1 /********************************************************** 2 * This file has been automatically created by "typemaker2" 3 * from the file "element.xml". 4 * Please do not edit this file, all changes will be lost. 5 * Better edit the mentioned source file instead. 6 **********************************************************/ 7 8 #ifndef AQFINTS_ELEMENT_ELEMENT_H 9 #define AQFINTS_ELEMENT_ELEMENT_H 10 11 12 #ifdef __cplusplus 13 extern "C" { 14 #endif 15 16 /** @page P_AQFINTS_ELEMENT Structure AQFINTS_ELEMENT 17 <p>This page describes the properties of AQFINTS_ELEMENT.</p> 18 19 20 21 <h1>AQFINTS_ELEMENT</h1> 22 23 24 25 @anchor AQFINTS_ELEMENT_flags 26 <h2>flags</h2> 27 28 <p>Set this property with @ref AQFINTS_Element_SetFlags(), get it with @ref AQFINTS_Element_GetFlags().</p> 29 30 31 @anchor AQFINTS_ELEMENT_elementType 32 <h2>elementType</h2> 33 34 <p>Set this property with @ref AQFINTS_Element_SetElementType(), get it with @ref AQFINTS_Element_GetElementType().</p> 35 36 37 @anchor AQFINTS_ELEMENT_id 38 <h2>id</h2> 39 40 <p>Set this property with @ref AQFINTS_Element_SetId(), get it with @ref AQFINTS_Element_GetId().</p> 41 42 43 @anchor AQFINTS_ELEMENT_name 44 <h2>name</h2> 45 46 <p>Set this property with @ref AQFINTS_Element_SetName(), get it with @ref AQFINTS_Element_GetName().</p> 47 48 49 @anchor AQFINTS_ELEMENT_version 50 <h2>version</h2> 51 52 <p>Set this property with @ref AQFINTS_Element_SetVersion(), get it with @ref AQFINTS_Element_GetVersion().</p> 53 54 55 @anchor AQFINTS_ELEMENT_type 56 <h2>type</h2> 57 58 <p>Set this property with @ref AQFINTS_Element_SetType(), get it with @ref AQFINTS_Element_GetType().</p> 59 60 61 @anchor AQFINTS_ELEMENT_minNum 62 <h2>minNum</h2> 63 64 <p>Set this property with @ref AQFINTS_Element_SetMinNum(), get it with @ref AQFINTS_Element_GetMinNum().</p> 65 66 67 @anchor AQFINTS_ELEMENT_maxNum 68 <h2>maxNum</h2> 69 70 <p>Set this property with @ref AQFINTS_Element_SetMaxNum(), get it with @ref AQFINTS_Element_GetMaxNum().</p> 71 72 73 @anchor AQFINTS_ELEMENT_minSize 74 <h2>minSize</h2> 75 76 <p>Set this property with @ref AQFINTS_Element_SetMinSize(), get it with @ref AQFINTS_Element_GetMinSize().</p> 77 78 79 @anchor AQFINTS_ELEMENT_maxSize 80 <h2>maxSize</h2> 81 82 <p>Set this property with @ref AQFINTS_Element_SetMaxSize(), get it with @ref AQFINTS_Element_GetMaxSize().</p> 83 84 85 @anchor AQFINTS_ELEMENT_trustLevel 86 <h2>trustLevel</h2> 87 88 <p>Set this property with @ref AQFINTS_Element_SetTrustLevel(), get it with @ref AQFINTS_Element_GetTrustLevel().</p> 89 90 91 @anchor AQFINTS_ELEMENT_data 92 <h2>data</h2> 93 94 <p>Set this property with @ref AQFINTS_Element_SetData(), get it with @ref AQFINTS_Element_GetData().</p> 95 96 97 @anchor AQFINTS_ELEMENT_runtimeFlags 98 <h2>runtimeFlags</h2> 99 100 <p>Set this property with @ref AQFINTS_Element_SetRuntimeFlags(), get it with @ref AQFINTS_Element_GetRuntimeFlags().</p> 101 102 */ 103 104 /* define AQFINTS_ELEMENT_RTFLAGS */ 105 106 107 /* define AQFINTS_ELEMENT_FLAGS */ 108 #define AQFINTS_ELEMENT_FLAGS_ISBIN 0x00000001 109 #define AQFINTS_ELEMENT_FLAGS_LEFTFILL 0x00000002 110 #define AQFINTS_ELEMENT_FLAGS_RIGHTFILL 0x00000004 111 112 113 /* needed system headers */ 114 #include <gwenhywfar/types.h> 115 #include <gwenhywfar/tree2.h> 116 #include <gwenhywfar/db.h> 117 118 /* pre-headers */ 119 #include <libaqfints/aqfints.h> 120 #include <gwenhywfar/bindata.h> 121 122 typedef struct AQFINTS_ELEMENT AQFINTS_ELEMENT; 123 GWEN_TREE2_FUNCTION_DEFS(AQFINTS_ELEMENT, AQFINTS_Element) 124 125 126 127 typedef enum { 128 AQFINTS_ElementType_Unknown = -1, 129 AQFINTS_ElementType_Root, 130 AQFINTS_ElementType_Group, 131 AQFINTS_ElementType_De, 132 AQFINTS_ElementType_Deg 133 } AQFINTS_ELEMENT_TYPE; 134 135 136 typedef enum { 137 AQFINTS_ElementDataType_Unknown = -1, 138 AQFINTS_ElementDataType_Int, 139 AQFINTS_ElementDataType_Char, 140 AQFINTS_ElementDataType_Bin 141 } AQFINTS_ELEMENT_DATATYPE; 142 143 144 /* post-headers */ 145 146 147 AQFINTS_ELEMENT_TYPE AQFINTS_ElementType_fromString(const char *p_s); 148 149 AQFINTS_ELEMENT_DATATYPE AQFINTS_ElementDataType_fromString(const char *p_s); 150 151 const char *AQFINTS_ElementType_toString(AQFINTS_ELEMENT_TYPE p_i); 152 153 const char *AQFINTS_ElementDataType_toString(AQFINTS_ELEMENT_DATATYPE p_i); 154 155 /** Constructor. */ 156 AQFINTS_ELEMENT *AQFINTS_Element_new(void); 157 158 /** Destructor. */ 159 void AQFINTS_Element_free(AQFINTS_ELEMENT *p_struct); 160 161 void AQFINTS_Element_Attach(AQFINTS_ELEMENT *p_struct); 162 163 AQFINTS_ELEMENT *AQFINTS_Element_dup(const AQFINTS_ELEMENT *p_struct); 164 165 AQFINTS_ELEMENT *AQFINTS_Element_copy(AQFINTS_ELEMENT *p_struct, const AQFINTS_ELEMENT *p_src); 166 167 /** Getter. 168 * Use this function to get the member "flags" (see @ref AQFINTS_ELEMENT_flags) 169 */ 170 uint32_t AQFINTS_Element_GetFlags(const AQFINTS_ELEMENT *p_struct); 171 172 /** Getter. 173 * Use this function to get the member "elementType" (see @ref AQFINTS_ELEMENT_elementType) 174 */ 175 AQFINTS_ELEMENT_TYPE AQFINTS_Element_GetElementType(const AQFINTS_ELEMENT *p_struct); 176 177 /** Getter. 178 * Use this function to get the member "id" (see @ref AQFINTS_ELEMENT_id) 179 */ 180 const char *AQFINTS_Element_GetId(const AQFINTS_ELEMENT *p_struct); 181 182 /** Getter. 183 * Use this function to get the member "name" (see @ref AQFINTS_ELEMENT_name) 184 */ 185 const char *AQFINTS_Element_GetName(const AQFINTS_ELEMENT *p_struct); 186 187 /** Getter. 188 * Use this function to get the member "version" (see @ref AQFINTS_ELEMENT_version) 189 */ 190 int AQFINTS_Element_GetVersion(const AQFINTS_ELEMENT *p_struct); 191 192 /** Getter. 193 * Use this function to get the member "type" (see @ref AQFINTS_ELEMENT_type) 194 */ 195 const char *AQFINTS_Element_GetType(const AQFINTS_ELEMENT *p_struct); 196 197 /** Getter. 198 * Use this function to get the member "minNum" (see @ref AQFINTS_ELEMENT_minNum) 199 */ 200 int AQFINTS_Element_GetMinNum(const AQFINTS_ELEMENT *p_struct); 201 202 /** Getter. 203 * Use this function to get the member "maxNum" (see @ref AQFINTS_ELEMENT_maxNum) 204 */ 205 int AQFINTS_Element_GetMaxNum(const AQFINTS_ELEMENT *p_struct); 206 207 /** Getter. 208 * Use this function to get the member "minSize" (see @ref AQFINTS_ELEMENT_minSize) 209 */ 210 int AQFINTS_Element_GetMinSize(const AQFINTS_ELEMENT *p_struct); 211 212 /** Getter. 213 * Use this function to get the member "maxSize" (see @ref AQFINTS_ELEMENT_maxSize) 214 */ 215 int AQFINTS_Element_GetMaxSize(const AQFINTS_ELEMENT *p_struct); 216 217 /** Getter. 218 * Use this function to get the member "trustLevel" (see @ref AQFINTS_ELEMENT_trustLevel) 219 */ 220 int AQFINTS_Element_GetTrustLevel(const AQFINTS_ELEMENT *p_struct); 221 222 /** Getter. 223 * Use this function to get the member "runtimeFlags" (see @ref AQFINTS_ELEMENT_runtimeFlags) 224 */ 225 uint32_t AQFINTS_Element_GetRuntimeFlags(const AQFINTS_ELEMENT *p_struct); 226 227 /** Setter. 228 * Use this function to set the member "flags" (see @ref AQFINTS_ELEMENT_flags) 229 */ 230 void AQFINTS_Element_SetFlags(AQFINTS_ELEMENT *p_struct, uint32_t p_src); 231 232 /** Add flags. 233 * Use this function to add flags to the member "flags" 234 */ 235 void AQFINTS_Element_AddFlags(AQFINTS_ELEMENT *p_struct, uint32_t p_src); 236 237 /** Sub flags. 238 * Use this function to sub flags from the member "flags" 239 */ 240 void AQFINTS_Element_SubFlags(AQFINTS_ELEMENT *p_struct, uint32_t p_src); 241 242 /** Setter. 243 * Use this function to set the member "elementType" (see @ref AQFINTS_ELEMENT_elementType) 244 */ 245 void AQFINTS_Element_SetElementType(AQFINTS_ELEMENT *p_struct, AQFINTS_ELEMENT_TYPE p_src); 246 247 /** Setter. 248 * Use this function to set the member "id" (see @ref AQFINTS_ELEMENT_id) 249 */ 250 void AQFINTS_Element_SetId(AQFINTS_ELEMENT *p_struct, const char *p_src); 251 252 /** Setter. 253 * Use this function to set the member "name" (see @ref AQFINTS_ELEMENT_name) 254 */ 255 void AQFINTS_Element_SetName(AQFINTS_ELEMENT *p_struct, const char *p_src); 256 257 /** Setter. 258 * Use this function to set the member "version" (see @ref AQFINTS_ELEMENT_version) 259 */ 260 void AQFINTS_Element_SetVersion(AQFINTS_ELEMENT *p_struct, int p_src); 261 262 /** Setter. 263 * Use this function to set the member "type" (see @ref AQFINTS_ELEMENT_type) 264 */ 265 void AQFINTS_Element_SetType(AQFINTS_ELEMENT *p_struct, const char *p_src); 266 267 /** Setter. 268 * Use this function to set the member "minNum" (see @ref AQFINTS_ELEMENT_minNum) 269 */ 270 void AQFINTS_Element_SetMinNum(AQFINTS_ELEMENT *p_struct, int p_src); 271 272 /** Setter. 273 * Use this function to set the member "maxNum" (see @ref AQFINTS_ELEMENT_maxNum) 274 */ 275 void AQFINTS_Element_SetMaxNum(AQFINTS_ELEMENT *p_struct, int p_src); 276 277 /** Setter. 278 * Use this function to set the member "minSize" (see @ref AQFINTS_ELEMENT_minSize) 279 */ 280 void AQFINTS_Element_SetMinSize(AQFINTS_ELEMENT *p_struct, int p_src); 281 282 /** Setter. 283 * Use this function to set the member "maxSize" (see @ref AQFINTS_ELEMENT_maxSize) 284 */ 285 void AQFINTS_Element_SetMaxSize(AQFINTS_ELEMENT *p_struct, int p_src); 286 287 /** Setter. 288 * Use this function to set the member "trustLevel" (see @ref AQFINTS_ELEMENT_trustLevel) 289 */ 290 void AQFINTS_Element_SetTrustLevel(AQFINTS_ELEMENT *p_struct, int p_src); 291 292 /** Setter. 293 * Use this function to set the member "runtimeFlags" (see @ref AQFINTS_ELEMENT_runtimeFlags) 294 */ 295 void AQFINTS_Element_SetRuntimeFlags(AQFINTS_ELEMENT *p_struct, uint32_t p_src); 296 297 /** Add flags. 298 * Use this function to add flags to the member "runtimeFlags" 299 */ 300 void AQFINTS_Element_AddRuntimeFlags(AQFINTS_ELEMENT *p_struct, uint32_t p_src); 301 302 /** Sub flags. 303 * Use this function to sub flags from the member "runtimeFlags" 304 */ 305 void AQFINTS_Element_SubRuntimeFlags(AQFINTS_ELEMENT *p_struct, uint32_t p_src); 306 307 void AQFINTS_Element_ReadDb(AQFINTS_ELEMENT *p_struct, GWEN_DB_NODE *p_db); 308 309 int AQFINTS_Element_WriteDb(const AQFINTS_ELEMENT *p_struct, GWEN_DB_NODE *p_db); 310 311 AQFINTS_ELEMENT *AQFINTS_Element_fromDb(GWEN_DB_NODE *p_db); 312 313 int AQFINTS_Element_toDb(const AQFINTS_ELEMENT *p_struct, GWEN_DB_NODE *p_db); 314 315 void AQFINTS_Element_SetData(AQFINTS_ELEMENT *st, uint8_t *ptr, uint32_t len); 316 void AQFINTS_Element_SetDataCopy(AQFINTS_ELEMENT *st, const uint8_t *ptr, uint32_t len); 317 void AQFINTS_Element_SetTextDataCopy(AQFINTS_ELEMENT *st, const char *ptr); 318 const uint8_t *AQFINTS_Element_GetDataPointer(const AQFINTS_ELEMENT *st); 319 uint32_t AQFINTS_Element_GetDataLength(const AQFINTS_ELEMENT *st); 320 const char *AQFINTS_Element_GetDataAsChar(const AQFINTS_ELEMENT *st, const char *defaultValue); 321 int AQFINTS_Element_GetDataAsInt(const AQFINTS_ELEMENT *st, int defaultValue); 322 void AQFINTS_Element_SetDataAsInt(AQFINTS_ELEMENT *st, int value); 323 /* end-headers */ 324 325 326 #ifdef __cplusplus 327 } 328 #endif 329 330 #endif 331 332