sl@0
|
1 |
/* Copyright (c) 2009 The Khronos Group Inc.
|
sl@0
|
2 |
*
|
sl@0
|
3 |
* Permission is hereby granted, free of charge, to any person obtaining a
|
sl@0
|
4 |
* copy of this software and/or associated documentation files (the
|
sl@0
|
5 |
* "Materials"), to deal in the Materials without restriction, including
|
sl@0
|
6 |
* without limitation the rights to use, copy, modify, merge, publish,
|
sl@0
|
7 |
* distribute, sublicense, and/or sell copies of the Materials, and to
|
sl@0
|
8 |
* permit persons to whom the Materials are furnished to do so, subject to
|
sl@0
|
9 |
* the following conditions:
|
sl@0
|
10 |
*
|
sl@0
|
11 |
* The above copyright notice and this permission notice shall be included
|
sl@0
|
12 |
* in all copies or substantial portions of the Materials.
|
sl@0
|
13 |
*
|
sl@0
|
14 |
* THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
sl@0
|
15 |
* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
sl@0
|
16 |
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
|
sl@0
|
17 |
* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
|
sl@0
|
18 |
* CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
|
sl@0
|
19 |
* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
|
sl@0
|
20 |
* MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
|
sl@0
|
21 |
*/
|
sl@0
|
22 |
|
sl@0
|
23 |
/*!
|
sl@0
|
24 |
* \file owfconfig.h
|
sl@0
|
25 |
*
|
sl@0
|
26 |
*/
|
sl@0
|
27 |
|
sl@0
|
28 |
#ifndef OWFCONFIG_H_
|
sl@0
|
29 |
#define OWFCONFIG_H_
|
sl@0
|
30 |
|
sl@0
|
31 |
#include "owftypes.h"
|
sl@0
|
32 |
|
sl@0
|
33 |
|
sl@0
|
34 |
#ifdef __cplusplus
|
sl@0
|
35 |
extern "C" {
|
sl@0
|
36 |
#endif
|
sl@0
|
37 |
|
sl@0
|
38 |
|
sl@0
|
39 |
typedef void* OWF_CONF_DOCUMENT;
|
sl@0
|
40 |
typedef void* OWF_CONF_GROUP;
|
sl@0
|
41 |
typedef void* OWF_CONF_ELEMENT;
|
sl@0
|
42 |
|
sl@0
|
43 |
OWF_API_CALL OWF_CONF_DOCUMENT
|
sl@0
|
44 |
OWF_Conf_GetGetDocument(const char* str);
|
sl@0
|
45 |
|
sl@0
|
46 |
OWF_API_CALL OWF_CONF_GROUP
|
sl@0
|
47 |
OWF_Conf_GetRoot(OWF_CONF_DOCUMENT doc, const char* name);
|
sl@0
|
48 |
|
sl@0
|
49 |
OWF_API_CALL OWF_CONF_ELEMENT
|
sl@0
|
50 |
OWF_Conf_GetElement(const OWF_CONF_GROUP cur,
|
sl@0
|
51 |
const char* elementName);
|
sl@0
|
52 |
|
sl@0
|
53 |
OWF_API_CALL OWFint
|
sl@0
|
54 |
OWF_Conf_GetNbrElements(const OWF_CONF_GROUP cur,
|
sl@0
|
55 |
const char* elementName);
|
sl@0
|
56 |
|
sl@0
|
57 |
OWF_API_CALL OWF_CONF_ELEMENT
|
sl@0
|
58 |
OWF_Conf_GetNextElement(const OWF_CONF_ELEMENT cur,
|
sl@0
|
59 |
const char* elementName);
|
sl@0
|
60 |
|
sl@0
|
61 |
OWF_API_CALL OWFint
|
sl@0
|
62 |
OWF_Conf_GetContenti(const OWF_CONF_ELEMENT cur, OWFint deflt);
|
sl@0
|
63 |
|
sl@0
|
64 |
OWF_API_CALL OWFfloat
|
sl@0
|
65 |
OWF_Conf_GetContentf(const OWF_CONF_ELEMENT cur, OWFfloat deflt);
|
sl@0
|
66 |
|
sl@0
|
67 |
OWF_API_CALL char*
|
sl@0
|
68 |
OWF_Conf_GetContentStr(const OWF_CONF_ELEMENT cur,
|
sl@0
|
69 |
char* deflt);
|
sl@0
|
70 |
|
sl@0
|
71 |
OWF_API_CALL OWFint
|
sl@0
|
72 |
OWF_Conf_GetElementContenti(const OWF_CONF_GROUP cur,
|
sl@0
|
73 |
const char* elementName,
|
sl@0
|
74 |
OWFint deflt);
|
sl@0
|
75 |
|
sl@0
|
76 |
OWF_API_CALL OWFfloat
|
sl@0
|
77 |
OWF_Conf_GetElementContentf(const OWF_CONF_GROUP cur,
|
sl@0
|
78 |
const char* elementName,
|
sl@0
|
79 |
OWFfloat deflt);
|
sl@0
|
80 |
|
sl@0
|
81 |
/* \brief Get string element content
|
sl@0
|
82 |
*
|
sl@0
|
83 |
* String must be free by OWF_Conf_FreeContent() call;
|
sl@0
|
84 |
*/
|
sl@0
|
85 |
OWF_API_CALL char*
|
sl@0
|
86 |
OWF_Conf_GetElementContentStr(const OWF_CONF_GROUP cur,
|
sl@0
|
87 |
const char* elementName,
|
sl@0
|
88 |
char* deflt);
|
sl@0
|
89 |
|
sl@0
|
90 |
OWF_API_CALL void
|
sl@0
|
91 |
OWF_Conf_Cleanup(OWF_CONF_DOCUMENT doc);
|
sl@0
|
92 |
|
sl@0
|
93 |
OWF_API_CALL void
|
sl@0
|
94 |
OWF_Conf_FreeContent(char* str);
|
sl@0
|
95 |
|
sl@0
|
96 |
#ifdef __cplusplus
|
sl@0
|
97 |
}
|
sl@0
|
98 |
#endif
|
sl@0
|
99 |
|
sl@0
|
100 |
|
sl@0
|
101 |
|
sl@0
|
102 |
#endif /* OWFCONFIG_H_ */
|