FreeRDP
ini.h File Reference
#include <winpr/winpr.h>
#include <winpr/wtypes.h>
This graph shows which files directly or indirectly include this file:

Functions

WINPR_API int IniFile_ReadBuffer (wIniFile *ini, const char *buffer)
 read an ini file from a buffer More...
 
WINPR_API int IniFile_ReadFile (wIniFile *ini, const char *filename)
 read an ini file from a file More...
 
WINPR_API char * IniFile_WriteBuffer (wIniFile *ini)
 write an ini instance to a buffer More...
 
WINPR_API int IniFile_WriteFile (wIniFile *ini, const char *filename)
 write an ini instance to a file More...
 
WINPR_API char ** IniFile_GetSectionNames (wIniFile *ini, size_t *count)
 Get the number and names of sections in the ini instance. More...
 
WINPR_API char ** IniFile_GetSectionKeyNames (wIniFile *ini, const char *section, size_t *count)
 Get the number and names of keys of a section in the ini instance. More...
 
WINPR_API const char * IniFile_GetKeyValueString (wIniFile *ini, const char *section, const char *key)
 Get an ini [section/key] value of type string. More...
 
WINPR_API int IniFile_GetKeyValueInt (wIniFile *ini, const char *section, const char *key)
 Get an ini [section/key] value of type int. More...
 
WINPR_API int IniFile_SetKeyValueString (wIniFile *ini, const char *section, const char *key, const char *value)
 Set an ini [section/key] value of type string. More...
 
WINPR_API int IniFile_SetKeyValueInt (wIniFile *ini, const char *section, const char *key, int value)
 Set an ini [section/key] value of type int. More...
 
WINPR_API void IniFile_Free (wIniFile *ini)
 Free a ini instance. More...
 
WINPR_API wIniFile * IniFile_New (void)
 Create a new ini instance. More...
 
WINPR_API wIniFile * IniFile_Clone (const wIniFile *ini)
 Clone a ini instance. More...
 

Function Documentation

◆ IniFile_Clone()

WINPR_API wIniFile* IniFile_Clone ( const wIniFile *  ini)

Clone a ini instance.

Parameters
iniThe instance to free, may be NULL
Returns
the cloned instance or NULL in case of ini was NULL or failure
Here is the call graph for this function:
Here is the caller graph for this function:

◆ IniFile_Free()

WINPR_API void IniFile_Free ( wIniFile *  ini)

Free a ini instance.

Parameters
iniThe instance to free, may be NULL
Here is the call graph for this function:
Here is the caller graph for this function:

◆ IniFile_GetKeyValueInt()

WINPR_API int IniFile_GetKeyValueInt ( wIniFile *  ini,
const char *  section,
const char *  key 
)

Get an ini [section/key] value of type int.

Parameters
iniThe instance to use, must not be NULL
sectionThe name of the section as '\0' terminated string.
keyThe name of the key as '\0' terminated string.
Returns
The value of the [section/key]
Here is the call graph for this function:
Here is the caller graph for this function:

◆ IniFile_GetKeyValueString()

WINPR_API const char* IniFile_GetKeyValueString ( wIniFile *  ini,
const char *  section,
const char *  key 
)

Get an ini [section/key] value of type string.

Parameters
iniThe instance to use, must not be NULL
sectionThe name of the section as '\0' terminated string.
keyThe name of the key as '\0' terminated string.
Returns
The value of the [section/key] as '\0' terminated string or NULL
Here is the call graph for this function:
Here is the caller graph for this function:

◆ IniFile_GetSectionKeyNames()

WINPR_API char** IniFile_GetSectionKeyNames ( wIniFile *  ini,
const char *  section,
size_t *  count 
)

Get the number and names of keys of a section in the ini instance.

Parameters
iniThe instance to use, must not be NULL
sectionThe name of the section as '\0' terminated string.
countA buffer that will contain the number of sections
Returns
A newly allocated array of strings (size count). Use free after use
Here is the call graph for this function:
Here is the caller graph for this function:

◆ IniFile_GetSectionNames()

WINPR_API char** IniFile_GetSectionNames ( wIniFile *  ini,
size_t *  count 
)

Get the number and names of sections in the ini instance.

Parameters
iniThe instance to use, must not be NULL
countA buffer that will contain the number of sections
Returns
A newly allocated array of strings (size count). Use free after use
Here is the caller graph for this function:

◆ IniFile_New()

WINPR_API wIniFile* IniFile_New ( void  )

Create a new ini instance.

Returns
The newly allocated instance or NULL if failed.
Here is the call graph for this function:
Here is the caller graph for this function:

◆ IniFile_ReadBuffer()

WINPR_API int IniFile_ReadBuffer ( wIniFile *  ini,
const char *  buffer 
)

read an ini file from a buffer

Parameters
iniThe instance to use, must not be NULL
bufferThe buffer to read from, must be a '\0' terminated string.
Returns
> 0 for success, < 0 for failure
Here is the call graph for this function:
Here is the caller graph for this function:

◆ IniFile_ReadFile()

WINPR_API int IniFile_ReadFile ( wIniFile *  ini,
const char *  filename 
)

read an ini file from a file

Parameters
iniThe instance to use, must not be NULL
filenameThe name of the file to read from, must be a '\0' terminated string.
Returns
> 0 for success, < 0 for failure
Here is the call graph for this function:
Here is the caller graph for this function:

◆ IniFile_SetKeyValueInt()

WINPR_API int IniFile_SetKeyValueInt ( wIniFile *  ini,
const char *  section,
const char *  key,
int  value 
)

Set an ini [section/key] value of type int.

Parameters
iniThe instance to use, must not be NULL
sectionThe name of the section as '\0' terminated string.
keyThe name of the key as '\0' terminated string.
valueThe value of the [section/key]
Returns
> 0 for success, < 0 for failure
Here is the call graph for this function:
Here is the caller graph for this function:

◆ IniFile_SetKeyValueString()

WINPR_API int IniFile_SetKeyValueString ( wIniFile *  ini,
const char *  section,
const char *  key,
const char *  value 
)

Set an ini [section/key] value of type string.

Parameters
iniThe instance to use, must not be NULL
sectionThe name of the section as '\0' terminated string.
keyThe name of the key as '\0' terminated string.
valueThe value of the [section/key] as '\0' terminated string.
Returns
> 0 for success, < 0 for failure
Here is the call graph for this function:
Here is the caller graph for this function:

◆ IniFile_WriteBuffer()

WINPR_API char* IniFile_WriteBuffer ( wIniFile *  ini)

write an ini instance to a buffer

Parameters
iniThe instance to use, must not be NULL
Returns
A newly allocated string, use free after use. NULL in case of failure
Here is the caller graph for this function:

◆ IniFile_WriteFile()

WINPR_API int IniFile_WriteFile ( wIniFile *  ini,
const char *  filename 
)

write an ini instance to a file

Parameters
iniThe instance to use, must not be NULL
filenameThe name of the file as '\0' terminated string.
Returns
> 0 for success, < 0 for failure
Here is the call graph for this function:
Here is the caller graph for this function: