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

limit.h

Go to the documentation of this file.
00001 /***************************************************************************
00002  $RCSfile: limit.h,v $
00003  -------------------
00004  cvs         : $Id: limit.h,v 1.2 2003/06/04 10:50:33 cstim Exp $
00005  begin       : Fri Jan 17 2003
00006  copyright   : (C) 2003 by Fabian Kaiser
00007  email       : fabian@openhbci.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_LIMIT_H
00030 #define HBCI_LIMIT_H
00031 
00036 #ifdef __cplusplus
00037 #include <string>
00038 #endif /* __cplusplus */
00039 
00040 #include <openhbci/dllimport.h>
00041 #include <openhbci/value.h>
00042 
00043 typedef enum LimitType {
00045   LIMIT_DAY = 1,
00047   LIMIT_JOB,
00049   LIMIT_WEEK,
00051   LIMIT_MONTH,
00053   LIMIT_TIME,
00055   NO_LIMIT
00056 } LimitType;
00057 
00058 #ifdef __cplusplus
00059 using namespace std;
00060 
00061 namespace HBCI {
00062 
00063   class DLLIMPORT Limit {       
00064   public:
00068         Limit() {};
00069 
00077         Limit(const Value &limitValue, LimitType type, int days=0);     
00078 
00085         bool isValid() const;
00086 
00089         const Value &value() const { return _limitValue; };
00090 
00099         LimitType type() const { return _limitType; };
00100 
00105         int daysForTimeLimit() const { return _limitDays; };
00106 
00109         static LimitType typeFromChar(char type_char);
00112         static char typeToChar(LimitType type_enum);
00113   private:
00114     LimitType _limitType;
00115     Value _limitValue;
00116     int _limitDays;
00117   };
00118 
00119 } /* namespace HBCI */
00120 typedef struct HBCI::Limit HBCI_Limit;
00121 
00122 #else /* __cplusplus */
00123 typedef struct Limit HBCI_Limit;
00124 #endif /* __cplusplus */
00125 
00126 #ifdef __cplusplus
00127 extern "C" {
00128 #endif /* __cplusplus */
00129 
00131     extern int HBCI_Limit_isValid(const HBCI_Limit *l);
00132     extern const HBCI_Value *HBCI_Limit_value(const HBCI_Limit *l);
00133     extern LimitType HBCI_Limit_type(const HBCI_Limit *l);
00134     extern int HBCI_Limit_daysForTimeLimit(const HBCI_Limit *l);
00135     extern void HBCI_Limit_delete(HBCI_Limit *d);
00137 #ifdef __cplusplus
00138 }
00139 #endif /* __cplusplus */
00140 
00141 
00142 #endif /* HBCI_LIMIT_H */

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