00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020 #ifndef __ESR_SESSIONTYPE_H
00021 #define __ESR_SESSIONTYPE_H
00022
00023
00024
00025 #include "ESR_ReturnCode.h"
00026 #include "ESR_SharedPrefix.h"
00027 #include "ESR_VariableTypes.h"
00028 #include "ESR_SessionTypeListener.h"
00029 #include "pstdio.h"
00030 #include "ptypes.h"
00031
00042 typedef struct ESR_SessionType_t
00043 {
00053 ESR_ReturnCode(*getProperty)(struct ESR_SessionType_t* self, const LCHAR* name, void** value, VariableTypes type);
00062 ESR_ReturnCode(*getPropertyType)(struct ESR_SessionType_t* self, const LCHAR* name, VariableTypes* type);
00071 ESR_ReturnCode(*getInt)(struct ESR_SessionType_t* self, const LCHAR* name, int* value);
00079 ESR_ReturnCode(*getUint16_t)(struct ESR_SessionType_t* self, const LCHAR* name, asr_uint16_t* value);
00089 ESR_ReturnCode(*getSize_t)(struct ESR_SessionType_t* self, const LCHAR* name, size_t* value);
00098 ESR_ReturnCode(*getFloat)(struct ESR_SessionType_t* self, const LCHAR* name, float* value);
00107 ESR_ReturnCode(*getBool)(struct ESR_SessionType_t* self, const LCHAR* name, ESR_BOOL* value);
00118 ESR_ReturnCode(*getLCHAR)(struct ESR_SessionType_t* self, const LCHAR* name, LCHAR* value, size_t* len);
00127 ESR_ReturnCode(*contains)(struct ESR_SessionType_t* self, const LCHAR* name, ESR_BOOL* exists);
00137 ESR_ReturnCode(*setProperty)(struct ESR_SessionType_t* self, const LCHAR* name, void* value, VariableTypes type);
00146 ESR_ReturnCode(*setInt)(struct ESR_SessionType_t* self, const LCHAR* name, int value);
00154 ESR_ReturnCode(*setUint16_t)(struct ESR_SessionType_t* self, const LCHAR* name, asr_uint16_t value);
00163 ESR_ReturnCode(*setSize_t)(struct ESR_SessionType_t* self, const LCHAR* name, size_t value);
00172 ESR_ReturnCode(*setFloat)(struct ESR_SessionType_t* self, const LCHAR* name, float value);
00181 ESR_ReturnCode(*setBool)(struct ESR_SessionType_t* self, const LCHAR* name, ESR_BOOL value);
00190 ESR_ReturnCode(*setLCHAR)(struct ESR_SessionType_t* self, const LCHAR* name, LCHAR* value);
00202 ESR_ReturnCode(*setIntIfEmpty)(struct ESR_SessionType_t* self, const LCHAR* name, int value);
00213 ESR_ReturnCode(*setUint16_tIfEmpty)(struct ESR_SessionType_t* self, const LCHAR* name, asr_uint16_t value);
00225 ESR_ReturnCode(*setSize_tIfEmpty)(struct ESR_SessionType_t* self, const LCHAR* name, size_t value);
00237 ESR_ReturnCode(*setFloatIfEmpty)(struct ESR_SessionType_t* self, const LCHAR* name, float value);
00249 ESR_ReturnCode(*setBoolIfEmpty)(struct ESR_SessionType_t* self, const LCHAR* name, ESR_BOOL value);
00261 ESR_ReturnCode(*setLCHARIfEmpty)(struct ESR_SessionType_t* self, const LCHAR* name, LCHAR* value);
00269 ESR_ReturnCode(*removeProperty)(struct ESR_SessionType_t* self, const LCHAR* name);
00277 ESR_ReturnCode(*removeAndFreeProperty)(struct ESR_SessionType_t* self, const LCHAR* name);
00299 ESR_ReturnCode(*importCommandLine)(struct ESR_SessionType_t* self, int argc, char* argv[]);
00307 ESR_ReturnCode(*getSize)(struct ESR_SessionType_t* self, size_t* size);
00316 ESR_ReturnCode(*getKeyAtIndex)(struct ESR_SessionType_t* self, size_t index, LCHAR** key);
00325 ESR_ReturnCode(*convertToInt)(struct ESR_SessionType_t* self, const LCHAR* key);
00326
00335 ESR_ReturnCode(*convertToUint16_t)(struct ESR_SessionType_t* self, const LCHAR* key);
00336
00345 ESR_ReturnCode(*convertToSize_t)(struct ESR_SessionType_t* self, const LCHAR* key);
00346
00355 ESR_ReturnCode(*convertToFloat)(struct ESR_SessionType_t* self, const LCHAR* key);
00356
00365 ESR_ReturnCode(*convertToBool)(struct ESR_SessionType_t* self, const LCHAR* key);
00372 ESR_ReturnCode(*destroy)(struct ESR_SessionType_t* self);
00381 ESR_ReturnCode(*importParFile)(struct ESR_SessionType_t* self, const LCHAR* filename);
00388 ESR_ReturnCode(*importArgFile)(struct ESR_SessionType_t* self, const LCHAR* filename);
00389
00397 ESR_ReturnCode(*addListener)(struct ESR_SessionType_t* self, ESR_SessionTypeListenerPair* listener);
00398
00406 ESR_ReturnCode(*removeListener)(struct ESR_SessionType_t* self, ESR_SessionTypeListenerPair* listener);
00407
00411 void* data;
00412 }
00413 ESR_SessionType;
00414
00421 ESR_SHARED_API ESR_ReturnCode ESR_SessionTypeCreate(ESR_SessionType** self);
00427 #endif