00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023 #ifndef OUTBOXSTOJOBS_H
00024 #define OUTBOXSTOJOBS_H
00025
00030 #ifdef __cplusplus
00031 #include <string>
00032 #include <list>
00033 #endif
00034
00035 #include <openhbci/dllimport.h>
00036 #include <openhbci/pointer.h>
00037 #include <openhbci/customer.h>
00038 #include <openhbci/user.h>
00039 #include <openhbci/bank.h>
00040 #include <openhbci/account.h>
00041 #include <openhbci/outboxaccjobs.h>
00042 #include <openhbci/limit.h>
00043
00044 #ifdef __cplusplus
00045
00046 namespace HBCI {
00047
00053 class DLLIMPORT OutboxJobGetStandingOrders: public OutboxAccountJob {
00054 private:
00055 Pointer<Job> _job;
00056 list<Pointer<StandingOrder> > _orders;
00057 public:
00058 OutboxJobGetStandingOrders(Pointer<Customer> c,
00059 Pointer<Account> a);
00060 ~OutboxJobGetStandingOrders();
00061
00065 const list<Pointer<StandingOrder> > &getOrders() const;
00066
00076 static bool isSupported(Pointer<Account> forAccount);
00077
00078 bool createHBCIJobs(Pointer<MessageQueue> mbox, int n=0);
00079 bool evaluate();
00080 bool stillMessagesToSend(int nextMsg) const;
00081 bool commit(int msgNumber=HBCI_COMMIT_WHOLE_JOB);
00082 string description() const;
00083 JobProgressType type() const { return JOB_GET_STO; };
00084 list<int> resultCodes() const;
00085 };
00086
00087 }
00089 typedef struct HBCI::OutboxJobGetStandingOrders HBCI_OutboxJobGetStOs;
00090 extern "C" {
00091 #else
00092 typedef struct HBCI_OutboxJobGetStOs HBCI_OutboxJobGetStOs;
00093 #endif
00094
00098 extern HBCI_OutboxJobGetStOs *
00099 HBCI_OutboxJobGetStOs_new(const HBCI_Customer *c,
00100 HBCI_Account *a);
00102 extern HBCI_OutboxJob *
00103 HBCI_OutboxJobGetStOs_OutboxJob(HBCI_OutboxJobGetStOs *j);
00105 extern const list_HBCI_StO *
00106 HBCI_OutboxJobGetStOs_getOrders(const HBCI_OutboxJobGetStOs *j);
00108 #ifdef __cplusplus
00109 }
00110
00111 namespace HBCI {
00117 class DLLIMPORT OutboxJobNewStandingOrder: public OutboxAccountJob {
00118 private:
00119 Pointer<Job> _job;
00120 StandingOrder _newOrder;
00121 public:
00122 OutboxJobNewStandingOrder(Pointer<Customer> c,
00123 Pointer<Account> a,
00124 const StandingOrder &newOrder);
00125 ~OutboxJobNewStandingOrder();
00126
00127
00128
00133 static int maxDescriptionLines(const Bank &forBank);
00134
00141 static int minDaysToExec(const Bank &forBank);
00142
00149 static int maxDaysToExec(const Bank &forBank);
00150
00163 static list<int> monthlyCycle(const Bank &forBank);
00164
00179 static list<int> execDaysMonth(const Bank &forBank);
00180
00193 static list<int> weeklyCycle(const Bank &forBank);
00194
00207 static list<int> execDaysWeek(const Bank &forBank);
00208
00214 static list<int> transactionCodes(const Bank &forBank);
00215
00225 static bool isSupported(Pointer<Account> forAccount);
00226
00233 static const Limit limit(Pointer<Account> forAccount);
00234
00238 const StandingOrder &standingOrder() const { return _newOrder;};
00239
00240 bool createHBCIJobs(Pointer<MessageQueue> mbox, int n=0);
00241 bool evaluate();
00242 bool stillMessagesToSend(int nextMsg) const;
00243 bool commit(int msgNumber=HBCI_COMMIT_WHOLE_JOB);
00244 string description() const;
00245 JobProgressType type() const { return JOB_NEW_STO; };
00246 list<int> resultCodes() const;
00247 };
00248
00249 }
00251 typedef struct HBCI::OutboxJobNewStandingOrder HBCI_OutboxJobNewStO;
00252 extern "C" {
00253 #else
00254 typedef struct HBCI_OutboxJobNewStO HBCI_OutboxJobNewStO;
00255 #endif
00256
00260 extern HBCI_OutboxJobNewStO *
00261 HBCI_OutboxJobNewStO_new(const HBCI_Customer *c,
00262 HBCI_Account *a,
00263 const HBCI_StandingOrder *sto);
00265 extern HBCI_OutboxJob *
00266 HBCI_OutboxJobNewStO_OutboxJob(HBCI_OutboxJobNewStO *j);
00268 #ifdef __cplusplus
00269 }
00270
00271 namespace HBCI {
00280 class DLLIMPORT OutboxJobDeleteStandingOrder: public OutboxAccountJob {
00281 private:
00282 Pointer<Job> _job;
00283 StandingOrder _order2Delete;
00284 public:
00285 OutboxJobDeleteStandingOrder(Pointer<Customer> c,
00286 Pointer<Account> a,
00287 const StandingOrder &order2Delete);
00288 ~OutboxJobDeleteStandingOrder();
00289
00295 static int minDaysBeforeDelete(const Bank &forBank);
00296
00302 static int maxDaysBeforeDelete(const Bank &forBank);
00303
00309 static bool deletionTerminable(const Bank &forBank);
00310
00320 static bool isSupported(Pointer<Account> forAccount);
00321
00325 const StandingOrder &standingOrder() const { return _order2Delete;};
00326
00327 bool createHBCIJobs(Pointer<MessageQueue> mbox, int n=0);
00328 bool evaluate();
00329 bool stillMessagesToSend(int nextMsg) const;
00330 bool commit(int msgNumber=HBCI_COMMIT_WHOLE_JOB);
00331 string description() const;
00332 JobProgressType type() const { return JOB_DELETE_STO; };
00333 list<int> resultCodes() const;
00334 };
00335
00336 }
00338 typedef struct HBCI::OutboxJobDeleteStandingOrder HBCI_OutboxJobDeleteStO;
00339 extern "C" {
00340 #else
00341 typedef struct HBCI_OutboxJobDeleteStO HBCI_OutboxJobDeleteStO;
00342 #endif
00343
00347 extern HBCI_OutboxJobDeleteStO *
00348 HBCI_OutboxJobDeleteStO_new(const HBCI_Customer *c,
00349 HBCI_Account *a,
00350 const HBCI_StandingOrder *sto);
00352 extern HBCI_OutboxJob *
00353 HBCI_OutboxJobDeleteStO_OutboxJob(HBCI_OutboxJobDeleteStO *j);
00355 #ifdef __cplusplus
00356 }
00357 #endif
00358
00359
00360 #endif
00361
00362
00363