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 OUTBOXJOBS_H
00029 #define OUTBOXJOBS_H
00030
00035 #ifdef __cplusplus
00036 #include <string>
00037 #include <list>
00038 #endif
00039
00040 #include <openhbci/dllimport.h>
00041 #include <openhbci/pointer.h>
00042 #include <openhbci/customer.h>
00043 #include <openhbci/user.h>
00044 #include <openhbci/bank.h>
00045 #include <openhbci/account.h>
00046 #include <openhbci/outboxjob.h>
00047 #include <openhbci/statusreport.h>
00048
00049 #ifdef __cplusplus
00050
00051 namespace HBCI {
00052
00060 class DLLIMPORT OutboxJobGetAccounts: public OutboxJob {
00061 private:
00062 Pointer<MessageQueue> _mbox;
00063 int _resultcode;
00064
00065 public:
00066 OutboxJobGetAccounts(Pointer<Customer> c);
00067 ~OutboxJobGetAccounts();
00068
00069 bool createHBCIJobs(Pointer<MessageQueue> mbox, int n=0);
00070 bool evaluate();
00071 bool commit(int msgNumber=HBCI_COMMIT_WHOLE_JOB);
00072 string description() const;
00073 JobProgressType type() const { return JOB_GET_ACCOUNTS; };
00074 list<int> resultCodes() const;
00075 };
00076
00077 }
00079 typedef struct HBCI::OutboxJobGetAccounts HBCI_OutboxJobGetAccounts;
00080
00081 extern "C" {
00082 #else
00083 typedef struct HBCI_OutboxJobGetAccounts HBCI_OutboxJobGetAccounts;
00084 #endif
00085
00092 extern HBCI_OutboxJobGetAccounts *HBCI_OutboxJobGetAccounts_new(HBCI_Customer *c);
00094 extern HBCI_OutboxJob *HBCI_OutboxJobGetAccounts_OutboxJob(HBCI_OutboxJobGetAccounts *j);
00096 #ifdef __cplusplus
00097 }
00098 #endif
00099
00100
00101 #ifdef __cplusplus
00102
00103 namespace HBCI {
00104
00112 class DLLIMPORT OutboxJobSynchronize: public OutboxJob {
00113 private:
00114 const API *_hbciapi;
00115 Pointer<JOBDialogInit> _initjob;
00116 Pointer<Job> _syncjob;
00117 Pointer<Job> _exitjob;
00118 int _syncwhat;
00119
00120 protected:
00134 OutboxJobSynchronize(const API *api,
00135 Pointer<Customer> c,
00136 int syncwhat);
00137 ~OutboxJobSynchronize();
00138
00139 bool createHBCIJobs(Pointer<MessageQueue> mbox, int n=0);
00140 bool evaluate();
00141 bool commit(int msgNumber=HBCI_COMMIT_WHOLE_JOB);
00142 string description() const { return "Synchronisation";};
00143 list<int> resultCodes() const;
00144
00149 bool isDialogJob() const { return true;};
00150
00151 protected:
00156 int messages() const { return 2;};
00157 };
00158
00159 }
00161 typedef struct HBCI::OutboxJobSynchronize HBCI_OutboxJobSynchronize;
00162
00163 #else
00164 typedef struct HBCI_OutboxJobSynchronize HBCI_OutboxJobSynchronize;
00165 #endif
00166
00167
00168 #ifdef __cplusplus
00169
00170 namespace HBCI {
00171
00177 class DLLIMPORT OutboxJobGetSystemId: public OutboxJobSynchronize {
00178 public:
00179 OutboxJobGetSystemId(const API *api, Pointer<Customer> c);
00180 ~OutboxJobGetSystemId();
00181
00182 string description() const { return "Get SystemId";};
00183 JobProgressType type() const { return JOB_GET_SYSTEMID; };
00184 };
00185
00186 }
00188 typedef struct HBCI::OutboxJobGetSystemId HBCI_OutboxJobGetSystemId;
00189
00190 extern "C" {
00191 #else
00192 typedef struct HBCI_OutboxJobGetSystemId HBCI_OutboxJobGetSystemId;
00193 #endif
00194
00200 extern HBCI_OutboxJobGetSystemId *HBCI_OutboxJobGetSystemId_new(const HBCI_API *api, HBCI_Customer *c);
00202 extern HBCI_OutboxJob *HBCI_OutboxJobGetSystemId_OutboxJob(HBCI_OutboxJobGetSystemId *j);
00204 #ifdef __cplusplus
00205 }
00206 #endif
00207
00208
00209
00210 #ifdef __cplusplus
00211 namespace HBCI {
00217 class DLLIMPORT OutboxJobGetStatusReports: public OutboxJob {
00218 private:
00219 Pointer<JOBGetStatusReport> _job;
00220 Date _fromdate;
00221 Date _todate;
00222 int _maxentries;
00223 list<StatusReport> _reports;
00224
00225 public:
00237 OutboxJobGetStatusReports(Pointer<Customer> c,
00238 const Date &fromDate,
00239 const Date &todate,
00240 int maxEntries);
00241 ~OutboxJobGetStatusReports();
00242
00243 bool createHBCIJobs(Pointer<MessageQueue> mbox, int n=0);
00244 bool evaluate();
00245 bool stillMessagesToSend(int nextMsg) const;
00246 bool commit(int msgNumber=HBCI_COMMIT_WHOLE_JOB);
00247 string description() const;
00248 JobProgressType type() const { return JOB_GET_STATUS; };
00249 list<int> resultCodes() const;
00250
00254 const list<StatusReport> &statusReports() const { return _reports;};
00255
00256 };
00257 }
00258
00260 typedef struct HBCI::OutboxJobGetStatusReports HBCI_OutboxJobGetStatusReports;
00261
00262 extern "C" {
00263 #else
00264 typedef struct HBCI_OutboxJobGetStatusReports HBCI_OutboxJobGetStatusReports;
00265 #endif
00266
00280 extern HBCI_OutboxJobGetStatusReports *
00281 HBCI_OutboxJobGetStatusReports_new(HBCI_Customer *c,
00282 const HBCI_Date *fromdate,
00283 const HBCI_Date *todate,
00284 int maxEntries);
00286 extern HBCI_OutboxJob *
00287 HBCI_OutboxJobGetStatusReports_OutboxJob(HBCI_OutboxJobGetStatusReports *j);
00291 extern const list_HBCI_StatusReport *
00292 HBCI_OutboxJobGetStatusReports_statusReports
00293 (const HBCI_OutboxJobGetStatusReports *j);
00295 #ifdef __cplusplus
00296 }
00297 #endif
00298
00299
00300 #endif