00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014 #ifndef AQBANKING_IMEXPORTER_H
00015 #define AQBANKING_IMEXPORTER_H
00016
00017 #include <gwenhywfar/inherit.h>
00018 #include <gwenhywfar/bufferedio.h>
00019 #include <gwenhywfar/db.h>
00020 #include <gwenhywfar/types.h>
00021 #include <aqbanking/error.h>
00022 #include <aqbanking/accstatus.h>
00023
00024
00042
00043 #ifdef __cplusplus
00044 extern "C" {
00045 #endif
00046
00047 typedef struct AB_IMEXPORTER AB_IMEXPORTER;
00048 GWEN_INHERIT_FUNCTION_LIB_DEFS(AB_IMEXPORTER, AQBANKING_API)
00049
00050 typedef struct AB_IMEXPORTER_CONTEXT AB_IMEXPORTER_CONTEXT;
00051 typedef struct AB_IMEXPORTER_ACCOUNTINFO AB_IMEXPORTER_ACCOUNTINFO;
00052 #ifdef __cplusplus
00053 }
00054 #endif
00055
00056
00057 #include <aqbanking/banking.h>
00058 #include <aqbanking/account.h>
00059 #include <aqbanking/transaction.h>
00060
00061
00062 #ifdef __cplusplus
00063 extern "C" {
00064 #endif
00065
00066
00071
00082 AQBANKING_API
00083 int AB_ImExporter_Import(AB_IMEXPORTER *ie,
00084 AB_IMEXPORTER_CONTEXT *ctx,
00085 GWEN_BUFFEREDIO *bio,
00086 GWEN_DB_NODE *dbProfile);
00087
00097 AQBANKING_API
00098 int AB_ImExporter_Export(AB_IMEXPORTER *ie,
00099 AB_IMEXPORTER_CONTEXT *ctx,
00100 GWEN_BUFFEREDIO *bio,
00101 GWEN_DB_NODE *dbProfile);
00102
00106 AQBANKING_API
00107 int AB_ImExporter_ImportFile(AB_IMEXPORTER *ie,
00108 AB_IMEXPORTER_CONTEXT *ctx,
00109 const char *fname,
00110 GWEN_DB_NODE *dbProfile);
00111
00115 AQBANKING_API
00116 int AB_ImExporter_CheckFile(AB_IMEXPORTER *ie,
00117 const char *fname);
00118
00125 AQBANKING_API
00126 AB_BANKING *AB_ImExporter_GetBanking(const AB_IMEXPORTER *ie);
00127
00131 AQBANKING_API
00132 const char *AB_ImExporter_GetName(const AB_IMEXPORTER *ie);
00133
00134
00135
00136
00145 AQBANKING_API
00146 AB_IMEXPORTER_CONTEXT *AB_ImExporterContext_new();
00147 AQBANKING_API
00148 void AB_ImExporterContext_free(AB_IMEXPORTER_CONTEXT *iec);
00149
00153 AQBANKING_API
00154 int AB_ImExporterContext_toDb(const AB_IMEXPORTER_CONTEXT *iec,
00155 GWEN_DB_NODE *db);
00156
00160 AQBANKING_API
00161 AB_IMEXPORTER_CONTEXT *AB_ImExporterContext_fromDb(GWEN_DB_NODE *db);
00162
00166 AQBANKING_API
00167 void AB_ImExporterContext_AddAccountInfo(AB_IMEXPORTER_CONTEXT *iec,
00168 AB_IMEXPORTER_ACCOUNTINFO *iea);
00169
00174 AQBANKING_API
00175 AB_IMEXPORTER_ACCOUNTINFO*
00176 AB_ImExporterContext_GetFirstAccountInfo(AB_IMEXPORTER_CONTEXT *iec);
00177
00182 AQBANKING_API
00183 AB_IMEXPORTER_ACCOUNTINFO*
00184 AB_ImExporterContext_GetNextAccountInfo(AB_IMEXPORTER_CONTEXT *iec);
00185
00191 AB_IMEXPORTER_ACCOUNTINFO*
00192 AB_ImExporterContext_FindAccountInfo(AB_IMEXPORTER_CONTEXT *iec,
00193 const char *bankCode,
00194 const char *accountNumber);
00195
00201 AQBANKING_API
00202 AB_IMEXPORTER_ACCOUNTINFO*
00203 AB_ImExporterContext_GetAccountInfo(AB_IMEXPORTER_CONTEXT *iec,
00204 const char *bankCode,
00205 const char *accountNumber);
00206
00218 AQBANKING_API
00219 void AB_ImExporterContext_AddTransaction(AB_IMEXPORTER_CONTEXT *iec,
00220 AB_TRANSACTION *t);
00221
00222
00233 AQBANKING_API
00234 AB_IMEXPORTER_ACCOUNTINFO *AB_ImExporterAccountInfo_new();
00235 AQBANKING_API
00236 void AB_ImExporterAccountInfo_free(AB_IMEXPORTER_ACCOUNTINFO *iea);
00237
00244 AQBANKING_API
00245 AB_IMEXPORTER_ACCOUNTINFO*
00246 AB_ImExporterAccountInfo_dup(const AB_IMEXPORTER_ACCOUNTINFO *oldiea);
00247
00248
00252 AQBANKING_API
00253 void AB_ImExporterAccountInfo_AddTransaction(AB_IMEXPORTER_ACCOUNTINFO *iea,
00254 AB_TRANSACTION *t);
00259 AQBANKING_API
00260 const AB_TRANSACTION*
00261 AB_ImExporterAccountInfo_GetFirstTransaction(AB_IMEXPORTER_ACCOUNTINFO *iea);
00262
00267 AQBANKING_API
00268 const AB_TRANSACTION*
00269 AB_ImExporterAccountInfo_GetNextTransaction(AB_IMEXPORTER_ACCOUNTINFO *iea);
00270
00271
00275 AQBANKING_API
00276 void AB_ImExporterAccountInfo_AddAccountStatus(AB_IMEXPORTER_ACCOUNTINFO *iea,
00277 AB_ACCOUNT_STATUS *st);
00278
00285 AQBANKING_API
00286 AB_ACCOUNT_STATUS*
00287 AB_ImExporterAccountInfo_GetFirstAccountStatus(AB_IMEXPORTER_ACCOUNTINFO *iea);
00288
00295 AQBANKING_API
00296 AB_ACCOUNT_STATUS*
00297 AB_ImExporterAccountInfo_GetNextAccountStatus(AB_IMEXPORTER_ACCOUNTINFO *iea);
00298
00299
00312 AQBANKING_API
00313 void AB_ImExporterAccountInfo_AddStandingOrder(AB_IMEXPORTER_ACCOUNTINFO *iea,
00314 AB_TRANSACTION *t);
00328 AQBANKING_API
00329 const AB_TRANSACTION*
00330 AB_ImExporterAccountInfo_GetFirstStandingOrder(AB_IMEXPORTER_ACCOUNTINFO *iea);
00331
00345 AQBANKING_API
00346 const AB_TRANSACTION*
00347 AB_ImExporterAccountInfo_GetNextStandingOrder(AB_IMEXPORTER_ACCOUNTINFO *iea);
00348
00349
00366 AQBANKING_API
00367 void AB_ImExporterAccountInfo_AddTransfer(AB_IMEXPORTER_ACCOUNTINFO *iea,
00368 AB_TRANSACTION *t);
00384 AQBANKING_API
00385 const AB_TRANSACTION*
00386 AB_ImExporterAccountInfo_GetFirstTransfer(AB_IMEXPORTER_ACCOUNTINFO *iea);
00387
00403 AQBANKING_API
00404 const AB_TRANSACTION*
00405 AB_ImExporterAccountInfo_GetNextTransfer(AB_IMEXPORTER_ACCOUNTINFO *iea);
00406
00407
00408
00421 AQBANKING_API
00422 void AB_ImExporterAccountInfo_AddDatedTransfer(AB_IMEXPORTER_ACCOUNTINFO *iea,
00423 AB_TRANSACTION *t);
00437 AQBANKING_API
00438 const AB_TRANSACTION*
00439 AB_ImExporterAccountInfo_GetFirstDatedTransfer(AB_IMEXPORTER_ACCOUNTINFO *iea);
00440
00454 AQBANKING_API
00455 const AB_TRANSACTION*
00456 AB_ImExporterAccountInfo_GetNextDatedTransfer(AB_IMEXPORTER_ACCOUNTINFO *iea);
00457
00458
00462 AQBANKING_API
00463 const char*
00464 AB_ImExporterAccountInfo_GetBankCode(const AB_IMEXPORTER_ACCOUNTINFO *iea);
00465 void AB_ImExporterAccountInfo_SetBankCode(AB_IMEXPORTER_ACCOUNTINFO *iea,
00466 const char *s);
00467
00471 AQBANKING_API
00472 const char*
00473 AB_ImExporterAccountInfo_GetBankName(const AB_IMEXPORTER_ACCOUNTINFO *iea);
00474 void AB_ImExporterAccountInfo_SetBankName(AB_IMEXPORTER_ACCOUNTINFO *iea,
00475 const char *s);
00476
00481 AQBANKING_API
00482 const char*
00483 AB_ImExporterAccountInfo_GetAccountNumber(const AB_IMEXPORTER_ACCOUNTINFO *iea);
00484 void AB_ImExporterAccountInfo_SetAccountNumber(AB_IMEXPORTER_ACCOUNTINFO *iea,
00485 const char *s);
00486
00491 AQBANKING_API
00492 const char*
00493 AB_ImExporterAccountInfo_GetAccountName(const AB_IMEXPORTER_ACCOUNTINFO *iea);
00494 void AB_ImExporterAccountInfo_SetAccountName(AB_IMEXPORTER_ACCOUNTINFO *iea,
00495 const char *s);
00496
00501 AQBANKING_API
00502 const char*
00503 AB_ImExporterAccountInfo_GetOwner(const AB_IMEXPORTER_ACCOUNTINFO *iea);
00504 AQBANKING_API
00505 void AB_ImExporterAccountInfo_SetOwner(AB_IMEXPORTER_ACCOUNTINFO *iea,
00506 const char *s);
00507
00508 AQBANKING_API
00509 AB_ACCOUNT_TYPE
00510 AB_ImExporterAccountInfo_GetType(const AB_IMEXPORTER_ACCOUNTINFO *iea);
00511 AQBANKING_API
00512 void AB_ImExporterAccountInfo_SetType(AB_IMEXPORTER_ACCOUNTINFO *iea,
00513 AB_ACCOUNT_TYPE t);
00514
00515 AQBANKING_API
00516 const char*
00517 AB_ImExporterAccountInfo_GetDescription(const AB_IMEXPORTER_ACCOUNTINFO *iea);
00518 AQBANKING_API
00519 void AB_ImExporterAccountInfo_SetDescription(AB_IMEXPORTER_ACCOUNTINFO *iea,
00520 const char *s);
00521
00534 AQBANKING_API
00535 void AB_ImExporter_Utf8ToDta(const char *p, int size, GWEN_BUFFER *buf);
00536
00540 AQBANKING_API
00541 void AB_ImExporter_DtaToUtf8(const char *p, int size, GWEN_BUFFER *buf);
00542
00543 AQBANKING_API
00544 void AB_ImExporter_Iso8859_1ToUtf8(const char *p,
00545 int size,
00546 GWEN_BUFFER *buf);
00547
00552 AQBANKING_API
00553 int AH_ImExporter_DbFromIso8859_1ToUtf8(GWEN_DB_NODE *db);
00554
00555 AQBANKING_API
00556 GWEN_TIME *AB_ImExporter_DateFromString(const char *p,
00557 const char *tmpl,
00558 int inUtc);
00559
00564 #ifdef __cplusplus
00565 }
00566 #endif
00567
00568
00570
00571
00572 #endif
00573
00574