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
00036 #ifndef HBCIBANK_H
00037 #define HBCIBANK_H
00038
00039 #ifdef __cplusplus
00040 #include <string>
00041 #include <list>
00042 using namespace std;
00043 #endif
00044
00045 #include <openhbci/dllimport.h>
00046 #include <openhbci/pointer.h>
00047 #ifdef __cplusplus
00048 namespace HBCI {
00049 class Bank;
00050 };
00054 typedef struct HBCI::Bank HBCI_Bank;
00057 typedef list<HBCI::Pointer<HBCI::Bank> > list_HBCI_Bank;
00060 typedef list<HBCI::Pointer<HBCI::Bank> >::const_iterator list_HBCI_Bank_iter;
00061 #else
00062 typedef struct HBCI_Bank HBCI_Bank;
00063 typedef struct list_HBCI_Bank list_HBCI_Bank;
00064 typedef struct list_HBCI_Bank_iter list_HBCI_Bank_iter;
00065 #endif
00066
00067 #include <openhbci/hbci.h>
00068 #include <openhbci/date.h>
00069 #include <openhbci/account.h>
00070 #include <openhbci/user.h>
00071 #include <openhbci/listwrappers.h>
00072 #include <openhbci/bpdjob.h>
00073
00074
00075 #ifdef __cplusplus
00076 namespace HBCI {
00086 class DLLIMPORT instituteMessage {
00087 private:
00088 Date _date;
00089 Time _time;
00090 string _subject;
00091 string _text;
00092 int _country;
00093 string _instituteCode;
00094 bool _read;
00095
00096 public:
00097 instituteMessage();
00098 ~instituteMessage();
00099
00100 const bool operator==(const instituteMessage &msg);
00101
00103 const Date &date() const { return _date;};
00105 void setDate(const Date &d) { _date=d;};
00106
00108 const Time &time() const { return _time;};
00110 void setTime(const Time &t) { _time=t;};
00111
00113 const string &subject() const { return _subject;};
00115 void setSubject(const string &t) { _subject=t;};
00116
00118 const string &text() const { return _text;};
00120 void setText(const string &t) { _text=t;};
00121
00132 int country() const { return _country;};
00135 void setCountry(int i) { _country=i;};
00136
00147 const string &bankCode() const { return _instituteCode;};
00150 void setBankCode(const string &s) { _instituteCode=s;};
00151
00156 bool read() const { return _read;};
00159 void setRead(bool b) { _read=b;};
00160 };
00161 }
00162 #endif
00163
00164 #ifdef __cplusplus
00165 typedef struct HBCI::instituteMessage HBCI_instituteMessage;
00166 typedef list<HBCI::instituteMessage> list_HBCI_instituteMessage;
00167 #else
00168 typedef struct HBCI_instituteMessage HBCI_instituteMessage;
00169 typedef struct list_HBCI_instituteMessage list_HBCI_instituteMessage;
00170 #endif
00171
00172
00173 #ifdef __cplusplus
00174 namespace HBCI {
00195 class DLLIMPORT Bank {
00196 public:
00197 Bank();
00198 virtual ~Bank();
00199
00202 virtual const Hbci *hbci() const =0;
00203
00216 virtual int countryCode() const =0;
00217
00222 virtual void setCountryCode(int i)=0;
00223
00227 virtual const string &bankCode() const =0;
00228
00232 virtual void setBankCode(const string &s)=0;
00244 virtual const string &name() const =0;
00245
00255 virtual const list<instituteMessage> &messages() const =0;
00256
00260 virtual void deleteInstituteMessage(const instituteMessage &msg)=0;
00272 virtual const list<Pointer<Account> > &accounts() const =0;
00273
00278 virtual const list<Pointer<User> > &users() const =0;
00279
00287 virtual Pointer<User>
00288 findUser(const string &userid) const =0;
00289
00297 virtual Pointer<Customer>
00298 findCustomer(const string &id) const =0;
00299
00308 virtual Pointer<Account>
00309 findAccount(const string &nr,
00310 const string &subid="") const =0;
00328 virtual void addAccount(Pointer<Account> a)=0;
00329
00345 virtual void removeAccount(Pointer<Account> a)=0;
00346
00354 virtual void addUser(Pointer<User> c)=0;
00355
00370 virtual void removeUser(Pointer<User> c)=0;
00386 virtual const string &addr() const =0;
00394 virtual void setAddr(const string &s)=0;
00395
00400 virtual int type() const =0;
00405 virtual void setType(int i)=0;
00406
00413 virtual const string &suffix() const =0;
00418 virtual void setSuffix(const string &s)=0;
00431 virtual int language() const =0;
00434 virtual void setLanguage(int l)=0;
00435
00437 virtual const list<int> &languages() const =0;
00451 virtual int hbciVersion() const =0;
00452
00456 virtual void setHbciVersion(int v)=0;
00457
00467 virtual int bpdVersion() const = 0;
00468
00476 virtual void setBPDVersion(int i) = 0;
00477
00481 virtual list<int> supportedVersions() const =0;
00482
00491 virtual const bpdJob *findJob(const string &segname,
00492 int minv=0, int maxv=9999) const =0;
00494 };
00495 }
00496 #endif
00497
00498 #ifdef __cplusplus
00499 extern "C" {
00500 #endif
00501
00507
00514 extern const HBCI_Hbci *HBCI_Bank_hbci(const HBCI_Bank *h);
00527 extern int HBCI_Bank_countryCode(const HBCI_Bank *h);
00535 extern void HBCI_Bank_setCountryCode(HBCI_Bank *h, int i);
00536
00542 extern const char *HBCI_Bank_bankCode(const HBCI_Bank *h);
00549 extern void HBCI_Bank_setBankCode(HBCI_Bank *h, const char *s);
00560 extern const char *HBCI_Bank_name(const HBCI_Bank *h);
00561
00570 extern const list_HBCI_instituteMessage *
00571 HBCI_Bank_messages(const HBCI_Bank *h);
00580 extern const list_HBCI_Account *HBCI_Bank_accounts(const HBCI_Bank *h);
00585 extern const list_HBCI_User *HBCI_Bank_users(const HBCI_Bank *h);
00593 extern const HBCI_User *HBCI_Bank_findUser(const HBCI_Bank *h,
00594 const char *userid);
00602 extern const HBCI_Account *HBCI_Bank_findAccount(const HBCI_Bank *h,
00603 const char *nr);
00614 extern const HBCI_Account *HBCI_Bank_findAccountWSuf(const HBCI_Bank *h,
00615 const char *nr,
00616 const char *suf);
00639 extern HBCI_Error *HBCI_Bank_addAccount(HBCI_Bank *h,
00640 HBCI_Account *a,
00641 int autoDelete);
00657 extern HBCI_Error *HBCI_Bank_addUser(HBCI_Bank *h,
00658 HBCI_User *c,
00659 int autoDelete);
00673 extern const char *HBCI_Bank_addr(const HBCI_Bank *h);
00683 extern void HBCI_Bank_setAddr(HBCI_Bank *h, const char *s);
00689 extern int HBCI_Bank_type(const HBCI_Bank *h);
00696 extern void HBCI_Bank_setType(HBCI_Bank *h, int i);
00707 extern int HBCI_Bank_hbciVersion(const HBCI_Bank *h);
00711 extern void HBCI_Bank_setHbciVersion(HBCI_Bank *h, int v);
00712
00722 extern int HBCI_Bank_bpdVersion(const HBCI_Bank *h);
00730 extern void HBCI_Bank_setBPDVersion(HBCI_Bank *h, int i);
00734 extern list_int *HBCI_Bank_supportedVersions(const HBCI_Bank *h);
00735
00743 extern const HBCI_bpdJob *HBCI_Bank_findJob(const HBCI_Bank *h,
00744 const char *segname);
00753 extern const HBCI_bpdJob *HBCI_Bank_findJob_minv(const HBCI_Bank *h,
00754 const char *segname,
00755 int minv);
00765 extern const HBCI_bpdJob *HBCI_Bank_findJob_maxv(const HBCI_Bank *h,
00766 const char *segname,
00767 int minv, int maxv);
00779 extern void list_HBCI_Bank_delete(list_HBCI_Bank *l);
00780 extern void list_HBCI_Bank_iter_delete(list_HBCI_Bank_iter *l);
00781 extern int list_HBCI_Bank_size(const list_HBCI_Bank *l);
00782 extern list_HBCI_Bank_iter* list_HBCI_Bank_begin(const list_HBCI_Bank *l);
00783 extern list_HBCI_Bank_iter* list_HBCI_Bank_end(const list_HBCI_Bank *l);
00784 extern const HBCI_Bank*
00785 list_HBCI_Bank_iter_get(const list_HBCI_Bank_iter *l);
00786 extern void list_HBCI_Bank_iter_next(list_HBCI_Bank_iter *l);
00787 extern int list_HBCI_Bank_iter_equal(const list_HBCI_Bank_iter *l1,
00788 const list_HBCI_Bank_iter *l2);
00790 typedef void *(*list_HBCI_Bank_cb) (const HBCI_Bank *bank,
00791 void *user_data);
00804 extern void *list_HBCI_Bank_foreach (const list_HBCI_Bank *list,
00805 list_HBCI_Bank_cb func,
00806 void *user_data);
00809
00810
00814 extern const HBCI_Date *
00815 HBCI_instituteMessage_date(const HBCI_instituteMessage *m);
00816
00818 extern const HBCI_Time *
00819 HBCI_instituteMessage_time(const HBCI_instituteMessage *m);
00820
00822 extern const char *
00823 HBCI_instituteMessage_subject(const HBCI_instituteMessage *m);
00824
00826 extern const char *
00827 HBCI_instituteMessage_text(const HBCI_instituteMessage *m);
00828
00831 extern int HBCI_instituteMessage_country(const HBCI_instituteMessage *m);
00832
00835 extern const char *
00836 HBCI_instituteMessage_bankCode(const HBCI_instituteMessage *m);
00837
00842 extern int HBCI_instituteMessage_read(const HBCI_instituteMessage *m);
00845 extern void HBCI_instituteMessage_setRead(HBCI_instituteMessage *m, int b);
00857 typedef void *(*list_HBCI_instituteMessage_cb)
00858 (HBCI_instituteMessage *msg,
00859 void *user_data);
00872 extern void *
00873 list_HBCI_instituteMessage_foreach (const list_HBCI_instituteMessage *list,
00874 list_HBCI_instituteMessage_cb func,
00875 void *user_data);
00878 #ifdef __cplusplus
00879 }
00880 #endif
00881
00882 #endif