Main Page   Modules   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Namespace Members   Compound Members   File Members   Related Pages  

outboxjobs.h

Go to the documentation of this file.
00001 /***************************************************************************
00002  $RCSfile: outboxjobs.h,v $
00003                              -------------------
00004     cvs         : $Id: outboxjobs.h,v 1.57 2003/06/14 11:33:11 cstim Exp $
00005     begin       : Sat Jun 08 2002
00006     copyright   : (C) 2001 by Martin Preuss
00007     email       : openhbci@aquamaniac.de
00008 
00009  ***************************************************************************
00010  *                                                                         *
00011  *   This library is free software; you can redistribute it and/or         *
00012  *   modify it under the terms of the GNU Lesser General Public            *
00013  *   License as published by the Free Software Foundation; either          *
00014  *   version 2.1 of the License, or (at your option) any later version.    *
00015  *                                                                         *
00016  *   This library is distributed in the hope that it will be useful,       *
00017  *   but WITHOUT ANY WARRANTY; without even the implied warranty of        *
00018  *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU     *
00019  *   Lesser General Public License for more details.                       *
00020  *                                                                         *
00021  *   You should have received a copy of the GNU Lesser General Public      *
00022  *   License along with this library; if not, write to the Free Software   *
00023  *   Foundation, Inc., 59 Temple Place, Suite 330, Boston,                 *
00024  *   MA  02111-1307  USA                                                   *
00025  *                                                                         *
00026  ***************************************************************************/
00027 
00028 #ifndef OUTBOXJOBS_H
00029 #define OUTBOXJOBS_H
00030 
00035 #ifdef __cplusplus
00036 #include <string>
00037 #include <list>
00038 #endif /* __cplusplus */
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 } /* namespace HBCI */
00079 typedef struct HBCI::OutboxJobGetAccounts HBCI_OutboxJobGetAccounts;
00080 
00081 extern "C" {
00082 #else /* __cplusplus */
00083     typedef struct HBCI_OutboxJobGetAccounts HBCI_OutboxJobGetAccounts;
00084 #endif /* __cplusplus */
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 /* __cplusplus */
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 } /* namespace HBCI */
00161 typedef struct HBCI::OutboxJobSynchronize HBCI_OutboxJobSynchronize;
00162 
00163 #else /* __cplusplus */
00164 typedef struct HBCI_OutboxJobSynchronize HBCI_OutboxJobSynchronize;
00165 #endif /* __cplusplus */
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 } /* namespace HBCI */
00188 typedef struct HBCI::OutboxJobGetSystemId HBCI_OutboxJobGetSystemId;
00189 
00190 extern "C" {
00191 #else /* __cplusplus */
00192     typedef struct HBCI_OutboxJobGetSystemId HBCI_OutboxJobGetSystemId;
00193 #endif /* __cplusplus */
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 /* __cplusplus */
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 } // namespace HBCI
00258 
00260 typedef struct HBCI::OutboxJobGetStatusReports HBCI_OutboxJobGetStatusReports;
00261 
00262 extern "C" {
00263 #else /* __cplusplus */
00264     typedef struct HBCI_OutboxJobGetStatusReports HBCI_OutboxJobGetStatusReports;
00265 #endif /* __cplusplus */
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 /* __cplusplus */
00298 
00299 
00300 #endif

Generated on Mon Jun 23 13:41:07 2003 for openhbci by doxygen1.2.17