ESR_SessionType.h

00001 /*---------------------------------------------------------------------------*
00002  *  ESR_SessionType.h  *
00003  *                                                                           *
00004  *  Copyright 2007 Nuance Communciations, Inc.                               *
00005  *                                                                           *
00006  *  Licensed under the Apache License, Version 2.0 (the 'License');          *
00007  *  you may not use this file except in compliance with the License.         *
00008  *                                                                           *
00009  *  You may obtain a copy of the License at                                  *
00010  *      http://www.apache.org/licenses/LICENSE-2.0                           *
00011  *                                                                           *
00012  *  Unless required by applicable law or agreed to in writing, software      *
00013  *  distributed under the License is distributed on an 'AS IS' BASIS,        *
00014  *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * 
00015  *  See the License for the specific language governing permissions and      *
00016  *  limitations under the License.                                           *
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 /* __ESR_SESSIONTYPE_H */

Generated on Thu May 1 15:37:25 2008 for SREC by  doxygen 1.5.3