aqbanking  5.0.24.0-git
value.h
Go to the documentation of this file.
1 /***************************************************************************
2  $RCSfile$
3  -------------------
4  cvs : $Id$
5  begin : Mon Apr 05 2004
6  copyright : (C) 2004 by Martin Preuss
7  email : martin@libchipcard.de
8 
9  ***************************************************************************
10  * This file is part of the project "AqBanking". *
11  * Please see toplevel file COPYING of that project for license details. *
12  ***************************************************************************/
13 
14 
15 #ifndef AB_VALUE_H
16 #define AB_VALUE_H
17 
18 #include <gwenhywfar/buffer.h>
19 #include <gwenhywfar/db.h>
20 #include <gwenhywfar/list.h>
21 #include <gwenhywfar/types.h>
22 
23 #include <aqbanking/error.h>
24 
25 #include <stdio.h>
26 
27 
28 #ifdef __cplusplus
29 extern "C" {
30 #endif
31 
32 typedef struct AB_VALUE AB_VALUE;
34 
35 
39 
40 
44 
51 
57 AQBANKING_API void AB_Value_toString(const AB_VALUE *v, GWEN_BUFFER *buf);
58 
60  GWEN_BUFFER *buf,
61  int prec);
62 
64  GWEN_BUFFER *buf,
65  int prec,
66  int withCurrency);
67 
69 
72 AQBANKING_API AB_VALUE *AB_Value_fromInt(long int num, long int denom);
73 
74 
76 AQBANKING_API AB_VALUE *AB_Value_fromDb(GWEN_DB_NODE *db);
77 
79 AQBANKING_API int AB_Value_toDb(const AB_VALUE *v, GWEN_DB_NODE *db);
80 
82 AQBANKING_API int AB_Value_toDbFloat(const AB_VALUE *v, GWEN_DB_NODE *db);
83 
90 
91 
99 
106  char *buffer,
107  uint32_t buflen);
108 
110 
114 AQBANKING_API int AB_Value_Compare(const AB_VALUE *v1, const AB_VALUE *v2);
115 
120 AQBANKING_API int AB_Value_Equal(const AB_VALUE *v1, const AB_VALUE *v2);
121 
126 
128 
129 
130 AQBANKING_API const char *AB_Value_GetCurrency(const AB_VALUE *v);
131 AQBANKING_API void AB_Value_SetCurrency(AB_VALUE *v, const char *s);
132 
133 
134 AQBANKING_API void AB_Value_Dump(const AB_VALUE *v, FILE *f, unsigned int indent);
135 
137 AQBANKING_API long int AB_Value_Num(const AB_VALUE *v);
139 AQBANKING_API long int AB_Value_Denom(const AB_VALUE *v);
140 
141 
142 #ifdef __cplusplus
143 }
144 #endif
145 
146 
147 #endif /* AB_VALUE_H */
148 
149 
150 
151 
152 
153 
154 
155