1 /**********************************************************
2  * This file has been automatically created by "typemaker2"
3  * from the file "account.xml".
4  * Please do not edit this file, all changes will be lost.
5  * Better edit the mentioned source file instead.
6  **********************************************************/
7 
8 #ifndef AB_ACCOUNT_ACCOUNT_H
9 #define AB_ACCOUNT_ACCOUNT_H
10 
11 
12 #ifdef __cplusplus
13 extern "C" {
14 #endif
15 
16 /** @page P_AB_ACCOUNT Structure AB_ACCOUNT
17 <p>This page describes the properties of AB_ACCOUNT.</p>
18 
19 
20 
21 <h1>AB_ACCOUNT</h1>
22 
23 This type contains all important information about accounts. All text fields are in UTF-8.
24 
25 
26 <h2>Type</h2>
27 
28 
29 
30 @anchor AB_ACCOUNT_accountType
31 <h3>accountType</h3>
32 
33 <p>Set this property with @ref AB_Account_SetAccountType(), get it with @ref AB_Account_GetAccountType().</p>
34 
35 
36 <h2>Identifiers</h2>
37 
38 
39 
40 @anchor AB_ACCOUNT_uniqueId
41 <h3>uniqueId</h3>
42 
43 This is a unique id assigned by AqBanking.
44 <p>Set this property with @ref AB_Account_SetUniqueId(), get it with @ref AB_Account_GetUniqueId().</p>
45 
46 
47 <h2>Common Information</h2>
48 
49 
50 
51 @anchor AB_ACCOUNT_backendName
52 <h3>backendName</h3>
53 
54 Name of the banking backend this account belongs to.
55 <p>Set this property with @ref AB_Account_SetBackendName(), get it with @ref AB_Account_GetBackendName().</p>
56 
57 
58 @anchor AB_ACCOUNT_ownerName
59 <h3>ownerName</h3>
60 
61 Name of the account owner as it is stored with the bank.
62 <p>Set this property with @ref AB_Account_SetOwnerName(), get it with @ref AB_Account_GetOwnerName().</p>
63 
64 
65 @anchor AB_ACCOUNT_bankName
66 <h3>bankName</h3>
67 
68 Name of the bank the account belongs to.
69 <p>Set this property with @ref AB_Account_SetBankName(), get it with @ref AB_Account_GetBankName().</p>
70 
71 
72 @anchor AB_ACCOUNT_accountName
73 <h3>accountName</h3>
74 
75 Name of the account.
76 <p>Set this property with @ref AB_Account_SetAccountName(), get it with @ref AB_Account_GetAccountName().</p>
77 
78 
79 @anchor AB_ACCOUNT_currency
80 <h3>currency</h3>
81 
82 Currency used with this account.
83 <p>Set this property with @ref AB_Account_SetCurrency(), get it with @ref AB_Account_GetCurrency().</p>
84 
85 
86 @anchor AB_ACCOUNT_memo
87 <h3>memo</h3>
88 
89 Optional additional info.
90 <p>Set this property with @ref AB_Account_SetMemo(), get it with @ref AB_Account_GetMemo().</p>
91 
92 
93 <h2>SEPA Account Specification</h2>
94 
95 
96 
97 @anchor AB_ACCOUNT_iban
98 <h3>iban</h3>
99 
100 Internation bank account number as specified by the SEPA specs.
101 <p>Set this property with @ref AB_Account_SetIban(), get it with @ref AB_Account_GetIban().</p>
102 
103 
104 @anchor AB_ACCOUNT_bic
105 <h3>bic</h3>
106 
107 SWIFT code of the bank at which this account is registered.
108 <p>Set this property with @ref AB_Account_SetBic(), get it with @ref AB_Account_GetBic().</p>
109 
110 
111 <h2>Non-SEPA Account Specification</h2>
112 
113 
114 
115 @anchor AB_ACCOUNT_country
116 <h3>country</h3>
117 
118 <p>Set this property with @ref AB_Account_SetCountry(), get it with @ref AB_Account_GetCountry().</p>
119 
120 
121 @anchor AB_ACCOUNT_bankCode
122 <h3>bankCode</h3>
123 
124 National bank code (e.g. BLZ in Germany, routing number in other countries).
125 <p>Set this property with @ref AB_Account_SetBankCode(), get it with @ref AB_Account_GetBankCode().</p>
126 
127 
128 @anchor AB_ACCOUNT_branchId
129 <h3>branchId</h3>
130 
131 This is the branch id of the local bank (OFX only)
132 <p>Set this property with @ref AB_Account_SetBranchId(), get it with @ref AB_Account_GetBranchId().</p>
133 
134 
135 @anchor AB_ACCOUNT_accountNumber
136 <h3>accountNumber</h3>
137 
138 Account number in national account specification.
139 <p>Set this property with @ref AB_Account_SetAccountNumber(), get it with @ref AB_Account_GetAccountNumber().</p>
140 
141 
142 @anchor AB_ACCOUNT_subAccountId
143 <h3>subAccountId</h3>
144 
145 If your account has subaccounts which are distinguished by different suffixes, then this is that suffix. Otherwise it's empty. (HBCI only)
146 <p>Set this property with @ref AB_Account_SetSubAccountId(), get it with @ref AB_Account_GetSubAccountId().</p>
147 
148 
149 <h2>Internal Data</h2>
150 
151 
152 
153 @anchor AB_ACCOUNT_userId
154 <h3>userId</h3>
155 
156 Id of the user to whom this account is assigned.
157 <p>Set this property with @ref AB_Account_SetUserId(), get it with @ref AB_Account_GetUserId().</p>
158 
159 
160 @anchor AB_ACCOUNT_provider
161 <h3>provider</h3>
162 
163 <p>Set this property with @ref AB_Account_SetProvider(), get it with @ref AB_Account_GetProvider().</p>
164 
165 */
166 
167 /* needed system headers */
168 #include <gwenhywfar/types.h>
169 #include <gwenhywfar/list1.h>
170 #include <gwenhywfar/list2.h>
171 #include <gwenhywfar/inherit.h>
172 #include <gwenhywfar/db.h>
173 #include <gwenhywfar/xml.h>
174 
175 /* pre-headers */
176 #include <aqbanking/error.h>
177 #include <gwenhywfar/mdigest.h>
178 #include <gwenhywfar/text.h>
179 #include <gwenhywfar/buffer.h>
180 
181 typedef struct AB_ACCOUNT AB_ACCOUNT;
182 GWEN_LIST_FUNCTION_DEFS(AB_ACCOUNT, AB_Account)
183 GWEN_LIST2_FUNCTION_DEFS(AB_ACCOUNT, AB_Account)
184 GWEN_INHERIT_FUNCTION_DEFS(AB_ACCOUNT)
185 
186 
187 
188 /* post-headers */
189 #include <aqbanking/account_type.h>
190 #include <aqbanking/backendsupport/provider.h>
191 
192 
193 /* definitions for virtual functions (post) */
194 typedef int (*AB_ACCOUNT_READFROMDB_FN)(AB_ACCOUNT *p_struct, GWEN_DB_NODE *dbData);
195 
196 typedef int (*AB_ACCOUNT_WRITETODB_FN)(const AB_ACCOUNT *p_struct, GWEN_DB_NODE *dbData);
197 
198 /** Constructor. */
199 AB_ACCOUNT *AB_Account_new(void);
200 
201 /** Destructor. */
202 void AB_Account_free(AB_ACCOUNT *p_struct);
203 
204 void AB_Account_Attach(AB_ACCOUNT *p_struct);
205 
206 /** Getter.
207  * Use this function to get the member "accountType" (see @ref AB_ACCOUNT_accountType)
208 */
209 int AB_Account_GetAccountType(const AB_ACCOUNT *p_struct);
210 
211 /** Getter.
212  * Use this function to get the member "uniqueId" (see @ref AB_ACCOUNT_uniqueId)
213 */
214 uint32_t AB_Account_GetUniqueId(const AB_ACCOUNT *p_struct);
215 
216 /** Getter.
217  * Use this function to get the member "backendName" (see @ref AB_ACCOUNT_backendName)
218 */
219 const char *AB_Account_GetBackendName(const AB_ACCOUNT *p_struct);
220 
221 /** Getter.
222  * Use this function to get the member "ownerName" (see @ref AB_ACCOUNT_ownerName)
223 */
224 const char *AB_Account_GetOwnerName(const AB_ACCOUNT *p_struct);
225 
226 /** Getter.
227  * Use this function to get the member "bankName" (see @ref AB_ACCOUNT_bankName)
228 */
229 const char *AB_Account_GetBankName(const AB_ACCOUNT *p_struct);
230 
231 /** Getter.
232  * Use this function to get the member "accountName" (see @ref AB_ACCOUNT_accountName)
233 */
234 const char *AB_Account_GetAccountName(const AB_ACCOUNT *p_struct);
235 
236 /** Getter.
237  * Use this function to get the member "currency" (see @ref AB_ACCOUNT_currency)
238 */
239 const char *AB_Account_GetCurrency(const AB_ACCOUNT *p_struct);
240 
241 /** Getter.
242  * Use this function to get the member "memo" (see @ref AB_ACCOUNT_memo)
243 */
244 const char *AB_Account_GetMemo(const AB_ACCOUNT *p_struct);
245 
246 /** Getter.
247  * Use this function to get the member "iban" (see @ref AB_ACCOUNT_iban)
248 */
249 const char *AB_Account_GetIban(const AB_ACCOUNT *p_struct);
250 
251 /** Getter.
252  * Use this function to get the member "bic" (see @ref AB_ACCOUNT_bic)
253 */
254 const char *AB_Account_GetBic(const AB_ACCOUNT *p_struct);
255 
256 /** Getter.
257  * Use this function to get the member "country" (see @ref AB_ACCOUNT_country)
258 */
259 const char *AB_Account_GetCountry(const AB_ACCOUNT *p_struct);
260 
261 /** Getter.
262  * Use this function to get the member "bankCode" (see @ref AB_ACCOUNT_bankCode)
263 */
264 const char *AB_Account_GetBankCode(const AB_ACCOUNT *p_struct);
265 
266 /** Getter.
267  * Use this function to get the member "branchId" (see @ref AB_ACCOUNT_branchId)
268 */
269 const char *AB_Account_GetBranchId(const AB_ACCOUNT *p_struct);
270 
271 /** Getter.
272  * Use this function to get the member "accountNumber" (see @ref AB_ACCOUNT_accountNumber)
273 */
274 const char *AB_Account_GetAccountNumber(const AB_ACCOUNT *p_struct);
275 
276 /** Getter.
277  * Use this function to get the member "subAccountId" (see @ref AB_ACCOUNT_subAccountId)
278 */
279 const char *AB_Account_GetSubAccountId(const AB_ACCOUNT *p_struct);
280 
281 /** Getter.
282  * Use this function to get the member "userId" (see @ref AB_ACCOUNT_userId)
283 */
284 uint32_t AB_Account_GetUserId(const AB_ACCOUNT *p_struct);
285 
286 /** Getter.
287  * Use this function to get the member "provider" (see @ref AB_ACCOUNT_provider)
288 */
289 AB_PROVIDER *AB_Account_GetProvider(const AB_ACCOUNT *p_struct);
290 
291 /** Setter.
292  * Use this function to set the member "accountType" (see @ref AB_ACCOUNT_accountType)
293 */
294 void AB_Account_SetAccountType(AB_ACCOUNT *p_struct, int p_src);
295 
296 /** Setter.
297  * Use this function to set the member "uniqueId" (see @ref AB_ACCOUNT_uniqueId)
298 */
299 void AB_Account_SetUniqueId(AB_ACCOUNT *p_struct, uint32_t p_src);
300 
301 /** Setter.
302  * Use this function to set the member "backendName" (see @ref AB_ACCOUNT_backendName)
303 */
304 void AB_Account_SetBackendName(AB_ACCOUNT *p_struct, const char *p_src);
305 
306 /** Setter.
307  * Use this function to set the member "ownerName" (see @ref AB_ACCOUNT_ownerName)
308 */
309 void AB_Account_SetOwnerName(AB_ACCOUNT *p_struct, const char *p_src);
310 
311 /** Setter.
312  * Use this function to set the member "bankName" (see @ref AB_ACCOUNT_bankName)
313 */
314 void AB_Account_SetBankName(AB_ACCOUNT *p_struct, const char *p_src);
315 
316 /** Setter.
317  * Use this function to set the member "accountName" (see @ref AB_ACCOUNT_accountName)
318 */
319 void AB_Account_SetAccountName(AB_ACCOUNT *p_struct, const char *p_src);
320 
321 /** Setter.
322  * Use this function to set the member "currency" (see @ref AB_ACCOUNT_currency)
323 */
324 void AB_Account_SetCurrency(AB_ACCOUNT *p_struct, const char *p_src);
325 
326 /** Setter.
327  * Use this function to set the member "memo" (see @ref AB_ACCOUNT_memo)
328 */
329 void AB_Account_SetMemo(AB_ACCOUNT *p_struct, const char *p_src);
330 
331 /** Setter.
332  * Use this function to set the member "iban" (see @ref AB_ACCOUNT_iban)
333 */
334 void AB_Account_SetIban(AB_ACCOUNT *p_struct, const char *p_src);
335 
336 /** Setter.
337  * Use this function to set the member "bic" (see @ref AB_ACCOUNT_bic)
338 */
339 void AB_Account_SetBic(AB_ACCOUNT *p_struct, const char *p_src);
340 
341 /** Setter.
342  * Use this function to set the member "country" (see @ref AB_ACCOUNT_country)
343 */
344 void AB_Account_SetCountry(AB_ACCOUNT *p_struct, const char *p_src);
345 
346 /** Setter.
347  * Use this function to set the member "bankCode" (see @ref AB_ACCOUNT_bankCode)
348 */
349 void AB_Account_SetBankCode(AB_ACCOUNT *p_struct, const char *p_src);
350 
351 /** Setter.
352  * Use this function to set the member "branchId" (see @ref AB_ACCOUNT_branchId)
353 */
354 void AB_Account_SetBranchId(AB_ACCOUNT *p_struct, const char *p_src);
355 
356 /** Setter.
357  * Use this function to set the member "accountNumber" (see @ref AB_ACCOUNT_accountNumber)
358 */
359 void AB_Account_SetAccountNumber(AB_ACCOUNT *p_struct, const char *p_src);
360 
361 /** Setter.
362  * Use this function to set the member "subAccountId" (see @ref AB_ACCOUNT_subAccountId)
363 */
364 void AB_Account_SetSubAccountId(AB_ACCOUNT *p_struct, const char *p_src);
365 
366 /** Setter.
367  * Use this function to set the member "userId" (see @ref AB_ACCOUNT_userId)
368 */
369 void AB_Account_SetUserId(AB_ACCOUNT *p_struct, uint32_t p_src);
370 
371 /** Setter.
372  * Use this function to set the member "provider" (see @ref AB_ACCOUNT_provider)
373 */
374 void AB_Account_SetProvider(AB_ACCOUNT *p_struct, AB_PROVIDER *p_src);
375 
376 /* prototypes for virtual functions */
377 /**
378  * Read an account from a GWEN_DB_NODE.
379  * @param dbData Profile data to read from.
380  */
381 int AB_Account_ReadFromDb(AB_ACCOUNT *p_struct, GWEN_DB_NODE *dbData);
382 
383 /**
384  * Write an account to a GWEN_DB_NODE.
385  * @param dbData Profile data to read from.
386  */
387 int AB_Account_WriteToDb(const AB_ACCOUNT *p_struct, GWEN_DB_NODE *dbData);
388 
389 /* setters for virtual functions */
390 AB_ACCOUNT_READFROMDB_FN AB_Account_SetReadFromDbFn(AB_ACCOUNT *p_struct, AB_ACCOUNT_READFROMDB_FN fn);
391 
392 AB_ACCOUNT_WRITETODB_FN AB_Account_SetWriteToDbFn(AB_ACCOUNT *p_struct, AB_ACCOUNT_WRITETODB_FN fn);
393 
394 /* getters for virtual functions */
395 AB_ACCOUNT_READFROMDB_FN AB_Account_GetReadFromDbFn(const AB_ACCOUNT *p_struct);
396 
397 AB_ACCOUNT_WRITETODB_FN AB_Account_GetWriteToDbFn(const AB_ACCOUNT *p_struct);
398 
399 void AB_Account_ReadDb(AB_ACCOUNT *p_struct, GWEN_DB_NODE *p_db);
400 
401 int AB_Account_WriteDb(const AB_ACCOUNT *p_struct, GWEN_DB_NODE *p_db);
402 
403 AB_ACCOUNT *AB_Account_fromDb(GWEN_DB_NODE *p_db);
404 
405 int AB_Account_toDb(const AB_ACCOUNT *p_struct, GWEN_DB_NODE *p_db);
406 
407 void AB_Account_ReadXml(AB_ACCOUNT *p_struct, GWEN_XMLNODE *p_db);
408 
409 void AB_Account_WriteXml(const AB_ACCOUNT *p_struct, GWEN_XMLNODE *p_db);
410 
411 void AB_Account_toXml(const AB_ACCOUNT *p_struct, GWEN_XMLNODE *p_db);
412 
413 AB_ACCOUNT *AB_Account_fromXml(GWEN_XMLNODE *p_db);
414 
415 AB_ACCOUNT *AB_Account_List_GetByUniqueId(const AB_ACCOUNT_LIST *p_list, uint32_t p_cmp);
416 
417 /**
418  * Check whether a given account info object matches the given criteria.
419  * @param a account info object to match
420  * @param backendName name of the banking backend (wildcards and jokers allowed)
421  * @param country ISO code of the country (wildcards and jokers allowed)
422  * @param bankId bank code to search for (wildcards and jokers allowed)
423  * @param accountNumber account number to search for (wildcards and jokers allowed)
424  * @param subAccountId sub account number (wildcards and jokers allowed)
425  * @param iban IBAN to search for (wildcards and jokers allowed)
426  * @param currency currecny the account uses (wildcards and jokers allowed)
427  * @param ty account type (use AB_AccountType_Unknown as wildcard)
428  */
429 int AB_Account_Matches(const AB_ACCOUNT *a, const char *backendName, const char *country, const char *bankId,
430                        const char *accountNumber, const char *subAccountId, const char *iban, const char *currency, int ty);
431 /**
432  * Find the first matching account object in a list of account info objects.
433  * @param al list of account objects among to search
434  * @param backendName name of the banking backend (wildcards and jokers allowed)
435  * @param country ISO code of the country (wildcards and jokers allowed)
436  * @param bankId bank code to search for (wildcards and jokers allowed)
437  * @param accountNumber account number to search for (wildcards and jokers allowed)
438  * @param subAccountId sub account number (wildcards and jokers allowed)
439  * @param iban IBAN to search for (wildcards and jokers allowed)
440  * @param currency currecny the account uses (wildcards and jokers allowed)
441  * @param ty account type (use AB_AccountType_Unknown as wildcard)
442  */
443 AB_ACCOUNT *AB_Account_List_FindFirst(AB_ACCOUNT_LIST *al, const char *backendName, const char *country,
444                                       const char *bankId, const char *accountNumber, const char *subAccountId, const char *iban, const char *currency,
445                                       int ty);
446 /**
447  * Find the next matching account object in a list of account info objects.
448  * @param a previous matching account objects among to search
449  * @param backendName name of the banking backend (wildcards and jokers allowed)
450  * @param country ISO code of the country (wildcards and jokers allowed)
451  * @param bankId bank code to search for (wildcards and jokers allowed)
452  * @param accountNumber account number to search for (wildcards and jokers allowed)
453  * @param subAccountId sub account number (wildcards and jokers allowed)
454  * @param iban IBAN to search for (wildcards and jokers allowed)
455  * @param currency currecny the account uses (wildcards and jokers allowed)
456  * @param ty account type (use AB_AccountType_Unknown as wildcard)
457  */
458 AB_ACCOUNT *AB_Account_List_FindNext(AB_ACCOUNT *a, const char *backendName, const char *country, const char *bankId,
459                                      const char *accountNumber, const char *subAccountId, const char *iban, const char *currency, int ty);
460 /* end-headers */
461 
462 
463 #ifdef __cplusplus
464 }
465 #endif
466 
467 #endif
468 
469