1 /**********************************************************
2  * This file has been automatically created by "typemaker2"
3  * from the file "transaction.xml".
4  * Please do not edit this file, all changes will be lost.
5  * Better edit the mentioned source file instead.
6  **********************************************************/
7 
8 #ifdef HAVE_CONFIG_H
9 # include <config.h>
10 #endif
11 
12 #include "./transaction_p.h"
13 
14 #include <gwenhywfar/misc.h>
15 #include <gwenhywfar/debug.h>
16 
17 /* code headers */
18 
19 /* macro functions */
GWEN_LIST_FUNCTIONS(AB_TRANSACTION,AB_Transaction)20 GWEN_LIST_FUNCTIONS(AB_TRANSACTION, AB_Transaction)
21 GWEN_LIST2_FUNCTIONS(AB_TRANSACTION, AB_Transaction)
22 GWEN_CONSTLIST2_FUNCTIONS(AB_TRANSACTION, AB_Transaction)
23 
24 
25 AB_TRANSACTION_TYPE AB_Transaction_Type_fromString(const char *p_s)
26 {
27   if (p_s && *p_s) {
28     if (strcasecmp(p_s, "none")==0)
29       return AB_Transaction_TypeNone;
30     else if (strcasecmp(p_s, "statement")==0)
31       return AB_Transaction_TypeStatement;
32     else if (strcasecmp(p_s, "notedStatement")==0)
33       return AB_Transaction_TypeNotedStatement;
34     else if (strcasecmp(p_s, "transfer")==0)
35       return AB_Transaction_TypeTransfer;
36     else if (strcasecmp(p_s, "debitNote")==0)
37       return AB_Transaction_TypeDebitNote;
38     else if (strcasecmp(p_s, "standingOrder")==0)
39       return AB_Transaction_TypeStandingOrder;
40     else if (strcasecmp(p_s, "internalTransfer")==0)
41       return AB_Transaction_TypeInternalTransfer;
42     else if (strcasecmp(p_s, "brokerage")==0)
43       return AB_Transaction_TypeBrokerage;
44     else if (strcasecmp(p_s, "transaction")==0)
45       return AB_Transaction_TypeTransaction;
46     else if (strcasecmp(p_s, "split")==0)
47       return AB_Transaction_TypeSplit;
48   }
49   return AB_Transaction_TypeUnknown;
50 }
51 
AB_Transaction_SubType_fromString(const char * p_s)52 AB_TRANSACTION_SUBTYPE AB_Transaction_SubType_fromString(const char *p_s)
53 {
54   if (p_s && *p_s) {
55     if (strcasecmp(p_s, "none")==0)
56       return AB_Transaction_SubTypeNone;
57     else if (strcasecmp(p_s, "standard")==0)
58       return AB_Transaction_SubTypeStandard;
59     else if (strcasecmp(p_s, "check")==0)
60       return AB_Transaction_SubTypeCheck;
61     else if (strcasecmp(p_s, "bookedDebitNote")==0)
62       return AB_Transaction_SubTypeBookedDebitNote;
63     else if (strcasecmp(p_s, "drawnDebitNote")==0)
64       return AB_Transaction_SubTypeDrawnDebitNote;
65     else if (strcasecmp(p_s, "standingOrder")==0)
66       return AB_Transaction_SubTypeStandingOrder;
67     else if (strcasecmp(p_s, "loan")==0)
68       return AB_Transaction_SubTypeLoan;
69     else if (strcasecmp(p_s, "euStandard")==0)
70       return AB_Transaction_SubTypeEuStandard;
71     else if (strcasecmp(p_s, "euASAP")==0)
72       return AB_Transaction_SubTypeEuASAP;
73     else if (strcasecmp(p_s, "buy")==0)
74       return AB_Transaction_SubTypeBuy;
75     else if (strcasecmp(p_s, "sell")==0)
76       return AB_Transaction_SubTypeSell;
77     else if (strcasecmp(p_s, "reinvest")==0)
78       return AB_Transaction_SubTypeReinvest;
79     else if (strcasecmp(p_s, "dividend")==0)
80       return AB_Transaction_SubTypeDividend;
81   }
82   return AB_Transaction_SubTypeUnknown;
83 }
84 
AB_Transaction_Command_fromString(const char * p_s)85 AB_TRANSACTION_COMMAND AB_Transaction_Command_fromString(const char *p_s)
86 {
87   if (p_s && *p_s) {
88     if (strcasecmp(p_s, "none")==0)
89       return AB_Transaction_CommandNone;
90     else if (strcasecmp(p_s, "getBalance")==0)
91       return AB_Transaction_CommandGetBalance;
92     else if (strcasecmp(p_s, "getTransactions")==0)
93       return AB_Transaction_CommandGetTransactions;
94     else if (strcasecmp(p_s, "getStandingOrders")==0)
95       return AB_Transaction_CommandGetStandingOrders;
96     else if (strcasecmp(p_s, "getDatedTransfers")==0)
97       return AB_Transaction_CommandGetDatedTransfers;
98     else if (strcasecmp(p_s, "sepaGetStandingOrders")==0)
99       return AB_Transaction_CommandSepaGetStandingOrders;
100     else if (strcasecmp(p_s, "loadCellPhone")==0)
101       return AB_Transaction_CommandLoadCellPhone;
102     else if (strcasecmp(p_s, "getEStatements")==0)
103       return AB_Transaction_CommandGetEStatements;
104     else if (strcasecmp(p_s, "transfer")==0)
105       return AB_Transaction_CommandTransfer;
106     else if (strcasecmp(p_s, "debitNote")==0)
107       return AB_Transaction_CommandDebitNote;
108     else if (strcasecmp(p_s, "createStandingOrder")==0)
109       return AB_Transaction_CommandCreateStandingOrder;
110     else if (strcasecmp(p_s, "modifyStandingOrder")==0)
111       return AB_Transaction_CommandModifyStandingOrder;
112     else if (strcasecmp(p_s, "deleteStandingOrder")==0)
113       return AB_Transaction_CommandDeleteStandingOrder;
114     else if (strcasecmp(p_s, "createDatedTransfer")==0)
115       return AB_Transaction_CommandCreateDatedTransfer;
116     else if (strcasecmp(p_s, "modifyDatedTransfer")==0)
117       return AB_Transaction_CommandModifyDatedTransfer;
118     else if (strcasecmp(p_s, "deleteDatedTransfer")==0)
119       return AB_Transaction_CommandDeleteDatedTransfer;
120     else if (strcasecmp(p_s, "internalTransfer")==0)
121       return AB_Transaction_CommandInternalTransfer;
122     else if (strcasecmp(p_s, "getDepot")==0)
123       return AB_Transaction_CommandGetDepot;
124     else if (strcasecmp(p_s, "sepaTransfer")==0)
125       return AB_Transaction_CommandSepaTransfer;
126     else if (strcasecmp(p_s, "sepaDebitNote")==0)
127       return AB_Transaction_CommandSepaDebitNote;
128     else if (strcasecmp(p_s, "sepaFlashDebitNote")==0)
129       return AB_Transaction_CommandSepaFlashDebitNote;
130     else if (strcasecmp(p_s, "sepaCreateStandingOrder")==0)
131       return AB_Transaction_CommandSepaCreateStandingOrder;
132     else if (strcasecmp(p_s, "sepaModifyStandingOrder")==0)
133       return AB_Transaction_CommandSepaModifyStandingOrder;
134     else if (strcasecmp(p_s, "sepaDeleteStandingOrder")==0)
135       return AB_Transaction_CommandSepaDeleteStandingOrder;
136     else if (strcasecmp(p_s, "sepaCreateDatedTransfer")==0)
137       return AB_Transaction_CommandSepaCreateDatedTransfer;
138     else if (strcasecmp(p_s, "sepaModifyDatedTransfer")==0)
139       return AB_Transaction_CommandSepaModifyDatedTransfer;
140     else if (strcasecmp(p_s, "sepaDeleteDatedTransfer")==0)
141       return AB_Transaction_CommandSepaDeleteDatedTransfer;
142     else if (strcasecmp(p_s, "sepaInternalTransfer")==0)
143       return AB_Transaction_CommandSepaInternalTransfer;
144   }
145   return AB_Transaction_CommandUnknown;
146 }
147 
AB_Transaction_Status_fromString(const char * p_s)148 AB_TRANSACTION_STATUS AB_Transaction_Status_fromString(const char *p_s)
149 {
150   if (p_s && *p_s) {
151     if (strcasecmp(p_s, "none")==0)
152       return AB_Transaction_StatusNone;
153     else if (strcasecmp(p_s, "enqueued")==0)
154       return AB_Transaction_StatusEnqueued;
155     else if (strcasecmp(p_s, "sending")==0)
156       return AB_Transaction_StatusSending;
157     else if (strcasecmp(p_s, "sent")==0)
158       return AB_Transaction_StatusSent;
159     else if (strcasecmp(p_s, "accepted")==0)
160       return AB_Transaction_StatusAccepted;
161     else if (strcasecmp(p_s, "rejected")==0)
162       return AB_Transaction_StatusRejected;
163     else if (strcasecmp(p_s, "pending")==0)
164       return AB_Transaction_StatusPending;
165     else if (strcasecmp(p_s, "autoReconciled")==0)
166       return AB_Transaction_StatusAutoReconciled;
167     else if (strcasecmp(p_s, "manuallyReconciled")==0)
168       return AB_Transaction_StatusManuallyReconciled;
169     else if (strcasecmp(p_s, "revoked")==0)
170       return AB_Transaction_StatusRevoked;
171     else if (strcasecmp(p_s, "aborted")==0)
172       return AB_Transaction_StatusAborted;
173     else if (strcasecmp(p_s, "error")==0)
174       return AB_Transaction_StatusError;
175   }
176   return AB_Transaction_StatusUnknown;
177 }
178 
AB_Transaction_Period_fromString(const char * p_s)179 AB_TRANSACTION_PERIOD AB_Transaction_Period_fromString(const char *p_s)
180 {
181   if (p_s && *p_s) {
182     if (strcasecmp(p_s, "none")==0)
183       return AB_Transaction_PeriodNone;
184     else if (strcasecmp(p_s, "monthly")==0)
185       return AB_Transaction_PeriodMonthly;
186     else if (strcasecmp(p_s, "weekly")==0)
187       return AB_Transaction_PeriodWeekly;
188   }
189   return AB_Transaction_PeriodUnknown;
190 }
191 
AB_Transaction_Charge_fromString(const char * p_s)192 AB_TRANSACTION_CHARGE AB_Transaction_Charge_fromString(const char *p_s)
193 {
194   if (p_s && *p_s) {
195     if (strcasecmp(p_s, "nobody")==0)
196       return AB_Transaction_ChargeNobody;
197     else if (strcasecmp(p_s, "local")==0)
198       return AB_Transaction_ChargeLocal;
199     else if (strcasecmp(p_s, "remote")==0)
200       return AB_Transaction_ChargeRemote;
201     else if (strcasecmp(p_s, "share")==0)
202       return AB_Transaction_ChargeShare;
203   }
204   return AB_Transaction_ChargeUnknown;
205 }
206 
AB_Transaction_Sequence_fromString(const char * p_s)207 AB_TRANSACTION_SEQUENCE AB_Transaction_Sequence_fromString(const char *p_s)
208 {
209   if (p_s && *p_s) {
210     if (strcasecmp(p_s, "once")==0)
211       return AB_Transaction_SequenceOnce;
212     else if (strcasecmp(p_s, "first")==0)
213       return AB_Transaction_SequenceFirst;
214     else if (strcasecmp(p_s, "following")==0)
215       return AB_Transaction_SequenceFollowing;
216     else if (strcasecmp(p_s, "final")==0)
217       return AB_Transaction_SequenceFinal;
218   }
219   return AB_Transaction_SequenceUnknown;
220 }
221 
AB_Transaction_Type_toString(AB_TRANSACTION_TYPE p_i)222 const char *AB_Transaction_Type_toString(AB_TRANSACTION_TYPE p_i)
223 {
224   switch (p_i) {
225   case AB_Transaction_TypeNone:
226     return "none";
227   case AB_Transaction_TypeStatement:
228     return "statement";
229   case AB_Transaction_TypeNotedStatement:
230     return "notedStatement";
231   case AB_Transaction_TypeTransfer:
232     return "transfer";
233   case AB_Transaction_TypeDebitNote:
234     return "debitNote";
235   case AB_Transaction_TypeStandingOrder:
236     return "standingOrder";
237   case AB_Transaction_TypeInternalTransfer:
238     return "internalTransfer";
239   case AB_Transaction_TypeBrokerage:
240     return "brokerage";
241   case AB_Transaction_TypeTransaction:
242     return "transaction";
243   case AB_Transaction_TypeSplit:
244     return "split";
245   case AB_Transaction_TypeUnknown:
246   default:
247     return "unknown";
248   }
249 }
250 
AB_Transaction_SubType_toString(AB_TRANSACTION_SUBTYPE p_i)251 const char *AB_Transaction_SubType_toString(AB_TRANSACTION_SUBTYPE p_i)
252 {
253   switch (p_i) {
254   case AB_Transaction_SubTypeNone:
255     return "none";
256   case AB_Transaction_SubTypeStandard:
257     return "standard";
258   case AB_Transaction_SubTypeCheck:
259     return "check";
260   case AB_Transaction_SubTypeBookedDebitNote:
261     return "bookedDebitNote";
262   case AB_Transaction_SubTypeDrawnDebitNote:
263     return "drawnDebitNote";
264   case AB_Transaction_SubTypeStandingOrder:
265     return "standingOrder";
266   case AB_Transaction_SubTypeLoan:
267     return "loan";
268   case AB_Transaction_SubTypeEuStandard:
269     return "euStandard";
270   case AB_Transaction_SubTypeEuASAP:
271     return "euASAP";
272   case AB_Transaction_SubTypeBuy:
273     return "buy";
274   case AB_Transaction_SubTypeSell:
275     return "sell";
276   case AB_Transaction_SubTypeReinvest:
277     return "reinvest";
278   case AB_Transaction_SubTypeDividend:
279     return "dividend";
280   case AB_Transaction_SubTypeUnknown:
281   default:
282     return "unknown";
283   }
284 }
285 
AB_Transaction_Command_toString(AB_TRANSACTION_COMMAND p_i)286 const char *AB_Transaction_Command_toString(AB_TRANSACTION_COMMAND p_i)
287 {
288   switch (p_i) {
289   case AB_Transaction_CommandNone:
290     return "none";
291   case AB_Transaction_CommandGetBalance:
292     return "getBalance";
293   case AB_Transaction_CommandGetTransactions:
294     return "getTransactions";
295   case AB_Transaction_CommandGetStandingOrders:
296     return "getStandingOrders";
297   case AB_Transaction_CommandGetDatedTransfers:
298     return "getDatedTransfers";
299   case AB_Transaction_CommandSepaGetStandingOrders:
300     return "sepaGetStandingOrders";
301   case AB_Transaction_CommandLoadCellPhone:
302     return "loadCellPhone";
303   case AB_Transaction_CommandGetEStatements:
304     return "getEStatements";
305   case AB_Transaction_CommandTransfer:
306     return "transfer";
307   case AB_Transaction_CommandDebitNote:
308     return "debitNote";
309   case AB_Transaction_CommandCreateStandingOrder:
310     return "createStandingOrder";
311   case AB_Transaction_CommandModifyStandingOrder:
312     return "modifyStandingOrder";
313   case AB_Transaction_CommandDeleteStandingOrder:
314     return "deleteStandingOrder";
315   case AB_Transaction_CommandCreateDatedTransfer:
316     return "createDatedTransfer";
317   case AB_Transaction_CommandModifyDatedTransfer:
318     return "modifyDatedTransfer";
319   case AB_Transaction_CommandDeleteDatedTransfer:
320     return "deleteDatedTransfer";
321   case AB_Transaction_CommandInternalTransfer:
322     return "internalTransfer";
323   case AB_Transaction_CommandGetDepot:
324     return "getDepot";
325   case AB_Transaction_CommandSepaTransfer:
326     return "sepaTransfer";
327   case AB_Transaction_CommandSepaDebitNote:
328     return "sepaDebitNote";
329   case AB_Transaction_CommandSepaFlashDebitNote:
330     return "sepaFlashDebitNote";
331   case AB_Transaction_CommandSepaCreateStandingOrder:
332     return "sepaCreateStandingOrder";
333   case AB_Transaction_CommandSepaModifyStandingOrder:
334     return "sepaModifyStandingOrder";
335   case AB_Transaction_CommandSepaDeleteStandingOrder:
336     return "sepaDeleteStandingOrder";
337   case AB_Transaction_CommandSepaCreateDatedTransfer:
338     return "sepaCreateDatedTransfer";
339   case AB_Transaction_CommandSepaModifyDatedTransfer:
340     return "sepaModifyDatedTransfer";
341   case AB_Transaction_CommandSepaDeleteDatedTransfer:
342     return "sepaDeleteDatedTransfer";
343   case AB_Transaction_CommandSepaInternalTransfer:
344     return "sepaInternalTransfer";
345   case AB_Transaction_CommandUnknown:
346   default:
347     return "unknown";
348   }
349 }
350 
AB_Transaction_Status_toString(AB_TRANSACTION_STATUS p_i)351 const char *AB_Transaction_Status_toString(AB_TRANSACTION_STATUS p_i)
352 {
353   switch (p_i) {
354   case AB_Transaction_StatusNone:
355     return "none";
356   case AB_Transaction_StatusEnqueued:
357     return "enqueued";
358   case AB_Transaction_StatusSending:
359     return "sending";
360   case AB_Transaction_StatusSent:
361     return "sent";
362   case AB_Transaction_StatusAccepted:
363     return "accepted";
364   case AB_Transaction_StatusRejected:
365     return "rejected";
366   case AB_Transaction_StatusPending:
367     return "pending";
368   case AB_Transaction_StatusAutoReconciled:
369     return "autoReconciled";
370   case AB_Transaction_StatusManuallyReconciled:
371     return "manuallyReconciled";
372   case AB_Transaction_StatusRevoked:
373     return "revoked";
374   case AB_Transaction_StatusAborted:
375     return "aborted";
376   case AB_Transaction_StatusError:
377     return "error";
378   case AB_Transaction_StatusUnknown:
379   default:
380     return "unknown";
381   }
382 }
383 
AB_Transaction_Period_toString(AB_TRANSACTION_PERIOD p_i)384 const char *AB_Transaction_Period_toString(AB_TRANSACTION_PERIOD p_i)
385 {
386   switch (p_i) {
387   case AB_Transaction_PeriodNone:
388     return "none";
389   case AB_Transaction_PeriodMonthly:
390     return "monthly";
391   case AB_Transaction_PeriodWeekly:
392     return "weekly";
393   case AB_Transaction_PeriodUnknown:
394   default:
395     return "unknown";
396   }
397 }
398 
AB_Transaction_Charge_toString(AB_TRANSACTION_CHARGE p_i)399 const char *AB_Transaction_Charge_toString(AB_TRANSACTION_CHARGE p_i)
400 {
401   switch (p_i) {
402   case AB_Transaction_ChargeNobody:
403     return "nobody";
404   case AB_Transaction_ChargeLocal:
405     return "local";
406   case AB_Transaction_ChargeRemote:
407     return "remote";
408   case AB_Transaction_ChargeShare:
409     return "share";
410   case AB_Transaction_ChargeUnknown:
411   default:
412     return "unknown";
413   }
414 }
415 
AB_Transaction_Sequence_toString(AB_TRANSACTION_SEQUENCE p_i)416 const char *AB_Transaction_Sequence_toString(AB_TRANSACTION_SEQUENCE p_i)
417 {
418   switch (p_i) {
419   case AB_Transaction_SequenceOnce:
420     return "once";
421   case AB_Transaction_SequenceFirst:
422     return "first";
423   case AB_Transaction_SequenceFollowing:
424     return "following";
425   case AB_Transaction_SequenceFinal:
426     return "final";
427   case AB_Transaction_SequenceUnknown:
428   default:
429     return "unknown";
430   }
431 }
432 
AB_Transaction_new(void)433 AB_TRANSACTION *AB_Transaction_new(void)
434 {
435   AB_TRANSACTION *p_struct;
436 
437   GWEN_NEW_OBJECT(AB_TRANSACTION, p_struct)
438   p_struct->_refCount=1;
439   GWEN_LIST_INIT(AB_TRANSACTION, p_struct)
440   /* members */
441   p_struct->type=AB_Transaction_TypeUnknown;
442   p_struct->subType=AB_Transaction_SubTypeNone;
443   p_struct->command=AB_Transaction_CommandNone;
444   p_struct->status=AB_Transaction_StatusUnknown;
445   p_struct->uniqueAccountId=0;
446   p_struct->uniqueId=0;
447   p_struct->refUniqueId=0;
448   p_struct->idForApplication=0;
449   p_struct->stringIdForApplication=0;
450   p_struct->sessionId=0;
451   p_struct->groupId=0;
452   p_struct->fiId=NULL;
453   p_struct->localIban=NULL;
454   p_struct->localBic=NULL;
455   p_struct->localCountry=NULL;
456   p_struct->localBankCode=NULL;
457   p_struct->localBranchId=NULL;
458   p_struct->localAccountNumber=NULL;
459   p_struct->localSuffix=NULL;
460   p_struct->localName=NULL;
461   p_struct->remoteCountry=NULL;
462   p_struct->remoteBankCode=NULL;
463   p_struct->remoteBranchId=NULL;
464   p_struct->remoteAccountNumber=NULL;
465   p_struct->remoteSuffix=NULL;
466   p_struct->remoteIban=NULL;
467   p_struct->remoteBic=NULL;
468   p_struct->remoteName=NULL;
469   p_struct->date=NULL;
470   p_struct->valutaDate=NULL;
471   p_struct->value=AB_Value_new();
472   p_struct->fees=AB_Value_new();
473   p_struct->transactionCode=0;
474   p_struct->transactionText=NULL;
475   p_struct->transactionKey=NULL;
476   p_struct->textKey=0;
477   p_struct->primanota=NULL;
478   p_struct->purpose=NULL;
479   p_struct->category=NULL;
480   p_struct->customerReference=NULL;
481   p_struct->bankReference=NULL;
482   p_struct->endToEndReference=NULL;
483   p_struct->ultimateCreditor=NULL;
484   p_struct->ultimateDebtor=NULL;
485   p_struct->creditorSchemeId=NULL;
486   p_struct->originatorId=NULL;
487   p_struct->mandateId=NULL;
488   p_struct->mandateDate=NULL;
489   p_struct->mandateDebitorName=NULL;
490   p_struct->originalCreditorSchemeId=NULL;
491   p_struct->originalMandateId=NULL;
492   p_struct->originalCreditorName=NULL;
493   p_struct->sequence=AB_Transaction_SequenceUnknown;
494   p_struct->charge=AB_Transaction_ChargeUnknown;
495   p_struct->remoteAddrStreet=NULL;
496   p_struct->remoteAddrZipcode=NULL;
497   p_struct->remoteAddrCity=NULL;
498   p_struct->remoteAddrPhone=NULL;
499   p_struct->period=AB_Transaction_PeriodUnknown;
500   p_struct->cycle=0;
501   p_struct->executionDay=0;
502   p_struct->firstDate=NULL;
503   p_struct->lastDate=NULL;
504   p_struct->nextDate=NULL;
505   p_struct->unitId=NULL;
506   p_struct->unitIdNameSpace=NULL;
507   p_struct->tickerSymbol=NULL;
508   p_struct->units=AB_Value_new();
509   p_struct->unitPriceValue=AB_Value_new();
510   p_struct->unitPriceDate=NULL;
511   p_struct->commissionValue=AB_Value_new();
512   p_struct->memo=NULL;
513   p_struct->hash=NULL;
514   /* virtual functions */
515 
516   return p_struct;
517 }
518 
AB_Transaction_free(AB_TRANSACTION * p_struct)519 void AB_Transaction_free(AB_TRANSACTION *p_struct)
520 {
521   if (p_struct) {
522     assert(p_struct->_refCount);
523     if (p_struct->_refCount==1) {
524       GWEN_LIST_FINI(AB_TRANSACTION, p_struct)
525       /* members */
526       free(p_struct->fiId);
527       p_struct->fiId=NULL;
528       free(p_struct->localIban);
529       p_struct->localIban=NULL;
530       free(p_struct->localBic);
531       p_struct->localBic=NULL;
532       free(p_struct->localCountry);
533       p_struct->localCountry=NULL;
534       free(p_struct->localBankCode);
535       p_struct->localBankCode=NULL;
536       free(p_struct->localBranchId);
537       p_struct->localBranchId=NULL;
538       free(p_struct->localAccountNumber);
539       p_struct->localAccountNumber=NULL;
540       free(p_struct->localSuffix);
541       p_struct->localSuffix=NULL;
542       free(p_struct->localName);
543       p_struct->localName=NULL;
544       free(p_struct->remoteCountry);
545       p_struct->remoteCountry=NULL;
546       free(p_struct->remoteBankCode);
547       p_struct->remoteBankCode=NULL;
548       free(p_struct->remoteBranchId);
549       p_struct->remoteBranchId=NULL;
550       free(p_struct->remoteAccountNumber);
551       p_struct->remoteAccountNumber=NULL;
552       free(p_struct->remoteSuffix);
553       p_struct->remoteSuffix=NULL;
554       free(p_struct->remoteIban);
555       p_struct->remoteIban=NULL;
556       free(p_struct->remoteBic);
557       p_struct->remoteBic=NULL;
558       free(p_struct->remoteName);
559       p_struct->remoteName=NULL;
560       GWEN_Date_free(p_struct->date);
561       p_struct->date=NULL;
562       GWEN_Date_free(p_struct->valutaDate);
563       p_struct->valutaDate=NULL;
564       AB_Value_free(p_struct->value);
565       AB_Value_free(p_struct->fees);
566       free(p_struct->transactionText);
567       p_struct->transactionText=NULL;
568       free(p_struct->transactionKey);
569       p_struct->transactionKey=NULL;
570       free(p_struct->primanota);
571       p_struct->primanota=NULL;
572       free(p_struct->purpose);
573       p_struct->purpose=NULL;
574       free(p_struct->category);
575       p_struct->category=NULL;
576       free(p_struct->customerReference);
577       p_struct->customerReference=NULL;
578       free(p_struct->bankReference);
579       p_struct->bankReference=NULL;
580       free(p_struct->endToEndReference);
581       p_struct->endToEndReference=NULL;
582       free(p_struct->ultimateCreditor);
583       p_struct->ultimateCreditor=NULL;
584       free(p_struct->ultimateDebtor);
585       p_struct->ultimateDebtor=NULL;
586       free(p_struct->creditorSchemeId);
587       p_struct->creditorSchemeId=NULL;
588       free(p_struct->originatorId);
589       p_struct->originatorId=NULL;
590       free(p_struct->mandateId);
591       p_struct->mandateId=NULL;
592       GWEN_Date_free(p_struct->mandateDate);
593       p_struct->mandateDate=NULL;
594       free(p_struct->mandateDebitorName);
595       p_struct->mandateDebitorName=NULL;
596       free(p_struct->originalCreditorSchemeId);
597       p_struct->originalCreditorSchemeId=NULL;
598       free(p_struct->originalMandateId);
599       p_struct->originalMandateId=NULL;
600       free(p_struct->originalCreditorName);
601       p_struct->originalCreditorName=NULL;
602       free(p_struct->remoteAddrStreet);
603       p_struct->remoteAddrStreet=NULL;
604       free(p_struct->remoteAddrZipcode);
605       p_struct->remoteAddrZipcode=NULL;
606       free(p_struct->remoteAddrCity);
607       p_struct->remoteAddrCity=NULL;
608       free(p_struct->remoteAddrPhone);
609       p_struct->remoteAddrPhone=NULL;
610       GWEN_Date_free(p_struct->firstDate);
611       p_struct->firstDate=NULL;
612       GWEN_Date_free(p_struct->lastDate);
613       p_struct->lastDate=NULL;
614       GWEN_Date_free(p_struct->nextDate);
615       p_struct->nextDate=NULL;
616       free(p_struct->unitId);
617       p_struct->unitId=NULL;
618       free(p_struct->unitIdNameSpace);
619       p_struct->unitIdNameSpace=NULL;
620       free(p_struct->tickerSymbol);
621       p_struct->tickerSymbol=NULL;
622       AB_Value_free(p_struct->units);
623       AB_Value_free(p_struct->unitPriceValue);
624       GWEN_Date_free(p_struct->unitPriceDate);
625       p_struct->unitPriceDate=NULL;
626       AB_Value_free(p_struct->commissionValue);
627       free(p_struct->memo);
628       p_struct->memo=NULL;
629       free(p_struct->hash);
630       p_struct->hash=NULL;
631       p_struct->_refCount=0;
632       GWEN_FREE_OBJECT(p_struct);
633     }
634     else
635       p_struct->_refCount--;
636   }
637 }
638 
AB_Transaction_Attach(AB_TRANSACTION * p_struct)639 void AB_Transaction_Attach(AB_TRANSACTION *p_struct)
640 {
641   assert(p_struct);
642   assert(p_struct->_refCount);
643   p_struct->_refCount++;
644 }
645 
AB_Transaction_dup(const AB_TRANSACTION * p_src)646 AB_TRANSACTION *AB_Transaction_dup(const AB_TRANSACTION *p_src)
647 {
648   AB_TRANSACTION *p_struct;
649 
650   assert(p_src);
651   p_struct=AB_Transaction_new();
652   /* member "type" */
653   p_struct->type=p_src->type;
654 
655   /* member "subType" */
656   p_struct->subType=p_src->subType;
657 
658   /* member "command" */
659   p_struct->command=p_src->command;
660 
661   /* member "status" */
662   p_struct->status=p_src->status;
663 
664   /* member "uniqueAccountId" */
665   p_struct->uniqueAccountId=p_src->uniqueAccountId;
666 
667   /* member "uniqueId" */
668   p_struct->uniqueId=p_src->uniqueId;
669 
670   /* member "refUniqueId" */
671   p_struct->refUniqueId=p_src->refUniqueId;
672 
673   /* member "idForApplication" */
674   p_struct->idForApplication=p_src->idForApplication;
675 
676   /* member "stringIdForApplication" */
677   p_struct->stringIdForApplication=NULL;
678   if (p_src->stringIdForApplication) {
679     p_struct->stringIdForApplication=strdup(p_src->stringIdForApplication);
680   }
681 
682   /* member "sessionId" */
683   p_struct->sessionId=p_src->sessionId;
684 
685   /* member "groupId" */
686   p_struct->groupId=p_src->groupId;
687 
688   /* member "fiId" */
689   if (p_struct->fiId) {
690     free(p_struct->fiId);
691     p_struct->fiId=NULL;
692     p_struct->fiId=NULL;
693   }
694   if (p_src->fiId) {
695     p_struct->fiId=strdup(p_src->fiId);
696   }
697 
698   /* member "localIban" */
699   if (p_struct->localIban) {
700     free(p_struct->localIban);
701     p_struct->localIban=NULL;
702     p_struct->localIban=NULL;
703   }
704   if (p_src->localIban) {
705     p_struct->localIban=strdup(p_src->localIban);
706   }
707 
708   /* member "localBic" */
709   if (p_struct->localBic) {
710     free(p_struct->localBic);
711     p_struct->localBic=NULL;
712     p_struct->localBic=NULL;
713   }
714   if (p_src->localBic) {
715     p_struct->localBic=strdup(p_src->localBic);
716   }
717 
718   /* member "localCountry" */
719   if (p_struct->localCountry) {
720     free(p_struct->localCountry);
721     p_struct->localCountry=NULL;
722     p_struct->localCountry=NULL;
723   }
724   if (p_src->localCountry) {
725     p_struct->localCountry=strdup(p_src->localCountry);
726   }
727 
728   /* member "localBankCode" */
729   if (p_struct->localBankCode) {
730     free(p_struct->localBankCode);
731     p_struct->localBankCode=NULL;
732     p_struct->localBankCode=NULL;
733   }
734   if (p_src->localBankCode) {
735     p_struct->localBankCode=strdup(p_src->localBankCode);
736   }
737 
738   /* member "localBranchId" */
739   if (p_struct->localBranchId) {
740     free(p_struct->localBranchId);
741     p_struct->localBranchId=NULL;
742     p_struct->localBranchId=NULL;
743   }
744   if (p_src->localBranchId) {
745     p_struct->localBranchId=strdup(p_src->localBranchId);
746   }
747 
748   /* member "localAccountNumber" */
749   if (p_struct->localAccountNumber) {
750     free(p_struct->localAccountNumber);
751     p_struct->localAccountNumber=NULL;
752     p_struct->localAccountNumber=NULL;
753   }
754   if (p_src->localAccountNumber) {
755     p_struct->localAccountNumber=strdup(p_src->localAccountNumber);
756   }
757 
758   /* member "localSuffix" */
759   if (p_struct->localSuffix) {
760     free(p_struct->localSuffix);
761     p_struct->localSuffix=NULL;
762     p_struct->localSuffix=NULL;
763   }
764   if (p_src->localSuffix) {
765     p_struct->localSuffix=strdup(p_src->localSuffix);
766   }
767 
768   /* member "localName" */
769   if (p_struct->localName) {
770     free(p_struct->localName);
771     p_struct->localName=NULL;
772     p_struct->localName=NULL;
773   }
774   if (p_src->localName) {
775     p_struct->localName=strdup(p_src->localName);
776   }
777 
778   /* member "remoteCountry" */
779   if (p_struct->remoteCountry) {
780     free(p_struct->remoteCountry);
781     p_struct->remoteCountry=NULL;
782     p_struct->remoteCountry=NULL;
783   }
784   if (p_src->remoteCountry) {
785     p_struct->remoteCountry=strdup(p_src->remoteCountry);
786   }
787 
788   /* member "remoteBankCode" */
789   if (p_struct->remoteBankCode) {
790     free(p_struct->remoteBankCode);
791     p_struct->remoteBankCode=NULL;
792     p_struct->remoteBankCode=NULL;
793   }
794   if (p_src->remoteBankCode) {
795     p_struct->remoteBankCode=strdup(p_src->remoteBankCode);
796   }
797 
798   /* member "remoteBranchId" */
799   if (p_struct->remoteBranchId) {
800     free(p_struct->remoteBranchId);
801     p_struct->remoteBranchId=NULL;
802     p_struct->remoteBranchId=NULL;
803   }
804   if (p_src->remoteBranchId) {
805     p_struct->remoteBranchId=strdup(p_src->remoteBranchId);
806   }
807 
808   /* member "remoteAccountNumber" */
809   if (p_struct->remoteAccountNumber) {
810     free(p_struct->remoteAccountNumber);
811     p_struct->remoteAccountNumber=NULL;
812     p_struct->remoteAccountNumber=NULL;
813   }
814   if (p_src->remoteAccountNumber) {
815     p_struct->remoteAccountNumber=strdup(p_src->remoteAccountNumber);
816   }
817 
818   /* member "remoteSuffix" */
819   if (p_struct->remoteSuffix) {
820     free(p_struct->remoteSuffix);
821     p_struct->remoteSuffix=NULL;
822     p_struct->remoteSuffix=NULL;
823   }
824   if (p_src->remoteSuffix) {
825     p_struct->remoteSuffix=strdup(p_src->remoteSuffix);
826   }
827 
828   /* member "remoteIban" */
829   if (p_struct->remoteIban) {
830     free(p_struct->remoteIban);
831     p_struct->remoteIban=NULL;
832     p_struct->remoteIban=NULL;
833   }
834   if (p_src->remoteIban) {
835     p_struct->remoteIban=strdup(p_src->remoteIban);
836   }
837 
838   /* member "remoteBic" */
839   if (p_struct->remoteBic) {
840     free(p_struct->remoteBic);
841     p_struct->remoteBic=NULL;
842     p_struct->remoteBic=NULL;
843   }
844   if (p_src->remoteBic) {
845     p_struct->remoteBic=strdup(p_src->remoteBic);
846   }
847 
848   /* member "remoteName" */
849   if (p_struct->remoteName) {
850     free(p_struct->remoteName);
851     p_struct->remoteName=NULL;
852     p_struct->remoteName=NULL;
853   }
854   if (p_src->remoteName) {
855     p_struct->remoteName=strdup(p_src->remoteName);
856   }
857 
858   /* member "date" */
859   if (p_struct->date) {
860     GWEN_Date_free(p_struct->date);
861     p_struct->date=NULL;
862     p_struct->date=NULL;
863   }
864   if (p_src->date) {
865     p_struct->date=GWEN_Date_dup(p_src->date);
866   }
867 
868   /* member "valutaDate" */
869   if (p_struct->valutaDate) {
870     GWEN_Date_free(p_struct->valutaDate);
871     p_struct->valutaDate=NULL;
872     p_struct->valutaDate=NULL;
873   }
874   if (p_src->valutaDate) {
875     p_struct->valutaDate=GWEN_Date_dup(p_src->valutaDate);
876   }
877 
878   /* member "value" */
879   if (p_struct->value) {
880     AB_Value_free(p_struct->value);
881     p_struct->value=NULL;
882   }
883   if (p_src->value) {
884     p_struct->value=AB_Value_dup(p_src->value);
885   }
886 
887   /* member "fees" */
888   if (p_struct->fees) {
889     AB_Value_free(p_struct->fees);
890     p_struct->fees=NULL;
891   }
892   if (p_src->fees) {
893     p_struct->fees=AB_Value_dup(p_src->fees);
894   }
895 
896   /* member "transactionCode" */
897   p_struct->transactionCode=p_src->transactionCode;
898 
899   /* member "transactionText" */
900   if (p_struct->transactionText) {
901     free(p_struct->transactionText);
902     p_struct->transactionText=NULL;
903     p_struct->transactionText=NULL;
904   }
905   if (p_src->transactionText) {
906     p_struct->transactionText=strdup(p_src->transactionText);
907   }
908 
909   /* member "transactionKey" */
910   if (p_struct->transactionKey) {
911     free(p_struct->transactionKey);
912     p_struct->transactionKey=NULL;
913     p_struct->transactionKey=NULL;
914   }
915   if (p_src->transactionKey) {
916     p_struct->transactionKey=strdup(p_src->transactionKey);
917   }
918 
919   /* member "textKey" */
920   p_struct->textKey=p_src->textKey;
921 
922   /* member "primanota" */
923   if (p_struct->primanota) {
924     free(p_struct->primanota);
925     p_struct->primanota=NULL;
926     p_struct->primanota=NULL;
927   }
928   if (p_src->primanota) {
929     p_struct->primanota=strdup(p_src->primanota);
930   }
931 
932   /* member "purpose" */
933   if (p_struct->purpose) {
934     free(p_struct->purpose);
935     p_struct->purpose=NULL;
936     p_struct->purpose=NULL;
937   }
938   if (p_src->purpose) {
939     p_struct->purpose=strdup(p_src->purpose);
940   }
941 
942   /* member "category" */
943   if (p_struct->category) {
944     free(p_struct->category);
945     p_struct->category=NULL;
946     p_struct->category=NULL;
947   }
948   if (p_src->category) {
949     p_struct->category=strdup(p_src->category);
950   }
951 
952   /* member "customerReference" */
953   if (p_struct->customerReference) {
954     free(p_struct->customerReference);
955     p_struct->customerReference=NULL;
956     p_struct->customerReference=NULL;
957   }
958   if (p_src->customerReference) {
959     p_struct->customerReference=strdup(p_src->customerReference);
960   }
961 
962   /* member "bankReference" */
963   if (p_struct->bankReference) {
964     free(p_struct->bankReference);
965     p_struct->bankReference=NULL;
966     p_struct->bankReference=NULL;
967   }
968   if (p_src->bankReference) {
969     p_struct->bankReference=strdup(p_src->bankReference);
970   }
971 
972   /* member "endToEndReference" */
973   if (p_struct->endToEndReference) {
974     free(p_struct->endToEndReference);
975     p_struct->endToEndReference=NULL;
976     p_struct->endToEndReference=NULL;
977   }
978   if (p_src->endToEndReference) {
979     p_struct->endToEndReference=strdup(p_src->endToEndReference);
980   }
981 
982   /* member "ultimateCreditor" */
983   if (p_struct->ultimateCreditor) {
984     free(p_struct->ultimateCreditor);
985     p_struct->ultimateCreditor=NULL;
986     p_struct->ultimateCreditor=NULL;
987   }
988   if (p_src->ultimateCreditor) {
989     p_struct->ultimateCreditor=strdup(p_src->ultimateCreditor);
990   }
991 
992   /* member "ultimateDebtor" */
993   if (p_struct->ultimateDebtor) {
994     free(p_struct->ultimateDebtor);
995     p_struct->ultimateDebtor=NULL;
996     p_struct->ultimateDebtor=NULL;
997   }
998   if (p_src->ultimateDebtor) {
999     p_struct->ultimateDebtor=strdup(p_src->ultimateDebtor);
1000   }
1001 
1002   /* member "creditorSchemeId" */
1003   if (p_struct->creditorSchemeId) {
1004     free(p_struct->creditorSchemeId);
1005     p_struct->creditorSchemeId=NULL;
1006     p_struct->creditorSchemeId=NULL;
1007   }
1008   if (p_src->creditorSchemeId) {
1009     p_struct->creditorSchemeId=strdup(p_src->creditorSchemeId);
1010   }
1011 
1012   /* member "originatorId" */
1013   if (p_struct->originatorId) {
1014     free(p_struct->originatorId);
1015     p_struct->originatorId=NULL;
1016     p_struct->originatorId=NULL;
1017   }
1018   if (p_src->originatorId) {
1019     p_struct->originatorId=strdup(p_src->originatorId);
1020   }
1021 
1022   /* member "mandateId" */
1023   if (p_struct->mandateId) {
1024     free(p_struct->mandateId);
1025     p_struct->mandateId=NULL;
1026     p_struct->mandateId=NULL;
1027   }
1028   if (p_src->mandateId) {
1029     p_struct->mandateId=strdup(p_src->mandateId);
1030   }
1031 
1032   /* member "mandateDate" */
1033   if (p_struct->mandateDate) {
1034     GWEN_Date_free(p_struct->mandateDate);
1035     p_struct->mandateDate=NULL;
1036     p_struct->mandateDate=NULL;
1037   }
1038   if (p_src->mandateDate) {
1039     p_struct->mandateDate=GWEN_Date_dup(p_src->mandateDate);
1040   }
1041 
1042   /* member "mandateDebitorName" */
1043   if (p_struct->mandateDebitorName) {
1044     free(p_struct->mandateDebitorName);
1045     p_struct->mandateDebitorName=NULL;
1046     p_struct->mandateDebitorName=NULL;
1047   }
1048   if (p_src->mandateDebitorName) {
1049     p_struct->mandateDebitorName=strdup(p_src->mandateDebitorName);
1050   }
1051 
1052   /* member "originalCreditorSchemeId" */
1053   if (p_struct->originalCreditorSchemeId) {
1054     free(p_struct->originalCreditorSchemeId);
1055     p_struct->originalCreditorSchemeId=NULL;
1056     p_struct->originalCreditorSchemeId=NULL;
1057   }
1058   if (p_src->originalCreditorSchemeId) {
1059     p_struct->originalCreditorSchemeId=strdup(p_src->originalCreditorSchemeId);
1060   }
1061 
1062   /* member "originalMandateId" */
1063   if (p_struct->originalMandateId) {
1064     free(p_struct->originalMandateId);
1065     p_struct->originalMandateId=NULL;
1066     p_struct->originalMandateId=NULL;
1067   }
1068   if (p_src->originalMandateId) {
1069     p_struct->originalMandateId=strdup(p_src->originalMandateId);
1070   }
1071 
1072   /* member "originalCreditorName" */
1073   if (p_struct->originalCreditorName) {
1074     free(p_struct->originalCreditorName);
1075     p_struct->originalCreditorName=NULL;
1076     p_struct->originalCreditorName=NULL;
1077   }
1078   if (p_src->originalCreditorName) {
1079     p_struct->originalCreditorName=strdup(p_src->originalCreditorName);
1080   }
1081 
1082   /* member "sequence" */
1083   p_struct->sequence=p_src->sequence;
1084 
1085   /* member "charge" */
1086   p_struct->charge=p_src->charge;
1087 
1088   /* member "remoteAddrStreet" */
1089   if (p_struct->remoteAddrStreet) {
1090     free(p_struct->remoteAddrStreet);
1091     p_struct->remoteAddrStreet=NULL;
1092     p_struct->remoteAddrStreet=NULL;
1093   }
1094   if (p_src->remoteAddrStreet) {
1095     p_struct->remoteAddrStreet=strdup(p_src->remoteAddrStreet);
1096   }
1097 
1098   /* member "remoteAddrZipcode" */
1099   if (p_struct->remoteAddrZipcode) {
1100     free(p_struct->remoteAddrZipcode);
1101     p_struct->remoteAddrZipcode=NULL;
1102     p_struct->remoteAddrZipcode=NULL;
1103   }
1104   if (p_src->remoteAddrZipcode) {
1105     p_struct->remoteAddrZipcode=strdup(p_src->remoteAddrZipcode);
1106   }
1107 
1108   /* member "remoteAddrCity" */
1109   if (p_struct->remoteAddrCity) {
1110     free(p_struct->remoteAddrCity);
1111     p_struct->remoteAddrCity=NULL;
1112     p_struct->remoteAddrCity=NULL;
1113   }
1114   if (p_src->remoteAddrCity) {
1115     p_struct->remoteAddrCity=strdup(p_src->remoteAddrCity);
1116   }
1117 
1118   /* member "remoteAddrPhone" */
1119   if (p_struct->remoteAddrPhone) {
1120     free(p_struct->remoteAddrPhone);
1121     p_struct->remoteAddrPhone=NULL;
1122     p_struct->remoteAddrPhone=NULL;
1123   }
1124   if (p_src->remoteAddrPhone) {
1125     p_struct->remoteAddrPhone=strdup(p_src->remoteAddrPhone);
1126   }
1127 
1128   /* member "period" */
1129   p_struct->period=p_src->period;
1130 
1131   /* member "cycle" */
1132   p_struct->cycle=p_src->cycle;
1133 
1134   /* member "executionDay" */
1135   p_struct->executionDay=p_src->executionDay;
1136 
1137   /* member "firstDate" */
1138   if (p_struct->firstDate) {
1139     GWEN_Date_free(p_struct->firstDate);
1140     p_struct->firstDate=NULL;
1141     p_struct->firstDate=NULL;
1142   }
1143   if (p_src->firstDate) {
1144     p_struct->firstDate=GWEN_Date_dup(p_src->firstDate);
1145   }
1146 
1147   /* member "lastDate" */
1148   if (p_struct->lastDate) {
1149     GWEN_Date_free(p_struct->lastDate);
1150     p_struct->lastDate=NULL;
1151     p_struct->lastDate=NULL;
1152   }
1153   if (p_src->lastDate) {
1154     p_struct->lastDate=GWEN_Date_dup(p_src->lastDate);
1155   }
1156 
1157   /* member "nextDate" */
1158   if (p_struct->nextDate) {
1159     GWEN_Date_free(p_struct->nextDate);
1160     p_struct->nextDate=NULL;
1161     p_struct->nextDate=NULL;
1162   }
1163   if (p_src->nextDate) {
1164     p_struct->nextDate=GWEN_Date_dup(p_src->nextDate);
1165   }
1166 
1167   /* member "unitId" */
1168   if (p_struct->unitId) {
1169     free(p_struct->unitId);
1170     p_struct->unitId=NULL;
1171     p_struct->unitId=NULL;
1172   }
1173   if (p_src->unitId) {
1174     p_struct->unitId=strdup(p_src->unitId);
1175   }
1176 
1177   /* member "unitIdNameSpace" */
1178   if (p_struct->unitIdNameSpace) {
1179     free(p_struct->unitIdNameSpace);
1180     p_struct->unitIdNameSpace=NULL;
1181     p_struct->unitIdNameSpace=NULL;
1182   }
1183   if (p_src->unitIdNameSpace) {
1184     p_struct->unitIdNameSpace=strdup(p_src->unitIdNameSpace);
1185   }
1186 
1187   /* member "tickerSymbol" */
1188   if (p_struct->tickerSymbol) {
1189     free(p_struct->tickerSymbol);
1190     p_struct->tickerSymbol=NULL;
1191     p_struct->tickerSymbol=NULL;
1192   }
1193   if (p_src->tickerSymbol) {
1194     p_struct->tickerSymbol=strdup(p_src->tickerSymbol);
1195   }
1196 
1197   /* member "units" */
1198   if (p_struct->units) {
1199     AB_Value_free(p_struct->units);
1200     p_struct->units=NULL;
1201   }
1202   if (p_src->units) {
1203     p_struct->units=AB_Value_dup(p_src->units);
1204   }
1205 
1206   /* member "unitPriceValue" */
1207   if (p_struct->unitPriceValue) {
1208     AB_Value_free(p_struct->unitPriceValue);
1209     p_struct->unitPriceValue=NULL;
1210   }
1211   if (p_src->unitPriceValue) {
1212     p_struct->unitPriceValue=AB_Value_dup(p_src->unitPriceValue);
1213   }
1214 
1215   /* member "unitPriceDate" */
1216   if (p_struct->unitPriceDate) {
1217     GWEN_Date_free(p_struct->unitPriceDate);
1218     p_struct->unitPriceDate=NULL;
1219     p_struct->unitPriceDate=NULL;
1220   }
1221   if (p_src->unitPriceDate) {
1222     p_struct->unitPriceDate=GWEN_Date_dup(p_src->unitPriceDate);
1223   }
1224 
1225   /* member "commissionValue" */
1226   if (p_struct->commissionValue) {
1227     AB_Value_free(p_struct->commissionValue);
1228     p_struct->commissionValue=NULL;
1229   }
1230   if (p_src->commissionValue) {
1231     p_struct->commissionValue=AB_Value_dup(p_src->commissionValue);
1232   }
1233 
1234   /* member "memo" */
1235   if (p_struct->memo) {
1236     free(p_struct->memo);
1237     p_struct->memo=NULL;
1238     p_struct->memo=NULL;
1239   }
1240   if (p_src->memo) {
1241     p_struct->memo=strdup(p_src->memo);
1242   }
1243 
1244   /* member "hash" */
1245   if (p_struct->hash) {
1246     free(p_struct->hash);
1247     p_struct->hash=NULL;
1248     p_struct->hash=NULL;
1249   }
1250   if (p_src->hash) {
1251     p_struct->hash=strdup(p_src->hash);
1252   }
1253 
1254   return p_struct;
1255 }
1256 
AB_Transaction_copy(AB_TRANSACTION * p_struct,const AB_TRANSACTION * p_src)1257 AB_TRANSACTION *AB_Transaction_copy(AB_TRANSACTION *p_struct, const AB_TRANSACTION *p_src)
1258 {
1259   assert(p_struct);
1260   assert(p_src);
1261   /* member "type" */
1262   p_struct->type=p_src->type;
1263 
1264   /* member "subType" */
1265   p_struct->subType=p_src->subType;
1266 
1267   /* member "command" */
1268   p_struct->command=p_src->command;
1269 
1270   /* member "status" */
1271   p_struct->status=p_src->status;
1272 
1273   /* member "uniqueAccountId" */
1274   p_struct->uniqueAccountId=p_src->uniqueAccountId;
1275 
1276   /* member "uniqueId" */
1277   p_struct->uniqueId=p_src->uniqueId;
1278 
1279   /* member "refUniqueId" */
1280   p_struct->refUniqueId=p_src->refUniqueId;
1281 
1282   /* member "idForApplication" */
1283   p_struct->idForApplication=p_src->idForApplication;
1284 
1285   /* member "stringIdForApplication" */
1286   p_struct->stringIdForApplication=NULL;
1287   if (p_src->stringIdForApplication) {
1288     p_struct->stringIdForApplication=strdup(p_src->stringIdForApplication);
1289   }
1290 
1291   /* member "sessionId" */
1292   p_struct->sessionId=p_src->sessionId;
1293 
1294   /* member "groupId" */
1295   p_struct->groupId=p_src->groupId;
1296 
1297   /* member "fiId" */
1298   if (p_struct->fiId) {
1299     free(p_struct->fiId);
1300     p_struct->fiId=NULL;
1301     p_struct->fiId=NULL;
1302   }
1303   if (p_src->fiId) {
1304     p_struct->fiId=strdup(p_src->fiId);
1305   }
1306 
1307   /* member "localIban" */
1308   if (p_struct->localIban) {
1309     free(p_struct->localIban);
1310     p_struct->localIban=NULL;
1311     p_struct->localIban=NULL;
1312   }
1313   if (p_src->localIban) {
1314     p_struct->localIban=strdup(p_src->localIban);
1315   }
1316 
1317   /* member "localBic" */
1318   if (p_struct->localBic) {
1319     free(p_struct->localBic);
1320     p_struct->localBic=NULL;
1321     p_struct->localBic=NULL;
1322   }
1323   if (p_src->localBic) {
1324     p_struct->localBic=strdup(p_src->localBic);
1325   }
1326 
1327   /* member "localCountry" */
1328   if (p_struct->localCountry) {
1329     free(p_struct->localCountry);
1330     p_struct->localCountry=NULL;
1331     p_struct->localCountry=NULL;
1332   }
1333   if (p_src->localCountry) {
1334     p_struct->localCountry=strdup(p_src->localCountry);
1335   }
1336 
1337   /* member "localBankCode" */
1338   if (p_struct->localBankCode) {
1339     free(p_struct->localBankCode);
1340     p_struct->localBankCode=NULL;
1341     p_struct->localBankCode=NULL;
1342   }
1343   if (p_src->localBankCode) {
1344     p_struct->localBankCode=strdup(p_src->localBankCode);
1345   }
1346 
1347   /* member "localBranchId" */
1348   if (p_struct->localBranchId) {
1349     free(p_struct->localBranchId);
1350     p_struct->localBranchId=NULL;
1351     p_struct->localBranchId=NULL;
1352   }
1353   if (p_src->localBranchId) {
1354     p_struct->localBranchId=strdup(p_src->localBranchId);
1355   }
1356 
1357   /* member "localAccountNumber" */
1358   if (p_struct->localAccountNumber) {
1359     free(p_struct->localAccountNumber);
1360     p_struct->localAccountNumber=NULL;
1361     p_struct->localAccountNumber=NULL;
1362   }
1363   if (p_src->localAccountNumber) {
1364     p_struct->localAccountNumber=strdup(p_src->localAccountNumber);
1365   }
1366 
1367   /* member "localSuffix" */
1368   if (p_struct->localSuffix) {
1369     free(p_struct->localSuffix);
1370     p_struct->localSuffix=NULL;
1371     p_struct->localSuffix=NULL;
1372   }
1373   if (p_src->localSuffix) {
1374     p_struct->localSuffix=strdup(p_src->localSuffix);
1375   }
1376 
1377   /* member "localName" */
1378   if (p_struct->localName) {
1379     free(p_struct->localName);
1380     p_struct->localName=NULL;
1381     p_struct->localName=NULL;
1382   }
1383   if (p_src->localName) {
1384     p_struct->localName=strdup(p_src->localName);
1385   }
1386 
1387   /* member "remoteCountry" */
1388   if (p_struct->remoteCountry) {
1389     free(p_struct->remoteCountry);
1390     p_struct->remoteCountry=NULL;
1391     p_struct->remoteCountry=NULL;
1392   }
1393   if (p_src->remoteCountry) {
1394     p_struct->remoteCountry=strdup(p_src->remoteCountry);
1395   }
1396 
1397   /* member "remoteBankCode" */
1398   if (p_struct->remoteBankCode) {
1399     free(p_struct->remoteBankCode);
1400     p_struct->remoteBankCode=NULL;
1401     p_struct->remoteBankCode=NULL;
1402   }
1403   if (p_src->remoteBankCode) {
1404     p_struct->remoteBankCode=strdup(p_src->remoteBankCode);
1405   }
1406 
1407   /* member "remoteBranchId" */
1408   if (p_struct->remoteBranchId) {
1409     free(p_struct->remoteBranchId);
1410     p_struct->remoteBranchId=NULL;
1411     p_struct->remoteBranchId=NULL;
1412   }
1413   if (p_src->remoteBranchId) {
1414     p_struct->remoteBranchId=strdup(p_src->remoteBranchId);
1415   }
1416 
1417   /* member "remoteAccountNumber" */
1418   if (p_struct->remoteAccountNumber) {
1419     free(p_struct->remoteAccountNumber);
1420     p_struct->remoteAccountNumber=NULL;
1421     p_struct->remoteAccountNumber=NULL;
1422   }
1423   if (p_src->remoteAccountNumber) {
1424     p_struct->remoteAccountNumber=strdup(p_src->remoteAccountNumber);
1425   }
1426 
1427   /* member "remoteSuffix" */
1428   if (p_struct->remoteSuffix) {
1429     free(p_struct->remoteSuffix);
1430     p_struct->remoteSuffix=NULL;
1431     p_struct->remoteSuffix=NULL;
1432   }
1433   if (p_src->remoteSuffix) {
1434     p_struct->remoteSuffix=strdup(p_src->remoteSuffix);
1435   }
1436 
1437   /* member "remoteIban" */
1438   if (p_struct->remoteIban) {
1439     free(p_struct->remoteIban);
1440     p_struct->remoteIban=NULL;
1441     p_struct->remoteIban=NULL;
1442   }
1443   if (p_src->remoteIban) {
1444     p_struct->remoteIban=strdup(p_src->remoteIban);
1445   }
1446 
1447   /* member "remoteBic" */
1448   if (p_struct->remoteBic) {
1449     free(p_struct->remoteBic);
1450     p_struct->remoteBic=NULL;
1451     p_struct->remoteBic=NULL;
1452   }
1453   if (p_src->remoteBic) {
1454     p_struct->remoteBic=strdup(p_src->remoteBic);
1455   }
1456 
1457   /* member "remoteName" */
1458   if (p_struct->remoteName) {
1459     free(p_struct->remoteName);
1460     p_struct->remoteName=NULL;
1461     p_struct->remoteName=NULL;
1462   }
1463   if (p_src->remoteName) {
1464     p_struct->remoteName=strdup(p_src->remoteName);
1465   }
1466 
1467   /* member "date" */
1468   if (p_struct->date) {
1469     GWEN_Date_free(p_struct->date);
1470     p_struct->date=NULL;
1471     p_struct->date=NULL;
1472   }
1473   if (p_src->date) {
1474     p_struct->date=GWEN_Date_dup(p_src->date);
1475   }
1476 
1477   /* member "valutaDate" */
1478   if (p_struct->valutaDate) {
1479     GWEN_Date_free(p_struct->valutaDate);
1480     p_struct->valutaDate=NULL;
1481     p_struct->valutaDate=NULL;
1482   }
1483   if (p_src->valutaDate) {
1484     p_struct->valutaDate=GWEN_Date_dup(p_src->valutaDate);
1485   }
1486 
1487   /* member "value" */
1488   if (p_struct->value) {
1489     AB_Value_free(p_struct->value);
1490     p_struct->value=NULL;
1491   }
1492   if (p_src->value) {
1493     p_struct->value=AB_Value_dup(p_src->value);
1494   }
1495 
1496   /* member "fees" */
1497   if (p_struct->fees) {
1498     AB_Value_free(p_struct->fees);
1499     p_struct->fees=NULL;
1500   }
1501   if (p_src->fees) {
1502     p_struct->fees=AB_Value_dup(p_src->fees);
1503   }
1504 
1505   /* member "transactionCode" */
1506   p_struct->transactionCode=p_src->transactionCode;
1507 
1508   /* member "transactionText" */
1509   if (p_struct->transactionText) {
1510     free(p_struct->transactionText);
1511     p_struct->transactionText=NULL;
1512     p_struct->transactionText=NULL;
1513   }
1514   if (p_src->transactionText) {
1515     p_struct->transactionText=strdup(p_src->transactionText);
1516   }
1517 
1518   /* member "transactionKey" */
1519   if (p_struct->transactionKey) {
1520     free(p_struct->transactionKey);
1521     p_struct->transactionKey=NULL;
1522     p_struct->transactionKey=NULL;
1523   }
1524   if (p_src->transactionKey) {
1525     p_struct->transactionKey=strdup(p_src->transactionKey);
1526   }
1527 
1528   /* member "textKey" */
1529   p_struct->textKey=p_src->textKey;
1530 
1531   /* member "primanota" */
1532   if (p_struct->primanota) {
1533     free(p_struct->primanota);
1534     p_struct->primanota=NULL;
1535     p_struct->primanota=NULL;
1536   }
1537   if (p_src->primanota) {
1538     p_struct->primanota=strdup(p_src->primanota);
1539   }
1540 
1541   /* member "purpose" */
1542   if (p_struct->purpose) {
1543     free(p_struct->purpose);
1544     p_struct->purpose=NULL;
1545     p_struct->purpose=NULL;
1546   }
1547   if (p_src->purpose) {
1548     p_struct->purpose=strdup(p_src->purpose);
1549   }
1550 
1551   /* member "category" */
1552   if (p_struct->category) {
1553     free(p_struct->category);
1554     p_struct->category=NULL;
1555     p_struct->category=NULL;
1556   }
1557   if (p_src->category) {
1558     p_struct->category=strdup(p_src->category);
1559   }
1560 
1561   /* member "customerReference" */
1562   if (p_struct->customerReference) {
1563     free(p_struct->customerReference);
1564     p_struct->customerReference=NULL;
1565     p_struct->customerReference=NULL;
1566   }
1567   if (p_src->customerReference) {
1568     p_struct->customerReference=strdup(p_src->customerReference);
1569   }
1570 
1571   /* member "bankReference" */
1572   if (p_struct->bankReference) {
1573     free(p_struct->bankReference);
1574     p_struct->bankReference=NULL;
1575     p_struct->bankReference=NULL;
1576   }
1577   if (p_src->bankReference) {
1578     p_struct->bankReference=strdup(p_src->bankReference);
1579   }
1580 
1581   /* member "endToEndReference" */
1582   if (p_struct->endToEndReference) {
1583     free(p_struct->endToEndReference);
1584     p_struct->endToEndReference=NULL;
1585     p_struct->endToEndReference=NULL;
1586   }
1587   if (p_src->endToEndReference) {
1588     p_struct->endToEndReference=strdup(p_src->endToEndReference);
1589   }
1590 
1591   /* member "ultimateCreditor" */
1592   if (p_struct->ultimateCreditor) {
1593     free(p_struct->ultimateCreditor);
1594     p_struct->ultimateCreditor=NULL;
1595     p_struct->ultimateCreditor=NULL;
1596   }
1597   if (p_src->ultimateCreditor) {
1598     p_struct->ultimateCreditor=strdup(p_src->ultimateCreditor);
1599   }
1600 
1601   /* member "ultimateDebtor" */
1602   if (p_struct->ultimateDebtor) {
1603     free(p_struct->ultimateDebtor);
1604     p_struct->ultimateDebtor=NULL;
1605     p_struct->ultimateDebtor=NULL;
1606   }
1607   if (p_src->ultimateDebtor) {
1608     p_struct->ultimateDebtor=strdup(p_src->ultimateDebtor);
1609   }
1610 
1611   /* member "creditorSchemeId" */
1612   if (p_struct->creditorSchemeId) {
1613     free(p_struct->creditorSchemeId);
1614     p_struct->creditorSchemeId=NULL;
1615     p_struct->creditorSchemeId=NULL;
1616   }
1617   if (p_src->creditorSchemeId) {
1618     p_struct->creditorSchemeId=strdup(p_src->creditorSchemeId);
1619   }
1620 
1621   /* member "originatorId" */
1622   if (p_struct->originatorId) {
1623     free(p_struct->originatorId);
1624     p_struct->originatorId=NULL;
1625     p_struct->originatorId=NULL;
1626   }
1627   if (p_src->originatorId) {
1628     p_struct->originatorId=strdup(p_src->originatorId);
1629   }
1630 
1631   /* member "mandateId" */
1632   if (p_struct->mandateId) {
1633     free(p_struct->mandateId);
1634     p_struct->mandateId=NULL;
1635     p_struct->mandateId=NULL;
1636   }
1637   if (p_src->mandateId) {
1638     p_struct->mandateId=strdup(p_src->mandateId);
1639   }
1640 
1641   /* member "mandateDate" */
1642   if (p_struct->mandateDate) {
1643     GWEN_Date_free(p_struct->mandateDate);
1644     p_struct->mandateDate=NULL;
1645     p_struct->mandateDate=NULL;
1646   }
1647   if (p_src->mandateDate) {
1648     p_struct->mandateDate=GWEN_Date_dup(p_src->mandateDate);
1649   }
1650 
1651   /* member "mandateDebitorName" */
1652   if (p_struct->mandateDebitorName) {
1653     free(p_struct->mandateDebitorName);
1654     p_struct->mandateDebitorName=NULL;
1655     p_struct->mandateDebitorName=NULL;
1656   }
1657   if (p_src->mandateDebitorName) {
1658     p_struct->mandateDebitorName=strdup(p_src->mandateDebitorName);
1659   }
1660 
1661   /* member "originalCreditorSchemeId" */
1662   if (p_struct->originalCreditorSchemeId) {
1663     free(p_struct->originalCreditorSchemeId);
1664     p_struct->originalCreditorSchemeId=NULL;
1665     p_struct->originalCreditorSchemeId=NULL;
1666   }
1667   if (p_src->originalCreditorSchemeId) {
1668     p_struct->originalCreditorSchemeId=strdup(p_src->originalCreditorSchemeId);
1669   }
1670 
1671   /* member "originalMandateId" */
1672   if (p_struct->originalMandateId) {
1673     free(p_struct->originalMandateId);
1674     p_struct->originalMandateId=NULL;
1675     p_struct->originalMandateId=NULL;
1676   }
1677   if (p_src->originalMandateId) {
1678     p_struct->originalMandateId=strdup(p_src->originalMandateId);
1679   }
1680 
1681   /* member "originalCreditorName" */
1682   if (p_struct->originalCreditorName) {
1683     free(p_struct->originalCreditorName);
1684     p_struct->originalCreditorName=NULL;
1685     p_struct->originalCreditorName=NULL;
1686   }
1687   if (p_src->originalCreditorName) {
1688     p_struct->originalCreditorName=strdup(p_src->originalCreditorName);
1689   }
1690 
1691   /* member "sequence" */
1692   p_struct->sequence=p_src->sequence;
1693 
1694   /* member "charge" */
1695   p_struct->charge=p_src->charge;
1696 
1697   /* member "remoteAddrStreet" */
1698   if (p_struct->remoteAddrStreet) {
1699     free(p_struct->remoteAddrStreet);
1700     p_struct->remoteAddrStreet=NULL;
1701     p_struct->remoteAddrStreet=NULL;
1702   }
1703   if (p_src->remoteAddrStreet) {
1704     p_struct->remoteAddrStreet=strdup(p_src->remoteAddrStreet);
1705   }
1706 
1707   /* member "remoteAddrZipcode" */
1708   if (p_struct->remoteAddrZipcode) {
1709     free(p_struct->remoteAddrZipcode);
1710     p_struct->remoteAddrZipcode=NULL;
1711     p_struct->remoteAddrZipcode=NULL;
1712   }
1713   if (p_src->remoteAddrZipcode) {
1714     p_struct->remoteAddrZipcode=strdup(p_src->remoteAddrZipcode);
1715   }
1716 
1717   /* member "remoteAddrCity" */
1718   if (p_struct->remoteAddrCity) {
1719     free(p_struct->remoteAddrCity);
1720     p_struct->remoteAddrCity=NULL;
1721     p_struct->remoteAddrCity=NULL;
1722   }
1723   if (p_src->remoteAddrCity) {
1724     p_struct->remoteAddrCity=strdup(p_src->remoteAddrCity);
1725   }
1726 
1727   /* member "remoteAddrPhone" */
1728   if (p_struct->remoteAddrPhone) {
1729     free(p_struct->remoteAddrPhone);
1730     p_struct->remoteAddrPhone=NULL;
1731     p_struct->remoteAddrPhone=NULL;
1732   }
1733   if (p_src->remoteAddrPhone) {
1734     p_struct->remoteAddrPhone=strdup(p_src->remoteAddrPhone);
1735   }
1736 
1737   /* member "period" */
1738   p_struct->period=p_src->period;
1739 
1740   /* member "cycle" */
1741   p_struct->cycle=p_src->cycle;
1742 
1743   /* member "executionDay" */
1744   p_struct->executionDay=p_src->executionDay;
1745 
1746   /* member "firstDate" */
1747   if (p_struct->firstDate) {
1748     GWEN_Date_free(p_struct->firstDate);
1749     p_struct->firstDate=NULL;
1750     p_struct->firstDate=NULL;
1751   }
1752   if (p_src->firstDate) {
1753     p_struct->firstDate=GWEN_Date_dup(p_src->firstDate);
1754   }
1755 
1756   /* member "lastDate" */
1757   if (p_struct->lastDate) {
1758     GWEN_Date_free(p_struct->lastDate);
1759     p_struct->lastDate=NULL;
1760     p_struct->lastDate=NULL;
1761   }
1762   if (p_src->lastDate) {
1763     p_struct->lastDate=GWEN_Date_dup(p_src->lastDate);
1764   }
1765 
1766   /* member "nextDate" */
1767   if (p_struct->nextDate) {
1768     GWEN_Date_free(p_struct->nextDate);
1769     p_struct->nextDate=NULL;
1770     p_struct->nextDate=NULL;
1771   }
1772   if (p_src->nextDate) {
1773     p_struct->nextDate=GWEN_Date_dup(p_src->nextDate);
1774   }
1775 
1776   /* member "unitId" */
1777   if (p_struct->unitId) {
1778     free(p_struct->unitId);
1779     p_struct->unitId=NULL;
1780     p_struct->unitId=NULL;
1781   }
1782   if (p_src->unitId) {
1783     p_struct->unitId=strdup(p_src->unitId);
1784   }
1785 
1786   /* member "unitIdNameSpace" */
1787   if (p_struct->unitIdNameSpace) {
1788     free(p_struct->unitIdNameSpace);
1789     p_struct->unitIdNameSpace=NULL;
1790     p_struct->unitIdNameSpace=NULL;
1791   }
1792   if (p_src->unitIdNameSpace) {
1793     p_struct->unitIdNameSpace=strdup(p_src->unitIdNameSpace);
1794   }
1795 
1796   /* member "tickerSymbol" */
1797   if (p_struct->tickerSymbol) {
1798     free(p_struct->tickerSymbol);
1799     p_struct->tickerSymbol=NULL;
1800     p_struct->tickerSymbol=NULL;
1801   }
1802   if (p_src->tickerSymbol) {
1803     p_struct->tickerSymbol=strdup(p_src->tickerSymbol);
1804   }
1805 
1806   /* member "units" */
1807   if (p_struct->units) {
1808     AB_Value_free(p_struct->units);
1809     p_struct->units=NULL;
1810   }
1811   if (p_src->units) {
1812     p_struct->units=AB_Value_dup(p_src->units);
1813   }
1814 
1815   /* member "unitPriceValue" */
1816   if (p_struct->unitPriceValue) {
1817     AB_Value_free(p_struct->unitPriceValue);
1818     p_struct->unitPriceValue=NULL;
1819   }
1820   if (p_src->unitPriceValue) {
1821     p_struct->unitPriceValue=AB_Value_dup(p_src->unitPriceValue);
1822   }
1823 
1824   /* member "unitPriceDate" */
1825   if (p_struct->unitPriceDate) {
1826     GWEN_Date_free(p_struct->unitPriceDate);
1827     p_struct->unitPriceDate=NULL;
1828     p_struct->unitPriceDate=NULL;
1829   }
1830   if (p_src->unitPriceDate) {
1831     p_struct->unitPriceDate=GWEN_Date_dup(p_src->unitPriceDate);
1832   }
1833 
1834   /* member "commissionValue" */
1835   if (p_struct->commissionValue) {
1836     AB_Value_free(p_struct->commissionValue);
1837     p_struct->commissionValue=NULL;
1838   }
1839   if (p_src->commissionValue) {
1840     p_struct->commissionValue=AB_Value_dup(p_src->commissionValue);
1841   }
1842 
1843   /* member "memo" */
1844   if (p_struct->memo) {
1845     free(p_struct->memo);
1846     p_struct->memo=NULL;
1847     p_struct->memo=NULL;
1848   }
1849   if (p_src->memo) {
1850     p_struct->memo=strdup(p_src->memo);
1851   }
1852 
1853   /* member "hash" */
1854   if (p_struct->hash) {
1855     free(p_struct->hash);
1856     p_struct->hash=NULL;
1857     p_struct->hash=NULL;
1858   }
1859   if (p_src->hash) {
1860     p_struct->hash=strdup(p_src->hash);
1861   }
1862 
1863   return p_struct;
1864 }
1865 
AB_Transaction_GetType(const AB_TRANSACTION * p_struct)1866 AB_TRANSACTION_TYPE AB_Transaction_GetType(const AB_TRANSACTION *p_struct)
1867 {
1868   assert(p_struct);
1869   return p_struct->type;
1870 }
1871 
AB_Transaction_GetSubType(const AB_TRANSACTION * p_struct)1872 AB_TRANSACTION_SUBTYPE AB_Transaction_GetSubType(const AB_TRANSACTION *p_struct)
1873 {
1874   assert(p_struct);
1875   return p_struct->subType;
1876 }
1877 
AB_Transaction_GetCommand(const AB_TRANSACTION * p_struct)1878 AB_TRANSACTION_COMMAND AB_Transaction_GetCommand(const AB_TRANSACTION *p_struct)
1879 {
1880   assert(p_struct);
1881   return p_struct->command;
1882 }
1883 
AB_Transaction_GetStatus(const AB_TRANSACTION * p_struct)1884 AB_TRANSACTION_STATUS AB_Transaction_GetStatus(const AB_TRANSACTION *p_struct)
1885 {
1886   assert(p_struct);
1887   return p_struct->status;
1888 }
1889 
AB_Transaction_GetUniqueAccountId(const AB_TRANSACTION * p_struct)1890 uint32_t AB_Transaction_GetUniqueAccountId(const AB_TRANSACTION *p_struct)
1891 {
1892   assert(p_struct);
1893   return p_struct->uniqueAccountId;
1894 }
1895 
AB_Transaction_GetUniqueId(const AB_TRANSACTION * p_struct)1896 uint32_t AB_Transaction_GetUniqueId(const AB_TRANSACTION *p_struct)
1897 {
1898   assert(p_struct);
1899   return p_struct->uniqueId;
1900 }
1901 
AB_Transaction_GetRefUniqueId(const AB_TRANSACTION * p_struct)1902 uint32_t AB_Transaction_GetRefUniqueId(const AB_TRANSACTION *p_struct)
1903 {
1904   assert(p_struct);
1905   return p_struct->refUniqueId;
1906 }
1907 
AB_Transaction_GetIdForApplication(const AB_TRANSACTION * p_struct)1908 uint32_t AB_Transaction_GetIdForApplication(const AB_TRANSACTION *p_struct)
1909 {
1910   assert(p_struct);
1911   return p_struct->idForApplication;
1912 }
1913 
AB_Transaction_GetStringIdForApplication(const AB_TRANSACTION * p_struct)1914 const char *AB_Transaction_GetStringIdForApplication(const AB_TRANSACTION *p_struct)
1915 {
1916   assert(p_struct);
1917   return p_struct->stringIdForApplication;
1918 }
1919 
AB_Transaction_GetSessionId(const AB_TRANSACTION * p_struct)1920 uint32_t AB_Transaction_GetSessionId(const AB_TRANSACTION *p_struct)
1921 {
1922   assert(p_struct);
1923   return p_struct->sessionId;
1924 }
1925 
AB_Transaction_GetGroupId(const AB_TRANSACTION * p_struct)1926 uint32_t AB_Transaction_GetGroupId(const AB_TRANSACTION *p_struct)
1927 {
1928   assert(p_struct);
1929   return p_struct->groupId;
1930 }
1931 
AB_Transaction_GetFiId(const AB_TRANSACTION * p_struct)1932 const char *AB_Transaction_GetFiId(const AB_TRANSACTION *p_struct)
1933 {
1934   assert(p_struct);
1935   return p_struct->fiId;
1936 }
1937 
AB_Transaction_GetLocalIban(const AB_TRANSACTION * p_struct)1938 const char *AB_Transaction_GetLocalIban(const AB_TRANSACTION *p_struct)
1939 {
1940   assert(p_struct);
1941   return p_struct->localIban;
1942 }
1943 
AB_Transaction_GetLocalBic(const AB_TRANSACTION * p_struct)1944 const char *AB_Transaction_GetLocalBic(const AB_TRANSACTION *p_struct)
1945 {
1946   assert(p_struct);
1947   return p_struct->localBic;
1948 }
1949 
AB_Transaction_GetLocalCountry(const AB_TRANSACTION * p_struct)1950 const char *AB_Transaction_GetLocalCountry(const AB_TRANSACTION *p_struct)
1951 {
1952   assert(p_struct);
1953   return p_struct->localCountry;
1954 }
1955 
AB_Transaction_GetLocalBankCode(const AB_TRANSACTION * p_struct)1956 const char *AB_Transaction_GetLocalBankCode(const AB_TRANSACTION *p_struct)
1957 {
1958   assert(p_struct);
1959   return p_struct->localBankCode;
1960 }
1961 
AB_Transaction_GetLocalBranchId(const AB_TRANSACTION * p_struct)1962 const char *AB_Transaction_GetLocalBranchId(const AB_TRANSACTION *p_struct)
1963 {
1964   assert(p_struct);
1965   return p_struct->localBranchId;
1966 }
1967 
AB_Transaction_GetLocalAccountNumber(const AB_TRANSACTION * p_struct)1968 const char *AB_Transaction_GetLocalAccountNumber(const AB_TRANSACTION *p_struct)
1969 {
1970   assert(p_struct);
1971   return p_struct->localAccountNumber;
1972 }
1973 
AB_Transaction_GetLocalSuffix(const AB_TRANSACTION * p_struct)1974 const char *AB_Transaction_GetLocalSuffix(const AB_TRANSACTION *p_struct)
1975 {
1976   assert(p_struct);
1977   return p_struct->localSuffix;
1978 }
1979 
AB_Transaction_GetLocalName(const AB_TRANSACTION * p_struct)1980 const char *AB_Transaction_GetLocalName(const AB_TRANSACTION *p_struct)
1981 {
1982   assert(p_struct);
1983   return p_struct->localName;
1984 }
1985 
AB_Transaction_GetRemoteCountry(const AB_TRANSACTION * p_struct)1986 const char *AB_Transaction_GetRemoteCountry(const AB_TRANSACTION *p_struct)
1987 {
1988   assert(p_struct);
1989   return p_struct->remoteCountry;
1990 }
1991 
AB_Transaction_GetRemoteBankCode(const AB_TRANSACTION * p_struct)1992 const char *AB_Transaction_GetRemoteBankCode(const AB_TRANSACTION *p_struct)
1993 {
1994   assert(p_struct);
1995   return p_struct->remoteBankCode;
1996 }
1997 
AB_Transaction_GetRemoteBranchId(const AB_TRANSACTION * p_struct)1998 const char *AB_Transaction_GetRemoteBranchId(const AB_TRANSACTION *p_struct)
1999 {
2000   assert(p_struct);
2001   return p_struct->remoteBranchId;
2002 }
2003 
AB_Transaction_GetRemoteAccountNumber(const AB_TRANSACTION * p_struct)2004 const char *AB_Transaction_GetRemoteAccountNumber(const AB_TRANSACTION *p_struct)
2005 {
2006   assert(p_struct);
2007   return p_struct->remoteAccountNumber;
2008 }
2009 
AB_Transaction_GetRemoteSuffix(const AB_TRANSACTION * p_struct)2010 const char *AB_Transaction_GetRemoteSuffix(const AB_TRANSACTION *p_struct)
2011 {
2012   assert(p_struct);
2013   return p_struct->remoteSuffix;
2014 }
2015 
AB_Transaction_GetRemoteIban(const AB_TRANSACTION * p_struct)2016 const char *AB_Transaction_GetRemoteIban(const AB_TRANSACTION *p_struct)
2017 {
2018   assert(p_struct);
2019   return p_struct->remoteIban;
2020 }
2021 
AB_Transaction_GetRemoteBic(const AB_TRANSACTION * p_struct)2022 const char *AB_Transaction_GetRemoteBic(const AB_TRANSACTION *p_struct)
2023 {
2024   assert(p_struct);
2025   return p_struct->remoteBic;
2026 }
2027 
AB_Transaction_GetRemoteName(const AB_TRANSACTION * p_struct)2028 const char *AB_Transaction_GetRemoteName(const AB_TRANSACTION *p_struct)
2029 {
2030   assert(p_struct);
2031   return p_struct->remoteName;
2032 }
2033 
AB_Transaction_GetDate(const AB_TRANSACTION * p_struct)2034 const GWEN_DATE *AB_Transaction_GetDate(const AB_TRANSACTION *p_struct)
2035 {
2036   assert(p_struct);
2037   return p_struct->date;
2038 }
2039 
AB_Transaction_GetValutaDate(const AB_TRANSACTION * p_struct)2040 const GWEN_DATE *AB_Transaction_GetValutaDate(const AB_TRANSACTION *p_struct)
2041 {
2042   assert(p_struct);
2043   return p_struct->valutaDate;
2044 }
2045 
AB_Transaction_GetValue(const AB_TRANSACTION * p_struct)2046 const AB_VALUE *AB_Transaction_GetValue(const AB_TRANSACTION *p_struct)
2047 {
2048   assert(p_struct);
2049   return p_struct->value;
2050 }
2051 
AB_Transaction_GetFees(const AB_TRANSACTION * p_struct)2052 const AB_VALUE *AB_Transaction_GetFees(const AB_TRANSACTION *p_struct)
2053 {
2054   assert(p_struct);
2055   return p_struct->fees;
2056 }
2057 
AB_Transaction_GetTransactionCode(const AB_TRANSACTION * p_struct)2058 int AB_Transaction_GetTransactionCode(const AB_TRANSACTION *p_struct)
2059 {
2060   assert(p_struct);
2061   return p_struct->transactionCode;
2062 }
2063 
AB_Transaction_GetTransactionText(const AB_TRANSACTION * p_struct)2064 const char *AB_Transaction_GetTransactionText(const AB_TRANSACTION *p_struct)
2065 {
2066   assert(p_struct);
2067   return p_struct->transactionText;
2068 }
2069 
AB_Transaction_GetTransactionKey(const AB_TRANSACTION * p_struct)2070 const char *AB_Transaction_GetTransactionKey(const AB_TRANSACTION *p_struct)
2071 {
2072   assert(p_struct);
2073   return p_struct->transactionKey;
2074 }
2075 
AB_Transaction_GetTextKey(const AB_TRANSACTION * p_struct)2076 int AB_Transaction_GetTextKey(const AB_TRANSACTION *p_struct)
2077 {
2078   assert(p_struct);
2079   return p_struct->textKey;
2080 }
2081 
AB_Transaction_GetPrimanota(const AB_TRANSACTION * p_struct)2082 const char *AB_Transaction_GetPrimanota(const AB_TRANSACTION *p_struct)
2083 {
2084   assert(p_struct);
2085   return p_struct->primanota;
2086 }
2087 
AB_Transaction_GetPurpose(const AB_TRANSACTION * p_struct)2088 const char *AB_Transaction_GetPurpose(const AB_TRANSACTION *p_struct)
2089 {
2090   assert(p_struct);
2091   return p_struct->purpose;
2092 }
2093 
AB_Transaction_GetCategory(const AB_TRANSACTION * p_struct)2094 const char *AB_Transaction_GetCategory(const AB_TRANSACTION *p_struct)
2095 {
2096   assert(p_struct);
2097   return p_struct->category;
2098 }
2099 
AB_Transaction_GetCustomerReference(const AB_TRANSACTION * p_struct)2100 const char *AB_Transaction_GetCustomerReference(const AB_TRANSACTION *p_struct)
2101 {
2102   assert(p_struct);
2103   return p_struct->customerReference;
2104 }
2105 
AB_Transaction_GetBankReference(const AB_TRANSACTION * p_struct)2106 const char *AB_Transaction_GetBankReference(const AB_TRANSACTION *p_struct)
2107 {
2108   assert(p_struct);
2109   return p_struct->bankReference;
2110 }
2111 
AB_Transaction_GetEndToEndReference(const AB_TRANSACTION * p_struct)2112 const char *AB_Transaction_GetEndToEndReference(const AB_TRANSACTION *p_struct)
2113 {
2114   assert(p_struct);
2115   return p_struct->endToEndReference;
2116 }
2117 
AB_Transaction_GetUltimateCreditor(const AB_TRANSACTION * p_struct)2118 const char *AB_Transaction_GetUltimateCreditor(const AB_TRANSACTION *p_struct)
2119 {
2120   assert(p_struct);
2121   return p_struct->ultimateCreditor;
2122 }
2123 
AB_Transaction_GetUltimateDebtor(const AB_TRANSACTION * p_struct)2124 const char *AB_Transaction_GetUltimateDebtor(const AB_TRANSACTION *p_struct)
2125 {
2126   assert(p_struct);
2127   return p_struct->ultimateDebtor;
2128 }
2129 
AB_Transaction_GetCreditorSchemeId(const AB_TRANSACTION * p_struct)2130 const char *AB_Transaction_GetCreditorSchemeId(const AB_TRANSACTION *p_struct)
2131 {
2132   assert(p_struct);
2133   return p_struct->creditorSchemeId;
2134 }
2135 
AB_Transaction_GetOriginatorId(const AB_TRANSACTION * p_struct)2136 const char *AB_Transaction_GetOriginatorId(const AB_TRANSACTION *p_struct)
2137 {
2138   assert(p_struct);
2139   return p_struct->originatorId;
2140 }
2141 
AB_Transaction_GetMandateId(const AB_TRANSACTION * p_struct)2142 const char *AB_Transaction_GetMandateId(const AB_TRANSACTION *p_struct)
2143 {
2144   assert(p_struct);
2145   return p_struct->mandateId;
2146 }
2147 
AB_Transaction_GetMandateDate(const AB_TRANSACTION * p_struct)2148 const GWEN_DATE *AB_Transaction_GetMandateDate(const AB_TRANSACTION *p_struct)
2149 {
2150   assert(p_struct);
2151   return p_struct->mandateDate;
2152 }
2153 
AB_Transaction_GetMandateDebitorName(const AB_TRANSACTION * p_struct)2154 const char *AB_Transaction_GetMandateDebitorName(const AB_TRANSACTION *p_struct)
2155 {
2156   assert(p_struct);
2157   return p_struct->mandateDebitorName;
2158 }
2159 
AB_Transaction_GetOriginalCreditorSchemeId(const AB_TRANSACTION * p_struct)2160 const char *AB_Transaction_GetOriginalCreditorSchemeId(const AB_TRANSACTION *p_struct)
2161 {
2162   assert(p_struct);
2163   return p_struct->originalCreditorSchemeId;
2164 }
2165 
AB_Transaction_GetOriginalMandateId(const AB_TRANSACTION * p_struct)2166 const char *AB_Transaction_GetOriginalMandateId(const AB_TRANSACTION *p_struct)
2167 {
2168   assert(p_struct);
2169   return p_struct->originalMandateId;
2170 }
2171 
AB_Transaction_GetOriginalCreditorName(const AB_TRANSACTION * p_struct)2172 const char *AB_Transaction_GetOriginalCreditorName(const AB_TRANSACTION *p_struct)
2173 {
2174   assert(p_struct);
2175   return p_struct->originalCreditorName;
2176 }
2177 
AB_Transaction_GetSequence(const AB_TRANSACTION * p_struct)2178 AB_TRANSACTION_SEQUENCE AB_Transaction_GetSequence(const AB_TRANSACTION *p_struct)
2179 {
2180   assert(p_struct);
2181   return p_struct->sequence;
2182 }
2183 
AB_Transaction_GetCharge(const AB_TRANSACTION * p_struct)2184 AB_TRANSACTION_CHARGE AB_Transaction_GetCharge(const AB_TRANSACTION *p_struct)
2185 {
2186   assert(p_struct);
2187   return p_struct->charge;
2188 }
2189 
AB_Transaction_GetRemoteAddrStreet(const AB_TRANSACTION * p_struct)2190 const char *AB_Transaction_GetRemoteAddrStreet(const AB_TRANSACTION *p_struct)
2191 {
2192   assert(p_struct);
2193   return p_struct->remoteAddrStreet;
2194 }
2195 
AB_Transaction_GetRemoteAddrZipcode(const AB_TRANSACTION * p_struct)2196 const char *AB_Transaction_GetRemoteAddrZipcode(const AB_TRANSACTION *p_struct)
2197 {
2198   assert(p_struct);
2199   return p_struct->remoteAddrZipcode;
2200 }
2201 
AB_Transaction_GetRemoteAddrCity(const AB_TRANSACTION * p_struct)2202 const char *AB_Transaction_GetRemoteAddrCity(const AB_TRANSACTION *p_struct)
2203 {
2204   assert(p_struct);
2205   return p_struct->remoteAddrCity;
2206 }
2207 
AB_Transaction_GetRemoteAddrPhone(const AB_TRANSACTION * p_struct)2208 const char *AB_Transaction_GetRemoteAddrPhone(const AB_TRANSACTION *p_struct)
2209 {
2210   assert(p_struct);
2211   return p_struct->remoteAddrPhone;
2212 }
2213 
AB_Transaction_GetPeriod(const AB_TRANSACTION * p_struct)2214 AB_TRANSACTION_PERIOD AB_Transaction_GetPeriod(const AB_TRANSACTION *p_struct)
2215 {
2216   assert(p_struct);
2217   return p_struct->period;
2218 }
2219 
AB_Transaction_GetCycle(const AB_TRANSACTION * p_struct)2220 uint32_t AB_Transaction_GetCycle(const AB_TRANSACTION *p_struct)
2221 {
2222   assert(p_struct);
2223   return p_struct->cycle;
2224 }
2225 
AB_Transaction_GetExecutionDay(const AB_TRANSACTION * p_struct)2226 uint32_t AB_Transaction_GetExecutionDay(const AB_TRANSACTION *p_struct)
2227 {
2228   assert(p_struct);
2229   return p_struct->executionDay;
2230 }
2231 
AB_Transaction_GetFirstDate(const AB_TRANSACTION * p_struct)2232 const GWEN_DATE *AB_Transaction_GetFirstDate(const AB_TRANSACTION *p_struct)
2233 {
2234   assert(p_struct);
2235   return p_struct->firstDate;
2236 }
2237 
AB_Transaction_GetLastDate(const AB_TRANSACTION * p_struct)2238 const GWEN_DATE *AB_Transaction_GetLastDate(const AB_TRANSACTION *p_struct)
2239 {
2240   assert(p_struct);
2241   return p_struct->lastDate;
2242 }
2243 
AB_Transaction_GetNextDate(const AB_TRANSACTION * p_struct)2244 const GWEN_DATE *AB_Transaction_GetNextDate(const AB_TRANSACTION *p_struct)
2245 {
2246   assert(p_struct);
2247   return p_struct->nextDate;
2248 }
2249 
AB_Transaction_GetUnitId(const AB_TRANSACTION * p_struct)2250 const char *AB_Transaction_GetUnitId(const AB_TRANSACTION *p_struct)
2251 {
2252   assert(p_struct);
2253   return p_struct->unitId;
2254 }
2255 
AB_Transaction_GetUnitIdNameSpace(const AB_TRANSACTION * p_struct)2256 const char *AB_Transaction_GetUnitIdNameSpace(const AB_TRANSACTION *p_struct)
2257 {
2258   assert(p_struct);
2259   return p_struct->unitIdNameSpace;
2260 }
2261 
AB_Transaction_GetTickerSymbol(const AB_TRANSACTION * p_struct)2262 const char *AB_Transaction_GetTickerSymbol(const AB_TRANSACTION *p_struct)
2263 {
2264   assert(p_struct);
2265   return p_struct->tickerSymbol;
2266 }
2267 
AB_Transaction_GetUnits(const AB_TRANSACTION * p_struct)2268 const AB_VALUE *AB_Transaction_GetUnits(const AB_TRANSACTION *p_struct)
2269 {
2270   assert(p_struct);
2271   return p_struct->units;
2272 }
2273 
AB_Transaction_GetUnitPriceValue(const AB_TRANSACTION * p_struct)2274 const AB_VALUE *AB_Transaction_GetUnitPriceValue(const AB_TRANSACTION *p_struct)
2275 {
2276   assert(p_struct);
2277   return p_struct->unitPriceValue;
2278 }
2279 
AB_Transaction_GetUnitPriceDate(const AB_TRANSACTION * p_struct)2280 const GWEN_DATE *AB_Transaction_GetUnitPriceDate(const AB_TRANSACTION *p_struct)
2281 {
2282   assert(p_struct);
2283   return p_struct->unitPriceDate;
2284 }
2285 
AB_Transaction_GetCommissionValue(const AB_TRANSACTION * p_struct)2286 const AB_VALUE *AB_Transaction_GetCommissionValue(const AB_TRANSACTION *p_struct)
2287 {
2288   assert(p_struct);
2289   return p_struct->commissionValue;
2290 }
2291 
AB_Transaction_GetMemo(const AB_TRANSACTION * p_struct)2292 const char *AB_Transaction_GetMemo(const AB_TRANSACTION *p_struct)
2293 {
2294   assert(p_struct);
2295   return p_struct->memo;
2296 }
2297 
AB_Transaction_GetHash(const AB_TRANSACTION * p_struct)2298 const char *AB_Transaction_GetHash(const AB_TRANSACTION *p_struct)
2299 {
2300   assert(p_struct);
2301   return p_struct->hash;
2302 }
2303 
AB_Transaction_SetType(AB_TRANSACTION * p_struct,AB_TRANSACTION_TYPE p_src)2304 void AB_Transaction_SetType(AB_TRANSACTION *p_struct, AB_TRANSACTION_TYPE  p_src)
2305 {
2306   assert(p_struct);
2307   p_struct->type=p_src;
2308 }
2309 
AB_Transaction_SetSubType(AB_TRANSACTION * p_struct,AB_TRANSACTION_SUBTYPE p_src)2310 void AB_Transaction_SetSubType(AB_TRANSACTION *p_struct, AB_TRANSACTION_SUBTYPE  p_src)
2311 {
2312   assert(p_struct);
2313   p_struct->subType=p_src;
2314 }
2315 
AB_Transaction_SetCommand(AB_TRANSACTION * p_struct,AB_TRANSACTION_COMMAND p_src)2316 void AB_Transaction_SetCommand(AB_TRANSACTION *p_struct, AB_TRANSACTION_COMMAND  p_src)
2317 {
2318   assert(p_struct);
2319   p_struct->command=p_src;
2320 }
2321 
AB_Transaction_SetStatus(AB_TRANSACTION * p_struct,AB_TRANSACTION_STATUS p_src)2322 void AB_Transaction_SetStatus(AB_TRANSACTION *p_struct, AB_TRANSACTION_STATUS  p_src)
2323 {
2324   assert(p_struct);
2325   p_struct->status=p_src;
2326 }
2327 
AB_Transaction_SetUniqueAccountId(AB_TRANSACTION * p_struct,uint32_t p_src)2328 void AB_Transaction_SetUniqueAccountId(AB_TRANSACTION *p_struct, uint32_t p_src)
2329 {
2330   assert(p_struct);
2331   p_struct->uniqueAccountId=p_src;
2332 }
2333 
AB_Transaction_SetUniqueId(AB_TRANSACTION * p_struct,uint32_t p_src)2334 void AB_Transaction_SetUniqueId(AB_TRANSACTION *p_struct, uint32_t p_src)
2335 {
2336   assert(p_struct);
2337   p_struct->uniqueId=p_src;
2338 }
2339 
AB_Transaction_SetRefUniqueId(AB_TRANSACTION * p_struct,uint32_t p_src)2340 void AB_Transaction_SetRefUniqueId(AB_TRANSACTION *p_struct, uint32_t p_src)
2341 {
2342   assert(p_struct);
2343   p_struct->refUniqueId=p_src;
2344 }
2345 
AB_Transaction_SetIdForApplication(AB_TRANSACTION * p_struct,uint32_t p_src)2346 void AB_Transaction_SetIdForApplication(AB_TRANSACTION *p_struct, uint32_t p_src)
2347 {
2348   assert(p_struct);
2349   p_struct->idForApplication=p_src;
2350 }
2351 
AB_Transaction_SetStringIdForApplication(AB_TRANSACTION * p_struct,const char * p_src)2352 void AB_Transaction_SetStringIdForApplication(AB_TRANSACTION *p_struct, const char *p_src)
2353 {
2354   assert(p_struct);
2355   if (p_src) {
2356     p_struct->stringIdForApplication=strdup(p_src);
2357   }
2358   else {
2359     p_struct->stringIdForApplication=0;
2360   }
2361 }
2362 
AB_Transaction_SetSessionId(AB_TRANSACTION * p_struct,uint32_t p_src)2363 void AB_Transaction_SetSessionId(AB_TRANSACTION *p_struct, uint32_t p_src)
2364 {
2365   assert(p_struct);
2366   p_struct->sessionId=p_src;
2367 }
2368 
AB_Transaction_SetGroupId(AB_TRANSACTION * p_struct,uint32_t p_src)2369 void AB_Transaction_SetGroupId(AB_TRANSACTION *p_struct, uint32_t p_src)
2370 {
2371   assert(p_struct);
2372   p_struct->groupId=p_src;
2373 }
2374 
AB_Transaction_SetFiId(AB_TRANSACTION * p_struct,const char * p_src)2375 void AB_Transaction_SetFiId(AB_TRANSACTION *p_struct, const char *p_src)
2376 {
2377   assert(p_struct);
2378   if (p_struct->fiId) {
2379     free(p_struct->fiId);
2380     p_struct->fiId=NULL;
2381   }
2382   if (p_src) {
2383     p_struct->fiId=strdup(p_src);
2384   }
2385   else {
2386     p_struct->fiId=NULL;
2387   }
2388 }
2389 
AB_Transaction_SetLocalIban(AB_TRANSACTION * p_struct,const char * p_src)2390 void AB_Transaction_SetLocalIban(AB_TRANSACTION *p_struct, const char *p_src)
2391 {
2392   assert(p_struct);
2393   if (p_struct->localIban) {
2394     free(p_struct->localIban);
2395     p_struct->localIban=NULL;
2396   }
2397   if (p_src) {
2398     p_struct->localIban=strdup(p_src);
2399   }
2400   else {
2401     p_struct->localIban=NULL;
2402   }
2403 }
2404 
AB_Transaction_SetLocalBic(AB_TRANSACTION * p_struct,const char * p_src)2405 void AB_Transaction_SetLocalBic(AB_TRANSACTION *p_struct, const char *p_src)
2406 {
2407   assert(p_struct);
2408   if (p_struct->localBic) {
2409     free(p_struct->localBic);
2410     p_struct->localBic=NULL;
2411   }
2412   if (p_src) {
2413     p_struct->localBic=strdup(p_src);
2414   }
2415   else {
2416     p_struct->localBic=NULL;
2417   }
2418 }
2419 
AB_Transaction_SetLocalCountry(AB_TRANSACTION * p_struct,const char * p_src)2420 void AB_Transaction_SetLocalCountry(AB_TRANSACTION *p_struct, const char *p_src)
2421 {
2422   assert(p_struct);
2423   if (p_struct->localCountry) {
2424     free(p_struct->localCountry);
2425     p_struct->localCountry=NULL;
2426   }
2427   if (p_src) {
2428     p_struct->localCountry=strdup(p_src);
2429   }
2430   else {
2431     p_struct->localCountry=NULL;
2432   }
2433 }
2434 
AB_Transaction_SetLocalBankCode(AB_TRANSACTION * p_struct,const char * p_src)2435 void AB_Transaction_SetLocalBankCode(AB_TRANSACTION *p_struct, const char *p_src)
2436 {
2437   assert(p_struct);
2438   if (p_struct->localBankCode) {
2439     free(p_struct->localBankCode);
2440     p_struct->localBankCode=NULL;
2441   }
2442   if (p_src) {
2443     p_struct->localBankCode=strdup(p_src);
2444   }
2445   else {
2446     p_struct->localBankCode=NULL;
2447   }
2448 }
2449 
AB_Transaction_SetLocalBranchId(AB_TRANSACTION * p_struct,const char * p_src)2450 void AB_Transaction_SetLocalBranchId(AB_TRANSACTION *p_struct, const char *p_src)
2451 {
2452   assert(p_struct);
2453   if (p_struct->localBranchId) {
2454     free(p_struct->localBranchId);
2455     p_struct->localBranchId=NULL;
2456   }
2457   if (p_src) {
2458     p_struct->localBranchId=strdup(p_src);
2459   }
2460   else {
2461     p_struct->localBranchId=NULL;
2462   }
2463 }
2464 
AB_Transaction_SetLocalAccountNumber(AB_TRANSACTION * p_struct,const char * p_src)2465 void AB_Transaction_SetLocalAccountNumber(AB_TRANSACTION *p_struct, const char *p_src)
2466 {
2467   assert(p_struct);
2468   if (p_struct->localAccountNumber) {
2469     free(p_struct->localAccountNumber);
2470     p_struct->localAccountNumber=NULL;
2471   }
2472   if (p_src) {
2473     p_struct->localAccountNumber=strdup(p_src);
2474   }
2475   else {
2476     p_struct->localAccountNumber=NULL;
2477   }
2478 }
2479 
AB_Transaction_SetLocalSuffix(AB_TRANSACTION * p_struct,const char * p_src)2480 void AB_Transaction_SetLocalSuffix(AB_TRANSACTION *p_struct, const char *p_src)
2481 {
2482   assert(p_struct);
2483   if (p_struct->localSuffix) {
2484     free(p_struct->localSuffix);
2485     p_struct->localSuffix=NULL;
2486   }
2487   if (p_src) {
2488     p_struct->localSuffix=strdup(p_src);
2489   }
2490   else {
2491     p_struct->localSuffix=NULL;
2492   }
2493 }
2494 
AB_Transaction_SetLocalName(AB_TRANSACTION * p_struct,const char * p_src)2495 void AB_Transaction_SetLocalName(AB_TRANSACTION *p_struct, const char *p_src)
2496 {
2497   assert(p_struct);
2498   if (p_struct->localName) {
2499     free(p_struct->localName);
2500     p_struct->localName=NULL;
2501   }
2502   if (p_src) {
2503     p_struct->localName=strdup(p_src);
2504   }
2505   else {
2506     p_struct->localName=NULL;
2507   }
2508 }
2509 
AB_Transaction_SetRemoteCountry(AB_TRANSACTION * p_struct,const char * p_src)2510 void AB_Transaction_SetRemoteCountry(AB_TRANSACTION *p_struct, const char *p_src)
2511 {
2512   assert(p_struct);
2513   if (p_struct->remoteCountry) {
2514     free(p_struct->remoteCountry);
2515     p_struct->remoteCountry=NULL;
2516   }
2517   if (p_src) {
2518     p_struct->remoteCountry=strdup(p_src);
2519   }
2520   else {
2521     p_struct->remoteCountry=NULL;
2522   }
2523 }
2524 
AB_Transaction_SetRemoteBankCode(AB_TRANSACTION * p_struct,const char * p_src)2525 void AB_Transaction_SetRemoteBankCode(AB_TRANSACTION *p_struct, const char *p_src)
2526 {
2527   assert(p_struct);
2528   if (p_struct->remoteBankCode) {
2529     free(p_struct->remoteBankCode);
2530     p_struct->remoteBankCode=NULL;
2531   }
2532   if (p_src) {
2533     p_struct->remoteBankCode=strdup(p_src);
2534   }
2535   else {
2536     p_struct->remoteBankCode=NULL;
2537   }
2538 }
2539 
AB_Transaction_SetRemoteBranchId(AB_TRANSACTION * p_struct,const char * p_src)2540 void AB_Transaction_SetRemoteBranchId(AB_TRANSACTION *p_struct, const char *p_src)
2541 {
2542   assert(p_struct);
2543   if (p_struct->remoteBranchId) {
2544     free(p_struct->remoteBranchId);
2545     p_struct->remoteBranchId=NULL;
2546   }
2547   if (p_src) {
2548     p_struct->remoteBranchId=strdup(p_src);
2549   }
2550   else {
2551     p_struct->remoteBranchId=NULL;
2552   }
2553 }
2554 
AB_Transaction_SetRemoteAccountNumber(AB_TRANSACTION * p_struct,const char * p_src)2555 void AB_Transaction_SetRemoteAccountNumber(AB_TRANSACTION *p_struct, const char *p_src)
2556 {
2557   assert(p_struct);
2558   if (p_struct->remoteAccountNumber) {
2559     free(p_struct->remoteAccountNumber);
2560     p_struct->remoteAccountNumber=NULL;
2561   }
2562   if (p_src) {
2563     p_struct->remoteAccountNumber=strdup(p_src);
2564   }
2565   else {
2566     p_struct->remoteAccountNumber=NULL;
2567   }
2568 }
2569 
AB_Transaction_SetRemoteSuffix(AB_TRANSACTION * p_struct,const char * p_src)2570 void AB_Transaction_SetRemoteSuffix(AB_TRANSACTION *p_struct, const char *p_src)
2571 {
2572   assert(p_struct);
2573   if (p_struct->remoteSuffix) {
2574     free(p_struct->remoteSuffix);
2575     p_struct->remoteSuffix=NULL;
2576   }
2577   if (p_src) {
2578     p_struct->remoteSuffix=strdup(p_src);
2579   }
2580   else {
2581     p_struct->remoteSuffix=NULL;
2582   }
2583 }
2584 
AB_Transaction_SetRemoteIban(AB_TRANSACTION * p_struct,const char * p_src)2585 void AB_Transaction_SetRemoteIban(AB_TRANSACTION *p_struct, const char *p_src)
2586 {
2587   assert(p_struct);
2588   if (p_struct->remoteIban) {
2589     free(p_struct->remoteIban);
2590     p_struct->remoteIban=NULL;
2591   }
2592   if (p_src) {
2593     p_struct->remoteIban=strdup(p_src);
2594   }
2595   else {
2596     p_struct->remoteIban=NULL;
2597   }
2598 }
2599 
AB_Transaction_SetRemoteBic(AB_TRANSACTION * p_struct,const char * p_src)2600 void AB_Transaction_SetRemoteBic(AB_TRANSACTION *p_struct, const char *p_src)
2601 {
2602   assert(p_struct);
2603   if (p_struct->remoteBic) {
2604     free(p_struct->remoteBic);
2605     p_struct->remoteBic=NULL;
2606   }
2607   if (p_src) {
2608     p_struct->remoteBic=strdup(p_src);
2609   }
2610   else {
2611     p_struct->remoteBic=NULL;
2612   }
2613 }
2614 
AB_Transaction_SetRemoteName(AB_TRANSACTION * p_struct,const char * p_src)2615 void AB_Transaction_SetRemoteName(AB_TRANSACTION *p_struct, const char *p_src)
2616 {
2617   assert(p_struct);
2618   if (p_struct->remoteName) {
2619     free(p_struct->remoteName);
2620     p_struct->remoteName=NULL;
2621   }
2622   if (p_src) {
2623     p_struct->remoteName=strdup(p_src);
2624   }
2625   else {
2626     p_struct->remoteName=NULL;
2627   }
2628 }
2629 
AB_Transaction_SetDate(AB_TRANSACTION * p_struct,const GWEN_DATE * p_src)2630 void AB_Transaction_SetDate(AB_TRANSACTION *p_struct, const GWEN_DATE *p_src)
2631 {
2632   assert(p_struct);
2633   if (p_struct->date) {
2634     GWEN_Date_free(p_struct->date);
2635     p_struct->date=NULL;
2636   }
2637   if (p_src) {
2638     p_struct->date=GWEN_Date_dup(p_src);
2639   }
2640   else {
2641     p_struct->date=NULL;
2642   }
2643 }
2644 
AB_Transaction_SetValutaDate(AB_TRANSACTION * p_struct,const GWEN_DATE * p_src)2645 void AB_Transaction_SetValutaDate(AB_TRANSACTION *p_struct, const GWEN_DATE *p_src)
2646 {
2647   assert(p_struct);
2648   if (p_struct->valutaDate) {
2649     GWEN_Date_free(p_struct->valutaDate);
2650     p_struct->valutaDate=NULL;
2651   }
2652   if (p_src) {
2653     p_struct->valutaDate=GWEN_Date_dup(p_src);
2654   }
2655   else {
2656     p_struct->valutaDate=NULL;
2657   }
2658 }
2659 
AB_Transaction_SetValue(AB_TRANSACTION * p_struct,const AB_VALUE * p_src)2660 void AB_Transaction_SetValue(AB_TRANSACTION *p_struct, const AB_VALUE *p_src)
2661 {
2662   assert(p_struct);
2663   if (p_struct->value) {
2664     AB_Value_free(p_struct->value);
2665   }
2666   if (p_src) {
2667     p_struct->value=AB_Value_dup(p_src);
2668   }
2669   else {
2670     p_struct->value=AB_Value_new();
2671   }
2672 }
2673 
AB_Transaction_SetFees(AB_TRANSACTION * p_struct,const AB_VALUE * p_src)2674 void AB_Transaction_SetFees(AB_TRANSACTION *p_struct, const AB_VALUE *p_src)
2675 {
2676   assert(p_struct);
2677   if (p_struct->fees) {
2678     AB_Value_free(p_struct->fees);
2679   }
2680   if (p_src) {
2681     p_struct->fees=AB_Value_dup(p_src);
2682   }
2683   else {
2684     p_struct->fees=AB_Value_new();
2685   }
2686 }
2687 
AB_Transaction_SetTransactionCode(AB_TRANSACTION * p_struct,int p_src)2688 void AB_Transaction_SetTransactionCode(AB_TRANSACTION *p_struct, int p_src)
2689 {
2690   assert(p_struct);
2691   p_struct->transactionCode=p_src;
2692 }
2693 
AB_Transaction_SetTransactionText(AB_TRANSACTION * p_struct,const char * p_src)2694 void AB_Transaction_SetTransactionText(AB_TRANSACTION *p_struct, const char *p_src)
2695 {
2696   assert(p_struct);
2697   if (p_struct->transactionText) {
2698     free(p_struct->transactionText);
2699     p_struct->transactionText=NULL;
2700   }
2701   if (p_src) {
2702     p_struct->transactionText=strdup(p_src);
2703   }
2704   else {
2705     p_struct->transactionText=NULL;
2706   }
2707 }
2708 
AB_Transaction_SetTransactionKey(AB_TRANSACTION * p_struct,const char * p_src)2709 void AB_Transaction_SetTransactionKey(AB_TRANSACTION *p_struct, const char *p_src)
2710 {
2711   assert(p_struct);
2712   if (p_struct->transactionKey) {
2713     free(p_struct->transactionKey);
2714     p_struct->transactionKey=NULL;
2715   }
2716   if (p_src) {
2717     p_struct->transactionKey=strdup(p_src);
2718   }
2719   else {
2720     p_struct->transactionKey=NULL;
2721   }
2722 }
2723 
AB_Transaction_SetTextKey(AB_TRANSACTION * p_struct,int p_src)2724 void AB_Transaction_SetTextKey(AB_TRANSACTION *p_struct, int p_src)
2725 {
2726   assert(p_struct);
2727   p_struct->textKey=p_src;
2728 }
2729 
AB_Transaction_SetPrimanota(AB_TRANSACTION * p_struct,const char * p_src)2730 void AB_Transaction_SetPrimanota(AB_TRANSACTION *p_struct, const char *p_src)
2731 {
2732   assert(p_struct);
2733   if (p_struct->primanota) {
2734     free(p_struct->primanota);
2735     p_struct->primanota=NULL;
2736   }
2737   if (p_src) {
2738     p_struct->primanota=strdup(p_src);
2739   }
2740   else {
2741     p_struct->primanota=NULL;
2742   }
2743 }
2744 
AB_Transaction_SetPurpose(AB_TRANSACTION * p_struct,const char * p_src)2745 void AB_Transaction_SetPurpose(AB_TRANSACTION *p_struct, const char *p_src)
2746 {
2747   assert(p_struct);
2748   if (p_struct->purpose) {
2749     free(p_struct->purpose);
2750     p_struct->purpose=NULL;
2751   }
2752   if (p_src) {
2753     p_struct->purpose=strdup(p_src);
2754   }
2755   else {
2756     p_struct->purpose=NULL;
2757   }
2758 }
2759 
AB_Transaction_SetCategory(AB_TRANSACTION * p_struct,const char * p_src)2760 void AB_Transaction_SetCategory(AB_TRANSACTION *p_struct, const char *p_src)
2761 {
2762   assert(p_struct);
2763   if (p_struct->category) {
2764     free(p_struct->category);
2765     p_struct->category=NULL;
2766   }
2767   if (p_src) {
2768     p_struct->category=strdup(p_src);
2769   }
2770   else {
2771     p_struct->category=NULL;
2772   }
2773 }
2774 
AB_Transaction_SetCustomerReference(AB_TRANSACTION * p_struct,const char * p_src)2775 void AB_Transaction_SetCustomerReference(AB_TRANSACTION *p_struct, const char *p_src)
2776 {
2777   assert(p_struct);
2778   if (p_struct->customerReference) {
2779     free(p_struct->customerReference);
2780     p_struct->customerReference=NULL;
2781   }
2782   if (p_src) {
2783     p_struct->customerReference=strdup(p_src);
2784   }
2785   else {
2786     p_struct->customerReference=NULL;
2787   }
2788 }
2789 
AB_Transaction_SetBankReference(AB_TRANSACTION * p_struct,const char * p_src)2790 void AB_Transaction_SetBankReference(AB_TRANSACTION *p_struct, const char *p_src)
2791 {
2792   assert(p_struct);
2793   if (p_struct->bankReference) {
2794     free(p_struct->bankReference);
2795     p_struct->bankReference=NULL;
2796   }
2797   if (p_src) {
2798     p_struct->bankReference=strdup(p_src);
2799   }
2800   else {
2801     p_struct->bankReference=NULL;
2802   }
2803 }
2804 
AB_Transaction_SetEndToEndReference(AB_TRANSACTION * p_struct,const char * p_src)2805 void AB_Transaction_SetEndToEndReference(AB_TRANSACTION *p_struct, const char *p_src)
2806 {
2807   assert(p_struct);
2808   if (p_struct->endToEndReference) {
2809     free(p_struct->endToEndReference);
2810     p_struct->endToEndReference=NULL;
2811   }
2812   if (p_src) {
2813     p_struct->endToEndReference=strdup(p_src);
2814   }
2815   else {
2816     p_struct->endToEndReference=NULL;
2817   }
2818 }
2819 
AB_Transaction_SetUltimateCreditor(AB_TRANSACTION * p_struct,const char * p_src)2820 void AB_Transaction_SetUltimateCreditor(AB_TRANSACTION *p_struct, const char *p_src)
2821 {
2822   assert(p_struct);
2823   if (p_struct->ultimateCreditor) {
2824     free(p_struct->ultimateCreditor);
2825     p_struct->ultimateCreditor=NULL;
2826   }
2827   if (p_src) {
2828     p_struct->ultimateCreditor=strdup(p_src);
2829   }
2830   else {
2831     p_struct->ultimateCreditor=NULL;
2832   }
2833 }
2834 
AB_Transaction_SetUltimateDebtor(AB_TRANSACTION * p_struct,const char * p_src)2835 void AB_Transaction_SetUltimateDebtor(AB_TRANSACTION *p_struct, const char *p_src)
2836 {
2837   assert(p_struct);
2838   if (p_struct->ultimateDebtor) {
2839     free(p_struct->ultimateDebtor);
2840     p_struct->ultimateDebtor=NULL;
2841   }
2842   if (p_src) {
2843     p_struct->ultimateDebtor=strdup(p_src);
2844   }
2845   else {
2846     p_struct->ultimateDebtor=NULL;
2847   }
2848 }
2849 
AB_Transaction_SetCreditorSchemeId(AB_TRANSACTION * p_struct,const char * p_src)2850 void AB_Transaction_SetCreditorSchemeId(AB_TRANSACTION *p_struct, const char *p_src)
2851 {
2852   assert(p_struct);
2853   if (p_struct->creditorSchemeId) {
2854     free(p_struct->creditorSchemeId);
2855     p_struct->creditorSchemeId=NULL;
2856   }
2857   if (p_src) {
2858     p_struct->creditorSchemeId=strdup(p_src);
2859   }
2860   else {
2861     p_struct->creditorSchemeId=NULL;
2862   }
2863 }
2864 
AB_Transaction_SetOriginatorId(AB_TRANSACTION * p_struct,const char * p_src)2865 void AB_Transaction_SetOriginatorId(AB_TRANSACTION *p_struct, const char *p_src)
2866 {
2867   assert(p_struct);
2868   if (p_struct->originatorId) {
2869     free(p_struct->originatorId);
2870     p_struct->originatorId=NULL;
2871   }
2872   if (p_src) {
2873     p_struct->originatorId=strdup(p_src);
2874   }
2875   else {
2876     p_struct->originatorId=NULL;
2877   }
2878 }
2879 
AB_Transaction_SetMandateId(AB_TRANSACTION * p_struct,const char * p_src)2880 void AB_Transaction_SetMandateId(AB_TRANSACTION *p_struct, const char *p_src)
2881 {
2882   assert(p_struct);
2883   if (p_struct->mandateId) {
2884     free(p_struct->mandateId);
2885     p_struct->mandateId=NULL;
2886   }
2887   if (p_src) {
2888     p_struct->mandateId=strdup(p_src);
2889   }
2890   else {
2891     p_struct->mandateId=NULL;
2892   }
2893 }
2894 
AB_Transaction_SetMandateDate(AB_TRANSACTION * p_struct,const GWEN_DATE * p_src)2895 void AB_Transaction_SetMandateDate(AB_TRANSACTION *p_struct, const GWEN_DATE *p_src)
2896 {
2897   assert(p_struct);
2898   if (p_struct->mandateDate) {
2899     GWEN_Date_free(p_struct->mandateDate);
2900     p_struct->mandateDate=NULL;
2901   }
2902   if (p_src) {
2903     p_struct->mandateDate=GWEN_Date_dup(p_src);
2904   }
2905   else {
2906     p_struct->mandateDate=NULL;
2907   }
2908 }
2909 
AB_Transaction_SetMandateDebitorName(AB_TRANSACTION * p_struct,const char * p_src)2910 void AB_Transaction_SetMandateDebitorName(AB_TRANSACTION *p_struct, const char *p_src)
2911 {
2912   assert(p_struct);
2913   if (p_struct->mandateDebitorName) {
2914     free(p_struct->mandateDebitorName);
2915     p_struct->mandateDebitorName=NULL;
2916   }
2917   if (p_src) {
2918     p_struct->mandateDebitorName=strdup(p_src);
2919   }
2920   else {
2921     p_struct->mandateDebitorName=NULL;
2922   }
2923 }
2924 
AB_Transaction_SetOriginalCreditorSchemeId(AB_TRANSACTION * p_struct,const char * p_src)2925 void AB_Transaction_SetOriginalCreditorSchemeId(AB_TRANSACTION *p_struct, const char *p_src)
2926 {
2927   assert(p_struct);
2928   if (p_struct->originalCreditorSchemeId) {
2929     free(p_struct->originalCreditorSchemeId);
2930     p_struct->originalCreditorSchemeId=NULL;
2931   }
2932   if (p_src) {
2933     p_struct->originalCreditorSchemeId=strdup(p_src);
2934   }
2935   else {
2936     p_struct->originalCreditorSchemeId=NULL;
2937   }
2938 }
2939 
AB_Transaction_SetOriginalMandateId(AB_TRANSACTION * p_struct,const char * p_src)2940 void AB_Transaction_SetOriginalMandateId(AB_TRANSACTION *p_struct, const char *p_src)
2941 {
2942   assert(p_struct);
2943   if (p_struct->originalMandateId) {
2944     free(p_struct->originalMandateId);
2945     p_struct->originalMandateId=NULL;
2946   }
2947   if (p_src) {
2948     p_struct->originalMandateId=strdup(p_src);
2949   }
2950   else {
2951     p_struct->originalMandateId=NULL;
2952   }
2953 }
2954 
AB_Transaction_SetOriginalCreditorName(AB_TRANSACTION * p_struct,const char * p_src)2955 void AB_Transaction_SetOriginalCreditorName(AB_TRANSACTION *p_struct, const char *p_src)
2956 {
2957   assert(p_struct);
2958   if (p_struct->originalCreditorName) {
2959     free(p_struct->originalCreditorName);
2960     p_struct->originalCreditorName=NULL;
2961   }
2962   if (p_src) {
2963     p_struct->originalCreditorName=strdup(p_src);
2964   }
2965   else {
2966     p_struct->originalCreditorName=NULL;
2967   }
2968 }
2969 
AB_Transaction_SetSequence(AB_TRANSACTION * p_struct,AB_TRANSACTION_SEQUENCE p_src)2970 void AB_Transaction_SetSequence(AB_TRANSACTION *p_struct, AB_TRANSACTION_SEQUENCE  p_src)
2971 {
2972   assert(p_struct);
2973   p_struct->sequence=p_src;
2974 }
2975 
AB_Transaction_SetCharge(AB_TRANSACTION * p_struct,AB_TRANSACTION_CHARGE p_src)2976 void AB_Transaction_SetCharge(AB_TRANSACTION *p_struct, AB_TRANSACTION_CHARGE  p_src)
2977 {
2978   assert(p_struct);
2979   p_struct->charge=p_src;
2980 }
2981 
AB_Transaction_SetRemoteAddrStreet(AB_TRANSACTION * p_struct,const char * p_src)2982 void AB_Transaction_SetRemoteAddrStreet(AB_TRANSACTION *p_struct, const char *p_src)
2983 {
2984   assert(p_struct);
2985   if (p_struct->remoteAddrStreet) {
2986     free(p_struct->remoteAddrStreet);
2987     p_struct->remoteAddrStreet=NULL;
2988   }
2989   if (p_src) {
2990     p_struct->remoteAddrStreet=strdup(p_src);
2991   }
2992   else {
2993     p_struct->remoteAddrStreet=NULL;
2994   }
2995 }
2996 
AB_Transaction_SetRemoteAddrZipcode(AB_TRANSACTION * p_struct,const char * p_src)2997 void AB_Transaction_SetRemoteAddrZipcode(AB_TRANSACTION *p_struct, const char *p_src)
2998 {
2999   assert(p_struct);
3000   if (p_struct->remoteAddrZipcode) {
3001     free(p_struct->remoteAddrZipcode);
3002     p_struct->remoteAddrZipcode=NULL;
3003   }
3004   if (p_src) {
3005     p_struct->remoteAddrZipcode=strdup(p_src);
3006   }
3007   else {
3008     p_struct->remoteAddrZipcode=NULL;
3009   }
3010 }
3011 
AB_Transaction_SetRemoteAddrCity(AB_TRANSACTION * p_struct,const char * p_src)3012 void AB_Transaction_SetRemoteAddrCity(AB_TRANSACTION *p_struct, const char *p_src)
3013 {
3014   assert(p_struct);
3015   if (p_struct->remoteAddrCity) {
3016     free(p_struct->remoteAddrCity);
3017     p_struct->remoteAddrCity=NULL;
3018   }
3019   if (p_src) {
3020     p_struct->remoteAddrCity=strdup(p_src);
3021   }
3022   else {
3023     p_struct->remoteAddrCity=NULL;
3024   }
3025 }
3026 
AB_Transaction_SetRemoteAddrPhone(AB_TRANSACTION * p_struct,const char * p_src)3027 void AB_Transaction_SetRemoteAddrPhone(AB_TRANSACTION *p_struct, const char *p_src)
3028 {
3029   assert(p_struct);
3030   if (p_struct->remoteAddrPhone) {
3031     free(p_struct->remoteAddrPhone);
3032     p_struct->remoteAddrPhone=NULL;
3033   }
3034   if (p_src) {
3035     p_struct->remoteAddrPhone=strdup(p_src);
3036   }
3037   else {
3038     p_struct->remoteAddrPhone=NULL;
3039   }
3040 }
3041 
AB_Transaction_SetPeriod(AB_TRANSACTION * p_struct,AB_TRANSACTION_PERIOD p_src)3042 void AB_Transaction_SetPeriod(AB_TRANSACTION *p_struct, AB_TRANSACTION_PERIOD  p_src)
3043 {
3044   assert(p_struct);
3045   p_struct->period=p_src;
3046 }
3047 
AB_Transaction_SetCycle(AB_TRANSACTION * p_struct,uint32_t p_src)3048 void AB_Transaction_SetCycle(AB_TRANSACTION *p_struct, uint32_t p_src)
3049 {
3050   assert(p_struct);
3051   p_struct->cycle=p_src;
3052 }
3053 
AB_Transaction_SetExecutionDay(AB_TRANSACTION * p_struct,uint32_t p_src)3054 void AB_Transaction_SetExecutionDay(AB_TRANSACTION *p_struct, uint32_t p_src)
3055 {
3056   assert(p_struct);
3057   p_struct->executionDay=p_src;
3058 }
3059 
AB_Transaction_SetFirstDate(AB_TRANSACTION * p_struct,const GWEN_DATE * p_src)3060 void AB_Transaction_SetFirstDate(AB_TRANSACTION *p_struct, const GWEN_DATE *p_src)
3061 {
3062   assert(p_struct);
3063   if (p_struct->firstDate) {
3064     GWEN_Date_free(p_struct->firstDate);
3065     p_struct->firstDate=NULL;
3066   }
3067   if (p_src) {
3068     p_struct->firstDate=GWEN_Date_dup(p_src);
3069   }
3070   else {
3071     p_struct->firstDate=NULL;
3072   }
3073 }
3074 
AB_Transaction_SetLastDate(AB_TRANSACTION * p_struct,const GWEN_DATE * p_src)3075 void AB_Transaction_SetLastDate(AB_TRANSACTION *p_struct, const GWEN_DATE *p_src)
3076 {
3077   assert(p_struct);
3078   if (p_struct->lastDate) {
3079     GWEN_Date_free(p_struct->lastDate);
3080     p_struct->lastDate=NULL;
3081   }
3082   if (p_src) {
3083     p_struct->lastDate=GWEN_Date_dup(p_src);
3084   }
3085   else {
3086     p_struct->lastDate=NULL;
3087   }
3088 }
3089 
AB_Transaction_SetNextDate(AB_TRANSACTION * p_struct,const GWEN_DATE * p_src)3090 void AB_Transaction_SetNextDate(AB_TRANSACTION *p_struct, const GWEN_DATE *p_src)
3091 {
3092   assert(p_struct);
3093   if (p_struct->nextDate) {
3094     GWEN_Date_free(p_struct->nextDate);
3095     p_struct->nextDate=NULL;
3096   }
3097   if (p_src) {
3098     p_struct->nextDate=GWEN_Date_dup(p_src);
3099   }
3100   else {
3101     p_struct->nextDate=NULL;
3102   }
3103 }
3104 
AB_Transaction_SetUnitId(AB_TRANSACTION * p_struct,const char * p_src)3105 void AB_Transaction_SetUnitId(AB_TRANSACTION *p_struct, const char *p_src)
3106 {
3107   assert(p_struct);
3108   if (p_struct->unitId) {
3109     free(p_struct->unitId);
3110     p_struct->unitId=NULL;
3111   }
3112   if (p_src) {
3113     p_struct->unitId=strdup(p_src);
3114   }
3115   else {
3116     p_struct->unitId=NULL;
3117   }
3118 }
3119 
AB_Transaction_SetUnitIdNameSpace(AB_TRANSACTION * p_struct,const char * p_src)3120 void AB_Transaction_SetUnitIdNameSpace(AB_TRANSACTION *p_struct, const char *p_src)
3121 {
3122   assert(p_struct);
3123   if (p_struct->unitIdNameSpace) {
3124     free(p_struct->unitIdNameSpace);
3125     p_struct->unitIdNameSpace=NULL;
3126   }
3127   if (p_src) {
3128     p_struct->unitIdNameSpace=strdup(p_src);
3129   }
3130   else {
3131     p_struct->unitIdNameSpace=NULL;
3132   }
3133 }
3134 
AB_Transaction_SetTickerSymbol(AB_TRANSACTION * p_struct,const char * p_src)3135 void AB_Transaction_SetTickerSymbol(AB_TRANSACTION *p_struct, const char *p_src)
3136 {
3137   assert(p_struct);
3138   if (p_struct->tickerSymbol) {
3139     free(p_struct->tickerSymbol);
3140     p_struct->tickerSymbol=NULL;
3141   }
3142   if (p_src) {
3143     p_struct->tickerSymbol=strdup(p_src);
3144   }
3145   else {
3146     p_struct->tickerSymbol=NULL;
3147   }
3148 }
3149 
AB_Transaction_SetUnits(AB_TRANSACTION * p_struct,const AB_VALUE * p_src)3150 void AB_Transaction_SetUnits(AB_TRANSACTION *p_struct, const AB_VALUE *p_src)
3151 {
3152   assert(p_struct);
3153   if (p_struct->units) {
3154     AB_Value_free(p_struct->units);
3155   }
3156   if (p_src) {
3157     p_struct->units=AB_Value_dup(p_src);
3158   }
3159   else {
3160     p_struct->units=AB_Value_new();
3161   }
3162 }
3163 
AB_Transaction_SetUnitPriceValue(AB_TRANSACTION * p_struct,const AB_VALUE * p_src)3164 void AB_Transaction_SetUnitPriceValue(AB_TRANSACTION *p_struct, const AB_VALUE *p_src)
3165 {
3166   assert(p_struct);
3167   if (p_struct->unitPriceValue) {
3168     AB_Value_free(p_struct->unitPriceValue);
3169   }
3170   if (p_src) {
3171     p_struct->unitPriceValue=AB_Value_dup(p_src);
3172   }
3173   else {
3174     p_struct->unitPriceValue=AB_Value_new();
3175   }
3176 }
3177 
AB_Transaction_SetUnitPriceDate(AB_TRANSACTION * p_struct,const GWEN_DATE * p_src)3178 void AB_Transaction_SetUnitPriceDate(AB_TRANSACTION *p_struct, const GWEN_DATE *p_src)
3179 {
3180   assert(p_struct);
3181   if (p_struct->unitPriceDate) {
3182     GWEN_Date_free(p_struct->unitPriceDate);
3183     p_struct->unitPriceDate=NULL;
3184   }
3185   if (p_src) {
3186     p_struct->unitPriceDate=GWEN_Date_dup(p_src);
3187   }
3188   else {
3189     p_struct->unitPriceDate=NULL;
3190   }
3191 }
3192 
AB_Transaction_SetCommissionValue(AB_TRANSACTION * p_struct,const AB_VALUE * p_src)3193 void AB_Transaction_SetCommissionValue(AB_TRANSACTION *p_struct, const AB_VALUE *p_src)
3194 {
3195   assert(p_struct);
3196   if (p_struct->commissionValue) {
3197     AB_Value_free(p_struct->commissionValue);
3198   }
3199   if (p_src) {
3200     p_struct->commissionValue=AB_Value_dup(p_src);
3201   }
3202   else {
3203     p_struct->commissionValue=AB_Value_new();
3204   }
3205 }
3206 
AB_Transaction_SetMemo(AB_TRANSACTION * p_struct,const char * p_src)3207 void AB_Transaction_SetMemo(AB_TRANSACTION *p_struct, const char *p_src)
3208 {
3209   assert(p_struct);
3210   if (p_struct->memo) {
3211     free(p_struct->memo);
3212     p_struct->memo=NULL;
3213   }
3214   if (p_src) {
3215     p_struct->memo=strdup(p_src);
3216   }
3217   else {
3218     p_struct->memo=NULL;
3219   }
3220 }
3221 
AB_Transaction_SetHash(AB_TRANSACTION * p_struct,const char * p_src)3222 void AB_Transaction_SetHash(AB_TRANSACTION *p_struct, const char *p_src)
3223 {
3224   assert(p_struct);
3225   if (p_struct->hash) {
3226     free(p_struct->hash);
3227     p_struct->hash=NULL;
3228   }
3229   if (p_src) {
3230     p_struct->hash=strdup(p_src);
3231   }
3232   else {
3233     p_struct->hash=NULL;
3234   }
3235 }
3236 
3237 /* list1 functions */
AB_Transaction_List_dup(const AB_TRANSACTION_LIST * p_src)3238 AB_TRANSACTION_LIST *AB_Transaction_List_dup(const AB_TRANSACTION_LIST *p_src)
3239 {
3240   AB_TRANSACTION_LIST *p_dest;
3241   AB_TRANSACTION *p_elem;
3242 
3243   assert(p_src);
3244   p_dest=AB_Transaction_List_new();
3245   p_elem=AB_Transaction_List_First(p_src);
3246   while (p_elem) {
3247     AB_TRANSACTION *p_cpy;
3248 
3249     p_cpy=AB_Transaction_dup(p_elem);
3250     AB_Transaction_List_Add(p_cpy, p_dest);
3251     p_elem=AB_Transaction_List_Next(p_elem);
3252   }
3253 
3254   return p_dest;
3255 }
3256 
AB_Transaction_ReadDb(AB_TRANSACTION * p_struct,GWEN_DB_NODE * p_db)3257 void AB_Transaction_ReadDb(AB_TRANSACTION *p_struct, GWEN_DB_NODE *p_db)
3258 {
3259   assert(p_struct);
3260   /* member "type" */
3261   {
3262     const char *s;
3263     s=GWEN_DB_GetCharValue(p_db, "type", 0, NULL);
3264     if (s)
3265       p_struct->type=AB_Transaction_Type_fromString(s);
3266     else
3267       p_struct->type=AB_Transaction_TypeUnknown;
3268   }
3269 
3270   /* member "subType" */
3271   {
3272     const char *s;
3273     s=GWEN_DB_GetCharValue(p_db, "subType", 0, NULL);
3274     if (s)
3275       p_struct->subType=AB_Transaction_SubType_fromString(s);
3276     else
3277       p_struct->subType=AB_Transaction_SubTypeNone;
3278   }
3279 
3280   /* member "command" */
3281   {
3282     const char *s;
3283     s=GWEN_DB_GetCharValue(p_db, "command", 0, NULL);
3284     if (s)
3285       p_struct->command=AB_Transaction_Command_fromString(s);
3286     else
3287       p_struct->command=AB_Transaction_CommandNone;
3288   }
3289 
3290   /* member "status" */
3291   {
3292     const char *s;
3293     s=GWEN_DB_GetCharValue(p_db, "status", 0, NULL);
3294     if (s)
3295       p_struct->status=AB_Transaction_Status_fromString(s);
3296     else
3297       p_struct->status=AB_Transaction_StatusUnknown;
3298   }
3299 
3300   /* member "uniqueAccountId" */
3301   p_struct->uniqueAccountId=GWEN_DB_GetIntValue(p_db, "uniqueAccountId", 0, 0);
3302 
3303   /* member "uniqueId" */
3304   p_struct->uniqueId=GWEN_DB_GetIntValue(p_db, "uniqueId", 0, 0);
3305 
3306   /* member "refUniqueId" */
3307   p_struct->refUniqueId=GWEN_DB_GetIntValue(p_db, "refUniqueId", 0, 0);
3308 
3309   /* member "idForApplication" */
3310   p_struct->idForApplication=GWEN_DB_GetIntValue(p_db, "idForApplication", 0, 0);
3311 
3312   /* member "stringIdForApplication" */
3313   {
3314     const char *s;
3315     s=GWEN_DB_GetCharValue(p_db, "stringIdForApplication", 0, 0);
3316     if (s)
3317       p_struct->stringIdForApplication=strdup(s);
3318   }
3319   if (p_struct->stringIdForApplication==NULL) {
3320     p_struct->stringIdForApplication=0;
3321   }
3322 
3323   /* member "sessionId" */
3324   p_struct->sessionId=GWEN_DB_GetIntValue(p_db, "sessionId", 0, 0);
3325 
3326   /* member "groupId" */
3327   p_struct->groupId=GWEN_DB_GetIntValue(p_db, "groupId", 0, 0);
3328 
3329   /* member "fiId" */
3330   if (p_struct->fiId) {
3331     free(p_struct->fiId);
3332     p_struct->fiId=NULL;
3333   }
3334   {
3335     const char *s;
3336     s=GWEN_DB_GetCharValue(p_db, "fiId", 0, NULL);
3337     if (s)
3338       p_struct->fiId=strdup(s);
3339   }
3340   if (p_struct->fiId==NULL) {
3341     p_struct->fiId=NULL;
3342   }
3343 
3344   /* member "localIban" */
3345   if (p_struct->localIban) {
3346     free(p_struct->localIban);
3347     p_struct->localIban=NULL;
3348   }
3349   {
3350     const char *s;
3351     s=GWEN_DB_GetCharValue(p_db, "localIban", 0, NULL);
3352     if (s)
3353       p_struct->localIban=strdup(s);
3354   }
3355   if (p_struct->localIban==NULL) {
3356     p_struct->localIban=NULL;
3357   }
3358 
3359   /* member "localBic" */
3360   if (p_struct->localBic) {
3361     free(p_struct->localBic);
3362     p_struct->localBic=NULL;
3363   }
3364   {
3365     const char *s;
3366     s=GWEN_DB_GetCharValue(p_db, "localBic", 0, NULL);
3367     if (s)
3368       p_struct->localBic=strdup(s);
3369   }
3370   if (p_struct->localBic==NULL) {
3371     p_struct->localBic=NULL;
3372   }
3373 
3374   /* member "localCountry" */
3375   if (p_struct->localCountry) {
3376     free(p_struct->localCountry);
3377     p_struct->localCountry=NULL;
3378   }
3379   {
3380     const char *s;
3381     s=GWEN_DB_GetCharValue(p_db, "localCountry", 0, NULL);
3382     if (s)
3383       p_struct->localCountry=strdup(s);
3384   }
3385   if (p_struct->localCountry==NULL) {
3386     p_struct->localCountry=NULL;
3387   }
3388 
3389   /* member "localBankCode" */
3390   if (p_struct->localBankCode) {
3391     free(p_struct->localBankCode);
3392     p_struct->localBankCode=NULL;
3393   }
3394   {
3395     const char *s;
3396     s=GWEN_DB_GetCharValue(p_db, "localBankCode", 0, NULL);
3397     if (s)
3398       p_struct->localBankCode=strdup(s);
3399   }
3400   if (p_struct->localBankCode==NULL) {
3401     p_struct->localBankCode=NULL;
3402   }
3403 
3404   /* member "localBranchId" */
3405   if (p_struct->localBranchId) {
3406     free(p_struct->localBranchId);
3407     p_struct->localBranchId=NULL;
3408   }
3409   {
3410     const char *s;
3411     s=GWEN_DB_GetCharValue(p_db, "localBranchId", 0, NULL);
3412     if (s)
3413       p_struct->localBranchId=strdup(s);
3414   }
3415   if (p_struct->localBranchId==NULL) {
3416     p_struct->localBranchId=NULL;
3417   }
3418 
3419   /* member "localAccountNumber" */
3420   if (p_struct->localAccountNumber) {
3421     free(p_struct->localAccountNumber);
3422     p_struct->localAccountNumber=NULL;
3423   }
3424   {
3425     const char *s;
3426     s=GWEN_DB_GetCharValue(p_db, "localAccountNumber", 0, NULL);
3427     if (s)
3428       p_struct->localAccountNumber=strdup(s);
3429   }
3430   if (p_struct->localAccountNumber==NULL) {
3431     p_struct->localAccountNumber=NULL;
3432   }
3433 
3434   /* member "localSuffix" */
3435   if (p_struct->localSuffix) {
3436     free(p_struct->localSuffix);
3437     p_struct->localSuffix=NULL;
3438   }
3439   {
3440     const char *s;
3441     s=GWEN_DB_GetCharValue(p_db, "localSuffix", 0, NULL);
3442     if (s)
3443       p_struct->localSuffix=strdup(s);
3444   }
3445   if (p_struct->localSuffix==NULL) {
3446     p_struct->localSuffix=NULL;
3447   }
3448 
3449   /* member "localName" */
3450   if (p_struct->localName) {
3451     free(p_struct->localName);
3452     p_struct->localName=NULL;
3453   }
3454   {
3455     const char *s;
3456     s=GWEN_DB_GetCharValue(p_db, "localName", 0, NULL);
3457     if (s)
3458       p_struct->localName=strdup(s);
3459   }
3460   if (p_struct->localName==NULL) {
3461     p_struct->localName=NULL;
3462   }
3463 
3464   /* member "remoteCountry" */
3465   if (p_struct->remoteCountry) {
3466     free(p_struct->remoteCountry);
3467     p_struct->remoteCountry=NULL;
3468   }
3469   {
3470     const char *s;
3471     s=GWEN_DB_GetCharValue(p_db, "remoteCountry", 0, NULL);
3472     if (s)
3473       p_struct->remoteCountry=strdup(s);
3474   }
3475   if (p_struct->remoteCountry==NULL) {
3476     p_struct->remoteCountry=NULL;
3477   }
3478 
3479   /* member "remoteBankCode" */
3480   if (p_struct->remoteBankCode) {
3481     free(p_struct->remoteBankCode);
3482     p_struct->remoteBankCode=NULL;
3483   }
3484   {
3485     const char *s;
3486     s=GWEN_DB_GetCharValue(p_db, "remoteBankCode", 0, NULL);
3487     if (s)
3488       p_struct->remoteBankCode=strdup(s);
3489   }
3490   if (p_struct->remoteBankCode==NULL) {
3491     p_struct->remoteBankCode=NULL;
3492   }
3493 
3494   /* member "remoteBranchId" */
3495   if (p_struct->remoteBranchId) {
3496     free(p_struct->remoteBranchId);
3497     p_struct->remoteBranchId=NULL;
3498   }
3499   {
3500     const char *s;
3501     s=GWEN_DB_GetCharValue(p_db, "remoteBranchId", 0, NULL);
3502     if (s)
3503       p_struct->remoteBranchId=strdup(s);
3504   }
3505   if (p_struct->remoteBranchId==NULL) {
3506     p_struct->remoteBranchId=NULL;
3507   }
3508 
3509   /* member "remoteAccountNumber" */
3510   if (p_struct->remoteAccountNumber) {
3511     free(p_struct->remoteAccountNumber);
3512     p_struct->remoteAccountNumber=NULL;
3513   }
3514   {
3515     const char *s;
3516     s=GWEN_DB_GetCharValue(p_db, "remoteAccountNumber", 0, NULL);
3517     if (s)
3518       p_struct->remoteAccountNumber=strdup(s);
3519   }
3520   if (p_struct->remoteAccountNumber==NULL) {
3521     p_struct->remoteAccountNumber=NULL;
3522   }
3523 
3524   /* member "remoteSuffix" */
3525   if (p_struct->remoteSuffix) {
3526     free(p_struct->remoteSuffix);
3527     p_struct->remoteSuffix=NULL;
3528   }
3529   {
3530     const char *s;
3531     s=GWEN_DB_GetCharValue(p_db, "remoteSuffix", 0, NULL);
3532     if (s)
3533       p_struct->remoteSuffix=strdup(s);
3534   }
3535   if (p_struct->remoteSuffix==NULL) {
3536     p_struct->remoteSuffix=NULL;
3537   }
3538 
3539   /* member "remoteIban" */
3540   if (p_struct->remoteIban) {
3541     free(p_struct->remoteIban);
3542     p_struct->remoteIban=NULL;
3543   }
3544   {
3545     const char *s;
3546     s=GWEN_DB_GetCharValue(p_db, "remoteIban", 0, NULL);
3547     if (s)
3548       p_struct->remoteIban=strdup(s);
3549   }
3550   if (p_struct->remoteIban==NULL) {
3551     p_struct->remoteIban=NULL;
3552   }
3553 
3554   /* member "remoteBic" */
3555   if (p_struct->remoteBic) {
3556     free(p_struct->remoteBic);
3557     p_struct->remoteBic=NULL;
3558   }
3559   {
3560     const char *s;
3561     s=GWEN_DB_GetCharValue(p_db, "remoteBic", 0, NULL);
3562     if (s)
3563       p_struct->remoteBic=strdup(s);
3564   }
3565   if (p_struct->remoteBic==NULL) {
3566     p_struct->remoteBic=NULL;
3567   }
3568 
3569   /* member "remoteName" */
3570   if (p_struct->remoteName) {
3571     free(p_struct->remoteName);
3572     p_struct->remoteName=NULL;
3573   }
3574   {
3575     const char *s;
3576     s=GWEN_DB_GetCharValue(p_db, "remoteName", 0, NULL);
3577     if (s)
3578       p_struct->remoteName=strdup(s);
3579   }
3580   if (p_struct->remoteName==NULL) {
3581     p_struct->remoteName=NULL;
3582   }
3583 
3584   /* member "date" */
3585   if (p_struct->date) {
3586     GWEN_Date_free(p_struct->date);
3587     p_struct->date=NULL;
3588   }
3589   {
3590     const char *s;
3591     s=GWEN_DB_GetCharValue(p_db, "date", 0, NULL);
3592     if (s && *s)
3593       p_struct->date=GWEN_Date_fromString(s);
3594   }
3595   if (p_struct->date==NULL) {
3596     p_struct->date=NULL;
3597   }
3598 
3599   /* member "valutaDate" */
3600   if (p_struct->valutaDate) {
3601     GWEN_Date_free(p_struct->valutaDate);
3602     p_struct->valutaDate=NULL;
3603   }
3604   {
3605     const char *s;
3606     s=GWEN_DB_GetCharValue(p_db, "valutaDate", 0, NULL);
3607     if (s && *s)
3608       p_struct->valutaDate=GWEN_Date_fromString(s);
3609   }
3610   if (p_struct->valutaDate==NULL) {
3611     p_struct->valutaDate=NULL;
3612   }
3613 
3614   /* member "value" */
3615   if (p_struct->value) {
3616     AB_Value_free(p_struct->value);
3617   }
3618   {
3619     const char *s;
3620     s=GWEN_DB_GetCharValue(p_db, "value", 0, NULL);
3621     if (s)
3622       p_struct->value=AB_Value_fromString(s);
3623     else
3624       p_struct->value=NULL;
3625   }
3626   if (p_struct->value==NULL) {
3627     p_struct->value=AB_Value_new();
3628   }
3629 
3630   /* member "fees" */
3631   if (p_struct->fees) {
3632     AB_Value_free(p_struct->fees);
3633   }
3634   {
3635     const char *s;
3636     s=GWEN_DB_GetCharValue(p_db, "fees", 0, NULL);
3637     if (s)
3638       p_struct->fees=AB_Value_fromString(s);
3639     else
3640       p_struct->fees=NULL;
3641   }
3642   if (p_struct->fees==NULL) {
3643     p_struct->fees=AB_Value_new();
3644   }
3645 
3646   /* member "transactionCode" */
3647   p_struct->transactionCode=GWEN_DB_GetIntValue(p_db, "transactionCode", 0, 0);
3648 
3649   /* member "transactionText" */
3650   if (p_struct->transactionText) {
3651     free(p_struct->transactionText);
3652     p_struct->transactionText=NULL;
3653   }
3654   {
3655     const char *s;
3656     s=GWEN_DB_GetCharValue(p_db, "transactionText", 0, NULL);
3657     if (s)
3658       p_struct->transactionText=strdup(s);
3659   }
3660   if (p_struct->transactionText==NULL) {
3661     p_struct->transactionText=NULL;
3662   }
3663 
3664   /* member "transactionKey" */
3665   if (p_struct->transactionKey) {
3666     free(p_struct->transactionKey);
3667     p_struct->transactionKey=NULL;
3668   }
3669   {
3670     const char *s;
3671     s=GWEN_DB_GetCharValue(p_db, "transactionKey", 0, NULL);
3672     if (s)
3673       p_struct->transactionKey=strdup(s);
3674   }
3675   if (p_struct->transactionKey==NULL) {
3676     p_struct->transactionKey=NULL;
3677   }
3678 
3679   /* member "textKey" */
3680   p_struct->textKey=GWEN_DB_GetIntValue(p_db, "textKey", 0, 0);
3681 
3682   /* member "primanota" */
3683   if (p_struct->primanota) {
3684     free(p_struct->primanota);
3685     p_struct->primanota=NULL;
3686   }
3687   {
3688     const char *s;
3689     s=GWEN_DB_GetCharValue(p_db, "primanota", 0, NULL);
3690     if (s)
3691       p_struct->primanota=strdup(s);
3692   }
3693   if (p_struct->primanota==NULL) {
3694     p_struct->primanota=NULL;
3695   }
3696 
3697   /* member "purpose" */
3698   if (p_struct->purpose) {
3699     free(p_struct->purpose);
3700     p_struct->purpose=NULL;
3701   }
3702   {
3703     const char *s;
3704     s=GWEN_DB_GetCharValue(p_db, "purpose", 0, NULL);
3705     if (s)
3706       p_struct->purpose=strdup(s);
3707   }
3708   if (p_struct->purpose==NULL) {
3709     p_struct->purpose=NULL;
3710   }
3711 
3712   /* member "category" */
3713   if (p_struct->category) {
3714     free(p_struct->category);
3715     p_struct->category=NULL;
3716   }
3717   {
3718     const char *s;
3719     s=GWEN_DB_GetCharValue(p_db, "category", 0, NULL);
3720     if (s)
3721       p_struct->category=strdup(s);
3722   }
3723   if (p_struct->category==NULL) {
3724     p_struct->category=NULL;
3725   }
3726 
3727   /* member "customerReference" */
3728   if (p_struct->customerReference) {
3729     free(p_struct->customerReference);
3730     p_struct->customerReference=NULL;
3731   }
3732   {
3733     const char *s;
3734     s=GWEN_DB_GetCharValue(p_db, "customerReference", 0, NULL);
3735     if (s)
3736       p_struct->customerReference=strdup(s);
3737   }
3738   if (p_struct->customerReference==NULL) {
3739     p_struct->customerReference=NULL;
3740   }
3741 
3742   /* member "bankReference" */
3743   if (p_struct->bankReference) {
3744     free(p_struct->bankReference);
3745     p_struct->bankReference=NULL;
3746   }
3747   {
3748     const char *s;
3749     s=GWEN_DB_GetCharValue(p_db, "bankReference", 0, NULL);
3750     if (s)
3751       p_struct->bankReference=strdup(s);
3752   }
3753   if (p_struct->bankReference==NULL) {
3754     p_struct->bankReference=NULL;
3755   }
3756 
3757   /* member "endToEndReference" */
3758   if (p_struct->endToEndReference) {
3759     free(p_struct->endToEndReference);
3760     p_struct->endToEndReference=NULL;
3761   }
3762   {
3763     const char *s;
3764     s=GWEN_DB_GetCharValue(p_db, "endToEndReference", 0, NULL);
3765     if (s)
3766       p_struct->endToEndReference=strdup(s);
3767   }
3768   if (p_struct->endToEndReference==NULL) {
3769     p_struct->endToEndReference=NULL;
3770   }
3771 
3772   /* member "ultimateCreditor" */
3773   if (p_struct->ultimateCreditor) {
3774     free(p_struct->ultimateCreditor);
3775     p_struct->ultimateCreditor=NULL;
3776   }
3777   {
3778     const char *s;
3779     s=GWEN_DB_GetCharValue(p_db, "ultimateCreditor", 0, NULL);
3780     if (s)
3781       p_struct->ultimateCreditor=strdup(s);
3782   }
3783   if (p_struct->ultimateCreditor==NULL) {
3784     p_struct->ultimateCreditor=NULL;
3785   }
3786 
3787   /* member "ultimateDebtor" */
3788   if (p_struct->ultimateDebtor) {
3789     free(p_struct->ultimateDebtor);
3790     p_struct->ultimateDebtor=NULL;
3791   }
3792   {
3793     const char *s;
3794     s=GWEN_DB_GetCharValue(p_db, "ultimateDebtor", 0, NULL);
3795     if (s)
3796       p_struct->ultimateDebtor=strdup(s);
3797   }
3798   if (p_struct->ultimateDebtor==NULL) {
3799     p_struct->ultimateDebtor=NULL;
3800   }
3801 
3802   /* member "creditorSchemeId" */
3803   if (p_struct->creditorSchemeId) {
3804     free(p_struct->creditorSchemeId);
3805     p_struct->creditorSchemeId=NULL;
3806   }
3807   {
3808     const char *s;
3809     s=GWEN_DB_GetCharValue(p_db, "creditorSchemeId", 0, NULL);
3810     if (s)
3811       p_struct->creditorSchemeId=strdup(s);
3812   }
3813   if (p_struct->creditorSchemeId==NULL) {
3814     p_struct->creditorSchemeId=NULL;
3815   }
3816 
3817   /* member "originatorId" */
3818   if (p_struct->originatorId) {
3819     free(p_struct->originatorId);
3820     p_struct->originatorId=NULL;
3821   }
3822   {
3823     const char *s;
3824     s=GWEN_DB_GetCharValue(p_db, "originatorId", 0, NULL);
3825     if (s)
3826       p_struct->originatorId=strdup(s);
3827   }
3828   if (p_struct->originatorId==NULL) {
3829     p_struct->originatorId=NULL;
3830   }
3831 
3832   /* member "mandateId" */
3833   if (p_struct->mandateId) {
3834     free(p_struct->mandateId);
3835     p_struct->mandateId=NULL;
3836   }
3837   {
3838     const char *s;
3839     s=GWEN_DB_GetCharValue(p_db, "mandateId", 0, NULL);
3840     if (s)
3841       p_struct->mandateId=strdup(s);
3842   }
3843   if (p_struct->mandateId==NULL) {
3844     p_struct->mandateId=NULL;
3845   }
3846 
3847   /* member "mandateDate" */
3848   if (p_struct->mandateDate) {
3849     GWEN_Date_free(p_struct->mandateDate);
3850     p_struct->mandateDate=NULL;
3851   }
3852   {
3853     const char *s;
3854     s=GWEN_DB_GetCharValue(p_db, "mandateDate", 0, NULL);
3855     if (s && *s)
3856       p_struct->mandateDate=GWEN_Date_fromString(s);
3857   }
3858   if (p_struct->mandateDate==NULL) {
3859     p_struct->mandateDate=NULL;
3860   }
3861 
3862   /* member "mandateDebitorName" */
3863   if (p_struct->mandateDebitorName) {
3864     free(p_struct->mandateDebitorName);
3865     p_struct->mandateDebitorName=NULL;
3866   }
3867   {
3868     const char *s;
3869     s=GWEN_DB_GetCharValue(p_db, "mandateDebitorName", 0, NULL);
3870     if (s)
3871       p_struct->mandateDebitorName=strdup(s);
3872   }
3873   if (p_struct->mandateDebitorName==NULL) {
3874     p_struct->mandateDebitorName=NULL;
3875   }
3876 
3877   /* member "originalCreditorSchemeId" */
3878   if (p_struct->originalCreditorSchemeId) {
3879     free(p_struct->originalCreditorSchemeId);
3880     p_struct->originalCreditorSchemeId=NULL;
3881   }
3882   {
3883     const char *s;
3884     s=GWEN_DB_GetCharValue(p_db, "originalCreditorSchemeId", 0, NULL);
3885     if (s)
3886       p_struct->originalCreditorSchemeId=strdup(s);
3887   }
3888   if (p_struct->originalCreditorSchemeId==NULL) {
3889     p_struct->originalCreditorSchemeId=NULL;
3890   }
3891 
3892   /* member "originalMandateId" */
3893   if (p_struct->originalMandateId) {
3894     free(p_struct->originalMandateId);
3895     p_struct->originalMandateId=NULL;
3896   }
3897   {
3898     const char *s;
3899     s=GWEN_DB_GetCharValue(p_db, "originalMandateId", 0, NULL);
3900     if (s)
3901       p_struct->originalMandateId=strdup(s);
3902   }
3903   if (p_struct->originalMandateId==NULL) {
3904     p_struct->originalMandateId=NULL;
3905   }
3906 
3907   /* member "originalCreditorName" */
3908   if (p_struct->originalCreditorName) {
3909     free(p_struct->originalCreditorName);
3910     p_struct->originalCreditorName=NULL;
3911   }
3912   {
3913     const char *s;
3914     s=GWEN_DB_GetCharValue(p_db, "originalCreditorName", 0, NULL);
3915     if (s)
3916       p_struct->originalCreditorName=strdup(s);
3917   }
3918   if (p_struct->originalCreditorName==NULL) {
3919     p_struct->originalCreditorName=NULL;
3920   }
3921 
3922   /* member "sequence" */
3923   {
3924     const char *s;
3925     s=GWEN_DB_GetCharValue(p_db, "sequence", 0, NULL);
3926     if (s)
3927       p_struct->sequence=AB_Transaction_Sequence_fromString(s);
3928     else
3929       p_struct->sequence=AB_Transaction_SequenceUnknown;
3930   }
3931 
3932   /* member "charge" */
3933   {
3934     const char *s;
3935     s=GWEN_DB_GetCharValue(p_db, "charge", 0, NULL);
3936     if (s)
3937       p_struct->charge=AB_Transaction_Charge_fromString(s);
3938     else
3939       p_struct->charge=AB_Transaction_ChargeUnknown;
3940   }
3941 
3942   /* member "remoteAddrStreet" */
3943   if (p_struct->remoteAddrStreet) {
3944     free(p_struct->remoteAddrStreet);
3945     p_struct->remoteAddrStreet=NULL;
3946   }
3947   {
3948     const char *s;
3949     s=GWEN_DB_GetCharValue(p_db, "remoteAddrStreet", 0, NULL);
3950     if (s)
3951       p_struct->remoteAddrStreet=strdup(s);
3952   }
3953   if (p_struct->remoteAddrStreet==NULL) {
3954     p_struct->remoteAddrStreet=NULL;
3955   }
3956 
3957   /* member "remoteAddrZipcode" */
3958   if (p_struct->remoteAddrZipcode) {
3959     free(p_struct->remoteAddrZipcode);
3960     p_struct->remoteAddrZipcode=NULL;
3961   }
3962   {
3963     const char *s;
3964     s=GWEN_DB_GetCharValue(p_db, "remoteAddrZipcode", 0, NULL);
3965     if (s)
3966       p_struct->remoteAddrZipcode=strdup(s);
3967   }
3968   if (p_struct->remoteAddrZipcode==NULL) {
3969     p_struct->remoteAddrZipcode=NULL;
3970   }
3971 
3972   /* member "remoteAddrCity" */
3973   if (p_struct->remoteAddrCity) {
3974     free(p_struct->remoteAddrCity);
3975     p_struct->remoteAddrCity=NULL;
3976   }
3977   {
3978     const char *s;
3979     s=GWEN_DB_GetCharValue(p_db, "remoteAddrCity", 0, NULL);
3980     if (s)
3981       p_struct->remoteAddrCity=strdup(s);
3982   }
3983   if (p_struct->remoteAddrCity==NULL) {
3984     p_struct->remoteAddrCity=NULL;
3985   }
3986 
3987   /* member "remoteAddrPhone" */
3988   if (p_struct->remoteAddrPhone) {
3989     free(p_struct->remoteAddrPhone);
3990     p_struct->remoteAddrPhone=NULL;
3991   }
3992   {
3993     const char *s;
3994     s=GWEN_DB_GetCharValue(p_db, "remoteAddrPhone", 0, NULL);
3995     if (s)
3996       p_struct->remoteAddrPhone=strdup(s);
3997   }
3998   if (p_struct->remoteAddrPhone==NULL) {
3999     p_struct->remoteAddrPhone=NULL;
4000   }
4001 
4002   /* member "period" */
4003   {
4004     const char *s;
4005     s=GWEN_DB_GetCharValue(p_db, "period", 0, NULL);
4006     if (s)
4007       p_struct->period=AB_Transaction_Period_fromString(s);
4008     else
4009       p_struct->period=AB_Transaction_PeriodUnknown;
4010   }
4011 
4012   /* member "cycle" */
4013   p_struct->cycle=GWEN_DB_GetIntValue(p_db, "cycle", 0, 0);
4014 
4015   /* member "executionDay" */
4016   p_struct->executionDay=GWEN_DB_GetIntValue(p_db, "executionDay", 0, 0);
4017 
4018   /* member "firstDate" */
4019   if (p_struct->firstDate) {
4020     GWEN_Date_free(p_struct->firstDate);
4021     p_struct->firstDate=NULL;
4022   }
4023   {
4024     const char *s;
4025     s=GWEN_DB_GetCharValue(p_db, "firstDate", 0, NULL);
4026     if (s && *s)
4027       p_struct->firstDate=GWEN_Date_fromString(s);
4028   }
4029   if (p_struct->firstDate==NULL) {
4030     p_struct->firstDate=NULL;
4031   }
4032 
4033   /* member "lastDate" */
4034   if (p_struct->lastDate) {
4035     GWEN_Date_free(p_struct->lastDate);
4036     p_struct->lastDate=NULL;
4037   }
4038   {
4039     const char *s;
4040     s=GWEN_DB_GetCharValue(p_db, "lastDate", 0, NULL);
4041     if (s && *s)
4042       p_struct->lastDate=GWEN_Date_fromString(s);
4043   }
4044   if (p_struct->lastDate==NULL) {
4045     p_struct->lastDate=NULL;
4046   }
4047 
4048   /* member "nextDate" */
4049   if (p_struct->nextDate) {
4050     GWEN_Date_free(p_struct->nextDate);
4051     p_struct->nextDate=NULL;
4052   }
4053   {
4054     const char *s;
4055     s=GWEN_DB_GetCharValue(p_db, "nextDate", 0, NULL);
4056     if (s && *s)
4057       p_struct->nextDate=GWEN_Date_fromString(s);
4058   }
4059   if (p_struct->nextDate==NULL) {
4060     p_struct->nextDate=NULL;
4061   }
4062 
4063   /* member "unitId" */
4064   if (p_struct->unitId) {
4065     free(p_struct->unitId);
4066     p_struct->unitId=NULL;
4067   }
4068   {
4069     const char *s;
4070     s=GWEN_DB_GetCharValue(p_db, "unitId", 0, NULL);
4071     if (s)
4072       p_struct->unitId=strdup(s);
4073   }
4074   if (p_struct->unitId==NULL) {
4075     p_struct->unitId=NULL;
4076   }
4077 
4078   /* member "unitIdNameSpace" */
4079   if (p_struct->unitIdNameSpace) {
4080     free(p_struct->unitIdNameSpace);
4081     p_struct->unitIdNameSpace=NULL;
4082   }
4083   {
4084     const char *s;
4085     s=GWEN_DB_GetCharValue(p_db, "unitIdNameSpace", 0, NULL);
4086     if (s)
4087       p_struct->unitIdNameSpace=strdup(s);
4088   }
4089   if (p_struct->unitIdNameSpace==NULL) {
4090     p_struct->unitIdNameSpace=NULL;
4091   }
4092 
4093   /* member "tickerSymbol" */
4094   if (p_struct->tickerSymbol) {
4095     free(p_struct->tickerSymbol);
4096     p_struct->tickerSymbol=NULL;
4097   }
4098   {
4099     const char *s;
4100     s=GWEN_DB_GetCharValue(p_db, "tickerSymbol", 0, NULL);
4101     if (s)
4102       p_struct->tickerSymbol=strdup(s);
4103   }
4104   if (p_struct->tickerSymbol==NULL) {
4105     p_struct->tickerSymbol=NULL;
4106   }
4107 
4108   /* member "units" */
4109   if (p_struct->units) {
4110     AB_Value_free(p_struct->units);
4111   }
4112   {
4113     const char *s;
4114     s=GWEN_DB_GetCharValue(p_db, "units", 0, NULL);
4115     if (s)
4116       p_struct->units=AB_Value_fromString(s);
4117     else
4118       p_struct->units=NULL;
4119   }
4120   if (p_struct->units==NULL) {
4121     p_struct->units=AB_Value_new();
4122   }
4123 
4124   /* member "unitPriceValue" */
4125   if (p_struct->unitPriceValue) {
4126     AB_Value_free(p_struct->unitPriceValue);
4127   }
4128   {
4129     const char *s;
4130     s=GWEN_DB_GetCharValue(p_db, "unitPriceValue", 0, NULL);
4131     if (s)
4132       p_struct->unitPriceValue=AB_Value_fromString(s);
4133     else
4134       p_struct->unitPriceValue=NULL;
4135   }
4136   if (p_struct->unitPriceValue==NULL) {
4137     p_struct->unitPriceValue=AB_Value_new();
4138   }
4139 
4140   /* member "unitPriceDate" */
4141   if (p_struct->unitPriceDate) {
4142     GWEN_Date_free(p_struct->unitPriceDate);
4143     p_struct->unitPriceDate=NULL;
4144   }
4145   {
4146     const char *s;
4147     s=GWEN_DB_GetCharValue(p_db, "unitPriceDate", 0, NULL);
4148     if (s && *s)
4149       p_struct->unitPriceDate=GWEN_Date_fromString(s);
4150   }
4151   if (p_struct->unitPriceDate==NULL) {
4152     p_struct->unitPriceDate=NULL;
4153   }
4154 
4155   /* member "commissionValue" */
4156   if (p_struct->commissionValue) {
4157     AB_Value_free(p_struct->commissionValue);
4158   }
4159   {
4160     const char *s;
4161     s=GWEN_DB_GetCharValue(p_db, "commissionValue", 0, NULL);
4162     if (s)
4163       p_struct->commissionValue=AB_Value_fromString(s);
4164     else
4165       p_struct->commissionValue=NULL;
4166   }
4167   if (p_struct->commissionValue==NULL) {
4168     p_struct->commissionValue=AB_Value_new();
4169   }
4170 
4171   /* member "memo" */
4172   if (p_struct->memo) {
4173     free(p_struct->memo);
4174     p_struct->memo=NULL;
4175   }
4176   {
4177     const char *s;
4178     s=GWEN_DB_GetCharValue(p_db, "memo", 0, NULL);
4179     if (s)
4180       p_struct->memo=strdup(s);
4181   }
4182   if (p_struct->memo==NULL) {
4183     p_struct->memo=NULL;
4184   }
4185 
4186   /* member "hash" */
4187   if (p_struct->hash) {
4188     free(p_struct->hash);
4189     p_struct->hash=NULL;
4190   }
4191   /* member "hash" is volatile, just presetting */
4192   p_struct->hash=NULL;
4193 
4194 }
4195 
AB_Transaction_WriteDb(const AB_TRANSACTION * p_struct,GWEN_DB_NODE * p_db)4196 int AB_Transaction_WriteDb(const AB_TRANSACTION *p_struct, GWEN_DB_NODE *p_db)
4197 {
4198   int p_rv;
4199 
4200   assert(p_struct);
4201   /* member "type" */
4202   p_rv=GWEN_DB_SetCharValue(p_db, GWEN_DB_FLAGS_OVERWRITE_VARS, "type", AB_Transaction_Type_toString(p_struct->type));
4203   if (p_rv<0) {
4204     DBG_INFO(GWEN_LOGDOMAIN, "here (%d)\n", p_rv);
4205     return p_rv;
4206   }
4207 
4208   /* member "subType" */
4209   p_rv=GWEN_DB_SetCharValue(p_db, GWEN_DB_FLAGS_OVERWRITE_VARS, "subType",
4210                             AB_Transaction_SubType_toString(p_struct->subType));
4211   if (p_rv<0) {
4212     DBG_INFO(GWEN_LOGDOMAIN, "here (%d)\n", p_rv);
4213     return p_rv;
4214   }
4215 
4216   /* member "command" */
4217   p_rv=GWEN_DB_SetCharValue(p_db, GWEN_DB_FLAGS_OVERWRITE_VARS, "command",
4218                             AB_Transaction_Command_toString(p_struct->command));
4219   if (p_rv<0) {
4220     DBG_INFO(GWEN_LOGDOMAIN, "here (%d)\n", p_rv);
4221     return p_rv;
4222   }
4223 
4224   /* member "status" */
4225   p_rv=GWEN_DB_SetCharValue(p_db, GWEN_DB_FLAGS_OVERWRITE_VARS, "status",
4226                             AB_Transaction_Status_toString(p_struct->status));
4227   if (p_rv<0) {
4228     DBG_INFO(GWEN_LOGDOMAIN, "here (%d)\n", p_rv);
4229     return p_rv;
4230   }
4231 
4232   /* member "uniqueAccountId" */
4233   p_rv=GWEN_DB_SetIntValue(p_db, GWEN_DB_FLAGS_OVERWRITE_VARS, "uniqueAccountId", p_struct->uniqueAccountId);
4234   if (p_rv<0) {
4235     DBG_INFO(GWEN_LOGDOMAIN, "here (%d)\n", p_rv);
4236     return p_rv;
4237   }
4238 
4239   /* member "uniqueId" */
4240   p_rv=GWEN_DB_SetIntValue(p_db, GWEN_DB_FLAGS_OVERWRITE_VARS, "uniqueId", p_struct->uniqueId);
4241   if (p_rv<0) {
4242     DBG_INFO(GWEN_LOGDOMAIN, "here (%d)\n", p_rv);
4243     return p_rv;
4244   }
4245 
4246   /* member "refUniqueId" */
4247   p_rv=GWEN_DB_SetIntValue(p_db, GWEN_DB_FLAGS_OVERWRITE_VARS, "refUniqueId", p_struct->refUniqueId);
4248   if (p_rv<0) {
4249     DBG_INFO(GWEN_LOGDOMAIN, "here (%d)\n", p_rv);
4250     return p_rv;
4251   }
4252 
4253   /* member "idForApplication" */
4254   p_rv=GWEN_DB_SetIntValue(p_db, GWEN_DB_FLAGS_OVERWRITE_VARS, "idForApplication", p_struct->idForApplication);
4255   if (p_rv<0) {
4256     DBG_INFO(GWEN_LOGDOMAIN, "here (%d)\n", p_rv);
4257     return p_rv;
4258   }
4259 
4260   /* member "stringIdForApplication" */
4261   if (p_struct->stringIdForApplication)
4262     p_rv=GWEN_DB_SetCharValue(p_db, GWEN_DB_FLAGS_OVERWRITE_VARS, "stringIdForApplication",
4263                               p_struct->stringIdForApplication);
4264   else {
4265     GWEN_DB_DeleteVar(p_db, "stringIdForApplication");
4266     p_rv=0;
4267   }
4268   if (p_rv<0) {
4269     DBG_INFO(GWEN_LOGDOMAIN, "here (%d)\n", p_rv);
4270     return p_rv;
4271   }
4272 
4273   /* member "sessionId" */
4274   p_rv=GWEN_DB_SetIntValue(p_db, GWEN_DB_FLAGS_OVERWRITE_VARS, "sessionId", p_struct->sessionId);
4275   if (p_rv<0) {
4276     DBG_INFO(GWEN_LOGDOMAIN, "here (%d)\n", p_rv);
4277     return p_rv;
4278   }
4279 
4280   /* member "groupId" */
4281   p_rv=GWEN_DB_SetIntValue(p_db, GWEN_DB_FLAGS_OVERWRITE_VARS, "groupId", p_struct->groupId);
4282   if (p_rv<0) {
4283     DBG_INFO(GWEN_LOGDOMAIN, "here (%d)\n", p_rv);
4284     return p_rv;
4285   }
4286 
4287   /* member "fiId" */
4288   if (p_struct->fiId)
4289     p_rv=GWEN_DB_SetCharValue(p_db, GWEN_DB_FLAGS_OVERWRITE_VARS, "fiId", p_struct->fiId);
4290   else {
4291     GWEN_DB_DeleteVar(p_db, "fiId");
4292     p_rv=0;
4293   }
4294   if (p_rv<0) {
4295     DBG_INFO(GWEN_LOGDOMAIN, "here (%d)\n", p_rv);
4296     return p_rv;
4297   }
4298 
4299   /* member "localIban" */
4300   if (p_struct->localIban)
4301     p_rv=GWEN_DB_SetCharValue(p_db, GWEN_DB_FLAGS_OVERWRITE_VARS, "localIban", p_struct->localIban);
4302   else {
4303     GWEN_DB_DeleteVar(p_db, "localIban");
4304     p_rv=0;
4305   }
4306   if (p_rv<0) {
4307     DBG_INFO(GWEN_LOGDOMAIN, "here (%d)\n", p_rv);
4308     return p_rv;
4309   }
4310 
4311   /* member "localBic" */
4312   if (p_struct->localBic)
4313     p_rv=GWEN_DB_SetCharValue(p_db, GWEN_DB_FLAGS_OVERWRITE_VARS, "localBic", p_struct->localBic);
4314   else {
4315     GWEN_DB_DeleteVar(p_db, "localBic");
4316     p_rv=0;
4317   }
4318   if (p_rv<0) {
4319     DBG_INFO(GWEN_LOGDOMAIN, "here (%d)\n", p_rv);
4320     return p_rv;
4321   }
4322 
4323   /* member "localCountry" */
4324   if (p_struct->localCountry)
4325     p_rv=GWEN_DB_SetCharValue(p_db, GWEN_DB_FLAGS_OVERWRITE_VARS, "localCountry", p_struct->localCountry);
4326   else {
4327     GWEN_DB_DeleteVar(p_db, "localCountry");
4328     p_rv=0;
4329   }
4330   if (p_rv<0) {
4331     DBG_INFO(GWEN_LOGDOMAIN, "here (%d)\n", p_rv);
4332     return p_rv;
4333   }
4334 
4335   /* member "localBankCode" */
4336   if (p_struct->localBankCode)
4337     p_rv=GWEN_DB_SetCharValue(p_db, GWEN_DB_FLAGS_OVERWRITE_VARS, "localBankCode", p_struct->localBankCode);
4338   else {
4339     GWEN_DB_DeleteVar(p_db, "localBankCode");
4340     p_rv=0;
4341   }
4342   if (p_rv<0) {
4343     DBG_INFO(GWEN_LOGDOMAIN, "here (%d)\n", p_rv);
4344     return p_rv;
4345   }
4346 
4347   /* member "localBranchId" */
4348   if (p_struct->localBranchId)
4349     p_rv=GWEN_DB_SetCharValue(p_db, GWEN_DB_FLAGS_OVERWRITE_VARS, "localBranchId", p_struct->localBranchId);
4350   else {
4351     GWEN_DB_DeleteVar(p_db, "localBranchId");
4352     p_rv=0;
4353   }
4354   if (p_rv<0) {
4355     DBG_INFO(GWEN_LOGDOMAIN, "here (%d)\n", p_rv);
4356     return p_rv;
4357   }
4358 
4359   /* member "localAccountNumber" */
4360   if (p_struct->localAccountNumber)
4361     p_rv=GWEN_DB_SetCharValue(p_db, GWEN_DB_FLAGS_OVERWRITE_VARS, "localAccountNumber", p_struct->localAccountNumber);
4362   else {
4363     GWEN_DB_DeleteVar(p_db, "localAccountNumber");
4364     p_rv=0;
4365   }
4366   if (p_rv<0) {
4367     DBG_INFO(GWEN_LOGDOMAIN, "here (%d)\n", p_rv);
4368     return p_rv;
4369   }
4370 
4371   /* member "localSuffix" */
4372   if (p_struct->localSuffix)
4373     p_rv=GWEN_DB_SetCharValue(p_db, GWEN_DB_FLAGS_OVERWRITE_VARS, "localSuffix", p_struct->localSuffix);
4374   else {
4375     GWEN_DB_DeleteVar(p_db, "localSuffix");
4376     p_rv=0;
4377   }
4378   if (p_rv<0) {
4379     DBG_INFO(GWEN_LOGDOMAIN, "here (%d)\n", p_rv);
4380     return p_rv;
4381   }
4382 
4383   /* member "localName" */
4384   if (p_struct->localName)
4385     p_rv=GWEN_DB_SetCharValue(p_db, GWEN_DB_FLAGS_OVERWRITE_VARS, "localName", p_struct->localName);
4386   else {
4387     GWEN_DB_DeleteVar(p_db, "localName");
4388     p_rv=0;
4389   }
4390   if (p_rv<0) {
4391     DBG_INFO(GWEN_LOGDOMAIN, "here (%d)\n", p_rv);
4392     return p_rv;
4393   }
4394 
4395   /* member "remoteCountry" */
4396   if (p_struct->remoteCountry)
4397     p_rv=GWEN_DB_SetCharValue(p_db, GWEN_DB_FLAGS_OVERWRITE_VARS, "remoteCountry", p_struct->remoteCountry);
4398   else {
4399     GWEN_DB_DeleteVar(p_db, "remoteCountry");
4400     p_rv=0;
4401   }
4402   if (p_rv<0) {
4403     DBG_INFO(GWEN_LOGDOMAIN, "here (%d)\n", p_rv);
4404     return p_rv;
4405   }
4406 
4407   /* member "remoteBankCode" */
4408   if (p_struct->remoteBankCode)
4409     p_rv=GWEN_DB_SetCharValue(p_db, GWEN_DB_FLAGS_OVERWRITE_VARS, "remoteBankCode", p_struct->remoteBankCode);
4410   else {
4411     GWEN_DB_DeleteVar(p_db, "remoteBankCode");
4412     p_rv=0;
4413   }
4414   if (p_rv<0) {
4415     DBG_INFO(GWEN_LOGDOMAIN, "here (%d)\n", p_rv);
4416     return p_rv;
4417   }
4418 
4419   /* member "remoteBranchId" */
4420   if (p_struct->remoteBranchId)
4421     p_rv=GWEN_DB_SetCharValue(p_db, GWEN_DB_FLAGS_OVERWRITE_VARS, "remoteBranchId", p_struct->remoteBranchId);
4422   else {
4423     GWEN_DB_DeleteVar(p_db, "remoteBranchId");
4424     p_rv=0;
4425   }
4426   if (p_rv<0) {
4427     DBG_INFO(GWEN_LOGDOMAIN, "here (%d)\n", p_rv);
4428     return p_rv;
4429   }
4430 
4431   /* member "remoteAccountNumber" */
4432   if (p_struct->remoteAccountNumber)
4433     p_rv=GWEN_DB_SetCharValue(p_db, GWEN_DB_FLAGS_OVERWRITE_VARS, "remoteAccountNumber", p_struct->remoteAccountNumber);
4434   else {
4435     GWEN_DB_DeleteVar(p_db, "remoteAccountNumber");
4436     p_rv=0;
4437   }
4438   if (p_rv<0) {
4439     DBG_INFO(GWEN_LOGDOMAIN, "here (%d)\n", p_rv);
4440     return p_rv;
4441   }
4442 
4443   /* member "remoteSuffix" */
4444   if (p_struct->remoteSuffix)
4445     p_rv=GWEN_DB_SetCharValue(p_db, GWEN_DB_FLAGS_OVERWRITE_VARS, "remoteSuffix", p_struct->remoteSuffix);
4446   else {
4447     GWEN_DB_DeleteVar(p_db, "remoteSuffix");
4448     p_rv=0;
4449   }
4450   if (p_rv<0) {
4451     DBG_INFO(GWEN_LOGDOMAIN, "here (%d)\n", p_rv);
4452     return p_rv;
4453   }
4454 
4455   /* member "remoteIban" */
4456   if (p_struct->remoteIban)
4457     p_rv=GWEN_DB_SetCharValue(p_db, GWEN_DB_FLAGS_OVERWRITE_VARS, "remoteIban", p_struct->remoteIban);
4458   else {
4459     GWEN_DB_DeleteVar(p_db, "remoteIban");
4460     p_rv=0;
4461   }
4462   if (p_rv<0) {
4463     DBG_INFO(GWEN_LOGDOMAIN, "here (%d)\n", p_rv);
4464     return p_rv;
4465   }
4466 
4467   /* member "remoteBic" */
4468   if (p_struct->remoteBic)
4469     p_rv=GWEN_DB_SetCharValue(p_db, GWEN_DB_FLAGS_OVERWRITE_VARS, "remoteBic", p_struct->remoteBic);
4470   else {
4471     GWEN_DB_DeleteVar(p_db, "remoteBic");
4472     p_rv=0;
4473   }
4474   if (p_rv<0) {
4475     DBG_INFO(GWEN_LOGDOMAIN, "here (%d)\n", p_rv);
4476     return p_rv;
4477   }
4478 
4479   /* member "remoteName" */
4480   if (p_struct->remoteName)
4481     p_rv=GWEN_DB_SetCharValue(p_db, GWEN_DB_FLAGS_OVERWRITE_VARS, "remoteName", p_struct->remoteName);
4482   else {
4483     GWEN_DB_DeleteVar(p_db, "remoteName");
4484     p_rv=0;
4485   }
4486   if (p_rv<0) {
4487     DBG_INFO(GWEN_LOGDOMAIN, "here (%d)\n", p_rv);
4488     return p_rv;
4489   }
4490 
4491   /* member "date" */
4492   if (p_struct->date) {
4493     const char *s=GWEN_Date_GetString(p_struct->date);
4494     p_rv=GWEN_DB_SetCharValue(p_db, GWEN_DB_FLAGS_OVERWRITE_VARS, "date", s);
4495   }
4496   else {
4497     GWEN_DB_DeleteVar(p_db, "date");
4498     p_rv=0;
4499   }
4500   if (p_rv<0) {
4501     DBG_INFO(GWEN_LOGDOMAIN, "here (%d)\n", p_rv);
4502     return p_rv;
4503   }
4504 
4505   /* member "valutaDate" */
4506   if (p_struct->valutaDate) {
4507     const char *s=GWEN_Date_GetString(p_struct->valutaDate);
4508     p_rv=GWEN_DB_SetCharValue(p_db, GWEN_DB_FLAGS_OVERWRITE_VARS, "valutaDate", s);
4509   }
4510   else {
4511     GWEN_DB_DeleteVar(p_db, "valutaDate");
4512     p_rv=0;
4513   }
4514   if (p_rv<0) {
4515     DBG_INFO(GWEN_LOGDOMAIN, "here (%d)\n", p_rv);
4516     return p_rv;
4517   }
4518 
4519   /* member "value" */
4520   if (p_struct->value) {
4521     GWEN_BUFFER *tbuf=GWEN_Buffer_new(0, 64, 0, 1);
4522     AB_Value_toString(p_struct->value, tbuf);
4523     p_rv=GWEN_DB_SetCharValue(p_db, GWEN_DB_FLAGS_OVERWRITE_VARS, "value", GWEN_Buffer_GetStart(tbuf));
4524     GWEN_Buffer_free(tbuf);
4525   }
4526   else {
4527     GWEN_DB_DeleteVar(p_db, "value");
4528     p_rv=0;
4529   }
4530   if (p_rv<0) {
4531     DBG_INFO(GWEN_LOGDOMAIN, "here (%d)\n", p_rv);
4532     return p_rv;
4533   }
4534 
4535   /* member "fees" */
4536   if (p_struct->fees) {
4537     GWEN_BUFFER *tbuf=GWEN_Buffer_new(0, 64, 0, 1);
4538     AB_Value_toString(p_struct->fees, tbuf);
4539     p_rv=GWEN_DB_SetCharValue(p_db, GWEN_DB_FLAGS_OVERWRITE_VARS, "fees", GWEN_Buffer_GetStart(tbuf));
4540     GWEN_Buffer_free(tbuf);
4541   }
4542   else {
4543     GWEN_DB_DeleteVar(p_db, "fees");
4544     p_rv=0;
4545   }
4546   if (p_rv<0) {
4547     DBG_INFO(GWEN_LOGDOMAIN, "here (%d)\n", p_rv);
4548     return p_rv;
4549   }
4550 
4551   /* member "transactionCode" */
4552   p_rv=GWEN_DB_SetIntValue(p_db, GWEN_DB_FLAGS_OVERWRITE_VARS, "transactionCode", p_struct->transactionCode);
4553   if (p_rv<0) {
4554     DBG_INFO(GWEN_LOGDOMAIN, "here (%d)\n", p_rv);
4555     return p_rv;
4556   }
4557 
4558   /* member "transactionText" */
4559   if (p_struct->transactionText)
4560     p_rv=GWEN_DB_SetCharValue(p_db, GWEN_DB_FLAGS_OVERWRITE_VARS, "transactionText", p_struct->transactionText);
4561   else {
4562     GWEN_DB_DeleteVar(p_db, "transactionText");
4563     p_rv=0;
4564   }
4565   if (p_rv<0) {
4566     DBG_INFO(GWEN_LOGDOMAIN, "here (%d)\n", p_rv);
4567     return p_rv;
4568   }
4569 
4570   /* member "transactionKey" */
4571   if (p_struct->transactionKey)
4572     p_rv=GWEN_DB_SetCharValue(p_db, GWEN_DB_FLAGS_OVERWRITE_VARS, "transactionKey", p_struct->transactionKey);
4573   else {
4574     GWEN_DB_DeleteVar(p_db, "transactionKey");
4575     p_rv=0;
4576   }
4577   if (p_rv<0) {
4578     DBG_INFO(GWEN_LOGDOMAIN, "here (%d)\n", p_rv);
4579     return p_rv;
4580   }
4581 
4582   /* member "textKey" */
4583   p_rv=GWEN_DB_SetIntValue(p_db, GWEN_DB_FLAGS_OVERWRITE_VARS, "textKey", p_struct->textKey);
4584   if (p_rv<0) {
4585     DBG_INFO(GWEN_LOGDOMAIN, "here (%d)\n", p_rv);
4586     return p_rv;
4587   }
4588 
4589   /* member "primanota" */
4590   if (p_struct->primanota)
4591     p_rv=GWEN_DB_SetCharValue(p_db, GWEN_DB_FLAGS_OVERWRITE_VARS, "primanota", p_struct->primanota);
4592   else {
4593     GWEN_DB_DeleteVar(p_db, "primanota");
4594     p_rv=0;
4595   }
4596   if (p_rv<0) {
4597     DBG_INFO(GWEN_LOGDOMAIN, "here (%d)\n", p_rv);
4598     return p_rv;
4599   }
4600 
4601   /* member "purpose" */
4602   if (p_struct->purpose)
4603     p_rv=GWEN_DB_SetCharValue(p_db, GWEN_DB_FLAGS_OVERWRITE_VARS, "purpose", p_struct->purpose);
4604   else {
4605     GWEN_DB_DeleteVar(p_db, "purpose");
4606     p_rv=0;
4607   }
4608   if (p_rv<0) {
4609     DBG_INFO(GWEN_LOGDOMAIN, "here (%d)\n", p_rv);
4610     return p_rv;
4611   }
4612 
4613   /* member "category" */
4614   if (p_struct->category)
4615     p_rv=GWEN_DB_SetCharValue(p_db, GWEN_DB_FLAGS_OVERWRITE_VARS, "category", p_struct->category);
4616   else {
4617     GWEN_DB_DeleteVar(p_db, "category");
4618     p_rv=0;
4619   }
4620   if (p_rv<0) {
4621     DBG_INFO(GWEN_LOGDOMAIN, "here (%d)\n", p_rv);
4622     return p_rv;
4623   }
4624 
4625   /* member "customerReference" */
4626   if (p_struct->customerReference)
4627     p_rv=GWEN_DB_SetCharValue(p_db, GWEN_DB_FLAGS_OVERWRITE_VARS, "customerReference", p_struct->customerReference);
4628   else {
4629     GWEN_DB_DeleteVar(p_db, "customerReference");
4630     p_rv=0;
4631   }
4632   if (p_rv<0) {
4633     DBG_INFO(GWEN_LOGDOMAIN, "here (%d)\n", p_rv);
4634     return p_rv;
4635   }
4636 
4637   /* member "bankReference" */
4638   if (p_struct->bankReference)
4639     p_rv=GWEN_DB_SetCharValue(p_db, GWEN_DB_FLAGS_OVERWRITE_VARS, "bankReference", p_struct->bankReference);
4640   else {
4641     GWEN_DB_DeleteVar(p_db, "bankReference");
4642     p_rv=0;
4643   }
4644   if (p_rv<0) {
4645     DBG_INFO(GWEN_LOGDOMAIN, "here (%d)\n", p_rv);
4646     return p_rv;
4647   }
4648 
4649   /* member "endToEndReference" */
4650   if (p_struct->endToEndReference)
4651     p_rv=GWEN_DB_SetCharValue(p_db, GWEN_DB_FLAGS_OVERWRITE_VARS, "endToEndReference", p_struct->endToEndReference);
4652   else {
4653     GWEN_DB_DeleteVar(p_db, "endToEndReference");
4654     p_rv=0;
4655   }
4656   if (p_rv<0) {
4657     DBG_INFO(GWEN_LOGDOMAIN, "here (%d)\n", p_rv);
4658     return p_rv;
4659   }
4660 
4661   /* member "ultimateCreditor" */
4662   if (p_struct->ultimateCreditor)
4663     p_rv=GWEN_DB_SetCharValue(p_db, GWEN_DB_FLAGS_OVERWRITE_VARS, "ultimateCreditor", p_struct->ultimateCreditor);
4664   else {
4665     GWEN_DB_DeleteVar(p_db, "ultimateCreditor");
4666     p_rv=0;
4667   }
4668   if (p_rv<0) {
4669     DBG_INFO(GWEN_LOGDOMAIN, "here (%d)\n", p_rv);
4670     return p_rv;
4671   }
4672 
4673   /* member "ultimateDebtor" */
4674   if (p_struct->ultimateDebtor)
4675     p_rv=GWEN_DB_SetCharValue(p_db, GWEN_DB_FLAGS_OVERWRITE_VARS, "ultimateDebtor", p_struct->ultimateDebtor);
4676   else {
4677     GWEN_DB_DeleteVar(p_db, "ultimateDebtor");
4678     p_rv=0;
4679   }
4680   if (p_rv<0) {
4681     DBG_INFO(GWEN_LOGDOMAIN, "here (%d)\n", p_rv);
4682     return p_rv;
4683   }
4684 
4685   /* member "creditorSchemeId" */
4686   if (p_struct->creditorSchemeId)
4687     p_rv=GWEN_DB_SetCharValue(p_db, GWEN_DB_FLAGS_OVERWRITE_VARS, "creditorSchemeId", p_struct->creditorSchemeId);
4688   else {
4689     GWEN_DB_DeleteVar(p_db, "creditorSchemeId");
4690     p_rv=0;
4691   }
4692   if (p_rv<0) {
4693     DBG_INFO(GWEN_LOGDOMAIN, "here (%d)\n", p_rv);
4694     return p_rv;
4695   }
4696 
4697   /* member "originatorId" */
4698   if (p_struct->originatorId)
4699     p_rv=GWEN_DB_SetCharValue(p_db, GWEN_DB_FLAGS_OVERWRITE_VARS, "originatorId", p_struct->originatorId);
4700   else {
4701     GWEN_DB_DeleteVar(p_db, "originatorId");
4702     p_rv=0;
4703   }
4704   if (p_rv<0) {
4705     DBG_INFO(GWEN_LOGDOMAIN, "here (%d)\n", p_rv);
4706     return p_rv;
4707   }
4708 
4709   /* member "mandateId" */
4710   if (p_struct->mandateId)
4711     p_rv=GWEN_DB_SetCharValue(p_db, GWEN_DB_FLAGS_OVERWRITE_VARS, "mandateId", p_struct->mandateId);
4712   else {
4713     GWEN_DB_DeleteVar(p_db, "mandateId");
4714     p_rv=0;
4715   }
4716   if (p_rv<0) {
4717     DBG_INFO(GWEN_LOGDOMAIN, "here (%d)\n", p_rv);
4718     return p_rv;
4719   }
4720 
4721   /* member "mandateDate" */
4722   if (p_struct->mandateDate) {
4723     const char *s=GWEN_Date_GetString(p_struct->mandateDate);
4724     p_rv=GWEN_DB_SetCharValue(p_db, GWEN_DB_FLAGS_OVERWRITE_VARS, "mandateDate", s);
4725   }
4726   else {
4727     GWEN_DB_DeleteVar(p_db, "mandateDate");
4728     p_rv=0;
4729   }
4730   if (p_rv<0) {
4731     DBG_INFO(GWEN_LOGDOMAIN, "here (%d)\n", p_rv);
4732     return p_rv;
4733   }
4734 
4735   /* member "mandateDebitorName" */
4736   if (p_struct->mandateDebitorName)
4737     p_rv=GWEN_DB_SetCharValue(p_db, GWEN_DB_FLAGS_OVERWRITE_VARS, "mandateDebitorName", p_struct->mandateDebitorName);
4738   else {
4739     GWEN_DB_DeleteVar(p_db, "mandateDebitorName");
4740     p_rv=0;
4741   }
4742   if (p_rv<0) {
4743     DBG_INFO(GWEN_LOGDOMAIN, "here (%d)\n", p_rv);
4744     return p_rv;
4745   }
4746 
4747   /* member "originalCreditorSchemeId" */
4748   if (p_struct->originalCreditorSchemeId)
4749     p_rv=GWEN_DB_SetCharValue(p_db, GWEN_DB_FLAGS_OVERWRITE_VARS, "originalCreditorSchemeId",
4750                               p_struct->originalCreditorSchemeId);
4751   else {
4752     GWEN_DB_DeleteVar(p_db, "originalCreditorSchemeId");
4753     p_rv=0;
4754   }
4755   if (p_rv<0) {
4756     DBG_INFO(GWEN_LOGDOMAIN, "here (%d)\n", p_rv);
4757     return p_rv;
4758   }
4759 
4760   /* member "originalMandateId" */
4761   if (p_struct->originalMandateId)
4762     p_rv=GWEN_DB_SetCharValue(p_db, GWEN_DB_FLAGS_OVERWRITE_VARS, "originalMandateId", p_struct->originalMandateId);
4763   else {
4764     GWEN_DB_DeleteVar(p_db, "originalMandateId");
4765     p_rv=0;
4766   }
4767   if (p_rv<0) {
4768     DBG_INFO(GWEN_LOGDOMAIN, "here (%d)\n", p_rv);
4769     return p_rv;
4770   }
4771 
4772   /* member "originalCreditorName" */
4773   if (p_struct->originalCreditorName)
4774     p_rv=GWEN_DB_SetCharValue(p_db, GWEN_DB_FLAGS_OVERWRITE_VARS, "originalCreditorName", p_struct->originalCreditorName);
4775   else {
4776     GWEN_DB_DeleteVar(p_db, "originalCreditorName");
4777     p_rv=0;
4778   }
4779   if (p_rv<0) {
4780     DBG_INFO(GWEN_LOGDOMAIN, "here (%d)\n", p_rv);
4781     return p_rv;
4782   }
4783 
4784   /* member "sequence" */
4785   p_rv=GWEN_DB_SetCharValue(p_db, GWEN_DB_FLAGS_OVERWRITE_VARS, "sequence",
4786                             AB_Transaction_Sequence_toString(p_struct->sequence));
4787   if (p_rv<0) {
4788     DBG_INFO(GWEN_LOGDOMAIN, "here (%d)\n", p_rv);
4789     return p_rv;
4790   }
4791 
4792   /* member "charge" */
4793   p_rv=GWEN_DB_SetCharValue(p_db, GWEN_DB_FLAGS_OVERWRITE_VARS, "charge",
4794                             AB_Transaction_Charge_toString(p_struct->charge));
4795   if (p_rv<0) {
4796     DBG_INFO(GWEN_LOGDOMAIN, "here (%d)\n", p_rv);
4797     return p_rv;
4798   }
4799 
4800   /* member "remoteAddrStreet" */
4801   if (p_struct->remoteAddrStreet)
4802     p_rv=GWEN_DB_SetCharValue(p_db, GWEN_DB_FLAGS_OVERWRITE_VARS, "remoteAddrStreet", p_struct->remoteAddrStreet);
4803   else {
4804     GWEN_DB_DeleteVar(p_db, "remoteAddrStreet");
4805     p_rv=0;
4806   }
4807   if (p_rv<0) {
4808     DBG_INFO(GWEN_LOGDOMAIN, "here (%d)\n", p_rv);
4809     return p_rv;
4810   }
4811 
4812   /* member "remoteAddrZipcode" */
4813   if (p_struct->remoteAddrZipcode)
4814     p_rv=GWEN_DB_SetCharValue(p_db, GWEN_DB_FLAGS_OVERWRITE_VARS, "remoteAddrZipcode", p_struct->remoteAddrZipcode);
4815   else {
4816     GWEN_DB_DeleteVar(p_db, "remoteAddrZipcode");
4817     p_rv=0;
4818   }
4819   if (p_rv<0) {
4820     DBG_INFO(GWEN_LOGDOMAIN, "here (%d)\n", p_rv);
4821     return p_rv;
4822   }
4823 
4824   /* member "remoteAddrCity" */
4825   if (p_struct->remoteAddrCity)
4826     p_rv=GWEN_DB_SetCharValue(p_db, GWEN_DB_FLAGS_OVERWRITE_VARS, "remoteAddrCity", p_struct->remoteAddrCity);
4827   else {
4828     GWEN_DB_DeleteVar(p_db, "remoteAddrCity");
4829     p_rv=0;
4830   }
4831   if (p_rv<0) {
4832     DBG_INFO(GWEN_LOGDOMAIN, "here (%d)\n", p_rv);
4833     return p_rv;
4834   }
4835 
4836   /* member "remoteAddrPhone" */
4837   if (p_struct->remoteAddrPhone)
4838     p_rv=GWEN_DB_SetCharValue(p_db, GWEN_DB_FLAGS_OVERWRITE_VARS, "remoteAddrPhone", p_struct->remoteAddrPhone);
4839   else {
4840     GWEN_DB_DeleteVar(p_db, "remoteAddrPhone");
4841     p_rv=0;
4842   }
4843   if (p_rv<0) {
4844     DBG_INFO(GWEN_LOGDOMAIN, "here (%d)\n", p_rv);
4845     return p_rv;
4846   }
4847 
4848   /* member "period" */
4849   p_rv=GWEN_DB_SetCharValue(p_db, GWEN_DB_FLAGS_OVERWRITE_VARS, "period",
4850                             AB_Transaction_Period_toString(p_struct->period));
4851   if (p_rv<0) {
4852     DBG_INFO(GWEN_LOGDOMAIN, "here (%d)\n", p_rv);
4853     return p_rv;
4854   }
4855 
4856   /* member "cycle" */
4857   p_rv=GWEN_DB_SetIntValue(p_db, GWEN_DB_FLAGS_OVERWRITE_VARS, "cycle", p_struct->cycle);
4858   if (p_rv<0) {
4859     DBG_INFO(GWEN_LOGDOMAIN, "here (%d)\n", p_rv);
4860     return p_rv;
4861   }
4862 
4863   /* member "executionDay" */
4864   p_rv=GWEN_DB_SetIntValue(p_db, GWEN_DB_FLAGS_OVERWRITE_VARS, "executionDay", p_struct->executionDay);
4865   if (p_rv<0) {
4866     DBG_INFO(GWEN_LOGDOMAIN, "here (%d)\n", p_rv);
4867     return p_rv;
4868   }
4869 
4870   /* member "firstDate" */
4871   if (p_struct->firstDate) {
4872     const char *s=GWEN_Date_GetString(p_struct->firstDate);
4873     p_rv=GWEN_DB_SetCharValue(p_db, GWEN_DB_FLAGS_OVERWRITE_VARS, "firstDate", s);
4874   }
4875   else {
4876     GWEN_DB_DeleteVar(p_db, "firstDate");
4877     p_rv=0;
4878   }
4879   if (p_rv<0) {
4880     DBG_INFO(GWEN_LOGDOMAIN, "here (%d)\n", p_rv);
4881     return p_rv;
4882   }
4883 
4884   /* member "lastDate" */
4885   if (p_struct->lastDate) {
4886     const char *s=GWEN_Date_GetString(p_struct->lastDate);
4887     p_rv=GWEN_DB_SetCharValue(p_db, GWEN_DB_FLAGS_OVERWRITE_VARS, "lastDate", s);
4888   }
4889   else {
4890     GWEN_DB_DeleteVar(p_db, "lastDate");
4891     p_rv=0;
4892   }
4893   if (p_rv<0) {
4894     DBG_INFO(GWEN_LOGDOMAIN, "here (%d)\n", p_rv);
4895     return p_rv;
4896   }
4897 
4898   /* member "nextDate" */
4899   if (p_struct->nextDate) {
4900     const char *s=GWEN_Date_GetString(p_struct->nextDate);
4901     p_rv=GWEN_DB_SetCharValue(p_db, GWEN_DB_FLAGS_OVERWRITE_VARS, "nextDate", s);
4902   }
4903   else {
4904     GWEN_DB_DeleteVar(p_db, "nextDate");
4905     p_rv=0;
4906   }
4907   if (p_rv<0) {
4908     DBG_INFO(GWEN_LOGDOMAIN, "here (%d)\n", p_rv);
4909     return p_rv;
4910   }
4911 
4912   /* member "unitId" */
4913   if (p_struct->unitId)
4914     p_rv=GWEN_DB_SetCharValue(p_db, GWEN_DB_FLAGS_OVERWRITE_VARS, "unitId", p_struct->unitId);
4915   else {
4916     GWEN_DB_DeleteVar(p_db, "unitId");
4917     p_rv=0;
4918   }
4919   if (p_rv<0) {
4920     DBG_INFO(GWEN_LOGDOMAIN, "here (%d)\n", p_rv);
4921     return p_rv;
4922   }
4923 
4924   /* member "unitIdNameSpace" */
4925   if (p_struct->unitIdNameSpace)
4926     p_rv=GWEN_DB_SetCharValue(p_db, GWEN_DB_FLAGS_OVERWRITE_VARS, "unitIdNameSpace", p_struct->unitIdNameSpace);
4927   else {
4928     GWEN_DB_DeleteVar(p_db, "unitIdNameSpace");
4929     p_rv=0;
4930   }
4931   if (p_rv<0) {
4932     DBG_INFO(GWEN_LOGDOMAIN, "here (%d)\n", p_rv);
4933     return p_rv;
4934   }
4935 
4936   /* member "tickerSymbol" */
4937   if (p_struct->tickerSymbol)
4938     p_rv=GWEN_DB_SetCharValue(p_db, GWEN_DB_FLAGS_OVERWRITE_VARS, "tickerSymbol", p_struct->tickerSymbol);
4939   else {
4940     GWEN_DB_DeleteVar(p_db, "tickerSymbol");
4941     p_rv=0;
4942   }
4943   if (p_rv<0) {
4944     DBG_INFO(GWEN_LOGDOMAIN, "here (%d)\n", p_rv);
4945     return p_rv;
4946   }
4947 
4948   /* member "units" */
4949   if (p_struct->units) {
4950     GWEN_BUFFER *tbuf=GWEN_Buffer_new(0, 64, 0, 1);
4951     AB_Value_toString(p_struct->units, tbuf);
4952     p_rv=GWEN_DB_SetCharValue(p_db, GWEN_DB_FLAGS_OVERWRITE_VARS, "units", GWEN_Buffer_GetStart(tbuf));
4953     GWEN_Buffer_free(tbuf);
4954   }
4955   else {
4956     GWEN_DB_DeleteVar(p_db, "units");
4957     p_rv=0;
4958   }
4959   if (p_rv<0) {
4960     DBG_INFO(GWEN_LOGDOMAIN, "here (%d)\n", p_rv);
4961     return p_rv;
4962   }
4963 
4964   /* member "unitPriceValue" */
4965   if (p_struct->unitPriceValue) {
4966     GWEN_BUFFER *tbuf=GWEN_Buffer_new(0, 64, 0, 1);
4967     AB_Value_toString(p_struct->unitPriceValue, tbuf);
4968     p_rv=GWEN_DB_SetCharValue(p_db, GWEN_DB_FLAGS_OVERWRITE_VARS, "unitPriceValue", GWEN_Buffer_GetStart(tbuf));
4969     GWEN_Buffer_free(tbuf);
4970   }
4971   else {
4972     GWEN_DB_DeleteVar(p_db, "unitPriceValue");
4973     p_rv=0;
4974   }
4975   if (p_rv<0) {
4976     DBG_INFO(GWEN_LOGDOMAIN, "here (%d)\n", p_rv);
4977     return p_rv;
4978   }
4979 
4980   /* member "unitPriceDate" */
4981   if (p_struct->unitPriceDate) {
4982     const char *s=GWEN_Date_GetString(p_struct->unitPriceDate);
4983     p_rv=GWEN_DB_SetCharValue(p_db, GWEN_DB_FLAGS_OVERWRITE_VARS, "unitPriceDate", s);
4984   }
4985   else {
4986     GWEN_DB_DeleteVar(p_db, "unitPriceDate");
4987     p_rv=0;
4988   }
4989   if (p_rv<0) {
4990     DBG_INFO(GWEN_LOGDOMAIN, "here (%d)\n", p_rv);
4991     return p_rv;
4992   }
4993 
4994   /* member "commissionValue" */
4995   if (p_struct->commissionValue) {
4996     GWEN_BUFFER *tbuf=GWEN_Buffer_new(0, 64, 0, 1);
4997     AB_Value_toString(p_struct->commissionValue, tbuf);
4998     p_rv=GWEN_DB_SetCharValue(p_db, GWEN_DB_FLAGS_OVERWRITE_VARS, "commissionValue", GWEN_Buffer_GetStart(tbuf));
4999     GWEN_Buffer_free(tbuf);
5000   }
5001   else {
5002     GWEN_DB_DeleteVar(p_db, "commissionValue");
5003     p_rv=0;
5004   }
5005   if (p_rv<0) {
5006     DBG_INFO(GWEN_LOGDOMAIN, "here (%d)\n", p_rv);
5007     return p_rv;
5008   }
5009 
5010   /* member "memo" */
5011   if (p_struct->memo)
5012     p_rv=GWEN_DB_SetCharValue(p_db, GWEN_DB_FLAGS_OVERWRITE_VARS, "memo", p_struct->memo);
5013   else {
5014     GWEN_DB_DeleteVar(p_db, "memo");
5015     p_rv=0;
5016   }
5017   if (p_rv<0) {
5018     DBG_INFO(GWEN_LOGDOMAIN, "here (%d)\n", p_rv);
5019     return p_rv;
5020   }
5021 
5022   /* member "hash" is volatile, not writing to db */
5023 
5024   return 0;
5025 }
5026 
AB_Transaction_fromDb(GWEN_DB_NODE * p_db)5027 AB_TRANSACTION *AB_Transaction_fromDb(GWEN_DB_NODE *p_db)
5028 {
5029   AB_TRANSACTION *p_struct;
5030   p_struct=AB_Transaction_new();
5031   AB_Transaction_ReadDb(p_struct, p_db);
5032   return p_struct;
5033 }
5034 
AB_Transaction_toDb(const AB_TRANSACTION * p_struct,GWEN_DB_NODE * p_db)5035 int AB_Transaction_toDb(const AB_TRANSACTION *p_struct, GWEN_DB_NODE *p_db)
5036 {
5037   return AB_Transaction_WriteDb(p_struct, p_db);
5038 }
5039 
AB_Transaction_ReadXml(AB_TRANSACTION * p_struct,GWEN_XMLNODE * p_db)5040 void AB_Transaction_ReadXml(AB_TRANSACTION *p_struct, GWEN_XMLNODE *p_db)
5041 {
5042   assert(p_struct);
5043   /* member "type" */
5044   {
5045     const char *s;
5046     s=GWEN_XMLNode_GetCharValue(p_db, "type", NULL);
5047     if (s)
5048       p_struct->type=AB_Transaction_Type_fromString(s);
5049     else
5050       p_struct->type=AB_Transaction_TypeUnknown;
5051   }
5052 
5053   /* member "subType" */
5054   {
5055     const char *s;
5056     s=GWEN_XMLNode_GetCharValue(p_db, "subType", NULL);
5057     if (s)
5058       p_struct->subType=AB_Transaction_SubType_fromString(s);
5059     else
5060       p_struct->subType=AB_Transaction_SubTypeNone;
5061   }
5062 
5063   /* member "command" */
5064   {
5065     const char *s;
5066     s=GWEN_XMLNode_GetCharValue(p_db, "command", NULL);
5067     if (s)
5068       p_struct->command=AB_Transaction_Command_fromString(s);
5069     else
5070       p_struct->command=AB_Transaction_CommandNone;
5071   }
5072 
5073   /* member "status" */
5074   {
5075     const char *s;
5076     s=GWEN_XMLNode_GetCharValue(p_db, "status", NULL);
5077     if (s)
5078       p_struct->status=AB_Transaction_Status_fromString(s);
5079     else
5080       p_struct->status=AB_Transaction_StatusUnknown;
5081   }
5082 
5083   /* member "uniqueAccountId" */
5084   p_struct->uniqueAccountId=GWEN_XMLNode_GetIntValue(p_db, "uniqueAccountId", 0);
5085 
5086   /* member "uniqueId" */
5087   p_struct->uniqueId=GWEN_XMLNode_GetIntValue(p_db, "uniqueId", 0);
5088 
5089   /* member "refUniqueId" */
5090   p_struct->refUniqueId=GWEN_XMLNode_GetIntValue(p_db, "refUniqueId", 0);
5091 
5092   /* member "idForApplication" */
5093   p_struct->idForApplication=GWEN_XMLNode_GetIntValue(p_db, "idForApplication", 0);
5094 
5095   /* member "stringIdForApplication" */
5096   {
5097     const char *s;
5098     s=GWEN_XMLNode_GetCharValue(p_db, "stringIdForApplication", 0);
5099     if (s)
5100       p_struct->stringIdForApplication=strdup(s);
5101   }
5102   if (p_struct->stringIdForApplication==NULL) {  /* preset member "stringIdForApplication" if empty */
5103     p_struct->stringIdForApplication=0;
5104   }
5105 
5106   /* member "sessionId" */
5107   p_struct->sessionId=GWEN_XMLNode_GetIntValue(p_db, "sessionId", 0);
5108 
5109   /* member "groupId" */
5110   p_struct->groupId=GWEN_XMLNode_GetIntValue(p_db, "groupId", 0);
5111 
5112   /* member "fiId" */
5113   if (p_struct->fiId) {
5114     free(p_struct->fiId);
5115     p_struct->fiId=NULL;
5116   }
5117   {
5118     const char *s;
5119     s=GWEN_XMLNode_GetCharValue(p_db, "fiId", NULL);
5120     if (s)
5121       p_struct->fiId=strdup(s);
5122   }
5123   if (p_struct->fiId==NULL) {  /* preset member "fiId" if empty */
5124     p_struct->fiId=NULL;
5125   }
5126 
5127   /* member "localIban" */
5128   if (p_struct->localIban) {
5129     free(p_struct->localIban);
5130     p_struct->localIban=NULL;
5131   }
5132   {
5133     const char *s;
5134     s=GWEN_XMLNode_GetCharValue(p_db, "localIban", NULL);
5135     if (s)
5136       p_struct->localIban=strdup(s);
5137   }
5138   if (p_struct->localIban==NULL) {  /* preset member "localIban" if empty */
5139     p_struct->localIban=NULL;
5140   }
5141 
5142   /* member "localBic" */
5143   if (p_struct->localBic) {
5144     free(p_struct->localBic);
5145     p_struct->localBic=NULL;
5146   }
5147   {
5148     const char *s;
5149     s=GWEN_XMLNode_GetCharValue(p_db, "localBic", NULL);
5150     if (s)
5151       p_struct->localBic=strdup(s);
5152   }
5153   if (p_struct->localBic==NULL) {  /* preset member "localBic" if empty */
5154     p_struct->localBic=NULL;
5155   }
5156 
5157   /* member "localCountry" */
5158   if (p_struct->localCountry) {
5159     free(p_struct->localCountry);
5160     p_struct->localCountry=NULL;
5161   }
5162   {
5163     const char *s;
5164     s=GWEN_XMLNode_GetCharValue(p_db, "localCountry", NULL);
5165     if (s)
5166       p_struct->localCountry=strdup(s);
5167   }
5168   if (p_struct->localCountry==NULL) {  /* preset member "localCountry" if empty */
5169     p_struct->localCountry=NULL;
5170   }
5171 
5172   /* member "localBankCode" */
5173   if (p_struct->localBankCode) {
5174     free(p_struct->localBankCode);
5175     p_struct->localBankCode=NULL;
5176   }
5177   {
5178     const char *s;
5179     s=GWEN_XMLNode_GetCharValue(p_db, "localBankCode", NULL);
5180     if (s)
5181       p_struct->localBankCode=strdup(s);
5182   }
5183   if (p_struct->localBankCode==NULL) {  /* preset member "localBankCode" if empty */
5184     p_struct->localBankCode=NULL;
5185   }
5186 
5187   /* member "localBranchId" */
5188   if (p_struct->localBranchId) {
5189     free(p_struct->localBranchId);
5190     p_struct->localBranchId=NULL;
5191   }
5192   {
5193     const char *s;
5194     s=GWEN_XMLNode_GetCharValue(p_db, "localBranchId", NULL);
5195     if (s)
5196       p_struct->localBranchId=strdup(s);
5197   }
5198   if (p_struct->localBranchId==NULL) {  /* preset member "localBranchId" if empty */
5199     p_struct->localBranchId=NULL;
5200   }
5201 
5202   /* member "localAccountNumber" */
5203   if (p_struct->localAccountNumber) {
5204     free(p_struct->localAccountNumber);
5205     p_struct->localAccountNumber=NULL;
5206   }
5207   {
5208     const char *s;
5209     s=GWEN_XMLNode_GetCharValue(p_db, "localAccountNumber", NULL);
5210     if (s)
5211       p_struct->localAccountNumber=strdup(s);
5212   }
5213   if (p_struct->localAccountNumber==NULL) {  /* preset member "localAccountNumber" if empty */
5214     p_struct->localAccountNumber=NULL;
5215   }
5216 
5217   /* member "localSuffix" */
5218   if (p_struct->localSuffix) {
5219     free(p_struct->localSuffix);
5220     p_struct->localSuffix=NULL;
5221   }
5222   {
5223     const char *s;
5224     s=GWEN_XMLNode_GetCharValue(p_db, "localSuffix", NULL);
5225     if (s)
5226       p_struct->localSuffix=strdup(s);
5227   }
5228   if (p_struct->localSuffix==NULL) {  /* preset member "localSuffix" if empty */
5229     p_struct->localSuffix=NULL;
5230   }
5231 
5232   /* member "localName" */
5233   if (p_struct->localName) {
5234     free(p_struct->localName);
5235     p_struct->localName=NULL;
5236   }
5237   {
5238     const char *s;
5239     s=GWEN_XMLNode_GetCharValue(p_db, "localName", NULL);
5240     if (s)
5241       p_struct->localName=strdup(s);
5242   }
5243   if (p_struct->localName==NULL) {  /* preset member "localName" if empty */
5244     p_struct->localName=NULL;
5245   }
5246 
5247   /* member "remoteCountry" */
5248   if (p_struct->remoteCountry) {
5249     free(p_struct->remoteCountry);
5250     p_struct->remoteCountry=NULL;
5251   }
5252   {
5253     const char *s;
5254     s=GWEN_XMLNode_GetCharValue(p_db, "remoteCountry", NULL);
5255     if (s)
5256       p_struct->remoteCountry=strdup(s);
5257   }
5258   if (p_struct->remoteCountry==NULL) {  /* preset member "remoteCountry" if empty */
5259     p_struct->remoteCountry=NULL;
5260   }
5261 
5262   /* member "remoteBankCode" */
5263   if (p_struct->remoteBankCode) {
5264     free(p_struct->remoteBankCode);
5265     p_struct->remoteBankCode=NULL;
5266   }
5267   {
5268     const char *s;
5269     s=GWEN_XMLNode_GetCharValue(p_db, "remoteBankCode", NULL);
5270     if (s)
5271       p_struct->remoteBankCode=strdup(s);
5272   }
5273   if (p_struct->remoteBankCode==NULL) {  /* preset member "remoteBankCode" if empty */
5274     p_struct->remoteBankCode=NULL;
5275   }
5276 
5277   /* member "remoteBranchId" */
5278   if (p_struct->remoteBranchId) {
5279     free(p_struct->remoteBranchId);
5280     p_struct->remoteBranchId=NULL;
5281   }
5282   {
5283     const char *s;
5284     s=GWEN_XMLNode_GetCharValue(p_db, "remoteBranchId", NULL);
5285     if (s)
5286       p_struct->remoteBranchId=strdup(s);
5287   }
5288   if (p_struct->remoteBranchId==NULL) {  /* preset member "remoteBranchId" if empty */
5289     p_struct->remoteBranchId=NULL;
5290   }
5291 
5292   /* member "remoteAccountNumber" */
5293   if (p_struct->remoteAccountNumber) {
5294     free(p_struct->remoteAccountNumber);
5295     p_struct->remoteAccountNumber=NULL;
5296   }
5297   {
5298     const char *s;
5299     s=GWEN_XMLNode_GetCharValue(p_db, "remoteAccountNumber", NULL);
5300     if (s)
5301       p_struct->remoteAccountNumber=strdup(s);
5302   }
5303   if (p_struct->remoteAccountNumber==NULL) {  /* preset member "remoteAccountNumber" if empty */
5304     p_struct->remoteAccountNumber=NULL;
5305   }
5306 
5307   /* member "remoteSuffix" */
5308   if (p_struct->remoteSuffix) {
5309     free(p_struct->remoteSuffix);
5310     p_struct->remoteSuffix=NULL;
5311   }
5312   {
5313     const char *s;
5314     s=GWEN_XMLNode_GetCharValue(p_db, "remoteSuffix", NULL);
5315     if (s)
5316       p_struct->remoteSuffix=strdup(s);
5317   }
5318   if (p_struct->remoteSuffix==NULL) {  /* preset member "remoteSuffix" if empty */
5319     p_struct->remoteSuffix=NULL;
5320   }
5321 
5322   /* member "remoteIban" */
5323   if (p_struct->remoteIban) {
5324     free(p_struct->remoteIban);
5325     p_struct->remoteIban=NULL;
5326   }
5327   {
5328     const char *s;
5329     s=GWEN_XMLNode_GetCharValue(p_db, "remoteIban", NULL);
5330     if (s)
5331       p_struct->remoteIban=strdup(s);
5332   }
5333   if (p_struct->remoteIban==NULL) {  /* preset member "remoteIban" if empty */
5334     p_struct->remoteIban=NULL;
5335   }
5336 
5337   /* member "remoteBic" */
5338   if (p_struct->remoteBic) {
5339     free(p_struct->remoteBic);
5340     p_struct->remoteBic=NULL;
5341   }
5342   {
5343     const char *s;
5344     s=GWEN_XMLNode_GetCharValue(p_db, "remoteBic", NULL);
5345     if (s)
5346       p_struct->remoteBic=strdup(s);
5347   }
5348   if (p_struct->remoteBic==NULL) {  /* preset member "remoteBic" if empty */
5349     p_struct->remoteBic=NULL;
5350   }
5351 
5352   /* member "remoteName" */
5353   if (p_struct->remoteName) {
5354     free(p_struct->remoteName);
5355     p_struct->remoteName=NULL;
5356   }
5357   {
5358     const char *s;
5359     s=GWEN_XMLNode_GetCharValue(p_db, "remoteName", NULL);
5360     if (s)
5361       p_struct->remoteName=strdup(s);
5362   }
5363   if (p_struct->remoteName==NULL) {  /* preset member "remoteName" if empty */
5364     p_struct->remoteName=NULL;
5365   }
5366 
5367   /* member "date" */
5368   if (p_struct->date) {
5369     GWEN_Date_free(p_struct->date);
5370     p_struct->date=NULL;
5371   }
5372   {
5373     const char *s;
5374     s=GWEN_XMLNode_GetCharValue(p_db, "date", NULL);
5375     if (s && *s)
5376       p_struct->date=GWEN_Date_fromString(s);
5377   }
5378   if (p_struct->date==NULL) {  /* preset member "date" if empty */
5379     p_struct->date=NULL;
5380   }
5381 
5382   /* member "valutaDate" */
5383   if (p_struct->valutaDate) {
5384     GWEN_Date_free(p_struct->valutaDate);
5385     p_struct->valutaDate=NULL;
5386   }
5387   {
5388     const char *s;
5389     s=GWEN_XMLNode_GetCharValue(p_db, "valutaDate", NULL);
5390     if (s && *s)
5391       p_struct->valutaDate=GWEN_Date_fromString(s);
5392   }
5393   if (p_struct->valutaDate==NULL) {  /* preset member "valutaDate" if empty */
5394     p_struct->valutaDate=NULL;
5395   }
5396 
5397   /* member "value" */
5398   if (p_struct->value) {
5399     AB_Value_free(p_struct->value);
5400   }
5401   {
5402     const char *s;
5403     s=GWEN_XMLNode_GetCharValue(p_db, "value", NULL);
5404     if (s)
5405       p_struct->value=AB_Value_fromString(s);
5406     else
5407       p_struct->value=NULL;
5408   }
5409   if (p_struct->value==NULL) {  /* preset member "value" if empty */
5410     p_struct->value=AB_Value_new();
5411   }
5412 
5413   /* member "fees" */
5414   if (p_struct->fees) {
5415     AB_Value_free(p_struct->fees);
5416   }
5417   {
5418     const char *s;
5419     s=GWEN_XMLNode_GetCharValue(p_db, "fees", NULL);
5420     if (s)
5421       p_struct->fees=AB_Value_fromString(s);
5422     else
5423       p_struct->fees=NULL;
5424   }
5425   if (p_struct->fees==NULL) {  /* preset member "fees" if empty */
5426     p_struct->fees=AB_Value_new();
5427   }
5428 
5429   /* member "transactionCode" */
5430   p_struct->transactionCode=GWEN_XMLNode_GetIntValue(p_db, "transactionCode", 0);
5431 
5432   /* member "transactionText" */
5433   if (p_struct->transactionText) {
5434     free(p_struct->transactionText);
5435     p_struct->transactionText=NULL;
5436   }
5437   {
5438     const char *s;
5439     s=GWEN_XMLNode_GetCharValue(p_db, "transactionText", NULL);
5440     if (s)
5441       p_struct->transactionText=strdup(s);
5442   }
5443   if (p_struct->transactionText==NULL) {  /* preset member "transactionText" if empty */
5444     p_struct->transactionText=NULL;
5445   }
5446 
5447   /* member "transactionKey" */
5448   if (p_struct->transactionKey) {
5449     free(p_struct->transactionKey);
5450     p_struct->transactionKey=NULL;
5451   }
5452   {
5453     const char *s;
5454     s=GWEN_XMLNode_GetCharValue(p_db, "transactionKey", NULL);
5455     if (s)
5456       p_struct->transactionKey=strdup(s);
5457   }
5458   if (p_struct->transactionKey==NULL) {  /* preset member "transactionKey" if empty */
5459     p_struct->transactionKey=NULL;
5460   }
5461 
5462   /* member "textKey" */
5463   p_struct->textKey=GWEN_XMLNode_GetIntValue(p_db, "textKey", 0);
5464 
5465   /* member "primanota" */
5466   if (p_struct->primanota) {
5467     free(p_struct->primanota);
5468     p_struct->primanota=NULL;
5469   }
5470   {
5471     const char *s;
5472     s=GWEN_XMLNode_GetCharValue(p_db, "primanota", NULL);
5473     if (s)
5474       p_struct->primanota=strdup(s);
5475   }
5476   if (p_struct->primanota==NULL) {  /* preset member "primanota" if empty */
5477     p_struct->primanota=NULL;
5478   }
5479 
5480   /* member "purpose" */
5481   if (p_struct->purpose) {
5482     free(p_struct->purpose);
5483     p_struct->purpose=NULL;
5484   }
5485   {
5486     const char *s;
5487     s=GWEN_XMLNode_GetCharValue(p_db, "purpose", NULL);
5488     if (s)
5489       p_struct->purpose=strdup(s);
5490   }
5491   if (p_struct->purpose==NULL) {  /* preset member "purpose" if empty */
5492     p_struct->purpose=NULL;
5493   }
5494 
5495   /* member "category" */
5496   if (p_struct->category) {
5497     free(p_struct->category);
5498     p_struct->category=NULL;
5499   }
5500   {
5501     const char *s;
5502     s=GWEN_XMLNode_GetCharValue(p_db, "category", NULL);
5503     if (s)
5504       p_struct->category=strdup(s);
5505   }
5506   if (p_struct->category==NULL) {  /* preset member "category" if empty */
5507     p_struct->category=NULL;
5508   }
5509 
5510   /* member "customerReference" */
5511   if (p_struct->customerReference) {
5512     free(p_struct->customerReference);
5513     p_struct->customerReference=NULL;
5514   }
5515   {
5516     const char *s;
5517     s=GWEN_XMLNode_GetCharValue(p_db, "customerReference", NULL);
5518     if (s)
5519       p_struct->customerReference=strdup(s);
5520   }
5521   if (p_struct->customerReference==NULL) {  /* preset member "customerReference" if empty */
5522     p_struct->customerReference=NULL;
5523   }
5524 
5525   /* member "bankReference" */
5526   if (p_struct->bankReference) {
5527     free(p_struct->bankReference);
5528     p_struct->bankReference=NULL;
5529   }
5530   {
5531     const char *s;
5532     s=GWEN_XMLNode_GetCharValue(p_db, "bankReference", NULL);
5533     if (s)
5534       p_struct->bankReference=strdup(s);
5535   }
5536   if (p_struct->bankReference==NULL) {  /* preset member "bankReference" if empty */
5537     p_struct->bankReference=NULL;
5538   }
5539 
5540   /* member "endToEndReference" */
5541   if (p_struct->endToEndReference) {
5542     free(p_struct->endToEndReference);
5543     p_struct->endToEndReference=NULL;
5544   }
5545   {
5546     const char *s;
5547     s=GWEN_XMLNode_GetCharValue(p_db, "endToEndReference", NULL);
5548     if (s)
5549       p_struct->endToEndReference=strdup(s);
5550   }
5551   if (p_struct->endToEndReference==NULL) {  /* preset member "endToEndReference" if empty */
5552     p_struct->endToEndReference=NULL;
5553   }
5554 
5555   /* member "ultimateCreditor" */
5556   if (p_struct->ultimateCreditor) {
5557     free(p_struct->ultimateCreditor);
5558     p_struct->ultimateCreditor=NULL;
5559   }
5560   {
5561     const char *s;
5562     s=GWEN_XMLNode_GetCharValue(p_db, "ultimateCreditor", NULL);
5563     if (s)
5564       p_struct->ultimateCreditor=strdup(s);
5565   }
5566   if (p_struct->ultimateCreditor==NULL) {  /* preset member "ultimateCreditor" if empty */
5567     p_struct->ultimateCreditor=NULL;
5568   }
5569 
5570   /* member "ultimateDebtor" */
5571   if (p_struct->ultimateDebtor) {
5572     free(p_struct->ultimateDebtor);
5573     p_struct->ultimateDebtor=NULL;
5574   }
5575   {
5576     const char *s;
5577     s=GWEN_XMLNode_GetCharValue(p_db, "ultimateDebtor", NULL);
5578     if (s)
5579       p_struct->ultimateDebtor=strdup(s);
5580   }
5581   if (p_struct->ultimateDebtor==NULL) {  /* preset member "ultimateDebtor" if empty */
5582     p_struct->ultimateDebtor=NULL;
5583   }
5584 
5585   /* member "creditorSchemeId" */
5586   if (p_struct->creditorSchemeId) {
5587     free(p_struct->creditorSchemeId);
5588     p_struct->creditorSchemeId=NULL;
5589   }
5590   {
5591     const char *s;
5592     s=GWEN_XMLNode_GetCharValue(p_db, "creditorSchemeId", NULL);
5593     if (s)
5594       p_struct->creditorSchemeId=strdup(s);
5595   }
5596   if (p_struct->creditorSchemeId==NULL) {  /* preset member "creditorSchemeId" if empty */
5597     p_struct->creditorSchemeId=NULL;
5598   }
5599 
5600   /* member "originatorId" */
5601   if (p_struct->originatorId) {
5602     free(p_struct->originatorId);
5603     p_struct->originatorId=NULL;
5604   }
5605   {
5606     const char *s;
5607     s=GWEN_XMLNode_GetCharValue(p_db, "originatorId", NULL);
5608     if (s)
5609       p_struct->originatorId=strdup(s);
5610   }
5611   if (p_struct->originatorId==NULL) {  /* preset member "originatorId" if empty */
5612     p_struct->originatorId=NULL;
5613   }
5614 
5615   /* member "mandateId" */
5616   if (p_struct->mandateId) {
5617     free(p_struct->mandateId);
5618     p_struct->mandateId=NULL;
5619   }
5620   {
5621     const char *s;
5622     s=GWEN_XMLNode_GetCharValue(p_db, "mandateId", NULL);
5623     if (s)
5624       p_struct->mandateId=strdup(s);
5625   }
5626   if (p_struct->mandateId==NULL) {  /* preset member "mandateId" if empty */
5627     p_struct->mandateId=NULL;
5628   }
5629 
5630   /* member "mandateDate" */
5631   if (p_struct->mandateDate) {
5632     GWEN_Date_free(p_struct->mandateDate);
5633     p_struct->mandateDate=NULL;
5634   }
5635   {
5636     const char *s;
5637     s=GWEN_XMLNode_GetCharValue(p_db, "mandateDate", NULL);
5638     if (s && *s)
5639       p_struct->mandateDate=GWEN_Date_fromString(s);
5640   }
5641   if (p_struct->mandateDate==NULL) {  /* preset member "mandateDate" if empty */
5642     p_struct->mandateDate=NULL;
5643   }
5644 
5645   /* member "mandateDebitorName" */
5646   if (p_struct->mandateDebitorName) {
5647     free(p_struct->mandateDebitorName);
5648     p_struct->mandateDebitorName=NULL;
5649   }
5650   {
5651     const char *s;
5652     s=GWEN_XMLNode_GetCharValue(p_db, "mandateDebitorName", NULL);
5653     if (s)
5654       p_struct->mandateDebitorName=strdup(s);
5655   }
5656   if (p_struct->mandateDebitorName==NULL) {  /* preset member "mandateDebitorName" if empty */
5657     p_struct->mandateDebitorName=NULL;
5658   }
5659 
5660   /* member "originalCreditorSchemeId" */
5661   if (p_struct->originalCreditorSchemeId) {
5662     free(p_struct->originalCreditorSchemeId);
5663     p_struct->originalCreditorSchemeId=NULL;
5664   }
5665   {
5666     const char *s;
5667     s=GWEN_XMLNode_GetCharValue(p_db, "originalCreditorSchemeId", NULL);
5668     if (s)
5669       p_struct->originalCreditorSchemeId=strdup(s);
5670   }
5671   if (p_struct->originalCreditorSchemeId==NULL) {  /* preset member "originalCreditorSchemeId" if empty */
5672     p_struct->originalCreditorSchemeId=NULL;
5673   }
5674 
5675   /* member "originalMandateId" */
5676   if (p_struct->originalMandateId) {
5677     free(p_struct->originalMandateId);
5678     p_struct->originalMandateId=NULL;
5679   }
5680   {
5681     const char *s;
5682     s=GWEN_XMLNode_GetCharValue(p_db, "originalMandateId", NULL);
5683     if (s)
5684       p_struct->originalMandateId=strdup(s);
5685   }
5686   if (p_struct->originalMandateId==NULL) {  /* preset member "originalMandateId" if empty */
5687     p_struct->originalMandateId=NULL;
5688   }
5689 
5690   /* member "originalCreditorName" */
5691   if (p_struct->originalCreditorName) {
5692     free(p_struct->originalCreditorName);
5693     p_struct->originalCreditorName=NULL;
5694   }
5695   {
5696     const char *s;
5697     s=GWEN_XMLNode_GetCharValue(p_db, "originalCreditorName", NULL);
5698     if (s)
5699       p_struct->originalCreditorName=strdup(s);
5700   }
5701   if (p_struct->originalCreditorName==NULL) {  /* preset member "originalCreditorName" if empty */
5702     p_struct->originalCreditorName=NULL;
5703   }
5704 
5705   /* member "sequence" */
5706   {
5707     const char *s;
5708     s=GWEN_XMLNode_GetCharValue(p_db, "sequence", NULL);
5709     if (s)
5710       p_struct->sequence=AB_Transaction_Sequence_fromString(s);
5711     else
5712       p_struct->sequence=AB_Transaction_SequenceUnknown;
5713   }
5714 
5715   /* member "charge" */
5716   {
5717     const char *s;
5718     s=GWEN_XMLNode_GetCharValue(p_db, "charge", NULL);
5719     if (s)
5720       p_struct->charge=AB_Transaction_Charge_fromString(s);
5721     else
5722       p_struct->charge=AB_Transaction_ChargeUnknown;
5723   }
5724 
5725   /* member "remoteAddrStreet" */
5726   if (p_struct->remoteAddrStreet) {
5727     free(p_struct->remoteAddrStreet);
5728     p_struct->remoteAddrStreet=NULL;
5729   }
5730   {
5731     const char *s;
5732     s=GWEN_XMLNode_GetCharValue(p_db, "remoteAddrStreet", NULL);
5733     if (s)
5734       p_struct->remoteAddrStreet=strdup(s);
5735   }
5736   if (p_struct->remoteAddrStreet==NULL) {  /* preset member "remoteAddrStreet" if empty */
5737     p_struct->remoteAddrStreet=NULL;
5738   }
5739 
5740   /* member "remoteAddrZipcode" */
5741   if (p_struct->remoteAddrZipcode) {
5742     free(p_struct->remoteAddrZipcode);
5743     p_struct->remoteAddrZipcode=NULL;
5744   }
5745   {
5746     const char *s;
5747     s=GWEN_XMLNode_GetCharValue(p_db, "remoteAddrZipcode", NULL);
5748     if (s)
5749       p_struct->remoteAddrZipcode=strdup(s);
5750   }
5751   if (p_struct->remoteAddrZipcode==NULL) {  /* preset member "remoteAddrZipcode" if empty */
5752     p_struct->remoteAddrZipcode=NULL;
5753   }
5754 
5755   /* member "remoteAddrCity" */
5756   if (p_struct->remoteAddrCity) {
5757     free(p_struct->remoteAddrCity);
5758     p_struct->remoteAddrCity=NULL;
5759   }
5760   {
5761     const char *s;
5762     s=GWEN_XMLNode_GetCharValue(p_db, "remoteAddrCity", NULL);
5763     if (s)
5764       p_struct->remoteAddrCity=strdup(s);
5765   }
5766   if (p_struct->remoteAddrCity==NULL) {  /* preset member "remoteAddrCity" if empty */
5767     p_struct->remoteAddrCity=NULL;
5768   }
5769 
5770   /* member "remoteAddrPhone" */
5771   if (p_struct->remoteAddrPhone) {
5772     free(p_struct->remoteAddrPhone);
5773     p_struct->remoteAddrPhone=NULL;
5774   }
5775   {
5776     const char *s;
5777     s=GWEN_XMLNode_GetCharValue(p_db, "remoteAddrPhone", NULL);
5778     if (s)
5779       p_struct->remoteAddrPhone=strdup(s);
5780   }
5781   if (p_struct->remoteAddrPhone==NULL) {  /* preset member "remoteAddrPhone" if empty */
5782     p_struct->remoteAddrPhone=NULL;
5783   }
5784 
5785   /* member "period" */
5786   {
5787     const char *s;
5788     s=GWEN_XMLNode_GetCharValue(p_db, "period", NULL);
5789     if (s)
5790       p_struct->period=AB_Transaction_Period_fromString(s);
5791     else
5792       p_struct->period=AB_Transaction_PeriodUnknown;
5793   }
5794 
5795   /* member "cycle" */
5796   p_struct->cycle=GWEN_XMLNode_GetIntValue(p_db, "cycle", 0);
5797 
5798   /* member "executionDay" */
5799   p_struct->executionDay=GWEN_XMLNode_GetIntValue(p_db, "executionDay", 0);
5800 
5801   /* member "firstDate" */
5802   if (p_struct->firstDate) {
5803     GWEN_Date_free(p_struct->firstDate);
5804     p_struct->firstDate=NULL;
5805   }
5806   {
5807     const char *s;
5808     s=GWEN_XMLNode_GetCharValue(p_db, "firstDate", NULL);
5809     if (s && *s)
5810       p_struct->firstDate=GWEN_Date_fromString(s);
5811   }
5812   if (p_struct->firstDate==NULL) {  /* preset member "firstDate" if empty */
5813     p_struct->firstDate=NULL;
5814   }
5815 
5816   /* member "lastDate" */
5817   if (p_struct->lastDate) {
5818     GWEN_Date_free(p_struct->lastDate);
5819     p_struct->lastDate=NULL;
5820   }
5821   {
5822     const char *s;
5823     s=GWEN_XMLNode_GetCharValue(p_db, "lastDate", NULL);
5824     if (s && *s)
5825       p_struct->lastDate=GWEN_Date_fromString(s);
5826   }
5827   if (p_struct->lastDate==NULL) {  /* preset member "lastDate" if empty */
5828     p_struct->lastDate=NULL;
5829   }
5830 
5831   /* member "nextDate" */
5832   if (p_struct->nextDate) {
5833     GWEN_Date_free(p_struct->nextDate);
5834     p_struct->nextDate=NULL;
5835   }
5836   {
5837     const char *s;
5838     s=GWEN_XMLNode_GetCharValue(p_db, "nextDate", NULL);
5839     if (s && *s)
5840       p_struct->nextDate=GWEN_Date_fromString(s);
5841   }
5842   if (p_struct->nextDate==NULL) {  /* preset member "nextDate" if empty */
5843     p_struct->nextDate=NULL;
5844   }
5845 
5846   /* member "unitId" */
5847   if (p_struct->unitId) {
5848     free(p_struct->unitId);
5849     p_struct->unitId=NULL;
5850   }
5851   {
5852     const char *s;
5853     s=GWEN_XMLNode_GetCharValue(p_db, "unitId", NULL);
5854     if (s)
5855       p_struct->unitId=strdup(s);
5856   }
5857   if (p_struct->unitId==NULL) {  /* preset member "unitId" if empty */
5858     p_struct->unitId=NULL;
5859   }
5860 
5861   /* member "unitIdNameSpace" */
5862   if (p_struct->unitIdNameSpace) {
5863     free(p_struct->unitIdNameSpace);
5864     p_struct->unitIdNameSpace=NULL;
5865   }
5866   {
5867     const char *s;
5868     s=GWEN_XMLNode_GetCharValue(p_db, "unitIdNameSpace", NULL);
5869     if (s)
5870       p_struct->unitIdNameSpace=strdup(s);
5871   }
5872   if (p_struct->unitIdNameSpace==NULL) {  /* preset member "unitIdNameSpace" if empty */
5873     p_struct->unitIdNameSpace=NULL;
5874   }
5875 
5876   /* member "tickerSymbol" */
5877   if (p_struct->tickerSymbol) {
5878     free(p_struct->tickerSymbol);
5879     p_struct->tickerSymbol=NULL;
5880   }
5881   {
5882     const char *s;
5883     s=GWEN_XMLNode_GetCharValue(p_db, "tickerSymbol", NULL);
5884     if (s)
5885       p_struct->tickerSymbol=strdup(s);
5886   }
5887   if (p_struct->tickerSymbol==NULL) {  /* preset member "tickerSymbol" if empty */
5888     p_struct->tickerSymbol=NULL;
5889   }
5890 
5891   /* member "units" */
5892   if (p_struct->units) {
5893     AB_Value_free(p_struct->units);
5894   }
5895   {
5896     const char *s;
5897     s=GWEN_XMLNode_GetCharValue(p_db, "units", NULL);
5898     if (s)
5899       p_struct->units=AB_Value_fromString(s);
5900     else
5901       p_struct->units=NULL;
5902   }
5903   if (p_struct->units==NULL) {  /* preset member "units" if empty */
5904     p_struct->units=AB_Value_new();
5905   }
5906 
5907   /* member "unitPriceValue" */
5908   if (p_struct->unitPriceValue) {
5909     AB_Value_free(p_struct->unitPriceValue);
5910   }
5911   {
5912     const char *s;
5913     s=GWEN_XMLNode_GetCharValue(p_db, "unitPriceValue", NULL);
5914     if (s)
5915       p_struct->unitPriceValue=AB_Value_fromString(s);
5916     else
5917       p_struct->unitPriceValue=NULL;
5918   }
5919   if (p_struct->unitPriceValue==NULL) {  /* preset member "unitPriceValue" if empty */
5920     p_struct->unitPriceValue=AB_Value_new();
5921   }
5922 
5923   /* member "unitPriceDate" */
5924   if (p_struct->unitPriceDate) {
5925     GWEN_Date_free(p_struct->unitPriceDate);
5926     p_struct->unitPriceDate=NULL;
5927   }
5928   {
5929     const char *s;
5930     s=GWEN_XMLNode_GetCharValue(p_db, "unitPriceDate", NULL);
5931     if (s && *s)
5932       p_struct->unitPriceDate=GWEN_Date_fromString(s);
5933   }
5934   if (p_struct->unitPriceDate==NULL) {  /* preset member "unitPriceDate" if empty */
5935     p_struct->unitPriceDate=NULL;
5936   }
5937 
5938   /* member "commissionValue" */
5939   if (p_struct->commissionValue) {
5940     AB_Value_free(p_struct->commissionValue);
5941   }
5942   {
5943     const char *s;
5944     s=GWEN_XMLNode_GetCharValue(p_db, "commissionValue", NULL);
5945     if (s)
5946       p_struct->commissionValue=AB_Value_fromString(s);
5947     else
5948       p_struct->commissionValue=NULL;
5949   }
5950   if (p_struct->commissionValue==NULL) {  /* preset member "commissionValue" if empty */
5951     p_struct->commissionValue=AB_Value_new();
5952   }
5953 
5954   /* member "memo" */
5955   if (p_struct->memo) {
5956     free(p_struct->memo);
5957     p_struct->memo=NULL;
5958   }
5959   {
5960     const char *s;
5961     s=GWEN_XMLNode_GetCharValue(p_db, "memo", NULL);
5962     if (s)
5963       p_struct->memo=strdup(s);
5964   }
5965   if (p_struct->memo==NULL) {  /* preset member "memo" if empty */
5966     p_struct->memo=NULL;
5967   }
5968 
5969   /* member "hash" */
5970   if (p_struct->hash) {
5971     free(p_struct->hash);
5972     p_struct->hash=NULL;
5973   }
5974   /* member "hash" is volatile, just presetting */
5975   p_struct->hash=NULL;
5976 
5977 }
5978 
AB_Transaction_WriteXml(const AB_TRANSACTION * p_struct,GWEN_XMLNODE * p_db)5979 void AB_Transaction_WriteXml(const AB_TRANSACTION *p_struct, GWEN_XMLNODE *p_db)
5980 {
5981   assert(p_struct);
5982   /* member "type" */
5983   GWEN_XMLNode_SetCharValue(p_db, "type", AB_Transaction_Type_toString(p_struct->type));
5984 
5985   /* member "subType" */
5986   GWEN_XMLNode_SetCharValue(p_db, "subType", AB_Transaction_SubType_toString(p_struct->subType));
5987 
5988   /* member "command" */
5989   GWEN_XMLNode_SetCharValue(p_db, "command", AB_Transaction_Command_toString(p_struct->command));
5990 
5991   /* member "status" */
5992   GWEN_XMLNode_SetCharValue(p_db, "status", AB_Transaction_Status_toString(p_struct->status));
5993 
5994   /* member "uniqueAccountId" */
5995   GWEN_XMLNode_SetIntValue(p_db, "uniqueAccountId", p_struct->uniqueAccountId);
5996 
5997   /* member "uniqueId" */
5998   GWEN_XMLNode_SetIntValue(p_db, "uniqueId", p_struct->uniqueId);
5999 
6000   /* member "refUniqueId" */
6001   GWEN_XMLNode_SetIntValue(p_db, "refUniqueId", p_struct->refUniqueId);
6002 
6003   /* member "idForApplication" */
6004   GWEN_XMLNode_SetIntValue(p_db, "idForApplication", p_struct->idForApplication);
6005 
6006   /* member "stringIdForApplication" */
6007   GWEN_XMLNode_SetCharValue(p_db, "stringIdForApplication", p_struct->stringIdForApplication);
6008 
6009   /* member "sessionId" */
6010   GWEN_XMLNode_SetIntValue(p_db, "sessionId", p_struct->sessionId);
6011 
6012   /* member "groupId" */
6013   GWEN_XMLNode_SetIntValue(p_db, "groupId", p_struct->groupId);
6014 
6015   /* member "fiId" */
6016   GWEN_XMLNode_SetCharValue(p_db, "fiId", p_struct->fiId);
6017 
6018   /* member "localIban" */
6019   GWEN_XMLNode_SetCharValue(p_db, "localIban", p_struct->localIban);
6020 
6021   /* member "localBic" */
6022   GWEN_XMLNode_SetCharValue(p_db, "localBic", p_struct->localBic);
6023 
6024   /* member "localCountry" */
6025   GWEN_XMLNode_SetCharValue(p_db, "localCountry", p_struct->localCountry);
6026 
6027   /* member "localBankCode" */
6028   GWEN_XMLNode_SetCharValue(p_db, "localBankCode", p_struct->localBankCode);
6029 
6030   /* member "localBranchId" */
6031   GWEN_XMLNode_SetCharValue(p_db, "localBranchId", p_struct->localBranchId);
6032 
6033   /* member "localAccountNumber" */
6034   GWEN_XMLNode_SetCharValue(p_db, "localAccountNumber", p_struct->localAccountNumber);
6035 
6036   /* member "localSuffix" */
6037   GWEN_XMLNode_SetCharValue(p_db, "localSuffix", p_struct->localSuffix);
6038 
6039   /* member "localName" */
6040   GWEN_XMLNode_SetCharValue(p_db, "localName", p_struct->localName);
6041 
6042   /* member "remoteCountry" */
6043   GWEN_XMLNode_SetCharValue(p_db, "remoteCountry", p_struct->remoteCountry);
6044 
6045   /* member "remoteBankCode" */
6046   GWEN_XMLNode_SetCharValue(p_db, "remoteBankCode", p_struct->remoteBankCode);
6047 
6048   /* member "remoteBranchId" */
6049   GWEN_XMLNode_SetCharValue(p_db, "remoteBranchId", p_struct->remoteBranchId);
6050 
6051   /* member "remoteAccountNumber" */
6052   GWEN_XMLNode_SetCharValue(p_db, "remoteAccountNumber", p_struct->remoteAccountNumber);
6053 
6054   /* member "remoteSuffix" */
6055   GWEN_XMLNode_SetCharValue(p_db, "remoteSuffix", p_struct->remoteSuffix);
6056 
6057   /* member "remoteIban" */
6058   GWEN_XMLNode_SetCharValue(p_db, "remoteIban", p_struct->remoteIban);
6059 
6060   /* member "remoteBic" */
6061   GWEN_XMLNode_SetCharValue(p_db, "remoteBic", p_struct->remoteBic);
6062 
6063   /* member "remoteName" */
6064   GWEN_XMLNode_SetCharValue(p_db, "remoteName", p_struct->remoteName);
6065 
6066   /* member "date" */
6067   if (p_struct->date) {
6068     const char *s=GWEN_Date_GetString(p_struct->date);
6069     GWEN_XMLNode_SetCharValue(p_db, "date", s);
6070   }
6071 
6072   /* member "valutaDate" */
6073   if (p_struct->valutaDate) {
6074     const char *s=GWEN_Date_GetString(p_struct->valutaDate);
6075     GWEN_XMLNode_SetCharValue(p_db, "valutaDate", s);
6076   }
6077 
6078   /* member "value" */
6079   if (p_struct->value) {
6080     GWEN_BUFFER *tbuf=GWEN_Buffer_new(0, 64, 0, 1);
6081     AB_Value_toString(p_struct->value, tbuf);
6082     GWEN_XMLNode_SetCharValue(p_db, "value", GWEN_Buffer_GetStart(tbuf));
6083     GWEN_Buffer_free(tbuf);
6084   }
6085 
6086   /* member "fees" */
6087   if (p_struct->fees) {
6088     GWEN_BUFFER *tbuf=GWEN_Buffer_new(0, 64, 0, 1);
6089     AB_Value_toString(p_struct->fees, tbuf);
6090     GWEN_XMLNode_SetCharValue(p_db, "fees", GWEN_Buffer_GetStart(tbuf));
6091     GWEN_Buffer_free(tbuf);
6092   }
6093 
6094   /* member "transactionCode" */
6095   GWEN_XMLNode_SetIntValue(p_db, "transactionCode", p_struct->transactionCode);
6096 
6097   /* member "transactionText" */
6098   GWEN_XMLNode_SetCharValue(p_db, "transactionText", p_struct->transactionText);
6099 
6100   /* member "transactionKey" */
6101   GWEN_XMLNode_SetCharValue(p_db, "transactionKey", p_struct->transactionKey);
6102 
6103   /* member "textKey" */
6104   GWEN_XMLNode_SetIntValue(p_db, "textKey", p_struct->textKey);
6105 
6106   /* member "primanota" */
6107   GWEN_XMLNode_SetCharValue(p_db, "primanota", p_struct->primanota);
6108 
6109   /* member "purpose" */
6110   GWEN_XMLNode_SetCharValue(p_db, "purpose", p_struct->purpose);
6111 
6112   /* member "category" */
6113   GWEN_XMLNode_SetCharValue(p_db, "category", p_struct->category);
6114 
6115   /* member "customerReference" */
6116   GWEN_XMLNode_SetCharValue(p_db, "customerReference", p_struct->customerReference);
6117 
6118   /* member "bankReference" */
6119   GWEN_XMLNode_SetCharValue(p_db, "bankReference", p_struct->bankReference);
6120 
6121   /* member "endToEndReference" */
6122   GWEN_XMLNode_SetCharValue(p_db, "endToEndReference", p_struct->endToEndReference);
6123 
6124   /* member "ultimateCreditor" */
6125   GWEN_XMLNode_SetCharValue(p_db, "ultimateCreditor", p_struct->ultimateCreditor);
6126 
6127   /* member "ultimateDebtor" */
6128   GWEN_XMLNode_SetCharValue(p_db, "ultimateDebtor", p_struct->ultimateDebtor);
6129 
6130   /* member "creditorSchemeId" */
6131   GWEN_XMLNode_SetCharValue(p_db, "creditorSchemeId", p_struct->creditorSchemeId);
6132 
6133   /* member "originatorId" */
6134   GWEN_XMLNode_SetCharValue(p_db, "originatorId", p_struct->originatorId);
6135 
6136   /* member "mandateId" */
6137   GWEN_XMLNode_SetCharValue(p_db, "mandateId", p_struct->mandateId);
6138 
6139   /* member "mandateDate" */
6140   if (p_struct->mandateDate) {
6141     const char *s=GWEN_Date_GetString(p_struct->mandateDate);
6142     GWEN_XMLNode_SetCharValue(p_db, "mandateDate", s);
6143   }
6144 
6145   /* member "mandateDebitorName" */
6146   GWEN_XMLNode_SetCharValue(p_db, "mandateDebitorName", p_struct->mandateDebitorName);
6147 
6148   /* member "originalCreditorSchemeId" */
6149   GWEN_XMLNode_SetCharValue(p_db, "originalCreditorSchemeId", p_struct->originalCreditorSchemeId);
6150 
6151   /* member "originalMandateId" */
6152   GWEN_XMLNode_SetCharValue(p_db, "originalMandateId", p_struct->originalMandateId);
6153 
6154   /* member "originalCreditorName" */
6155   GWEN_XMLNode_SetCharValue(p_db, "originalCreditorName", p_struct->originalCreditorName);
6156 
6157   /* member "sequence" */
6158   GWEN_XMLNode_SetCharValue(p_db, "sequence", AB_Transaction_Sequence_toString(p_struct->sequence));
6159 
6160   /* member "charge" */
6161   GWEN_XMLNode_SetCharValue(p_db, "charge", AB_Transaction_Charge_toString(p_struct->charge));
6162 
6163   /* member "remoteAddrStreet" */
6164   GWEN_XMLNode_SetCharValue(p_db, "remoteAddrStreet", p_struct->remoteAddrStreet);
6165 
6166   /* member "remoteAddrZipcode" */
6167   GWEN_XMLNode_SetCharValue(p_db, "remoteAddrZipcode", p_struct->remoteAddrZipcode);
6168 
6169   /* member "remoteAddrCity" */
6170   GWEN_XMLNode_SetCharValue(p_db, "remoteAddrCity", p_struct->remoteAddrCity);
6171 
6172   /* member "remoteAddrPhone" */
6173   GWEN_XMLNode_SetCharValue(p_db, "remoteAddrPhone", p_struct->remoteAddrPhone);
6174 
6175   /* member "period" */
6176   GWEN_XMLNode_SetCharValue(p_db, "period", AB_Transaction_Period_toString(p_struct->period));
6177 
6178   /* member "cycle" */
6179   GWEN_XMLNode_SetIntValue(p_db, "cycle", p_struct->cycle);
6180 
6181   /* member "executionDay" */
6182   GWEN_XMLNode_SetIntValue(p_db, "executionDay", p_struct->executionDay);
6183 
6184   /* member "firstDate" */
6185   if (p_struct->firstDate) {
6186     const char *s=GWEN_Date_GetString(p_struct->firstDate);
6187     GWEN_XMLNode_SetCharValue(p_db, "firstDate", s);
6188   }
6189 
6190   /* member "lastDate" */
6191   if (p_struct->lastDate) {
6192     const char *s=GWEN_Date_GetString(p_struct->lastDate);
6193     GWEN_XMLNode_SetCharValue(p_db, "lastDate", s);
6194   }
6195 
6196   /* member "nextDate" */
6197   if (p_struct->nextDate) {
6198     const char *s=GWEN_Date_GetString(p_struct->nextDate);
6199     GWEN_XMLNode_SetCharValue(p_db, "nextDate", s);
6200   }
6201 
6202   /* member "unitId" */
6203   GWEN_XMLNode_SetCharValue(p_db, "unitId", p_struct->unitId);
6204 
6205   /* member "unitIdNameSpace" */
6206   GWEN_XMLNode_SetCharValue(p_db, "unitIdNameSpace", p_struct->unitIdNameSpace);
6207 
6208   /* member "tickerSymbol" */
6209   GWEN_XMLNode_SetCharValue(p_db, "tickerSymbol", p_struct->tickerSymbol);
6210 
6211   /* member "units" */
6212   if (p_struct->units) {
6213     GWEN_BUFFER *tbuf=GWEN_Buffer_new(0, 64, 0, 1);
6214     AB_Value_toString(p_struct->units, tbuf);
6215     GWEN_XMLNode_SetCharValue(p_db, "units", GWEN_Buffer_GetStart(tbuf));
6216     GWEN_Buffer_free(tbuf);
6217   }
6218 
6219   /* member "unitPriceValue" */
6220   if (p_struct->unitPriceValue) {
6221     GWEN_BUFFER *tbuf=GWEN_Buffer_new(0, 64, 0, 1);
6222     AB_Value_toString(p_struct->unitPriceValue, tbuf);
6223     GWEN_XMLNode_SetCharValue(p_db, "unitPriceValue", GWEN_Buffer_GetStart(tbuf));
6224     GWEN_Buffer_free(tbuf);
6225   }
6226 
6227   /* member "unitPriceDate" */
6228   if (p_struct->unitPriceDate) {
6229     const char *s=GWEN_Date_GetString(p_struct->unitPriceDate);
6230     GWEN_XMLNode_SetCharValue(p_db, "unitPriceDate", s);
6231   }
6232 
6233   /* member "commissionValue" */
6234   if (p_struct->commissionValue) {
6235     GWEN_BUFFER *tbuf=GWEN_Buffer_new(0, 64, 0, 1);
6236     AB_Value_toString(p_struct->commissionValue, tbuf);
6237     GWEN_XMLNode_SetCharValue(p_db, "commissionValue", GWEN_Buffer_GetStart(tbuf));
6238     GWEN_Buffer_free(tbuf);
6239   }
6240 
6241   /* member "memo" */
6242   GWEN_XMLNode_SetCharValue(p_db, "memo", p_struct->memo);
6243 
6244   /* member "hash" is volatile, not writing to xml */
6245 
6246 }
6247 
AB_Transaction_toXml(const AB_TRANSACTION * p_struct,GWEN_XMLNODE * p_db)6248 void AB_Transaction_toXml(const AB_TRANSACTION *p_struct, GWEN_XMLNODE *p_db)
6249 {
6250   AB_Transaction_WriteXml(p_struct, p_db);
6251 }
6252 
AB_Transaction_fromXml(GWEN_XMLNODE * p_db)6253 AB_TRANSACTION *AB_Transaction_fromXml(GWEN_XMLNODE *p_db)
6254 {
6255   AB_TRANSACTION *p_struct;
6256   p_struct=AB_Transaction_new();
6257   AB_Transaction_ReadXml(p_struct, p_db);
6258   return p_struct;
6259 }
6260 
AB_Transaction_List_GetByUniqueId(const AB_TRANSACTION_LIST * p_list,uint32_t p_cmp)6261 AB_TRANSACTION *AB_Transaction_List_GetByUniqueId(const AB_TRANSACTION_LIST *p_list, uint32_t p_cmp)
6262 {
6263   AB_TRANSACTION *p_struct;
6264 
6265   assert(p_list);
6266   p_struct = AB_Transaction_List_First(p_list);
6267   while (p_struct) {
6268     int p_rv;
6269 
6270     if (p_struct->uniqueId==p_cmp)
6271       p_rv=0;
6272     else if (p_cmp<p_struct->uniqueId)
6273       p_rv=-1;
6274     else
6275       p_rv=1;
6276     if (p_rv == 0)
6277       return p_struct;
6278     p_struct = AB_Transaction_List_Next(p_struct);
6279   }
6280   return NULL;
6281 }
6282 
AB_Transaction_List_GetByIdForApplication(const AB_TRANSACTION_LIST * p_list,uint32_t p_cmp)6283 AB_TRANSACTION *AB_Transaction_List_GetByIdForApplication(const AB_TRANSACTION_LIST *p_list, uint32_t p_cmp)
6284 {
6285   AB_TRANSACTION *p_struct;
6286 
6287   assert(p_list);
6288   p_struct = AB_Transaction_List_First(p_list);
6289   while (p_struct) {
6290     int p_rv;
6291 
6292     if (p_struct->idForApplication==p_cmp)
6293       p_rv=0;
6294     else if (p_cmp<p_struct->idForApplication)
6295       p_rv=-1;
6296     else
6297       p_rv=1;
6298     if (p_rv == 0)
6299       return p_struct;
6300     p_struct = AB_Transaction_List_Next(p_struct);
6301   }
6302   return NULL;
6303 }
6304 
AB_Transaction_List_GetByStringIdForApplication(const AB_TRANSACTION_LIST * p_list,const char * p_cmp)6305 AB_TRANSACTION *AB_Transaction_List_GetByStringIdForApplication(const AB_TRANSACTION_LIST *p_list,  const char *p_cmp)
6306 {
6307   AB_TRANSACTION *p_struct;
6308 
6309   assert(p_list);
6310   p_struct = AB_Transaction_List_First(p_list);
6311   while (p_struct) {
6312     int p_rv;
6313 
6314     if (p_struct->stringIdForApplication && p_cmp)
6315       p_rv=strcasecmp(p_cmp, p_struct->stringIdForApplication);
6316     else if (p_cmp)
6317       p_rv=1;
6318     else if (p_struct->stringIdForApplication)
6319       p_rv=-1;
6320     else
6321       p_rv=0;
6322     if (p_rv == 0)
6323       return p_struct;
6324     p_struct = AB_Transaction_List_Next(p_struct);
6325   }
6326   return NULL;
6327 }
6328 
AB_Transaction_toHashString(const AB_TRANSACTION * p_struct,GWEN_BUFFER * p_buffer)6329 void AB_Transaction_toHashString(const AB_TRANSACTION *p_struct, GWEN_BUFFER *p_buffer)
6330 {
6331   assert(p_struct);
6332   /* member "type" */
6333   {
6334     char numbuf[32];
6335     snprintf(numbuf, sizeof(numbuf)-1, "%d", p_struct->type);
6336     numbuf[sizeof(numbuf)-1]=0;
6337     GWEN_Buffer_AppendString(p_buffer, numbuf);
6338   }
6339   GWEN_Buffer_AppendByte(p_buffer, ':');
6340   /* member "subType" */
6341   {
6342     char numbuf[32];
6343     snprintf(numbuf, sizeof(numbuf)-1, "%d", p_struct->subType);
6344     numbuf[sizeof(numbuf)-1]=0;
6345     GWEN_Buffer_AppendString(p_buffer, numbuf);
6346   }
6347   GWEN_Buffer_AppendByte(p_buffer, ':');
6348   /* member "command" */
6349   {
6350     char numbuf[32];
6351     snprintf(numbuf, sizeof(numbuf)-1, "%d", p_struct->command);
6352     numbuf[sizeof(numbuf)-1]=0;
6353     GWEN_Buffer_AppendString(p_buffer, numbuf);
6354   }
6355   GWEN_Buffer_AppendByte(p_buffer, ':');
6356   /* member "status" */
6357   {
6358     char numbuf[32];
6359     snprintf(numbuf, sizeof(numbuf)-1, "%d", p_struct->status);
6360     numbuf[sizeof(numbuf)-1]=0;
6361     GWEN_Buffer_AppendString(p_buffer, numbuf);
6362   }
6363   GWEN_Buffer_AppendByte(p_buffer, ':');
6364   /* member "uniqueAccountId" */
6365   {
6366     char numbuf[32];
6367     snprintf(numbuf, sizeof(numbuf)-1, "%d", p_struct->uniqueAccountId);
6368     numbuf[sizeof(numbuf)-1]=0;
6369     GWEN_Buffer_AppendString(p_buffer, numbuf);
6370   }
6371   GWEN_Buffer_AppendByte(p_buffer, ':');
6372   /* member "uniqueId" */
6373   {
6374     char numbuf[32];
6375     snprintf(numbuf, sizeof(numbuf)-1, "%d", p_struct->uniqueId);
6376     numbuf[sizeof(numbuf)-1]=0;
6377     GWEN_Buffer_AppendString(p_buffer, numbuf);
6378   }
6379   GWEN_Buffer_AppendByte(p_buffer, ':');
6380   /* member "refUniqueId" */
6381   {
6382     char numbuf[32];
6383     snprintf(numbuf, sizeof(numbuf)-1, "%d", p_struct->refUniqueId);
6384     numbuf[sizeof(numbuf)-1]=0;
6385     GWEN_Buffer_AppendString(p_buffer, numbuf);
6386   }
6387   GWEN_Buffer_AppendByte(p_buffer, ':');
6388   /* member "idForApplication" */
6389   {
6390     char numbuf[32];
6391     snprintf(numbuf, sizeof(numbuf)-1, "%d", p_struct->idForApplication);
6392     numbuf[sizeof(numbuf)-1]=0;
6393     GWEN_Buffer_AppendString(p_buffer, numbuf);
6394   }
6395   GWEN_Buffer_AppendByte(p_buffer, ':');
6396   /* member "stringIdForApplication" */
6397   if (p_struct->stringIdForApplication)
6398     GWEN_Buffer_AppendString(p_buffer, p_struct->stringIdForApplication);
6399   GWEN_Buffer_AppendByte(p_buffer, ':');
6400   /* member "sessionId" */
6401   {
6402     char numbuf[32];
6403     snprintf(numbuf, sizeof(numbuf)-1, "%d", p_struct->sessionId);
6404     numbuf[sizeof(numbuf)-1]=0;
6405     GWEN_Buffer_AppendString(p_buffer, numbuf);
6406   }
6407   GWEN_Buffer_AppendByte(p_buffer, ':');
6408   /* member "groupId" */
6409   {
6410     char numbuf[32];
6411     snprintf(numbuf, sizeof(numbuf)-1, "%d", p_struct->groupId);
6412     numbuf[sizeof(numbuf)-1]=0;
6413     GWEN_Buffer_AppendString(p_buffer, numbuf);
6414   }
6415   GWEN_Buffer_AppendByte(p_buffer, ':');
6416   /* member "fiId" */
6417   if (p_struct->fiId)
6418     GWEN_Buffer_AppendString(p_buffer, p_struct->fiId);
6419   GWEN_Buffer_AppendByte(p_buffer, ':');
6420   /* member "localIban" */
6421   if (p_struct->localIban)
6422     GWEN_Buffer_AppendString(p_buffer, p_struct->localIban);
6423   GWEN_Buffer_AppendByte(p_buffer, ':');
6424   /* member "localBic" */
6425   if (p_struct->localBic)
6426     GWEN_Buffer_AppendString(p_buffer, p_struct->localBic);
6427   GWEN_Buffer_AppendByte(p_buffer, ':');
6428   /* member "localCountry" */
6429   if (p_struct->localCountry)
6430     GWEN_Buffer_AppendString(p_buffer, p_struct->localCountry);
6431   GWEN_Buffer_AppendByte(p_buffer, ':');
6432   /* member "localBankCode" */
6433   if (p_struct->localBankCode)
6434     GWEN_Buffer_AppendString(p_buffer, p_struct->localBankCode);
6435   GWEN_Buffer_AppendByte(p_buffer, ':');
6436   /* member "localBranchId" */
6437   if (p_struct->localBranchId)
6438     GWEN_Buffer_AppendString(p_buffer, p_struct->localBranchId);
6439   GWEN_Buffer_AppendByte(p_buffer, ':');
6440   /* member "localAccountNumber" */
6441   if (p_struct->localAccountNumber)
6442     GWEN_Buffer_AppendString(p_buffer, p_struct->localAccountNumber);
6443   GWEN_Buffer_AppendByte(p_buffer, ':');
6444   /* member "localSuffix" */
6445   if (p_struct->localSuffix)
6446     GWEN_Buffer_AppendString(p_buffer, p_struct->localSuffix);
6447   GWEN_Buffer_AppendByte(p_buffer, ':');
6448   /* member "localName" */
6449   if (p_struct->localName)
6450     GWEN_Buffer_AppendString(p_buffer, p_struct->localName);
6451   GWEN_Buffer_AppendByte(p_buffer, ':');
6452   /* member "remoteCountry" */
6453   if (p_struct->remoteCountry)
6454     GWEN_Buffer_AppendString(p_buffer, p_struct->remoteCountry);
6455   GWEN_Buffer_AppendByte(p_buffer, ':');
6456   /* member "remoteBankCode" */
6457   if (p_struct->remoteBankCode)
6458     GWEN_Buffer_AppendString(p_buffer, p_struct->remoteBankCode);
6459   GWEN_Buffer_AppendByte(p_buffer, ':');
6460   /* member "remoteBranchId" */
6461   if (p_struct->remoteBranchId)
6462     GWEN_Buffer_AppendString(p_buffer, p_struct->remoteBranchId);
6463   GWEN_Buffer_AppendByte(p_buffer, ':');
6464   /* member "remoteAccountNumber" */
6465   if (p_struct->remoteAccountNumber)
6466     GWEN_Buffer_AppendString(p_buffer, p_struct->remoteAccountNumber);
6467   GWEN_Buffer_AppendByte(p_buffer, ':');
6468   /* member "remoteSuffix" */
6469   if (p_struct->remoteSuffix)
6470     GWEN_Buffer_AppendString(p_buffer, p_struct->remoteSuffix);
6471   GWEN_Buffer_AppendByte(p_buffer, ':');
6472   /* member "remoteIban" */
6473   if (p_struct->remoteIban)
6474     GWEN_Buffer_AppendString(p_buffer, p_struct->remoteIban);
6475   GWEN_Buffer_AppendByte(p_buffer, ':');
6476   /* member "remoteBic" */
6477   if (p_struct->remoteBic)
6478     GWEN_Buffer_AppendString(p_buffer, p_struct->remoteBic);
6479   GWEN_Buffer_AppendByte(p_buffer, ':');
6480   /* member "remoteName" */
6481   if (p_struct->remoteName)
6482     GWEN_Buffer_AppendString(p_buffer, p_struct->remoteName);
6483   GWEN_Buffer_AppendByte(p_buffer, ':');
6484   /* member "date" */
6485   if (p_struct->date)
6486     GWEN_Buffer_AppendString(p_buffer, GWEN_Date_GetString(p_struct->date));
6487   GWEN_Buffer_AppendByte(p_buffer, ':');
6488   /* member "valutaDate" */
6489   if (p_struct->valutaDate)
6490     GWEN_Buffer_AppendString(p_buffer, GWEN_Date_GetString(p_struct->valutaDate));
6491   GWEN_Buffer_AppendByte(p_buffer, ':');
6492   /* member "value" */
6493   if (p_struct->value) {
6494     double d=AB_Value_GetValueAsDouble(p_struct->value);
6495     char numbuf[32];
6496     snprintf(numbuf, sizeof(numbuf)-1, "%.4f", d);
6497     numbuf[sizeof(numbuf)-1]=0;
6498     GWEN_Buffer_AppendString(p_buffer, numbuf);
6499   }
6500   GWEN_Buffer_AppendByte(p_buffer, ':');
6501   /* member "fees" */
6502   if (p_struct->fees) {
6503     double d=AB_Value_GetValueAsDouble(p_struct->fees);
6504     char numbuf[32];
6505     snprintf(numbuf, sizeof(numbuf)-1, "%.4f", d);
6506     numbuf[sizeof(numbuf)-1]=0;
6507     GWEN_Buffer_AppendString(p_buffer, numbuf);
6508   }
6509   GWEN_Buffer_AppendByte(p_buffer, ':');
6510   /* member "transactionCode" */
6511   {
6512     char numbuf[32];
6513     snprintf(numbuf, sizeof(numbuf)-1, "%d", p_struct->transactionCode);
6514     numbuf[sizeof(numbuf)-1]=0;
6515     GWEN_Buffer_AppendString(p_buffer, numbuf);
6516   }
6517   GWEN_Buffer_AppendByte(p_buffer, ':');
6518   /* member "transactionText" */
6519   if (p_struct->transactionText)
6520     GWEN_Buffer_AppendString(p_buffer, p_struct->transactionText);
6521   GWEN_Buffer_AppendByte(p_buffer, ':');
6522   /* member "transactionKey" */
6523   if (p_struct->transactionKey)
6524     GWEN_Buffer_AppendString(p_buffer, p_struct->transactionKey);
6525   GWEN_Buffer_AppendByte(p_buffer, ':');
6526   /* member "textKey" */
6527   {
6528     char numbuf[32];
6529     snprintf(numbuf, sizeof(numbuf)-1, "%d", p_struct->textKey);
6530     numbuf[sizeof(numbuf)-1]=0;
6531     GWEN_Buffer_AppendString(p_buffer, numbuf);
6532   }
6533   GWEN_Buffer_AppendByte(p_buffer, ':');
6534   /* member "primanota" */
6535   if (p_struct->primanota)
6536     GWEN_Buffer_AppendString(p_buffer, p_struct->primanota);
6537   GWEN_Buffer_AppendByte(p_buffer, ':');
6538   /* member "purpose" */
6539   if (p_struct->purpose)
6540     GWEN_Buffer_AppendString(p_buffer, p_struct->purpose);
6541   GWEN_Buffer_AppendByte(p_buffer, ':');
6542   /* member "category" */
6543   if (p_struct->category)
6544     GWEN_Buffer_AppendString(p_buffer, p_struct->category);
6545   GWEN_Buffer_AppendByte(p_buffer, ':');
6546   /* member "customerReference" */
6547   if (p_struct->customerReference)
6548     GWEN_Buffer_AppendString(p_buffer, p_struct->customerReference);
6549   GWEN_Buffer_AppendByte(p_buffer, ':');
6550   /* member "bankReference" */
6551   if (p_struct->bankReference)
6552     GWEN_Buffer_AppendString(p_buffer, p_struct->bankReference);
6553   GWEN_Buffer_AppendByte(p_buffer, ':');
6554   /* member "endToEndReference" */
6555   if (p_struct->endToEndReference)
6556     GWEN_Buffer_AppendString(p_buffer, p_struct->endToEndReference);
6557   GWEN_Buffer_AppendByte(p_buffer, ':');
6558   /* member "ultimateCreditor" */
6559   if (p_struct->ultimateCreditor)
6560     GWEN_Buffer_AppendString(p_buffer, p_struct->ultimateCreditor);
6561   GWEN_Buffer_AppendByte(p_buffer, ':');
6562   /* member "ultimateDebtor" */
6563   if (p_struct->ultimateDebtor)
6564     GWEN_Buffer_AppendString(p_buffer, p_struct->ultimateDebtor);
6565   GWEN_Buffer_AppendByte(p_buffer, ':');
6566   /* member "creditorSchemeId" */
6567   if (p_struct->creditorSchemeId)
6568     GWEN_Buffer_AppendString(p_buffer, p_struct->creditorSchemeId);
6569   GWEN_Buffer_AppendByte(p_buffer, ':');
6570   /* member "originatorId" */
6571   if (p_struct->originatorId)
6572     GWEN_Buffer_AppendString(p_buffer, p_struct->originatorId);
6573   GWEN_Buffer_AppendByte(p_buffer, ':');
6574   /* member "mandateId" */
6575   if (p_struct->mandateId)
6576     GWEN_Buffer_AppendString(p_buffer, p_struct->mandateId);
6577   GWEN_Buffer_AppendByte(p_buffer, ':');
6578   /* member "mandateDate" */
6579   if (p_struct->mandateDate)
6580     GWEN_Buffer_AppendString(p_buffer, GWEN_Date_GetString(p_struct->mandateDate));
6581   GWEN_Buffer_AppendByte(p_buffer, ':');
6582   /* member "mandateDebitorName" */
6583   if (p_struct->mandateDebitorName)
6584     GWEN_Buffer_AppendString(p_buffer, p_struct->mandateDebitorName);
6585   GWEN_Buffer_AppendByte(p_buffer, ':');
6586   /* member "originalCreditorSchemeId" */
6587   if (p_struct->originalCreditorSchemeId)
6588     GWEN_Buffer_AppendString(p_buffer, p_struct->originalCreditorSchemeId);
6589   GWEN_Buffer_AppendByte(p_buffer, ':');
6590   /* member "originalMandateId" */
6591   if (p_struct->originalMandateId)
6592     GWEN_Buffer_AppendString(p_buffer, p_struct->originalMandateId);
6593   GWEN_Buffer_AppendByte(p_buffer, ':');
6594   /* member "originalCreditorName" */
6595   if (p_struct->originalCreditorName)
6596     GWEN_Buffer_AppendString(p_buffer, p_struct->originalCreditorName);
6597   GWEN_Buffer_AppendByte(p_buffer, ':');
6598   /* member "sequence" */
6599   {
6600     char numbuf[32];
6601     snprintf(numbuf, sizeof(numbuf)-1, "%d", p_struct->sequence);
6602     numbuf[sizeof(numbuf)-1]=0;
6603     GWEN_Buffer_AppendString(p_buffer, numbuf);
6604   }
6605   GWEN_Buffer_AppendByte(p_buffer, ':');
6606   /* member "charge" */
6607   {
6608     char numbuf[32];
6609     snprintf(numbuf, sizeof(numbuf)-1, "%d", p_struct->charge);
6610     numbuf[sizeof(numbuf)-1]=0;
6611     GWEN_Buffer_AppendString(p_buffer, numbuf);
6612   }
6613   GWEN_Buffer_AppendByte(p_buffer, ':');
6614   /* member "remoteAddrStreet" */
6615   if (p_struct->remoteAddrStreet)
6616     GWEN_Buffer_AppendString(p_buffer, p_struct->remoteAddrStreet);
6617   GWEN_Buffer_AppendByte(p_buffer, ':');
6618   /* member "remoteAddrZipcode" */
6619   if (p_struct->remoteAddrZipcode)
6620     GWEN_Buffer_AppendString(p_buffer, p_struct->remoteAddrZipcode);
6621   GWEN_Buffer_AppendByte(p_buffer, ':');
6622   /* member "remoteAddrCity" */
6623   if (p_struct->remoteAddrCity)
6624     GWEN_Buffer_AppendString(p_buffer, p_struct->remoteAddrCity);
6625   GWEN_Buffer_AppendByte(p_buffer, ':');
6626   /* member "remoteAddrPhone" */
6627   if (p_struct->remoteAddrPhone)
6628     GWEN_Buffer_AppendString(p_buffer, p_struct->remoteAddrPhone);
6629   GWEN_Buffer_AppendByte(p_buffer, ':');
6630   /* member "period" */
6631   {
6632     char numbuf[32];
6633     snprintf(numbuf, sizeof(numbuf)-1, "%d", p_struct->period);
6634     numbuf[sizeof(numbuf)-1]=0;
6635     GWEN_Buffer_AppendString(p_buffer, numbuf);
6636   }
6637   GWEN_Buffer_AppendByte(p_buffer, ':');
6638   /* member "cycle" */
6639   {
6640     char numbuf[32];
6641     snprintf(numbuf, sizeof(numbuf)-1, "%d", p_struct->cycle);
6642     numbuf[sizeof(numbuf)-1]=0;
6643     GWEN_Buffer_AppendString(p_buffer, numbuf);
6644   }
6645   GWEN_Buffer_AppendByte(p_buffer, ':');
6646   /* member "executionDay" */
6647   {
6648     char numbuf[32];
6649     snprintf(numbuf, sizeof(numbuf)-1, "%d", p_struct->executionDay);
6650     numbuf[sizeof(numbuf)-1]=0;
6651     GWEN_Buffer_AppendString(p_buffer, numbuf);
6652   }
6653   GWEN_Buffer_AppendByte(p_buffer, ':');
6654   /* member "firstDate" */
6655   if (p_struct->firstDate)
6656     GWEN_Buffer_AppendString(p_buffer, GWEN_Date_GetString(p_struct->firstDate));
6657   GWEN_Buffer_AppendByte(p_buffer, ':');
6658   /* member "lastDate" */
6659   if (p_struct->lastDate)
6660     GWEN_Buffer_AppendString(p_buffer, GWEN_Date_GetString(p_struct->lastDate));
6661   GWEN_Buffer_AppendByte(p_buffer, ':');
6662   /* member "nextDate" */
6663   if (p_struct->nextDate)
6664     GWEN_Buffer_AppendString(p_buffer, GWEN_Date_GetString(p_struct->nextDate));
6665   GWEN_Buffer_AppendByte(p_buffer, ':');
6666   /* member "unitId" */
6667   if (p_struct->unitId)
6668     GWEN_Buffer_AppendString(p_buffer, p_struct->unitId);
6669   GWEN_Buffer_AppendByte(p_buffer, ':');
6670   /* member "unitIdNameSpace" */
6671   if (p_struct->unitIdNameSpace)
6672     GWEN_Buffer_AppendString(p_buffer, p_struct->unitIdNameSpace);
6673   GWEN_Buffer_AppendByte(p_buffer, ':');
6674   /* member "tickerSymbol" */
6675   if (p_struct->tickerSymbol)
6676     GWEN_Buffer_AppendString(p_buffer, p_struct->tickerSymbol);
6677   GWEN_Buffer_AppendByte(p_buffer, ':');
6678   /* member "units" */
6679   if (p_struct->units) {
6680     double d=AB_Value_GetValueAsDouble(p_struct->units);
6681     char numbuf[32];
6682     snprintf(numbuf, sizeof(numbuf)-1, "%.4f", d);
6683     numbuf[sizeof(numbuf)-1]=0;
6684     GWEN_Buffer_AppendString(p_buffer, numbuf);
6685   }
6686   GWEN_Buffer_AppendByte(p_buffer, ':');
6687   /* member "unitPriceValue" */
6688   if (p_struct->unitPriceValue) {
6689     double d=AB_Value_GetValueAsDouble(p_struct->unitPriceValue);
6690     char numbuf[32];
6691     snprintf(numbuf, sizeof(numbuf)-1, "%.4f", d);
6692     numbuf[sizeof(numbuf)-1]=0;
6693     GWEN_Buffer_AppendString(p_buffer, numbuf);
6694   }
6695   GWEN_Buffer_AppendByte(p_buffer, ':');
6696   /* member "unitPriceDate" */
6697   if (p_struct->unitPriceDate)
6698     GWEN_Buffer_AppendString(p_buffer, GWEN_Date_GetString(p_struct->unitPriceDate));
6699   GWEN_Buffer_AppendByte(p_buffer, ':');
6700   /* member "commissionValue" */
6701   if (p_struct->commissionValue) {
6702     double d=AB_Value_GetValueAsDouble(p_struct->commissionValue);
6703     char numbuf[32];
6704     snprintf(numbuf, sizeof(numbuf)-1, "%.4f", d);
6705     numbuf[sizeof(numbuf)-1]=0;
6706     GWEN_Buffer_AppendString(p_buffer, numbuf);
6707   }
6708   GWEN_Buffer_AppendByte(p_buffer, ':');
6709   /* member "memo" */
6710   if (p_struct->memo)
6711     GWEN_Buffer_AppendString(p_buffer, p_struct->memo);
6712   GWEN_Buffer_AppendByte(p_buffer, ':');
6713   /* member "hash" does not have the with_hash flag, ignoring */
6714 }
6715 
AB_Transaction_GenerateHash(AB_TRANSACTION * st)6716 int AB_Transaction_GenerateHash(AB_TRANSACTION *st)
6717 {
6718   GWEN_BUFFER *buf;
6719   int rv;
6720   GWEN_MDIGEST *md;
6721   assert(st);
6722   buf=GWEN_Buffer_new(0, 256, 0, 1);
6723   AB_Transaction_toHashString(st, buf);
6724   md=GWEN_MDigest_Rmd160_new();
6725   rv=GWEN_MDigest_Begin(md);
6726   if (rv<0) {
6727     DBG_INFO(AQBANKING_LOGDOMAIN, "here (%d)", rv);
6728     GWEN_MDigest_free(md);
6729     GWEN_Buffer_free(buf);
6730     return rv;
6731   }
6732   rv=GWEN_MDigest_Update(md, (const uint8_t *)GWEN_Buffer_GetStart(buf), GWEN_Buffer_GetUsedBytes(buf));
6733   if (rv<0) {
6734     DBG_INFO(AQBANKING_LOGDOMAIN, "here (%d)", rv);
6735     GWEN_MDigest_free(md);
6736     GWEN_Buffer_free(buf);
6737     return rv;
6738   }
6739   rv=GWEN_MDigest_End(md);
6740   if (rv<0) {
6741     DBG_INFO(AQBANKING_LOGDOMAIN, "here (%d)", rv);
6742     GWEN_MDigest_free(md);
6743     GWEN_Buffer_free(buf);
6744     return rv;
6745   }
6746   GWEN_Buffer_Reset(buf);
6747   rv=GWEN_Text_ToHexBuffer((const char *)GWEN_MDigest_GetDigestPtr(md), GWEN_MDigest_GetDigestSize(md), buf, 0, 0, 0);
6748   if (rv<0) {
6749     DBG_INFO(AQBANKING_LOGDOMAIN, "here (%d)", rv);
6750     GWEN_MDigest_free(md);
6751     GWEN_Buffer_free(buf);
6752     return rv;
6753   }
6754   GWEN_MDigest_free(md);
6755   AB_Transaction_SetHash(st, GWEN_Buffer_GetStart(buf));
6756   GWEN_Buffer_free(buf);
6757   return 0;
6758 }
AB_Transaction_MatchTypeAndCommand(const AB_TRANSACTION * t,int ty,int cmd)6759 int AB_Transaction_MatchTypeAndCommand(const AB_TRANSACTION *t, int ty, int cmd)
6760 {
6761   int match=1;
6762   if (match) {
6763     if ((ty > AB_Transaction_TypeNone) && (t->type!=ty)) {
6764       return 0;
6765     }
6766   }
6767   if (match) {
6768     if ((cmd > AB_Transaction_CommandNone) && (t->command!=cmd)) {
6769       return 0;
6770     }
6771   }
6772   if (match) {
6773     if ((cmd < AB_Transaction_CommandNone) && (t->command <= AB_Transaction_CommandNone)) {
6774       return 0;
6775     }
6776   } /* matches */ return 1;
6777 }
AB_Transaction_List_FindFirstByType(const AB_TRANSACTION_LIST * tl,int ty,int cmd)6778 AB_TRANSACTION *AB_Transaction_List_FindFirstByType(const AB_TRANSACTION_LIST *tl, int ty, int cmd)
6779 {
6780   if (tl) {
6781     AB_TRANSACTION *t;
6782     t=AB_Transaction_List_First(tl);
6783     while (t) {
6784       if (AB_Transaction_MatchTypeAndCommand(t, ty, cmd))
6785         return t;
6786       t=AB_Transaction_List_Next(t);
6787     }
6788   }
6789   return NULL;
6790 }
AB_Transaction_List_FindNextByType(const AB_TRANSACTION * tPrev,int ty,int cmd)6791 AB_TRANSACTION *AB_Transaction_List_FindNextByType(const AB_TRANSACTION *tPrev, int ty, int cmd)
6792 {
6793   if (tPrev) {
6794     AB_TRANSACTION *t;
6795     t=AB_Transaction_List_Next(tPrev);
6796     while (t) {
6797       if (AB_Transaction_MatchTypeAndCommand(t, ty, cmd))
6798         return t;
6799       t=AB_Transaction_List_Next(t);
6800     }
6801   }
6802   return NULL;
6803 }
AB_Transaction_List_RemoveByType(AB_TRANSACTION_LIST * tl,int ty,int cmd)6804 int AB_Transaction_List_RemoveByType(AB_TRANSACTION_LIST *tl, int ty, int cmd)
6805 {
6806   int cntRemoved=0;
6807   if (tl) {
6808     AB_TRANSACTION *t;
6809     t=AB_Transaction_List_First(tl);
6810     while (t) {
6811       AB_TRANSACTION *tNext;
6812       tNext=AB_Transaction_List_Next(t);
6813       if (AB_Transaction_MatchTypeAndCommand(t, ty, cmd)) {
6814         AB_Transaction_List_Del(t);
6815         AB_Transaction_free(t);
6816         cntRemoved++;
6817       }
6818       t=tNext;
6819     }
6820   }
6821   return cntRemoved;
6822 }
AB_Transaction_List_KeepByType(AB_TRANSACTION_LIST * tl,int ty,int cmd)6823 int AB_Transaction_List_KeepByType(AB_TRANSACTION_LIST *tl, int ty, int cmd)
6824 {
6825   int cntRemoved=0;
6826   if (tl) {
6827     AB_TRANSACTION *t;
6828     t=AB_Transaction_List_First(tl);
6829     while (t) {
6830       AB_TRANSACTION *tNext;
6831       tNext=AB_Transaction_List_Next(t);
6832       if (! AB_Transaction_MatchTypeAndCommand(t, ty, cmd)) {
6833         AB_Transaction_List_Del(t);
6834         AB_Transaction_free(t);
6835         cntRemoved++;
6836       }
6837       t=tNext;
6838     }
6839   }
6840   return cntRemoved;
6841 }
AB_Transaction_List_CountByType(const AB_TRANSACTION_LIST * tl,int ty,int cmd)6842 int AB_Transaction_List_CountByType(const AB_TRANSACTION_LIST *tl, int ty, int cmd)
6843 {
6844   int count=0;
6845   if (tl) {
6846     AB_TRANSACTION *t;
6847     t=AB_Transaction_List_First(tl);
6848     while (t) {
6849       if (AB_Transaction_MatchTypeAndCommand(t, ty, cmd))
6850         count++;
6851       t=AB_Transaction_List_Next(t);
6852     }
6853   }
6854   return count;
6855 }
AB_Transaction_List_ForEachByType(const AB_TRANSACTION_LIST * tl,AB_TRANSACTION_LIST_FOREACHBYTYPE_CB fn,void * user_data,int ty,int cmd)6856 const AB_TRANSACTION *AB_Transaction_List_ForEachByType(const AB_TRANSACTION_LIST *tl,
6857                                                         AB_TRANSACTION_LIST_FOREACHBYTYPE_CB fn, void *user_data, int ty, int cmd)
6858 {
6859   if (tl) {
6860     const AB_TRANSACTION *t;
6861     t=AB_Transaction_List_First(tl);
6862     while (t) {
6863       if (AB_Transaction_MatchTypeAndCommand(t, ty, cmd)) {
6864         const AB_TRANSACTION *tReturned;
6865         tReturned=fn(t, user_data);
6866         if (tReturned)
6867           return tReturned;
6868       }
6869       t=AB_Transaction_List_Next(t);
6870     }
6871   }
6872   return NULL;
6873 }
AB_Transaction_List_FindName(const AB_TRANSACTION_LIST * tl,int ty,const char * ns,const char * n)6874 AB_TRANSACTION *AB_Transaction_List_FindName(const AB_TRANSACTION_LIST *tl, int ty, const char *ns, const char *n)
6875 {
6876   if (tl) {
6877     AB_TRANSACTION *t;
6878     t=AB_Transaction_List_First(tl);
6879     while (t) {
6880       if ((ty==AB_Transaction_TypeNone || AB_Transaction_GetType(t)==ty) && (ns==NULL ||
6881                                                                              0==GWEN_Text_Compare(ns, t->unitIdNameSpace, 1)) && (n==NULL || 0==GWEN_Text_Compare(n, t->unitId, 1)))
6882         return t;
6883       t=AB_Transaction_List_Next(t);
6884     }
6885   }
6886   return NULL;
6887 }
AB_Transaction_List_WriteDb(const AB_TRANSACTION_LIST * tl,GWEN_DB_NODE * db)6888 int AB_Transaction_List_WriteDb(const AB_TRANSACTION_LIST *tl, GWEN_DB_NODE *db)
6889 {
6890   if (tl) {
6891     const AB_TRANSACTION *t;
6892     t=AB_Transaction_List_First(tl);
6893     while (t) {
6894       GWEN_DB_NODE *dbT;
6895       int rv;
6896       dbT=GWEN_DB_Group_new("transaction");
6897       rv=AB_Transaction_WriteDb(t, dbT);
6898       if (rv < 0) {
6899         DBG_ERROR(AQBANKING_LOGDOMAIN, "here (%d)", rv);
6900         GWEN_DB_Group_free(dbT);
6901         return rv;
6902       }
6903       else {
6904         GWEN_DB_AddGroup(db, dbT);
6905       }
6906       t=AB_Transaction_List_Next(t);
6907     }
6908   }
6909   return 0;
6910 }
AB_Transaction_List_ReadDb(AB_TRANSACTION_LIST * tl,GWEN_DB_NODE * db)6911 int AB_Transaction_List_ReadDb(AB_TRANSACTION_LIST *tl, GWEN_DB_NODE *db)
6912 {
6913   if (tl && db) {
6914     GWEN_DB_NODE *dbT;
6915     dbT=GWEN_DB_GetFirstGroup(db);
6916     while (dbT) {
6917       AB_TRANSACTION *t;
6918       t=AB_Transaction_fromDb(dbT);
6919       if (t) {
6920         AB_Transaction_List_Add(t, tl);
6921       }
6922       dbT=GWEN_DB_GetNextGroup(dbT);
6923     }
6924   }
6925   else {
6926     DBG_ERROR(AQBANKING_LOGDOMAIN, "Either list or db missing");
6927     return GWEN_ERROR_INVALID;
6928   }
6929   return 0;
6930 }
AB_Transaction_AddPurposeLine(AB_TRANSACTION * t,const char * s)6931 void AB_Transaction_AddPurposeLine(AB_TRANSACTION *t, const char *s)
6932 {
6933   assert(t);
6934   if (s && *s) {
6935     if (t->purpose && *(t->purpose)) {
6936       GWEN_BUFFER *tbuf;
6937       tbuf=GWEN_Buffer_new(0, 256, 0, 1);
6938       GWEN_Buffer_AppendString(tbuf, t->purpose);
6939       GWEN_Buffer_AppendString(tbuf, "\n");
6940       GWEN_Buffer_AppendString(tbuf, s);
6941       AB_Transaction_SetPurpose(t, GWEN_Buffer_GetStart(tbuf));
6942       GWEN_Buffer_free(tbuf);
6943     }
6944     else
6945       AB_Transaction_SetPurpose(t, s);
6946   }
6947   else {
6948     DBG_ERROR(AQBANKING_LOGDOMAIN, "Not adding empty string");
6949   }
6950 }
AB_Transaction_SetPurposeFromStringList(AB_TRANSACTION * t,const GWEN_STRINGLIST * sl)6951 void AB_Transaction_SetPurposeFromStringList(AB_TRANSACTION *t, const GWEN_STRINGLIST *sl)
6952 {
6953   assert(t);
6954   if (sl) {
6955     GWEN_STRINGLISTENTRY *se;
6956     GWEN_BUFFER *tbuf;
6957     tbuf=GWEN_Buffer_new(0, 256, 0, 1);
6958     se=GWEN_StringList_FirstEntry(sl);
6959     while (se) {
6960       const char *s;
6961       s=GWEN_StringListEntry_Data(se);
6962       if (s && *s) {
6963         if (GWEN_Buffer_GetUsedBytes(tbuf))
6964           GWEN_Buffer_AppendString(tbuf, "\n");
6965         GWEN_Buffer_AppendString(tbuf, s);
6966       }
6967       se=GWEN_StringListEntry_Next(se);
6968     }
6969     AB_Transaction_SetPurpose(t, GWEN_Buffer_GetStart(tbuf));
6970     GWEN_Buffer_free(tbuf);
6971   }
6972   else {
6973     AB_Transaction_SetPurpose(t, NULL);
6974   }
6975 }
AB_Transaction_GetPurposeAsStringList(const AB_TRANSACTION * t)6976 GWEN_STRINGLIST *AB_Transaction_GetPurposeAsStringList(const AB_TRANSACTION *t)
6977 {
6978   const char *s;
6979   assert(t);
6980   s=AB_Transaction_GetPurpose(t);
6981   if (s && *s) {
6982     GWEN_STRINGLIST *stringList;
6983     stringList=GWEN_StringList_fromString(s, "\n", 0);
6984     return stringList;
6985   }
6986   return NULL;
6987 }
AB_Transaction_AddCategory(AB_TRANSACTION * t,const char * s)6988 void AB_Transaction_AddCategory(AB_TRANSACTION *t, const char *s)
6989 {
6990   assert(t);
6991   if (s && *s) {
6992     if (t->category && *(t->category)) {
6993       GWEN_BUFFER *tbuf;
6994       tbuf=GWEN_Buffer_new(0, 256, 0, 1);
6995       GWEN_Buffer_AppendString(tbuf, t->category);
6996       GWEN_Buffer_AppendString(tbuf, "\n");
6997       GWEN_Buffer_AppendString(tbuf, s);
6998       AB_Transaction_SetPurpose(t, GWEN_Buffer_GetStart(tbuf));
6999       GWEN_Buffer_free(tbuf);
7000     }
7001     else
7002       AB_Transaction_SetCategory(t, s);
7003   }
7004   else {
7005     DBG_ERROR(AQBANKING_LOGDOMAIN, "Not adding empty string");
7006   }
7007 }
AB_Transaction_SetCategoryFromStringList(AB_TRANSACTION * t,const GWEN_STRINGLIST * sl)7008 void AB_Transaction_SetCategoryFromStringList(AB_TRANSACTION *t, const GWEN_STRINGLIST *sl)
7009 {
7010   assert(t);
7011   if (sl) {
7012     GWEN_STRINGLISTENTRY *se;
7013     GWEN_BUFFER *tbuf;
7014     tbuf=GWEN_Buffer_new(0, 256, 0, 1);
7015     se=GWEN_StringList_FirstEntry(sl);
7016     while (se) {
7017       const char *s;
7018       s=GWEN_StringListEntry_Data(se);
7019       if (s && *s) {
7020         if (GWEN_Buffer_GetUsedBytes(tbuf))
7021           GWEN_Buffer_AppendString(tbuf, "\n");
7022         GWEN_Buffer_AppendString(tbuf, s);
7023       }
7024       se=GWEN_StringListEntry_Next(se);
7025     }
7026     AB_Transaction_SetCategory(t, GWEN_Buffer_GetStart(tbuf));
7027     GWEN_Buffer_free(tbuf);
7028   }
7029   else {
7030     AB_Transaction_SetCategory(t, NULL);
7031   }
7032 }
AB_Transaction_List2__freeAll_cb(AB_TRANSACTION * t,void * user_data)7033 static AB_TRANSACTION *AB_Transaction_List2__freeAll_cb(AB_TRANSACTION *t, void *user_data)
7034 {
7035   AB_Transaction_free(t);
7036   return NULL;
7037 }
AB_Transaction_List2_freeAll(AB_TRANSACTION_LIST2 * tl)7038 int AB_Transaction_List2_freeAll(AB_TRANSACTION_LIST2 *tl)
7039 {
7040   if (tl) {
7041     AB_Transaction_List2_ForEach(tl, AB_Transaction_List2__freeAll_cb, NULL);
7042     AB_Transaction_List2_free(tl);
7043   }
7044   else {
7045     DBG_ERROR(AQBANKING_LOGDOMAIN, "List missing");
7046     return GWEN_ERROR_INVALID;
7047   }
7048   return 0;
7049 }
7050 
7051 /* code headers */
7052 
7053