FreeRDP
ini.h
1 
20 #ifndef WINPR_UTILS_INI_H
21 #define WINPR_UTILS_INI_H
22 
23 #include <winpr/winpr.h>
24 #include <winpr/wtypes.h>
25 
26 typedef struct s_wIniFile wIniFile;
27 
28 #ifdef __cplusplus
29 extern "C"
30 {
31 #endif
32 
40  WINPR_API int IniFile_ReadBuffer(wIniFile* ini, const char* buffer);
41 
49  WINPR_API int IniFile_ReadFile(wIniFile* ini, const char* filename);
50 
57  WINPR_API char* IniFile_WriteBuffer(wIniFile* ini);
58 
66  WINPR_API int IniFile_WriteFile(wIniFile* ini, const char* filename);
67 
75  WINPR_API char** IniFile_GetSectionNames(wIniFile* ini, size_t* count);
76 
85  WINPR_API char** IniFile_GetSectionKeyNames(wIniFile* ini, const char* section, size_t* count);
86 
95  WINPR_API const char* IniFile_GetKeyValueString(wIniFile* ini, const char* section,
96  const char* key);
97 
106  WINPR_API int IniFile_GetKeyValueInt(wIniFile* ini, const char* section, const char* key);
107 
117  WINPR_API int IniFile_SetKeyValueString(wIniFile* ini, const char* section, const char* key,
118  const char* value);
119 
129  WINPR_API int IniFile_SetKeyValueInt(wIniFile* ini, const char* section, const char* key,
130  int value);
131 
136  WINPR_API void IniFile_Free(wIniFile* ini);
137 
142  WINPR_ATTR_MALLOC(IniFile_Free, 1)
143  WINPR_API wIniFile* IniFile_New(void);
144 
151  WINPR_API wIniFile* IniFile_Clone(const wIniFile* ini);
152 
153 #ifdef __cplusplus
154 }
155 #endif
156 
157 #endif /* WINPR_UTILS_INI_H */