00001 /*************************************************************************** 00002 $RCSfile: account.h,v $ 00003 ------------------- 00004 cvs : $Id: account.h,v 1.15 2003/06/04 10:50:32 cstim Exp $ 00005 begin : Thu Nov 29 2001 00006 copyright : (C) 2001 by Martin Preuss 00007 email : openhbci@aquamaniac.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 00030 #ifndef HBCI_ACCOUNT_H 00031 #define HBCI_ACCOUNT_H 00032 00038 #ifdef __cplusplus 00039 #include <list> 00040 #include <string> 00041 using namespace std; 00042 #include <openhbci/pointer.h> 00043 #include <openhbci/dllimport.h> 00044 namespace HBCI { 00045 class Account; 00046 }; 00047 /* for C wrapper functions */ 00048 typedef list<HBCI::Pointer<HBCI::Account> > list_HBCI_Account; 00049 typedef list<HBCI::Pointer<HBCI::Account> >::const_iterator list_HBCI_Account_iter; 00050 typedef struct HBCI::Account HBCI_Account; 00051 #else /* __cplusplus */ 00052 typedef struct HBCI_Account HBCI_Account; 00053 typedef struct list_HBCI_Account list_HBCI_Account; 00054 typedef struct list_HBCI_Account_iter list_HBCI_Account_iter; 00055 #endif /* __cplusplus */ 00056 00057 #include <openhbci/transaction.h> 00058 #include <openhbci/value.h> 00059 #include <openhbci/user.h> 00060 #include <openhbci/customer.h> 00061 #include <openhbci/bank.h> 00062 #include <openhbci/balance.h> 00063 #include <openhbci/standingorder.h> 00064 #include <openhbci/limit.h> 00065 00066 #ifdef __cplusplus 00067 00068 namespace HBCI { 00069 00079 class DLLIMPORT Account { 00080 public: 00084 Account(); 00088 virtual ~Account(); 00089 00098 virtual Pointer<Bank> bank() const =0; 00099 00103 virtual const string& accountId() const=0; 00104 00110 virtual const string& accountSuffix() const=0; 00111 00122 virtual const string &instituteCode() const=0; 00123 00134 virtual int countryCode() const=0; 00148 virtual const string& name1() const=0; 00149 00152 virtual const string& name2() const=0; 00153 00159 virtual const string& accountName() const=0; 00160 00164 virtual const string& currency() const=0; 00178 virtual const list<Pointer<Customer> > &authorizedCustomers() 00179 const=0; 00180 00184 virtual void addAuthorizedCustomer(Pointer<Customer> c)=0; 00185 00192 virtual bool isAuthorized(const Pointer<Customer> c) const=0; 00206 virtual const AccountBalance &balance() const =0; 00207 00214 virtual const list<Transaction> &transactions() const=0; 00215 00219 virtual void clearTransactions()=0; 00220 00228 virtual const list<StandingOrder> &standingOrders() const=0; 00229 00233 virtual void clearStandingOrders()=0; 00234 00245 virtual void addStandingOrder(const StandingOrder &o)=0; 00268 virtual bool managed() const =0; 00272 virtual void setManaged(bool m)=0; 00280 00285 virtual const Limit &limit()=0; 00286 00297 /*virtual char limitType() const=0;*/ 00298 00304 /*virtual const Value &limitValue() const=0;*/ 00305 00312 /*virtual int limitDays() const=0;*/ 00315 }; 00316 } /* namespace HBCI */ 00317 #endif /* __cplusplus */ 00318 00319 #ifdef __cplusplus 00320 extern "C" { 00321 #endif 00322 00327 extern const HBCI_Bank* HBCI_Account_bank(const HBCI_Account *h); 00331 extern const char* HBCI_Account_accountId(const HBCI_Account* h); 00337 extern const char* HBCI_Account_accountSuffix(const HBCI_Account* h); 00341 extern const char* HBCI_Account_instituteCode(const HBCI_Account* h); 00345 extern int HBCI_Account_countryCode(const HBCI_Account* h); 00349 extern const char* HBCI_Account_name1(const HBCI_Account* h); 00352 extern const char* HBCI_Account_name2(const HBCI_Account* h); 00358 extern const char* HBCI_Account_accountName(const HBCI_Account* h); 00362 extern const char* HBCI_Account_currency(const HBCI_Account* h); 00369 extern const list_HBCI_Customer* 00370 HBCI_Account_authorizedCustomers(const HBCI_Account *h); 00377 extern int HBCI_Account_isAuthorized(const HBCI_Account *h, 00378 const HBCI_Customer *c); 00387 extern int HBCI_Account_managed(const HBCI_Account *h); 00391 extern void HBCI_Account_setManaged(HBCI_Account *h, int m); 00392 00397 extern const HBCI_Limit *HBCI_Account_limit(HBCI_Account *h); 00410 extern void list_HBCI_Account_delete(list_HBCI_Account *l); 00411 extern void list_HBCI_Account_iter_delete(list_HBCI_Account_iter *l); 00412 extern int list_HBCI_Account_size(const list_HBCI_Account *l); 00413 extern list_HBCI_Account_iter* 00414 list_HBCI_Account_begin(const list_HBCI_Account *l); 00415 extern list_HBCI_Account_iter* 00416 list_HBCI_Account_end(const list_HBCI_Account *l); 00417 extern const HBCI_Account* 00418 list_HBCI_Account_iter_get(const list_HBCI_Account_iter *l); 00419 extern void 00420 list_HBCI_Account_iter_next(list_HBCI_Account_iter *l); 00421 extern int 00422 list_HBCI_Account_iter_equal(const list_HBCI_Account_iter *l1, 00423 const list_HBCI_Account_iter *l2); 00425 typedef void *(*list_HBCI_Account_cb) (const HBCI_Account *account, 00426 void *user_data); 00438 extern void *list_HBCI_Account_foreach (const list_HBCI_Account *list, 00439 list_HBCI_Account_cb func, 00440 void *user_data); 00443 #ifdef __cplusplus 00444 } 00445 #endif /* __cplusplus */ 00446 00447 #endif