Project

General

Profile

Revision f4a16f5b src/libs/aqbanking/types2/balance.xml

View differences:

src/libs/aqbanking/types2/balance.xml
16 16
        with_db
17 17
        with_xml
18 18
        with_refcount
19
        with_list1
19 20
      </flags>
20 21
      
21 22
      <headers>
22 23
        <header type="sys" loc="pre">aqbanking/error.h</header>
23 24
        <header type="sys" loc="pre">gwenhywfar/types.h</header>
24
        <header type="sys" loc="pre">gwenhywfar/gwentime.h</header>
25
        <header type="sys" loc="pre">gwenhywfar/gwendate.h</header>
25 26

  
26 27
        <header type="sys" loc="post">aqbanking/value.h</header>
27 28
      </headers>
......
63 64
          </content>
64 65
        </inline>
65 66

  
67

  
68
        <inline loc="end" access="public">
69
          <typeFlagsMask>with_list1</typeFlagsMask>
70
          <typeFlagsValue>with_list1</typeFlagsValue>
71
          <content>
72
             $(api) AB_BALANCE *$(struct_prefix)_List_FindFirstByType(const $(struct_type)_LIST *bl, int ty);
73
          </content>
74
        </inline>
75

  
76
        <inline loc="code">
77
          <typeFlagsMask>with_list1</typeFlagsMask>
78
          <typeFlagsValue>with_list1</typeFlagsValue>
79
          <content>
80
             AB_BALANCE *$(struct_prefix)_List_FindFirstByType(const $(struct_type)_LIST *bl, int ty) {
81
               AB_BALANCE *bal;
82
               
83
               assert(bl);
84
               bal=AB_Balance_List_First(bl);
85
               while(bal) {
86
                 if (ty==AB_Balance_TypeNone || ty==bal->type)
87
                   return bal;
88
                 bal=AB_Balance_List_Next(bal);
89
               }
90
               
91
               return NULL;
92
             }
93
          </content>
94
        </inline>
95

  
96

  
97
        <inline loc="end" access="public">
98
          <typeFlagsMask>with_list1</typeFlagsMask>
99
          <typeFlagsValue>with_list1</typeFlagsValue>
100
          <content>
101
             $(api) AB_BALANCE *$(struct_prefix)_List_FindNextByType($(struct_type) *bal, int ty);
102
          </content>
103
        </inline>
104

  
105
        <inline loc="code">
106
          <typeFlagsMask>with_list1</typeFlagsMask>
107
          <typeFlagsValue>with_list1</typeFlagsValue>
108
          <content>
109
             AB_BALANCE *$(struct_prefix)_List_FindNextByType($(struct_type) *bal, int ty) {
110
               assert(bal);
111
               bal=AB_Balance_List_Next(bal);
112
               while(bal) {
113
                 if (ty==AB_Balance_TypeNone || ty==bal->type)
114
                   return bal;
115
                 bal=AB_Balance_List_Next(bal);
116
               }
117
               
118
               return NULL;
119
             }
120
          </content>
121
        </inline>
122

  
123

  
124
        <inline loc="end" access="public">
125
          <typeFlagsMask>with_list1</typeFlagsMask>
126
          <typeFlagsValue>with_list1</typeFlagsValue>
127
          <content>
128
             $(api) AB_BALANCE *$(struct_prefix)_List_GetLatestByType(const $(struct_type)_LIST *bl, int ty);
129
          </content>
130
        </inline>
131

  
132
        <inline loc="code">
133
          <typeFlagsMask>with_list1</typeFlagsMask>
134
          <typeFlagsValue>with_list1</typeFlagsValue>
135
          <content>
136
             AB_BALANCE *$(struct_prefix)_List_GetLatestByType(const $(struct_type)_LIST *bl, int ty) {
137
               AB_BALANCE *lastBal=NULL;
138
               const GWEN_DATE *lastDt=NULL;
139
               AB_BALANCE *bal=NULL;
140
             
141
               bal=AB_Balance_List_First(bl);
142
               while(bal) {
143
                 if (ty==0 || (AB_Balance_GetType(bal)==ty)) {
144
                   const GWEN_DATE *dt;
145
             
146
                   if (lastBal && lastDt && (dt=AB_Balance_GetDate(bal))) {
147
                     if (GWEN_Date_Compare(dt, lastDt)>0) {
148
                       lastBal=bal;
149
                       lastDt=dt;
150
                     }
151
                   }
152
                   else {
153
                     lastBal=bal;
154
                     lastDt=AB_Balance_GetDate(bal);
155
                   }
156
                 }
157
                 bal=AB_Balance_List_Next(bal);
158
               }
159

  
160
               return lastBal;
161
             }
162
          </content>
163
        </inline>
164

  
165

  
66 166
      </inlines>
67 167

  
68 168

  
......
70 170

  
71 171
    <enums>
72 172

  
173
      <enum id="AB_BALANCE_TYPE" prefix="AB_Balance_Type" type="AB_BALANCE_TYPE">
174
        <item name="none" value="0"/>
175
        <item name="noted"/>
176
        <item name="booked"/>
177
        <item name="bankLine"/>
178
        <item name="disposable"/>
179
        <item name="temporary"/>
180
      </enum>
181

  
73 182
    </enums>
74 183

  
75 184
    <defines>
......
79 188

  
80 189
    <members>
81 190

  
82
      <member name="time" type="gwen_time" maxlen="32" >
83
        <descr>
84
        </descr>
191
      <member name="date" type="gwen_date" maxlen="16" >
85 192
        <aqdb_type>AQDB_DataType_String</aqdb_type>
86 193
        <access>public</access>
87
        <flags>own</flags>
194
        <flags>own with_hash</flags>
88 195
        <setflags>const dup</setflags>
89 196
        <getflags>const</getflags>
90 197
        <default>NULL</default>
......
102 209
        <preset>NULL</preset>
103 210
      </member>
104 211

  
212
      <member name="type" type="int" maxlen="32" enum="AB_BALANCE_TYPE" >
213
        <default>AB_Balance_TypeUnknown</default>
214
        <preset>AB_Balance_TypeUnknown</preset>
215
        <access>public</access>
216
        <flags>enum with_getbymember</flags>
217
        <setflags>none</setflags>
218
        <getflags>none</getflags>
219
      </member>
220

  
105 221
    </members>
106 222

  
107 223
    

Also available in: Unified diff