sl@0: /* Copyright (c) 2009 The Khronos Group Inc. sl@0: * sl@0: * Permission is hereby granted, free of charge, to any person obtaining a sl@0: * copy of this software and/or associated documentation files (the sl@0: * "Materials"), to deal in the Materials without restriction, including sl@0: * without limitation the rights to use, copy, modify, merge, publish, sl@0: * distribute, sublicense, and/or sell copies of the Materials, and to sl@0: * permit persons to whom the Materials are furnished to do so, subject to sl@0: * the following conditions: sl@0: * sl@0: * The above copyright notice and this permission notice shall be included sl@0: * in all copies or substantial portions of the Materials. sl@0: * sl@0: * THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, sl@0: * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF sl@0: * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. sl@0: * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY sl@0: * CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, sl@0: * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE sl@0: * MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS. sl@0: */ sl@0: sl@0: /*! sl@0: * \file owfconfig.h sl@0: * sl@0: */ sl@0: sl@0: #ifndef OWFCONFIG_H_ sl@0: #define OWFCONFIG_H_ sl@0: sl@0: #include "owftypes.h" sl@0: sl@0: sl@0: #ifdef __cplusplus sl@0: extern "C" { sl@0: #endif sl@0: sl@0: sl@0: typedef void* OWF_CONF_DOCUMENT; sl@0: typedef void* OWF_CONF_GROUP; sl@0: typedef void* OWF_CONF_ELEMENT; sl@0: sl@0: OWF_API_CALL OWF_CONF_DOCUMENT sl@0: OWF_Conf_GetGetDocument(const char* str); sl@0: sl@0: OWF_API_CALL OWF_CONF_GROUP sl@0: OWF_Conf_GetRoot(OWF_CONF_DOCUMENT doc, const char* name); sl@0: sl@0: OWF_API_CALL OWF_CONF_ELEMENT sl@0: OWF_Conf_GetElement(const OWF_CONF_GROUP cur, sl@0: const char* elementName); sl@0: sl@0: OWF_API_CALL OWFint sl@0: OWF_Conf_GetNbrElements(const OWF_CONF_GROUP cur, sl@0: const char* elementName); sl@0: sl@0: OWF_API_CALL OWF_CONF_ELEMENT sl@0: OWF_Conf_GetNextElement(const OWF_CONF_ELEMENT cur, sl@0: const char* elementName); sl@0: sl@0: OWF_API_CALL OWFint sl@0: OWF_Conf_GetContenti(const OWF_CONF_ELEMENT cur, OWFint deflt); sl@0: sl@0: OWF_API_CALL OWFfloat sl@0: OWF_Conf_GetContentf(const OWF_CONF_ELEMENT cur, OWFfloat deflt); sl@0: sl@0: OWF_API_CALL char* sl@0: OWF_Conf_GetContentStr(const OWF_CONF_ELEMENT cur, sl@0: char* deflt); sl@0: sl@0: OWF_API_CALL OWFint sl@0: OWF_Conf_GetElementContenti(const OWF_CONF_GROUP cur, sl@0: const char* elementName, sl@0: OWFint deflt); sl@0: sl@0: OWF_API_CALL OWFfloat sl@0: OWF_Conf_GetElementContentf(const OWF_CONF_GROUP cur, sl@0: const char* elementName, sl@0: OWFfloat deflt); sl@0: sl@0: /* \brief Get string element content sl@0: * sl@0: * String must be free by OWF_Conf_FreeContent() call; sl@0: */ sl@0: OWF_API_CALL char* sl@0: OWF_Conf_GetElementContentStr(const OWF_CONF_GROUP cur, sl@0: const char* elementName, sl@0: char* deflt); sl@0: sl@0: OWF_API_CALL void sl@0: OWF_Conf_Cleanup(OWF_CONF_DOCUMENT doc); sl@0: sl@0: OWF_API_CALL void sl@0: OWF_Conf_FreeContent(char* str); sl@0: sl@0: #ifdef __cplusplus sl@0: } sl@0: #endif sl@0: sl@0: sl@0: sl@0: #endif /* OWFCONFIG_H_ */