00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015 #ifndef AQBANKING_IMEXPORTER_H
00016 #define AQBANKING_IMEXPORTER_H
00017
00018 #include <gwenhywfar/inherit.h>
00019 #include <gwenhywfar/iolayer.h>
00020 #include <gwenhywfar/db.h>
00021 #include <gwenhywfar/types.h>
00022 #include <aqbanking/error.h>
00023 #include <aqbanking/accstatus.h>
00024
00025
00044
00045 #ifdef __cplusplus
00046 extern "C" {
00047 #endif
00048
00049 typedef struct AB_IMEXPORTER AB_IMEXPORTER;
00050 GWEN_INHERIT_FUNCTION_LIB_DEFS(AB_IMEXPORTER, AQBANKING_API)
00051
00052 typedef struct AB_IMEXPORTER_CONTEXT AB_IMEXPORTER_CONTEXT;
00053 typedef struct AB_IMEXPORTER_ACCOUNTINFO AB_IMEXPORTER_ACCOUNTINFO;
00054 #ifdef __cplusplus
00055 }
00056 #endif
00057
00058
00059 #include <aqbanking/banking.h>
00060 #include <aqbanking/account.h>
00061 #include <aqbanking/transaction.h>
00062 #include <aqbanking/security.h>
00063 #include <aqbanking/message.h>
00064
00065
00066 #ifdef __cplusplus
00067 extern "C" {
00068 #endif
00069
00070
00075
00086 AQBANKING_API
00087 int AB_ImExporter_Import(AB_IMEXPORTER *ie,
00088 AB_IMEXPORTER_CONTEXT *ctx,
00089 GWEN_IO_LAYER *io,
00090 GWEN_DB_NODE *dbProfile,
00091 uint32_t guiid);
00092
00102 AQBANKING_API
00103 int AB_ImExporter_Export(AB_IMEXPORTER *ie,
00104 AB_IMEXPORTER_CONTEXT *ctx,
00105 GWEN_IO_LAYER *io,
00106 GWEN_DB_NODE *dbProfile,
00107 uint32_t guiid);
00108
00112 AQBANKING_API
00113 int AB_ImExporter_ImportFile(AB_IMEXPORTER *ie,
00114 AB_IMEXPORTER_CONTEXT *ctx,
00115 const char *fname,
00116 GWEN_DB_NODE *dbProfile,
00117 uint32_t guiid);
00118
00119 AQBANKING_API
00120 int AB_ImExporter_ImportBuffer(AB_IMEXPORTER *ie,
00121 AB_IMEXPORTER_CONTEXT *ctx,
00122 GWEN_BUFFER *buf,
00123 GWEN_DB_NODE *dbProfile,
00124 uint32_t guiid);
00125
00126
00130 AQBANKING_API
00131 int AB_ImExporter_CheckFile(AB_IMEXPORTER *ie,
00132 const char *fname,
00133 uint32_t guiid);
00134
00141 AQBANKING_API
00142 AB_BANKING *AB_ImExporter_GetBanking(const AB_IMEXPORTER *ie);
00143
00147 AQBANKING_API
00148 const char *AB_ImExporter_GetName(const AB_IMEXPORTER *ie);
00149
00150
00152
00153
00154
00164 AQBANKING_API
00165 AB_IMEXPORTER_CONTEXT *AB_ImExporterContext_new();
00166
00167 AQBANKING_API
00168 void AB_ImExporterContext_free(AB_IMEXPORTER_CONTEXT *iec);
00169
00173 AQBANKING_API
00174 int AB_ImExporterContext_toDb(const AB_IMEXPORTER_CONTEXT *iec,
00175 GWEN_DB_NODE *db);
00176
00180 AQBANKING_API
00181 AB_IMEXPORTER_CONTEXT *AB_ImExporterContext_fromDb(GWEN_DB_NODE *db);
00182
00183
00184 AQBANKING_API
00185 int AB_ImExporterContext_ReadDb(AB_IMEXPORTER_CONTEXT *iec,
00186 GWEN_DB_NODE *db);
00187
00188
00193 AQBANKING_API
00194 void AB_ImExporterContext_AddContext(AB_IMEXPORTER_CONTEXT *iec,
00195 AB_IMEXPORTER_CONTEXT *toAdd);
00196
00200 AQBANKING_API
00201 void AB_ImExporterContext_AddAccountInfo(AB_IMEXPORTER_CONTEXT *iec,
00202 AB_IMEXPORTER_ACCOUNTINFO *iea);
00203
00208 AQBANKING_API
00209 AB_IMEXPORTER_ACCOUNTINFO*
00210 AB_ImExporterContext_GetFirstAccountInfo(AB_IMEXPORTER_CONTEXT *iec);
00211
00216 AQBANKING_API
00217 AB_IMEXPORTER_ACCOUNTINFO*
00218 AB_ImExporterContext_GetNextAccountInfo(AB_IMEXPORTER_CONTEXT *iec);
00219
00225 typedef AB_IMEXPORTER_ACCOUNTINFO *
00226 (AB_IMEXPORTER_ACCOUNTINFO_LIST2_FOREACH)(AB_IMEXPORTER_ACCOUNTINFO *element,
00227 void *user_data);
00228
00249 AQBANKING_API
00250 AB_IMEXPORTER_ACCOUNTINFO *
00251 AB_ImExporterContext_AccountInfoForEach(AB_IMEXPORTER_CONTEXT *iec,
00252 AB_IMEXPORTER_ACCOUNTINFO_LIST2_FOREACH func,
00253 void* user_data);
00254
00260 AQBANKING_API
00261 AB_IMEXPORTER_ACCOUNTINFO*
00262 AB_ImExporterContext_FindAccountInfo(AB_IMEXPORTER_CONTEXT *iec,
00263 const char *bankCode,
00264 const char *accountNumber);
00265
00271 AQBANKING_API
00272 AB_IMEXPORTER_ACCOUNTINFO*
00273 AB_ImExporterContext_GetAccountInfo(AB_IMEXPORTER_CONTEXT *iec,
00274 const char *bankCode,
00275 const char *accountNumber);
00276
00288 AQBANKING_API
00289 void AB_ImExporterContext_AddTransaction(AB_IMEXPORTER_CONTEXT *iec,
00290 AB_TRANSACTION *t);
00291
00292
00293
00299 AQBANKING_API
00300 void AB_ImExporterContext_AddSecurity(AB_IMEXPORTER_CONTEXT *iec,
00301 AB_SECURITY *sec);
00302
00303 AQBANKING_API
00304 AB_SECURITY*
00305 AB_ImExporterContext_GetFirstSecurity(AB_IMEXPORTER_CONTEXT *iec);
00306
00307 AQBANKING_API
00308 AB_SECURITY*
00309 AB_ImExporterContext_GetNextSecurity(AB_IMEXPORTER_CONTEXT *iec);
00310
00311 AQBANKING_API
00312 AB_SECURITY*
00313 AB_ImExporterContext_FindSecurity(AB_IMEXPORTER_CONTEXT *iec,
00314 const char *nameSpace,
00315 const char *id);
00316
00326 AQBANKING_API
00327 void AB_ImExporterContext_AddMessage(AB_IMEXPORTER_CONTEXT *iec,
00328 AB_MESSAGE *msg);
00329
00330 AQBANKING_API
00331 AB_MESSAGE*
00332 AB_ImExporterContext_GetFirstMessage(AB_IMEXPORTER_CONTEXT *iec);
00333
00334 AQBANKING_API
00335 AB_MESSAGE*
00336 AB_ImExporterContext_GetNextMessage(AB_IMEXPORTER_CONTEXT *iec);
00337
00341
00342
00343
00344
00345
00353
00358 AQBANKING_API
00359 AB_IMEXPORTER_ACCOUNTINFO *AB_ImExporterAccountInfo_new();
00360 AQBANKING_API
00361 void AB_ImExporterAccountInfo_free(AB_IMEXPORTER_ACCOUNTINFO *iea);
00362
00369 AQBANKING_API
00370 AB_IMEXPORTER_ACCOUNTINFO*
00371 AB_ImExporterAccountInfo_dup(const AB_IMEXPORTER_ACCOUNTINFO *oldiea);
00382 AQBANKING_API
00383 const char*
00384 AB_ImExporterAccountInfo_GetBankCode(const AB_IMEXPORTER_ACCOUNTINFO *iea);
00385 AQBANKING_API
00386 void AB_ImExporterAccountInfo_SetBankCode(AB_IMEXPORTER_ACCOUNTINFO *iea,
00387 const char *s);
00388
00392 AQBANKING_API
00393 const char*
00394 AB_ImExporterAccountInfo_GetBankName(const AB_IMEXPORTER_ACCOUNTINFO *iea);
00395 AQBANKING_API
00396 void AB_ImExporterAccountInfo_SetBankName(AB_IMEXPORTER_ACCOUNTINFO *iea,
00397 const char *s);
00398
00403 AQBANKING_API
00404 const char*
00405 AB_ImExporterAccountInfo_GetAccountNumber(const AB_IMEXPORTER_ACCOUNTINFO *iea);
00406 AQBANKING_API
00407 void AB_ImExporterAccountInfo_SetAccountNumber(AB_IMEXPORTER_ACCOUNTINFO *iea,
00408 const char *s);
00409
00414 AQBANKING_API
00415 const char*
00416 AB_ImExporterAccountInfo_GetAccountName(const AB_IMEXPORTER_ACCOUNTINFO *iea);
00417 AQBANKING_API
00418 void AB_ImExporterAccountInfo_SetAccountName(AB_IMEXPORTER_ACCOUNTINFO *iea,
00419 const char *s);
00420
00424 AQBANKING_API
00425 const char*
00426 AB_ImExporterAccountInfo_GetIban(const AB_IMEXPORTER_ACCOUNTINFO *iea);
00427 AQBANKING_API
00428 void AB_ImExporterAccountInfo_SetIban(AB_IMEXPORTER_ACCOUNTINFO *iea,
00429 const char *s);
00430
00431
00435 AQBANKING_API
00436 const char*
00437 AB_ImExporterAccountInfo_GetBic(const AB_IMEXPORTER_ACCOUNTINFO *iea);
00438 AQBANKING_API
00439 void AB_ImExporterAccountInfo_SetBic(AB_IMEXPORTER_ACCOUNTINFO *iea,
00440 const char *s);
00441
00445 AQBANKING_API
00446 const char*
00447 AB_ImExporterAccountInfo_GetCurrency(const AB_IMEXPORTER_ACCOUNTINFO *iea);
00448
00449 AQBANKING_API
00450 void AB_ImExporterAccountInfo_SetCurrency(AB_IMEXPORTER_ACCOUNTINFO *iea,
00451 const char *s);
00452
00453
00458 AQBANKING_API
00459 const char*
00460 AB_ImExporterAccountInfo_GetOwner(const AB_IMEXPORTER_ACCOUNTINFO *iea);
00461 AQBANKING_API
00462 void AB_ImExporterAccountInfo_SetOwner(AB_IMEXPORTER_ACCOUNTINFO *iea,
00463 const char *s);
00464
00465 AQBANKING_API
00466 AB_ACCOUNT_TYPE
00467 AB_ImExporterAccountInfo_GetType(const AB_IMEXPORTER_ACCOUNTINFO *iea);
00468 AQBANKING_API
00469 void AB_ImExporterAccountInfo_SetType(AB_IMEXPORTER_ACCOUNTINFO *iea,
00470 AB_ACCOUNT_TYPE t);
00471
00472 AQBANKING_API
00473 const char*
00474 AB_ImExporterAccountInfo_GetDescription(const AB_IMEXPORTER_ACCOUNTINFO *iea);
00475 AQBANKING_API
00476 void AB_ImExporterAccountInfo_SetDescription(AB_IMEXPORTER_ACCOUNTINFO *iea,
00477 const char *s);
00489 AQBANKING_API
00490 void AB_ImExporterAccountInfo_AddTransaction(AB_IMEXPORTER_ACCOUNTINFO *iea,
00491 AB_TRANSACTION *t);
00496 AQBANKING_API
00497 const AB_TRANSACTION*
00498 AB_ImExporterAccountInfo_GetFirstTransaction(AB_IMEXPORTER_ACCOUNTINFO *iea);
00499
00504 AQBANKING_API
00505 const AB_TRANSACTION*
00506 AB_ImExporterAccountInfo_GetNextTransaction(AB_IMEXPORTER_ACCOUNTINFO *iea);
00507
00518 typedef const AB_TRANSACTION *
00519 (AB_TRANSACTION_CONSTLIST2_FOREACH)(const AB_TRANSACTION *element,
00520 void *user_data);
00521
00546 AQBANKING_API
00547 const AB_TRANSACTION *
00548 AB_ImExporterAccountInfo_TransactionsForEach(AB_IMEXPORTER_ACCOUNTINFO *iea,
00549 AB_TRANSACTION_CONSTLIST2_FOREACH func,
00550 void* user_data);
00561 AQBANKING_API
00562 void AB_ImExporterAccountInfo_AddAccountStatus(AB_IMEXPORTER_ACCOUNTINFO *iea,
00563 AB_ACCOUNT_STATUS *st);
00564
00572 AQBANKING_API
00573 AB_ACCOUNT_STATUS*
00574 AB_ImExporterAccountInfo_GetFirstAccountStatus(AB_IMEXPORTER_ACCOUNTINFO *iea);
00575
00582 AQBANKING_API
00583 AB_ACCOUNT_STATUS*
00584 AB_ImExporterAccountInfo_GetNextAccountStatus(AB_IMEXPORTER_ACCOUNTINFO *iea);
00592
00605 AQBANKING_API
00606 void AB_ImExporterAccountInfo_AddStandingOrder(AB_IMEXPORTER_ACCOUNTINFO *iea,
00607 AB_TRANSACTION *t);
00621 AQBANKING_API
00622 const AB_TRANSACTION*
00623 AB_ImExporterAccountInfo_GetFirstStandingOrder(AB_IMEXPORTER_ACCOUNTINFO *iea);
00624
00638 AQBANKING_API
00639 const AB_TRANSACTION*
00640 AB_ImExporterAccountInfo_GetNextStandingOrder(AB_IMEXPORTER_ACCOUNTINFO *iea);
00664 AQBANKING_API
00665 void AB_ImExporterAccountInfo_AddTransfer(AB_IMEXPORTER_ACCOUNTINFO *iea,
00666 AB_TRANSACTION *t);
00682 AQBANKING_API
00683 const AB_TRANSACTION*
00684 AB_ImExporterAccountInfo_GetFirstTransfer(AB_IMEXPORTER_ACCOUNTINFO *iea);
00685
00701 AQBANKING_API
00702 const AB_TRANSACTION*
00703 AB_ImExporterAccountInfo_GetNextTransfer(AB_IMEXPORTER_ACCOUNTINFO *iea);
00724 AQBANKING_API
00725 void AB_ImExporterAccountInfo_AddDatedTransfer(AB_IMEXPORTER_ACCOUNTINFO *iea,
00726 AB_TRANSACTION *t);
00740 AQBANKING_API
00741 const AB_TRANSACTION*
00742 AB_ImExporterAccountInfo_GetFirstDatedTransfer(AB_IMEXPORTER_ACCOUNTINFO *iea);
00743
00757 AQBANKING_API
00758 const AB_TRANSACTION*
00759 AB_ImExporterAccountInfo_GetNextDatedTransfer(AB_IMEXPORTER_ACCOUNTINFO *iea);
00779 AQBANKING_API
00780 void AB_ImExporterAccountInfo_AddNotedTransaction(AB_IMEXPORTER_ACCOUNTINFO *iea,
00781 AB_TRANSACTION *t);
00795 AQBANKING_API
00796 const AB_TRANSACTION*
00797 AB_ImExporterAccountInfo_GetFirstNotedTransaction(AB_IMEXPORTER_ACCOUNTINFO *iea);
00798
00812 AQBANKING_API
00813 const AB_TRANSACTION*
00814 AB_ImExporterAccountInfo_GetNextNotedTransaction(AB_IMEXPORTER_ACCOUNTINFO *iea);
00819
00820
00821
00831 AQBANKING_API
00832 void AB_ImExporter_Utf8ToDta(const char *p, int size, GWEN_BUFFER *buf);
00833
00837 AQBANKING_API
00838 void AB_ImExporter_DtaToUtf8(const char *p, int size, GWEN_BUFFER *buf);
00839
00840 AQBANKING_API
00841 void AB_ImExporter_Iso8859_1ToUtf8(const char *p,
00842 int size,
00843 GWEN_BUFFER *buf);
00844
00845 AQBANKING_DEPRECATED AQBANKING_API
00846 int AH_ImExporter_DbFromIso8859_1ToUtf8(GWEN_DB_NODE *db);
00847
00852 AQBANKING_API
00853 int AB_ImExporter_DbFromIso8859_1ToUtf8(GWEN_DB_NODE *db);
00854
00855 AQBANKING_API
00856 GWEN_TIME *AB_ImExporter_DateFromString(const char *p,
00857 const char *tmpl,
00858 int inUtc);
00859
00864 #ifdef __cplusplus
00865 }
00866 #endif
00867
00868
00869
00870
00871 #endif
00872
00873