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

standingorder.h

Go to the documentation of this file.
00001 /***************************************************************************
00002  $RCSfile: standingorder.h,v $
00003  -------------------
00004  cvs         : $Id: standingorder.h,v 1.11 2003/04/15 22:10:23 cstim Exp $
00005  begin       : Mon Jun 17 2002
00006  copyright   : (C) 2002 by Fabian Kaiser
00007  email       : openhbci@derzach.de
00008 
00009 
00010  ***************************************************************************
00011  *                                                                         *
00012  *   This library is free software; you can redistribute it and/or         *
00013  *   modify it under the terms of the GNU Lesser General Public            *
00014  *   License as published by the Free Software Foundation; either          *
00015  *   version 2.1 of the License, or (at your option) any later version.    *
00016  *                                                                         *
00017  *   This library is distributed in the hope that it will be useful,       *
00018  *   but WITHOUT ANY WARRANTY; without even the implied warranty of        *
00019  *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU     *
00020  *   Lesser General Public License for more details.                       *
00021  *                                                                         *
00022  *   You should have received a copy of the GNU Lesser General Public      *
00023  *   License along with this library; if not, write to the Free Software   *
00024  *   Foundation, Inc., 59 Temple Place, Suite 330, Boston,                 *
00025  *   MA  02111-1307  USA                                                   *
00026  *                                                                         *
00027  ***************************************************************************/
00028 
00029 #ifndef HBCI_STANDINGORDER_H
00030 #define HBCI_STANDINGORDER_H
00031 
00036 #ifdef __cplusplus
00037 #include <list>
00038 #include <string>
00039 #include <openhbci/pointer.h>
00040 using namespace std;
00041 
00042 namespace HBCI {
00043   class StandingOrder;
00044 }
00045 /* for C wrapper functions */
00047 typedef struct HBCI::StandingOrder HBCI_StandingOrder;
00049 typedef list<HBCI::Pointer<HBCI::StandingOrder> > list_HBCI_StO;
00051 typedef list<HBCI::Pointer<HBCI::StandingOrder> >::const_iterator 
00052    list_HBCI_StO_iter;
00053 #else /* __cplusplus */
00054 typedef struct HBCI_StandingOrder HBCI_StandingOrder;
00055 typedef struct list_HBCI_StO list_HBCI_StO;
00056 typedef struct list_HBCI_StO_iter list_HBCI_StO_iter;
00057 #endif /* __cplusplus */
00058 
00059 #include <openhbci/value.h>
00060 #include <openhbci/date.h>
00061 #include <openhbci/account.h>
00062 #include <openhbci/bank.h>
00063 
00064 #ifdef __cplusplus
00065 
00066 namespace HBCI {
00067 
00081 class DLLIMPORT StandingOrder : AbstractTrans {
00082 private:
00083     string _jobId;
00084     string _ourAccountId;
00085     string _ourSuffix;
00086     string _ourBankCode;
00087     int _ourCountryCode;
00088     string _otherBankCode;
00089     int _otherCountryCode;
00090     string _otherAccountId;
00091     string _otherSuffix;
00092     list<string> _otherName;
00093     Value _value;
00094     int _transactionCode;
00095     list<string> _description;
00096     Date _execDate;
00097 
00098     /* details */
00099     Date _firstExecution;
00100     Date _lastExecution;
00101     int _period;
00102     int _cycle;
00103     int _execDay;
00104 
00105     /* modification flags */
00106     bool modOurAccount;
00107     bool modOtherAccount;
00108     bool modOtherName;
00109     bool modValue;
00110     bool modTransactionCode;
00111     bool modDescription;
00112     bool modExecDate;
00113     bool modDetails;
00114 
00115 public:
00120     const static int EXECUTE_WEEKLY;
00125     const static int EXECUTE_MONTHLY;
00126 
00130     StandingOrder(const string &s, Pointer<Account> account);
00131 
00135     StandingOrder(Pointer<Account> account);
00136 
00140     StandingOrder();
00141 
00147     bool operator==(const StandingOrder &otherOrder) const;
00148 
00158     const string &jobIdentification() const;
00159 
00165     void setJobIdentification(const string &s);
00173     const Date &firstExecutionDate() const;
00174 
00180     void setFirstExecutionDate(const Date &ex);
00181 
00185     const Date &lastExecutionDate() const;
00186 
00190     void setLastExecutionDate(const Date &ex);
00194     const Date &executionDate() const;
00195 
00202     void setExecutionDate(const Date &ex);
00203 
00209     int cycle() const;
00210 
00217     void setCycle(int v=1);
00218 
00222     int period() const;
00223 
00228     void setPeriod(int c=EXECUTE_MONTHLY);
00229 
00235     int execDay() const;
00236 
00242     void setExecDay(int d=1);
00249     int ourCountryCode() const;
00251     void setOurCountryCode(int i);
00252 
00255     const string &ourBankCode() const;
00258     void setOurBankCode(const string &code);
00259 
00263     const string &ourAccountId() const;
00267     void setOurAccountId(const string &id);
00268 
00272     const string &ourSuffix() const;
00276     void setOurSuffix(const string &id);
00284     const Value &value() const;
00288     void setValue(const Value &v);
00297     int transactionCode() const;
00301     void setTransactionCode(int c);
00302 
00306     const list<string> &description() const;
00311     void addDescription(const string &s);
00321     int otherCountryCode() const;
00327     void setOtherCountryCode(int i);
00328 
00332     const string &otherBankCode() const;
00333 
00338     void setOtherBankCode(const string &s);
00339 
00344     const string &otherAccountId() const;
00349     void setOtherAccountId(const string &s);
00350 
00355     const string &otherSuffix() const;
00360     void setOtherSuffix(const string &id);
00361 
00365     const list<string> &otherName() const;
00368     void addOtherName(const string &s);
00370 };
00371 
00372 } /* namespace HBCI */
00373 
00374 extern "C" {
00375 #endif /* __cplusplus */
00376 
00381     extern void list_HBCI_StO_delete(list_HBCI_StO *l);
00382     extern int list_HBCI_StO_size(const list_HBCI_StO *l);
00383     extern void list_HBCI_StO_iter_delete(list_HBCI_StO_iter *l);
00384     extern list_HBCI_StO_iter* list_HBCI_StO_begin(const list_HBCI_StO *l);
00385     extern list_HBCI_StO_iter* list_HBCI_StO_end(const list_HBCI_StO *l);
00386     extern const HBCI_StandingOrder* 
00387     list_HBCI_StO_iter_get(const list_HBCI_StO_iter *l);
00388     extern void list_HBCI_StO_iter_next(list_HBCI_StO_iter *l);
00389     extern int list_HBCI_StO_iter_equal(const list_HBCI_StO_iter *l1, 
00390                                         const list_HBCI_StO_iter *l2);
00392     typedef void *(*list_HBCI_StO_cb) (const HBCI_StandingOrder *sto, 
00393                                        void *user_data);
00405     extern void *list_HBCI_StO_foreach (const list_HBCI_StO *list, 
00406                                         list_HBCI_StO_cb func,
00407                                         void *user_data);
00412     extern HBCI_StandingOrder * HBCI_StandingOrder_new();
00414     extern void HBCI_StandingOrder_delete(HBCI_StandingOrder *t);
00415 
00416 
00426     extern const char *
00427     HBCI_StandingOrder_jobIdentification(const HBCI_StandingOrder *h);
00428 
00434     extern void HBCI_StandingOrder_setJobIdentification(HBCI_StandingOrder *h,
00435                                                         const char *s);
00443     extern const HBCI_Date *
00444     HBCI_StandingOrder_firstExecutionDate(const HBCI_StandingOrder *h);
00445 
00451     extern void 
00452     HBCI_StandingOrder_setFirstExecutionDate(HBCI_StandingOrder *h, 
00453                                              const HBCI_Date *ex);
00454 
00458     extern const HBCI_Date *
00459     HBCI_StandingOrder_lastExecutionDate(const HBCI_StandingOrder *h);
00460 
00464     extern void 
00465     HBCI_StandingOrder_setLastExecutionDate(HBCI_StandingOrder *h,
00466                                             const HBCI_Date *ex);
00470     extern const HBCI_Date *
00471     HBCI_StandingOrder_executionDate(const HBCI_StandingOrder *h);
00472 
00479     extern void 
00480     HBCI_StandingOrder_setExecutionDate(HBCI_StandingOrder *h, 
00481                                         const HBCI_Date *ex);
00482 
00488     extern int HBCI_StandingOrder_cycle(const HBCI_StandingOrder *h);
00489 
00496     extern void HBCI_StandingOrder_setCycle(HBCI_StandingOrder *h,
00497                                             int v);
00498 
00502     extern int HBCI_StandingOrder_period(const HBCI_StandingOrder *h);
00503 
00508     extern void HBCI_StandingOrder_setPeriod(HBCI_StandingOrder *h,
00509                                              int c);
00510 
00516     extern int HBCI_StandingOrder_execDay(const HBCI_StandingOrder *h);
00517 
00523     extern void HBCI_StandingOrder_setExecDay(HBCI_StandingOrder *h, 
00524                                               int d);
00530     extern int HBCI_StandingOrder_ourCountryCode(const HBCI_StandingOrder *t);
00531     extern void 
00532     HBCI_StandingOrder_setOurCountryCode(HBCI_StandingOrder *t, int i);
00533 
00542     extern const char * 
00543     HBCI_StandingOrder_ourBankCode(const HBCI_StandingOrder *t);
00544     extern void 
00545     HBCI_StandingOrder_setOurBankCode(HBCI_StandingOrder *t, const char *code);
00546 
00550     extern const char * 
00551     HBCI_StandingOrder_ourAccountId(const HBCI_StandingOrder *t);
00552     extern void 
00553     HBCI_StandingOrder_setOurAccountId(HBCI_StandingOrder *t, const char *id);
00554 
00558     extern const char * 
00559     HBCI_StandingOrder_ourSuffix(const HBCI_StandingOrder *t);
00560     extern void 
00561     HBCI_StandingOrder_setOurSuffix(HBCI_StandingOrder *t, const char *id);
00568     extern const HBCI_Value* 
00569     HBCI_StandingOrder_value(const HBCI_StandingOrder *t);
00570 
00575     extern void 
00576     HBCI_StandingOrder_setValue(HBCI_StandingOrder *t, const HBCI_Value *v);
00585     extern int HBCI_StandingOrder_transactionCode(const HBCI_StandingOrder *t);
00589     extern void 
00590     HBCI_StandingOrder_setTransactionCode(HBCI_StandingOrder *t, int c);
00591 
00595     extern const list_string* 
00596     HBCI_StandingOrder_description(const HBCI_StandingOrder *t);
00597     extern void 
00598     HBCI_StandingOrder_addDescription(HBCI_StandingOrder *t, const char *s);
00605     extern int 
00606     HBCI_StandingOrder_otherCountryCode(const HBCI_StandingOrder *t);
00607     extern void 
00608     HBCI_StandingOrder_setOtherCountryCode(HBCI_StandingOrder *t, int i);
00609 
00612     extern const char * 
00613     HBCI_StandingOrder_otherBankCode(const HBCI_StandingOrder *t);
00614     extern void 
00615     HBCI_StandingOrder_setOtherBankCode(HBCI_StandingOrder *t, const char *s);
00616 
00619     extern const char * 
00620     HBCI_StandingOrder_otherAccountId(const HBCI_StandingOrder *t);
00621     extern void 
00622     HBCI_StandingOrder_setOtherAccountId(HBCI_StandingOrder *t, const char *s);
00623 
00628     extern const char * 
00629     HBCI_StandingOrder_otherSuffix(const HBCI_StandingOrder *t);
00630     extern void 
00631     HBCI_StandingOrder_setOtherSuffix(HBCI_StandingOrder *t, const char *id);
00632 
00634     extern const list_string* 
00635     HBCI_StandingOrder_otherName(const HBCI_StandingOrder *t);
00636     extern void 
00637     HBCI_StandingOrder_addOtherName(HBCI_StandingOrder *t, const char *s);
00641 
00642 #ifdef __cplusplus
00643 }
00644 #endif /* __cplusplus */
00645 
00646 #endif

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