00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028 #ifndef HBCITRANSACTION_H
00029 #define HBCITRANSACTION_H
00030
00036 #include <openhbci/dllimport.h>
00037 #include <openhbci/date.h>
00038 #include <openhbci/value.h>
00039 #include <openhbci/hbcistringlist.h>
00040 #include <openhbci/abstracttrans.h>
00041
00042 #ifdef __cplusplus
00043 #include <string>
00044 #include <list>
00045
00046 namespace HBCI {
00047
00081 class DLLIMPORT Transaction : AbstractTrans {
00082 private:
00083 unsigned int _tid;
00084 int _ourCountryCode;
00085 string _ourInstCode;
00086 string _ourId;
00087 string _ourSuffix;
00088 int _otherCountryCode;
00089 string _otherInstCode;
00090 string _otherId;
00091 string _otherSuffix;
00092 list<string> _otherName;
00093 string _primanota;
00094 string _transactionKey;
00095 string _customerReference;
00096 string _bankReference;
00097 int _transactionCode;
00098 list<string> _description;
00099 string _transactionText;
00100 Date _date;
00101 Date _valutaDate;
00102 Value _value;
00103 Value _originalValue;
00104 Value _charge;
00105
00106 public:
00107 Transaction();
00108 virtual ~Transaction();
00109
00113 virtual unsigned int id() const { return _tid;};
00115 virtual void setId(unsigned int i) { _tid=i;};
00121 int ourCountryCode() const { return _ourCountryCode;};
00123 void setOurCountryCode(int i) { _ourCountryCode=i;};
00124
00127 const string &ourBankCode() const { return _ourInstCode;};
00130 void setOurBankCode(const string &code) { _ourInstCode=code;};
00131
00135 const string &ourAccountId() const { return _ourId;};
00139 void setOurAccountId(const string &id) { _ourId=id;};
00140
00144 const string &ourSuffix() const { return _ourSuffix;};
00148 void setOurSuffix(const string &id) { _ourSuffix=id;};
00155 const Date &valutaDate() const { return _valutaDate;};
00158 void setValutaDate(const Date &d) { _valutaDate=d;};
00159
00163 const Date &date() const {return _date;};
00167 void setDate(const Date &d) { _date=d;};
00174 const Value &value() const { return _value;};
00177 void setValue(const Value &v) { _value=v;};
00184 const string &transactionKey() const { return _transactionKey;};
00187 void setTransactionKey(const string &s) { _transactionKey=s;};
00195 const string &customerReference() const { return _customerReference; };
00199 void setCustomerReference(const string &s) { _customerReference=s;};
00200
00203 const string &bankReference() const { return _bankReference; };
00206 void setBankReference(const string &s) { _bankReference=s;};
00215 const Value &originalValue() const { return _originalValue;};
00220 void setOriginalValue(const Value &v) { _originalValue=v;};
00221
00226 const Value &charge() const { return _charge;};
00231 void setCharge(const Value &v) { _charge=v;};
00234
00235
00245 int transactionCode() const { return _transactionCode;};
00253 void setTransactionCode(int c) { _transactionCode=c;};
00254
00257 const string &transactionText() const { return _transactionText;};
00260 void setTransactionText(const string &s) { _transactionText=s;};
00261
00264 const string &primanota() const { return _primanota;};
00267 void setPrimanota(const string &s) { _primanota=s;};
00268
00280 const list<string> &description() const { return _description;};
00295 void addDescription(const string &s) { _description.push_back(s);};
00302 int otherCountryCode() const { return _otherCountryCode;};
00305 void setOtherCountryCode(int i) { _otherCountryCode=i;};
00306
00309 const string &otherBankCode() const { return _otherInstCode;};
00312 void setOtherBankCode(const string &s) { _otherInstCode=s;};
00313
00316 const string &otherAccountId() const { return _otherId;};
00319 void setOtherAccountId(const string &s) { _otherId=s;};
00320
00325 const string &otherSuffix() const { return _otherSuffix;};
00330 void setOtherSuffix(const string &id) { _otherSuffix=id;};
00331
00333 const list<string> &otherName() const { return _otherName;};
00337 void addOtherName(const string &s) { _otherName.push_back(s);};
00344 bool operator==(const Transaction &tda) const;
00345
00346 };
00347
00348 }
00349
00352 typedef struct HBCI::Transaction HBCI_Transaction;
00353
00355 typedef list<HBCI::Transaction> list_HBCI_Transaction;
00357 typedef list<HBCI::Transaction>::const_iterator list_HBCI_Transaction_iter;
00358
00359 extern "C" {
00360 #else
00361 typedef struct HBCI_Transaction HBCI_Transaction;
00362 typedef struct list_HBCI_Transaction list_HBCI_Transaction;
00363 typedef struct list_HBCI_Transaction_iter list_HBCI_Transaction_iter;
00364 #endif
00365
00369 extern HBCI_Transaction * HBCI_Transaction_new();
00371 extern void HBCI_Transaction_delete(HBCI_Transaction *t);
00372
00376 extern int HBCI_Transaction_ourCountryCode(const HBCI_Transaction *t);
00377 extern void
00378 HBCI_Transaction_setOurCountryCode(HBCI_Transaction *t, int i);
00379
00388 extern const char *
00389 HBCI_Transaction_ourBankCode(const HBCI_Transaction *t);
00390 extern void
00391 HBCI_Transaction_setOurBankCode(HBCI_Transaction *t, const char *code);
00392
00396 extern const char *
00397 HBCI_Transaction_ourAccountId(const HBCI_Transaction *t);
00398 extern void
00399 HBCI_Transaction_setOurAccountId(HBCI_Transaction *t, const char *id);
00400
00404 extern const char *
00405 HBCI_Transaction_ourSuffix(const HBCI_Transaction *t);
00406 extern void
00407 HBCI_Transaction_setOurSuffix(HBCI_Transaction *t, const char *id);
00414 extern const HBCI_Date*
00415 HBCI_Transaction_valutaDate(const HBCI_Transaction *t);
00420 extern void
00421 HBCI_Transaction_setValutaDate(HBCI_Transaction *t, const HBCI_Date *d);
00422
00426 extern const HBCI_Date*
00427 HBCI_Transaction_date(const HBCI_Transaction *t);
00432 extern void
00433 HBCI_Transaction_setDate(HBCI_Transaction *t, const HBCI_Date *d);
00439 extern const HBCI_Value*
00440 HBCI_Transaction_value(const HBCI_Transaction *t);
00441
00446 extern void
00447 HBCI_Transaction_setValue(HBCI_Transaction *t, const HBCI_Value *v);
00454 extern const char *
00455 HBCI_Transaction_transactionKey(const HBCI_Transaction *t);
00456 extern void
00457 HBCI_Transaction_setTransactionKey(HBCI_Transaction *t, const char *s);
00462
00463
00464
00465 extern const char *
00466 HBCI_Transaction_customerReference(const HBCI_Transaction *t);
00467 extern void
00468 HBCI_Transaction_setCustomerReference(HBCI_Transaction *t, const char *s);
00469
00470
00471
00472 extern const char *
00473 HBCI_Transaction_bankReference(const HBCI_Transaction *t);
00474 extern void
00475 HBCI_Transaction_setBankReference(HBCI_Transaction *t, const char *s);
00478
00479
00485 extern int HBCI_Transaction_transactionCode(const HBCI_Transaction *t);
00486 extern void
00487 HBCI_Transaction_setTransactionCode(HBCI_Transaction *t, int c);
00488
00491 extern const char *
00492 HBCI_Transaction_transactionText(const HBCI_Transaction *t);
00493 extern void
00494 HBCI_Transaction_setTransactionText(HBCI_Transaction *t, const char *s);
00495
00498 extern const char *
00499 HBCI_Transaction_primanota(const HBCI_Transaction *t);
00500 extern void
00501 HBCI_Transaction_setPrimanota(HBCI_Transaction *t, const char *s);
00502
00506 extern const list_string*
00507 HBCI_Transaction_description(const HBCI_Transaction *t);
00508 extern void
00509 HBCI_Transaction_addDescription(HBCI_Transaction *t, const char *s);
00516 extern int
00517 HBCI_Transaction_otherCountryCode(const HBCI_Transaction *t);
00518 extern void
00519 HBCI_Transaction_setOtherCountryCode(HBCI_Transaction *t, int i);
00520
00523 extern const char *
00524 HBCI_Transaction_otherBankCode(const HBCI_Transaction *t);
00525 extern void
00526 HBCI_Transaction_setOtherBankCode(HBCI_Transaction *t, const char *s);
00527
00530 extern const char *
00531 HBCI_Transaction_otherAccountId(const HBCI_Transaction *t);
00532 extern void
00533 HBCI_Transaction_setOtherAccountId(HBCI_Transaction *t, const char *s);
00534
00539 extern const char *
00540 HBCI_Transaction_otherSuffix(const HBCI_Transaction *t);
00541 extern void
00542 HBCI_Transaction_setOtherSuffix(HBCI_Transaction *t, const char *id);
00543
00545 extern const list_string*
00546 HBCI_Transaction_otherName(const HBCI_Transaction *t);
00547 extern void
00548 HBCI_Transaction_addOtherName(HBCI_Transaction *t, const char *s);
00553 extern void list_HBCI_Transaction_delete(list_HBCI_Transaction *l);
00554 extern void
00555 list_HBCI_Transaction_iter_delete(list_HBCI_Transaction_iter *l);
00556 extern int list_HBCI_Transaction_size(const list_HBCI_Transaction *l);
00557 extern list_HBCI_Transaction_iter*
00558 list_HBCI_Transaction_begin(const list_HBCI_Transaction *l);
00559 extern list_HBCI_Transaction_iter*
00560 list_HBCI_Transaction_end(const list_HBCI_Transaction *l);
00561 extern const HBCI_Transaction*
00562 list_HBCI_Transaction_iter_get(const list_HBCI_Transaction_iter *l);
00563 extern void
00564 list_HBCI_Transaction_iter_next(list_HBCI_Transaction_iter *l);
00565 extern int
00566 list_HBCI_Transaction_iter_equal(const list_HBCI_Transaction_iter *l1,
00567 const list_HBCI_Transaction_iter *l2);
00569 typedef void *(*list_HBCI_Transaction_cb) (const HBCI_Transaction *trans,
00570 void *user_data);
00582 extern void *
00583 list_HBCI_Transaction_foreach (const list_HBCI_Transaction *list,
00584 list_HBCI_Transaction_cb func,
00585 void *user_data);
00588 #ifdef __cplusplus
00589 }
00590
00591 #endif
00592
00593
00594 #endif
00595
00596
00597