/usr/include/aqbanking5/aqbanking/imexporter.h is in libaqbanking-dev 5.6.12-1+b1.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 668 669 670 671 672 673 674 675 676 677 678 679 680 681 682 683 684 685 686 687 688 689 690 691 692 693 694 695 696 697 698 699 700 701 702 703 704 705 706 707 708 709 710 711 712 713 714 715 716 717 718 719 720 721 722 723 724 725 726 727 728 729 730 731 732 733 734 735 736 737 738 739 740 741 742 743 744 745 746 747 748 749 750 751 752 753 754 755 756 757 758 759 760 761 762 763 764 765 766 767 768 769 770 771 772 773 774 775 776 777 778 779 780 781 782 783 784 785 786 787 788 789 790 791 792 793 794 795 796 797 798 799 800 801 802 803 804 805 806 807 808 809 810 811 812 813 814 815 816 817 818 819 820 821 822 823 824 825 826 827 828 829 830 831 832 833 834 835 836 837 838 839 840 841 842 843 844 845 846 847 848 849 850 851 852 853 854 855 856 857 858 859 860 861 862 863 864 865 866 867 868 869 870 871 872 873 874 875 876 877 878 879 880 881 882 883 884 885 886 887 888 889 890 891 892 893 894 895 896 897 898 899 900 901 902 903 904 905 906 907 908 909 910 911 912 913 914 915 916 917 918 919 920 921 922 923 924 925 926 927 928 929 930 931 932 933 934 935 936 937 938 939 940 941 942 943 944 945 946 947 948 949 950 951 952 953 954 955 956 957 958 959 960 961 962 963 964 965 966 967 968 969 970 971 972 973 974 975 976 977 978 979 980 981 982 983 984 985 986 987 988 989 990 991 992 993 994 995 996 997 998 999 1000 1001 1002 1003 1004 1005 1006 1007 1008 1009 1010 1011 1012 1013 1014 1015 1016 1017 1018 1019 1020 1021 1022 1023 1024 1025 1026 1027 1028 1029 1030 1031 1032 1033 1034 1035 1036 1037 1038 | /***************************************************************************
begin : Mon Mar 01 2004
copyright : (C) 2004-2010 by Martin Preuss
email : martin@libchipcard.de
***************************************************************************
* This file is part of the project "AqBanking". *
* Please see toplevel file COPYING of that project for license details. *
***************************************************************************/
#ifndef AQBANKING_IMEXPORTER_H
#define AQBANKING_IMEXPORTER_H
#include <gwenhywfar/inherit.h>
#include <gwenhywfar/syncio.h>
#include <gwenhywfar/db.h>
#include <gwenhywfar/types.h>
#include <gwenhywfar/dialog.h>
#include <aqbanking/error.h>
#include <aqbanking/accstatus.h>
/** @addtogroup G_AB_IMEXPORTER Generic Im- and Exporter
*
* @short Generic Financial Data Importer/Exporter
* <p>
* This group contains a generic importer/exporter.
* </p>
* <h2>Importing</h2>
* <p>
* When importing this group reads transactions and accounts from a
* given stream (in most cases a file) and stores them in a given
* importer context.
* </p>
* <p>
* The application can later browse through all transactions stored within the
* given context and import them into its own database as needed.
* </p>
*/
/*@{*/
/** @name Flags returned by @ref AB_ImExporter_GetFlags
*
*/
/*@{*/
/** This module supports the function @ref AB_ImExporter_GetEditProfileDialog */
#define AB_IMEXPORTER_FLAGS_GETPROFILEEDITOR_SUPPORTED 0x00000001
/*@}*/
#ifdef __cplusplus
extern "C" {
#endif
typedef struct AB_IMEXPORTER AB_IMEXPORTER;
GWEN_INHERIT_FUNCTION_LIB_DEFS(AB_IMEXPORTER, AQBANKING_API)
typedef struct AB_IMEXPORTER_CONTEXT AB_IMEXPORTER_CONTEXT;
typedef struct AB_IMEXPORTER_ACCOUNTINFO AB_IMEXPORTER_ACCOUNTINFO;
#ifdef __cplusplus
}
#endif
#include <aqbanking/banking.h>
#include <aqbanking/account.h>
#include <aqbanking/transaction.h>
#include <aqbanking/security.h>
#include <aqbanking/message.h>
#ifdef __cplusplus
extern "C" {
#endif
/** @name Virtual Functions for Backends
*
*/
/*@{*/
/**
* Reads the given stream and imports all data from it. This imported
* data is stored within the given context.
* @param ie pointer to the importer/exporter
* @param ctx import context
* @param bio stream to read from (usually a file, see
* @ref GWEN_BufferedIO_File_new)
* @param dbProfile configuration data for the importer. You can get this
* using @ref AB_Banking_GetImExporterProfiles.
*/
AQBANKING_API
int AB_ImExporter_Import(AB_IMEXPORTER *ie,
AB_IMEXPORTER_CONTEXT *ctx,
GWEN_SYNCIO *sio,
GWEN_DB_NODE *dbProfile);
/**
* Writes all data to the given stream.
* @param ie pointer to the importer/exporter
* @param ctx export context
* @param bio stream to write to (usually a file, see
* @ref GWEN_BufferedIO_File_new)
* @param dbProfile configuration data for the exporter. You can get this
* using @ref AB_Banking_GetImExporterProfiles.
*/
AQBANKING_API
int AB_ImExporter_Export(AB_IMEXPORTER *ie,
AB_IMEXPORTER_CONTEXT *ctx,
GWEN_SYNCIO *sio,
GWEN_DB_NODE *dbProfile);
/**
* This function should return a dialog (see @ref GWEN_DIALOG) which
* allows editing of the given profile.
* You can use @ref AB_ImExporter_GetFlags to determine beforehand whether
* this function is supported (look for
* @ref AB_IMEXPORTER_FLAGS_GETPROFILEEDITOR_SUPPORTED).
* (introduced in AqBanking 4.3.0)
*
* @param ie pointer to the importer/exporter
*
* @param dbProfile configuration data for the exporter. You can get this
* using @ref AB_Banking_GetImExporterProfiles.
*
* @param pDlg pointer to a dialog pointer (receives the created dialog if any)
*
* @return 0 on success, error code otherwise
*/
AQBANKING_API
int AB_ImExporter_GetEditProfileDialog(AB_IMEXPORTER *ie,
GWEN_DB_NODE *dbProfile,
const char *testFileName,
GWEN_DIALOG **pDlg);
/**
* This is just a convenience function for @ref AB_ImExporter_Import.
*/
AQBANKING_API
int AB_ImExporter_ImportFile(AB_IMEXPORTER *ie,
AB_IMEXPORTER_CONTEXT *ctx,
const char *fname,
GWEN_DB_NODE *dbProfile);
AQBANKING_API
int AB_ImExporter_ImportBuffer(AB_IMEXPORTER *ie,
AB_IMEXPORTER_CONTEXT *ctx,
GWEN_BUFFER *buf,
GWEN_DB_NODE *dbProfile);
AQBANKING_API
int AB_ImExporter_ExportToBuffer(AB_IMEXPORTER *ie,
AB_IMEXPORTER_CONTEXT *ctx,
GWEN_BUFFER *buf,
GWEN_DB_NODE *dbProfile);
AQBANKING_API
int AB_ImExporter_ExportToFile(AB_IMEXPORTER *ie,
AB_IMEXPORTER_CONTEXT *ctx,
const char *fname,
GWEN_DB_NODE *dbProfile);
/**
* This function checks whether the given importer supports the given file.
*/
AQBANKING_API
int AB_ImExporter_CheckFile(AB_IMEXPORTER *ie,
const char *fname);
/*@}*/
/**
* Returns the AB_BANKING object to which the im/exporter belongs.
*/
AQBANKING_API
AB_BANKING *AB_ImExporter_GetBanking(const AB_IMEXPORTER *ie);
/**
* Returns the name of the im/exporter.
*/
AQBANKING_API
const char *AB_ImExporter_GetName(const AB_IMEXPORTER *ie);
/**
* Returns the flags if this im/exporter which specify the supported
* features.
*/
AQBANKING_API
uint32_t AB_ImExporter_GetFlags(const AB_IMEXPORTER *ie);
/*@}*/ /* defgroup */
/** @defgroup AB_IMEXPORTER_CONTEXT Im- and Exporter Context
* @ingroup G_AB_IMEXPORTER
*
* A context contains the list of accounts for which data has been imported
* or which are to be exported.
* These accounts each contain a list of imported/to be exported
* transactions.
*/
/*@{*/
AQBANKING_API
AB_IMEXPORTER_CONTEXT *AB_ImExporterContext_new(void);
AQBANKING_API
void AB_ImExporterContext_free(AB_IMEXPORTER_CONTEXT *iec);
/**
* This function clears the context (e.g. removes all transactions etc).
* (introduced in AqBanking 4.3.0)
*/
AQBANKING_API
void AB_ImExporterContext_Clear(AB_IMEXPORTER_CONTEXT *iec);
/** Stores a complete import/export context to a GWEN_DB.
*
*/
AQBANKING_API
int AB_ImExporterContext_toDb(const AB_IMEXPORTER_CONTEXT *iec,
GWEN_DB_NODE *db);
/** Restores a complete import/export context from a GWEN_DB.
*
*/
AQBANKING_API
AB_IMEXPORTER_CONTEXT *AB_ImExporterContext_fromDb(GWEN_DB_NODE *db);
AQBANKING_API
int AB_ImExporterContext_ReadDb(AB_IMEXPORTER_CONTEXT *iec,
GWEN_DB_NODE *db);
/**
* Adds the content of the second context to the first one.
* Frees the second context.
*/
AQBANKING_API
void AB_ImExporterContext_AddContext(AB_IMEXPORTER_CONTEXT *iec,
AB_IMEXPORTER_CONTEXT *toAdd);
/**
* Takes over ownership of the given account info.
*/
AQBANKING_API
void AB_ImExporterContext_AddAccountInfo(AB_IMEXPORTER_CONTEXT *iec,
AB_IMEXPORTER_ACCOUNTINFO *iea);
/**
* Returns the first imported account (if any).
* The context remains the owner of the object returned.
*/
AQBANKING_API
AB_IMEXPORTER_ACCOUNTINFO*
AB_ImExporterContext_GetFirstAccountInfo(AB_IMEXPORTER_CONTEXT *iec);
/**
* Returns the next account data has been imported for.
* The context remains the owner of the object returned.
*/
AQBANKING_API
AB_IMEXPORTER_ACCOUNTINFO*
AB_ImExporterContext_GetNextAccountInfo(AB_IMEXPORTER_CONTEXT *iec);
/** Callback function type for
* AB_ImExporterContext_AccountInfoForEach()
*
* (As soon as a ACCOUNTINFO_LIST2 is declared in this header,
* this declaration can be removed.) */
typedef AB_IMEXPORTER_ACCOUNTINFO *
(AB_IMEXPORTER_ACCOUNTINFO_LIST2_FOREACH)(AB_IMEXPORTER_ACCOUNTINFO *element,
void *user_data);
/** Traverses the list of account infos in this context, calling
* the callback function 'func' on each list element. Traversal
* will stop when 'func' returns a non-NULL value, and the routine
* will return with that value. Otherwise the routine will return
* NULL.
*
* Note: Every list element is still owned by the
* IMEXPORTER_CONTEXT object, so it must neither be free'd nor
* stored anywhere outside the lifecyle of this
* AB_IMEXPORTER_CONTEXT.
*
* Available since aqbanking-1.9.7.
*
* @param iec The importer context.
* @param func The function to be called with each list element.
* @param user_data A pointer passed on to the function 'func'.
* @return The non-NULL pointer returned by 'func' as soon as it
* returns one. Otherwise (i.e. 'func' always returns NULL)
* returns NULL.
*/
AQBANKING_API
AB_IMEXPORTER_ACCOUNTINFO *
AB_ImExporterContext_AccountInfoForEach(AB_IMEXPORTER_CONTEXT *iec,
AB_IMEXPORTER_ACCOUNTINFO_LIST2_FOREACH func,
void* user_data);
/**
* Looks for account info for the given account. If it is not found 0 is
* returned.
* The context remains the owner of the returned object.
*/
AQBANKING_API
AB_IMEXPORTER_ACCOUNTINFO*
AB_ImExporterContext_FindAccountInfo(AB_IMEXPORTER_CONTEXT *iec,
const char *bankCode,
const char *accountNumber);
/**
* Looks for account info for the given account. If it is not found 0 is
* returned.
* This is for SEPA.
* The context remains the owner of the returned object.
*/
AQBANKING_API
AB_IMEXPORTER_ACCOUNTINFO*
AB_ImExporterContext_FindAccountInfoByIban(AB_IMEXPORTER_CONTEXT *iec, const char *iban);
/**
* Looks for account info for the given account. If there is none it will
* be created and added to the context.
* The context remains the owner of the returned object.
*/
AQBANKING_API
AB_IMEXPORTER_ACCOUNTINFO*
AB_ImExporterContext_GetAccountInfo(AB_IMEXPORTER_CONTEXT *iec,
const char *bankCode,
const char *accountNumber);
/**
* Looks for account info for the given account. If there is none it will
* be created and added to the context.
* This function is for SEPA.
* The context remains the owner of the returned object.
*/
AQBANKING_API
AB_IMEXPORTER_ACCOUNTINFO*
AB_ImExporterContext_GetAccountInfoByIban(AB_IMEXPORTER_CONTEXT *iec, const char *iban);
AQBANKING_API
int AB_ImExporterContext_GetAccountInfoCount(const AB_IMEXPORTER_CONTEXT *iec);
/**
* This is just a convenience function. It takes the bank code and
* account number from the account, and then calls
* @ref AB_ImExporterContext_GetAccountInfo and
* @ref AB_ImExporterAccountInfo_AddTransaction.
* If you want to add many transactions which are sorted by account
* it is much faster to avoid this function and to select the appropriate
* account info object once before importing all transactions for this
* particular account. This would save you the additional lookup before
* every transaction.
*/
AQBANKING_API
void AB_ImExporterContext_AddTransaction(AB_IMEXPORTER_CONTEXT *iec,
AB_TRANSACTION *t);
/**
* This is just a convenience function. It takes the bank code and
* account number from the account, and then calls
* @ref AB_ImExporterContext_GetAccountInfo and
* @ref AB_ImExporterAccountInfo_AddTransfer.
* If you want to add many transfers which are sorted by account
* it is much faster to avoid this function and to select the appropriate
* account info object once before importing all transactions for this
* particular account. This would save you the additional lookup before
* every transaction.
*/
AQBANKING_API
void AB_ImExporterContext_AddTransfer(AB_IMEXPORTER_CONTEXT *iec,
AB_TRANSACTION *t);
AQBANKING_API
void AB_ImExporterContext_AddStandingOrder(AB_IMEXPORTER_CONTEXT *iec,
AB_TRANSACTION *t);
AQBANKING_API
void AB_ImExporterContext_AddDatedTransfer(AB_IMEXPORTER_CONTEXT *iec,
AB_TRANSACTION *t);
/** @defgroup AB_IMEXPORTER_CONTEXT_SECURITY Securities
*
* These functions handle stocks, mutual funds etc.
*/
/**@{*/
AQBANKING_API
void AB_ImExporterContext_AddSecurity(AB_IMEXPORTER_CONTEXT *iec,
AB_SECURITY *sec);
AQBANKING_API
AB_SECURITY*
AB_ImExporterContext_GetFirstSecurity(AB_IMEXPORTER_CONTEXT *iec);
AQBANKING_API
AB_SECURITY*
AB_ImExporterContext_GetNextSecurity(AB_IMEXPORTER_CONTEXT *iec);
AQBANKING_API
AB_SECURITY*
AB_ImExporterContext_FindSecurity(AB_IMEXPORTER_CONTEXT *iec,
const char *nameSpace,
const char *id);
/**@}*/
/** @defgroup AB_IMEXPORTER_CONTEXT_MESSAGE Messages
*
* These functions handle messages received from a bank.
*/
/**@{*/
AQBANKING_API
void AB_ImExporterContext_AddMessage(AB_IMEXPORTER_CONTEXT *iec,
AB_MESSAGE *msg);
AQBANKING_API
AB_MESSAGE*
AB_ImExporterContext_GetFirstMessage(AB_IMEXPORTER_CONTEXT *iec);
AQBANKING_API
AB_MESSAGE*
AB_ImExporterContext_GetNextMessage(AB_IMEXPORTER_CONTEXT *iec);
/**@}*/
/** @defgroup AB_IMEXPORTER_CONTEXT_LOGS Logs
*
* These functions handle logs written by the backends.
* Such logs are meant to be read and interpreted by a human user.
*/
/**@{*/
AQBANKING_API
void AB_ImExporterContext_AddLog(AB_IMEXPORTER_CONTEXT *iec,
const char *s);
AQBANKING_API
const char *AB_ImExporterContext_GetLog(const AB_IMEXPORTER_CONTEXT *iec);
AQBANKING_API
void AB_ImExporterContext_ClearLog(AB_IMEXPORTER_CONTEXT *iec);
/**@}*/
/*@}*/ /* defgroup */
/** @defgroup AB_IMEXPORTER_ACCOUNTINFO Im- and Exporter Account Info
* @ingroup G_AB_IMEXPORTER
*
* Such a structure contains the list of imported/to be exported transactions
* for a given account.
*/
/*@{*/
/** @name Constructor, Destructor, Copy
*
*/
/*@{*/
AQBANKING_API
AB_IMEXPORTER_ACCOUNTINFO *AB_ImExporterAccountInfo_new(void);
AQBANKING_API
void AB_ImExporterAccountInfo_free(AB_IMEXPORTER_ACCOUNTINFO *iea);
AQBANKING_API
void AB_ImExporterAccountInfo_FillFromAccount(AB_IMEXPORTER_ACCOUNTINFO *iea,
const AB_ACCOUNT *a);
/**
* Returns a copy of the given account info. Please note that only the data
* is copied, internal pointers for
* @ref AB_ImExporterAccountInfo_GetNextTransaction et al are reset in the
* copy.
*/
AQBANKING_API
AB_IMEXPORTER_ACCOUNTINFO*
AB_ImExporterAccountInfo_dup(const AB_IMEXPORTER_ACCOUNTINFO *oldiea);
/*@}*/
/** @name Informational Functions
*
*/
/*@{*/
/**
* Bank code of the institute the account is at.
*/
AQBANKING_API
const char*
AB_ImExporterAccountInfo_GetBankCode(const AB_IMEXPORTER_ACCOUNTINFO *iea);
AQBANKING_API
void AB_ImExporterAccountInfo_SetBankCode(AB_IMEXPORTER_ACCOUNTINFO *iea,
const char *s);
/**
* Bank name of the institute the account is at.
*/
AQBANKING_API
const char*
AB_ImExporterAccountInfo_GetBankName(const AB_IMEXPORTER_ACCOUNTINFO *iea);
AQBANKING_API
void AB_ImExporterAccountInfo_SetBankName(AB_IMEXPORTER_ACCOUNTINFO *iea,
const char *s);
/**
* Account number.
* Used when importing data, not used when exporting.
*/
AQBANKING_API
const char*
AB_ImExporterAccountInfo_GetAccountNumber(const AB_IMEXPORTER_ACCOUNTINFO *iea);
AQBANKING_API
void AB_ImExporterAccountInfo_SetAccountNumber(AB_IMEXPORTER_ACCOUNTINFO *iea,
const char *s);
/**
* Account name.
* Used when importing data, not used when exporting.
*/
AQBANKING_API
const char*
AB_ImExporterAccountInfo_GetAccountName(const AB_IMEXPORTER_ACCOUNTINFO *iea);
AQBANKING_API
void AB_ImExporterAccountInfo_SetAccountName(AB_IMEXPORTER_ACCOUNTINFO *iea,
const char *s);
/**
* IBAN.
*/
AQBANKING_API
const char*
AB_ImExporterAccountInfo_GetIban(const AB_IMEXPORTER_ACCOUNTINFO *iea);
AQBANKING_API
void AB_ImExporterAccountInfo_SetIban(AB_IMEXPORTER_ACCOUNTINFO *iea,
const char *s);
/**
* BIC.
*/
AQBANKING_API
const char*
AB_ImExporterAccountInfo_GetBic(const AB_IMEXPORTER_ACCOUNTINFO *iea);
AQBANKING_API
void AB_ImExporterAccountInfo_SetBic(AB_IMEXPORTER_ACCOUNTINFO *iea,
const char *s);
/**
* Account currency
*/
AQBANKING_API
const char*
AB_ImExporterAccountInfo_GetCurrency(const AB_IMEXPORTER_ACCOUNTINFO *iea);
AQBANKING_API
void AB_ImExporterAccountInfo_SetCurrency(AB_IMEXPORTER_ACCOUNTINFO *iea,
const char *s);
/**
* Name of the account' owner.
* Used when importing data, not used when exporting.
*/
AQBANKING_API
const char*
AB_ImExporterAccountInfo_GetOwner(const AB_IMEXPORTER_ACCOUNTINFO *iea);
AQBANKING_API
void AB_ImExporterAccountInfo_SetOwner(AB_IMEXPORTER_ACCOUNTINFO *iea,
const char *s);
AQBANKING_API
AB_ACCOUNT_TYPE
AB_ImExporterAccountInfo_GetType(const AB_IMEXPORTER_ACCOUNTINFO *iea);
AQBANKING_API
void AB_ImExporterAccountInfo_SetType(AB_IMEXPORTER_ACCOUNTINFO *iea,
AB_ACCOUNT_TYPE t);
AQBANKING_API
const char*
AB_ImExporterAccountInfo_GetDescription(const AB_IMEXPORTER_ACCOUNTINFO *iea);
AQBANKING_API
void AB_ImExporterAccountInfo_SetDescription(AB_IMEXPORTER_ACCOUNTINFO *iea,
const char *s);
/**
* This field is not used by AqBanking but might be used by applications.
*/
AQBANKING_API
uint32_t AB_ImExporterAccountInfo_GetAccountId(const AB_IMEXPORTER_ACCOUNTINFO *iea);
AQBANKING_API
void AB_ImExporterAccountInfo_SetAccountId(AB_IMEXPORTER_ACCOUNTINFO *iea, uint32_t id);
/*@}*/
/** @name Transactions
*
*/
/*@{*/
/**
* Takes over ownership of the given transaction.
*/
AQBANKING_API
void AB_ImExporterAccountInfo_AddTransaction(AB_IMEXPORTER_ACCOUNTINFO *iea,
AB_TRANSACTION *t);
/**
* Returns the first transaction stored within the context.
* The context remains the owner of the object returned.
*/
AQBANKING_API
AB_TRANSACTION*
AB_ImExporterAccountInfo_GetFirstTransaction(AB_IMEXPORTER_ACCOUNTINFO *iea);
/**
* Returns the next transaction stored within the context.
* The context remains the owner of the object returned.
*/
AQBANKING_API
AB_TRANSACTION*
AB_ImExporterAccountInfo_GetNextTransaction(AB_IMEXPORTER_ACCOUNTINFO *iea);
/** Callback function type for
* AB_ImExporterAccountInfo_TransactionsForEach()
*
* (As soon as transaction.h declares this type itself, this
* declaration can be removed. Currently transaction.h only
* declares the LIST2 but not the CONSTLIST2, so we add this
* declaration here. If transaction.h declares the CONSTLIST2 as
* well, it wouldn't harm because this typedef is exactly
* identical to the one from the GWEN_CONSTLIST2_FUNCTION_LIB_DEFS
* macro.) */
typedef const AB_TRANSACTION *
(AB_TRANSACTION_CONSTLIST2_FOREACH)(const AB_TRANSACTION *element,
void *user_data);
/** Traverses the list of Transactions in this AccountInfo,
* calling the callback function 'func' on each list element.
* Traversal will stop when 'func' returns a non-NULL value, and
* the routine will return with that value. Otherwise the routine
* will return NULL.
*
* Note: It is not totally clear to me whether this function might
* interfere with AB_ImExporterAccountInfo_GetFirstTransaction() /
* AB_ImExporterAccountInfo_GetNextTransaction() . To be on the
* safe side, you should probably traverse the transaction list
* only *either* by those mentioned two functions *or* by this
* ForEach function, but you should probably not mix the access
* through this two methods. (This doubt be changed in future
* versions.)
*
* Available since aqbanking-1.9.7.
*
* @param list The list to traverse.
* @param func The function to be called with each list element.
* @param user_data A pointer passed on to the function 'func'.
* @return The non-NULL pointer returned by 'func' as soon as it
* returns one. Otherwise (i.e. 'func' always returns NULL)
* returns NULL.
*/
AQBANKING_API
const AB_TRANSACTION*
AB_ImExporterAccountInfo_TransactionsForEach(AB_IMEXPORTER_ACCOUNTINFO *iea,
AB_TRANSACTION_CONSTLIST2_FOREACH func,
void* user_data);
AQBANKING_API
int AB_ImExporterAccountInfo_GetTransactionCount(const AB_IMEXPORTER_ACCOUNTINFO *iea);
/**
* Clear all transactions stored in the given account info.
*/
AQBANKING_API
void AB_ImExporterAccountInfo_ClearTransactions(AB_IMEXPORTER_ACCOUNTINFO *iea);
/*@}*/
/** @name Account Status
*
*/
/*@{*/
/**
* Takes over ownership of the given account status.
*/
AQBANKING_API
void AB_ImExporterAccountInfo_AddAccountStatus(AB_IMEXPORTER_ACCOUNTINFO *iea,
AB_ACCOUNT_STATUS *st);
/**
* Returns the first account status stored within the context and removes
* it.
* The context remains the owner of the object returned.
*/
AQBANKING_API
AB_ACCOUNT_STATUS*
AB_ImExporterAccountInfo_GetFirstAccountStatus(AB_IMEXPORTER_ACCOUNTINFO *iea);
/**
* Returns the next account status stored within the context and removes it
* The context remains the owner of the object returned.
*/
AQBANKING_API
AB_ACCOUNT_STATUS*
AB_ImExporterAccountInfo_GetNextAccountStatus(AB_IMEXPORTER_ACCOUNTINFO *iea);
/*@}*/
/** @name Standing Orders
*
*/
/*@{*/
/**
* <p>
* Takes over ownership of the given standing order.
* </p>
* <p>
* This function is only used in the context of the function
* @ref AB_Banking_GatherResponses. It is especially not used when
* importing or exporting normal transactions via
* @ref AB_ImExporter_Import or @ref AB_ImExporter_Export unless explicitly
* stated otherwise (see documentation of the importer/exporter in question).
* </p>
*/
AQBANKING_API
void AB_ImExporterAccountInfo_AddStandingOrder(AB_IMEXPORTER_ACCOUNTINFO *iea,
AB_TRANSACTION *t);
/**
* <p>
* Returns the first standing order stored within the context.
* The context remains the owner of the object returned.
* </p>
* <p>
* This function is only used in the context of the function
* @ref AB_Banking_GatherResponses. It is especially not used when
* importing or exporting normal transactions via
* @ref AB_ImExporter_Import or @ref AB_ImExporter_Export unless explicitly
* stated otherwise (see documentation of the importer/exporter in question).
* </p>
*/
AQBANKING_API
AB_TRANSACTION*
AB_ImExporterAccountInfo_GetFirstStandingOrder(AB_IMEXPORTER_ACCOUNTINFO *iea);
/**
* <p>
* Returns the next standing order stored within the context.
* The context remains the owner of the object returned.
* </p>
* <p>
* This function is only used in the context of the function
* @ref AB_Banking_GatherResponses. It is especially not used when
* importing or exporting normal transactions via
* @ref AB_ImExporter_Import or @ref AB_ImExporter_Export unless explicitly
* stated otherwise (see documentation of the importer/exporter in question).
* </p>
*/
AQBANKING_API
AB_TRANSACTION*
AB_ImExporterAccountInfo_GetNextStandingOrder(AB_IMEXPORTER_ACCOUNTINFO *iea);
AQBANKING_API
int AB_ImExporterAccountInfo_GetStandingOrderCount(const AB_IMEXPORTER_ACCOUNTINFO *iea);
/*@}*/
/** @name Transfers
*
*/
/*@{*/
/**
* <p>
* Takes over ownership of the given transfer.
* </p>
* <p>
* The transfer can be any kind of transfer (like single transfer,
* debit note, EU transfer etc).
* </p>
* <p>
* This function is only used in the context of the function
* @ref AB_Banking_GatherResponses. It is especially not used when
* importing or exporting normal transactions via
* @ref AB_ImExporter_Import or @ref AB_ImExporter_Export unless explicitly
* stated otherwise (see documentation of the importer/exporter in question).
* </p>
*/
AQBANKING_API
void AB_ImExporterAccountInfo_AddTransfer(AB_IMEXPORTER_ACCOUNTINFO *iea,
AB_TRANSACTION *t);
/**
* <p>
* Returns the first transfer stored within the context.
* The context remains the owner of the object returned.
* The transfer can be any kind of transfer (like single transfer,
* debit note, EU transfer etc).
* </p>
* <p>
* This function is only used in the context of the function
* @ref AB_Banking_GatherResponses. It is especially not used when
* importing or exporting normal transactions via
* @ref AB_ImExporter_Import or @ref AB_ImExporter_Export unless explicitly
* stated otherwise (see documentation of the importer/exporter in question).
* </p>
*/
AQBANKING_API
AB_TRANSACTION*
AB_ImExporterAccountInfo_GetFirstTransfer(AB_IMEXPORTER_ACCOUNTINFO *iea);
/**
* <p>
* Returns the next transfer stored within the context.
* The context remains the owner of the object returned.
* The transfer can be any kind of transfer (like single transfer,
* debit note, EU transfer etc).
* </p>
* <p>
* This function is only used in the context of the function
* @ref AB_Banking_GatherResponses. It is especially not used when
* importing or exporting normal transactions via
* @ref AB_ImExporter_Import or @ref AB_ImExporter_Export unless explicitly
* stated otherwise (see documentation of the importer/exporter in question).
* </p>
*/
AQBANKING_API
AB_TRANSACTION*
AB_ImExporterAccountInfo_GetNextTransfer(AB_IMEXPORTER_ACCOUNTINFO *iea);
AQBANKING_API
int AB_ImExporterAccountInfo_GetTransferCount(const AB_IMEXPORTER_ACCOUNTINFO *iea);
/*@}*/
/** @name Dated Transfers
*
*/
/*@{*/
/**
* <p>
* Takes over ownership of the given dated transfer.
* </p>
* <p>
* This function is only used in the context of the function
* @ref AB_Banking_GatherResponses. It is especially not used when
* importing or exporting normal transactions via
* @ref AB_ImExporter_Import or @ref AB_ImExporter_Export unless explicitly
* stated otherwise (see documentation of the importer/exporter in question).
* </p>
*/
AQBANKING_API
void AB_ImExporterAccountInfo_AddDatedTransfer(AB_IMEXPORTER_ACCOUNTINFO *iea,
AB_TRANSACTION *t);
/**
* <p>
* Returns the first dated transfer stored within the context.
* The context remains the owner of the object returned.
* </p>
* <p>
* This function is only used in the context of the function
* @ref AB_Banking_GatherResponses. It is especially not used when
* importing or exporting normal transactions via
* @ref AB_ImExporter_Import or @ref AB_ImExporter_Export unless explicitly
* stated otherwise (see documentation of the importer/exporter in question).
* </p>
*/
AQBANKING_API
AB_TRANSACTION*
AB_ImExporterAccountInfo_GetFirstDatedTransfer(AB_IMEXPORTER_ACCOUNTINFO *iea);
/**
* <p>
* Returns the next dated transfer stored within the context.
* The context remains the owner of the object returned.
* </p>
* <p>
* This function is only used in the context of the function
* @ref AB_Banking_GatherResponses. It is especially not used when
* importing or exporting normal transactions via
* @ref AB_ImExporter_Import or @ref AB_ImExporter_Export unless explicitly
* stated otherwise (see documentation of the importer/exporter in question).
* </p>
*/
AQBANKING_API
AB_TRANSACTION*
AB_ImExporterAccountInfo_GetNextDatedTransfer(AB_IMEXPORTER_ACCOUNTINFO *iea);
AQBANKING_API
int AB_ImExporterAccountInfo_GetDatedTransferCount(const AB_IMEXPORTER_ACCOUNTINFO *iea);
/*@}*/
/** @name Noted Transactions
*
*/
/*@{*/
/**
* <p>
* Takes over ownership of the given noted transfer.
* </p>
* <p>
* This function is only used in the context of the function
* @ref AB_Banking_GatherResponses. It is especially not used when
* importing or exporting normal transactions via
* @ref AB_ImExporter_Import or @ref AB_ImExporter_Export unless explicitly
* stated otherwise (see documentation of the importer/exporter in question).
* </p>
*/
AQBANKING_API
void AB_ImExporterAccountInfo_AddNotedTransaction(AB_IMEXPORTER_ACCOUNTINFO *iea,
AB_TRANSACTION *t);
/**
* <p>
* Returns the first noted transfer stored within the context.
* The context remains the owner of the object returned.
* </p>
* <p>
* This function is only used in the context of the function
* @ref AB_Banking_GatherResponses. It is especially not used when
* importing or exporting normal transactions via
* @ref AB_ImExporter_Import or @ref AB_ImExporter_Export unless explicitly
* stated otherwise (see documentation of the importer/exporter in question).
* </p>
*/
AQBANKING_API
AB_TRANSACTION*
AB_ImExporterAccountInfo_GetFirstNotedTransaction(AB_IMEXPORTER_ACCOUNTINFO *iea);
/**
* <p>
* Returns the next noted transfer stored within the context.
* The context remains the owner of the object returned.
* </p>
* <p>
* This function is only used in the context of the function
* @ref AB_Banking_GatherResponses. It is especially not used when
* importing or exporting normal transactions via
* @ref AB_ImExporter_Import or @ref AB_ImExporter_Export unless explicitly
* stated otherwise (see documentation of the importer/exporter in question).
* </p>
*/
AQBANKING_API
AB_TRANSACTION*
AB_ImExporterAccountInfo_GetNextNotedTransaction(AB_IMEXPORTER_ACCOUNTINFO *iea);
AQBANKING_API
int AB_ImExporterAccountInfo_GetNotedTransactionCount(const AB_IMEXPORTER_ACCOUNTINFO *iea);
/*@}*/
/*@}*/ /* defgroup */
/** @name Helper Functions
*
* These functions are most likely used by implementations of im/exporters.
*/
/*@{*/
/**
* Transforms an UTF-8 string to a DTA string. Untranslateable characters
* are replaced by a space (chr 32).
*/
AQBANKING_API
void AB_ImExporter_Utf8ToDta(const char *p, int size, GWEN_BUFFER *buf);
/**
* Transforms a DTA string to an UTF-8 string.
*/
AQBANKING_API
void AB_ImExporter_DtaToUtf8(const char *p, int size, GWEN_BUFFER *buf);
AQBANKING_API
void AB_ImExporter_Iso8859_1ToUtf8(const char *p,
int size,
GWEN_BUFFER *buf);
AQBANKING_DEPRECATED AQBANKING_API
int AH_ImExporter_DbFromIso8859_1ToUtf8(GWEN_DB_NODE *db);
/**
* This function call @ref AB_ImExporter_Iso8859_1ToUtf8 on all char
* values in the given db.
*/
AQBANKING_API
int AB_ImExporter_DbFromIso8859_1ToUtf8(GWEN_DB_NODE *db);
AQBANKING_API
GWEN_TIME *AB_ImExporter_DateFromString(const char *p,
const char *tmpl,
int inUtc);
AQBANKING_API
int AB_ImExporterContext_WriteContext(const AB_IMEXPORTER_CONTEXT *ctx, const char *ctxFile);
/*@}*/
#ifdef __cplusplus
}
#endif
#endif /* AQBANKING_IMEXPORTER_H */
|