|
FreeRDP
|
#include <winpr/config.h>#include <winpr/assert.h>#include <stdio.h>#include <stdlib.h>#include <string.h>#include <errno.h>#include <winpr/wtypes.h>#include <winpr/crt.h>#include <winpr/file.h>#include <winpr/ini.h>Functions | |
| static BOOL | IniFile_Load_NextLine (wIniFile *ini, char *str) |
| static BOOL | IniFile_BufferResize (wIniFile *ini, size_t size) |
| static BOOL | IniFile_Load_String (wIniFile *ini, const char *iniString) |
| static void | IniFile_Close_File (FILE *fp) |
| static FILE * | IniFile_Open_File (wIniFile *ini, const char *filename) |
| static BOOL | IniFile_Load_File (wIniFile *ini, const char *filename) |
| static BOOL | IniFile_Load_HasNextLine (wIniFile *ini) |
| static char * | IniFile_Load_GetNextLine (wIniFile *ini) |
| static void | IniFile_Key_Free (wIniFileKey *key) |
| static wIniFileKey * | IniFile_Key_New (const char *name, const char *value) |
| static void | IniFile_Section_Free (wIniFileSection *section) |
| static BOOL | IniFile_SectionKeysResize (wIniFileSection *section, size_t count) |
| static wIniFileSection * | IniFile_Section_New (const char *name) |
| static wIniFileSection * | IniFile_GetSection (wIniFile *ini, const char *name) |
| static BOOL | IniFile_SectionResize (wIniFile *ini, size_t count) |
| static wIniFileSection * | IniFile_AddToSection (wIniFile *ini, const char *name) |
| static wIniFileKey * | IniFile_GetKey (wIniFileSection *section, const char *name) |
| static wIniFileKey * | IniFile_AddKey (wIniFileSection *section, const char *name, const char *value) |
| static int | IniFile_Load (wIniFile *ini) |
| static BOOL | IniFile_SetFilename (wIniFile *ini, const char *name) |
| int | IniFile_ReadBuffer (wIniFile *ini, const char *buffer) |
| read an ini file from a buffer More... | |
| int | IniFile_ReadFile (wIniFile *ini, const char *filename) |
| read an ini file from a file More... | |
| char ** | IniFile_GetSectionNames (wIniFile *ini, size_t *count) |
| Get the number and names of sections in the ini instance. More... | |
| 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... | |
| const char * | IniFile_GetKeyValueString (wIniFile *ini, const char *section, const char *key) |
| Get an ini [section/key] value of type string. More... | |
| int | IniFile_GetKeyValueInt (wIniFile *ini, const char *section, const char *key) |
| Get an ini [section/key] value of type int. More... | |
| int | IniFile_SetKeyValueString (wIniFile *ini, const char *section, const char *key, const char *value) |
| Set an ini [section/key] value of type string. More... | |
| int | IniFile_SetKeyValueInt (wIniFile *ini, const char *section, const char *key, int value) |
| Set an ini [section/key] value of type int. More... | |
| char * | IniFile_WriteBuffer (wIniFile *ini) |
| write an ini instance to a buffer More... | |
| int | IniFile_WriteFile (wIniFile *ini, const char *filename) |
| write an ini instance to a file More... | |
| void | IniFile_Free (wIniFile *ini) |
| Free a ini instance. More... | |
| wIniFile * | IniFile_New (void) |
| Create a new ini instance. More... | |
| wIniFile * | IniFile_Clone (const wIniFile *ini) |
| Clone a ini instance. More... | |
|
static |


|
static |


|
static |


| wIniFile* IniFile_Clone | ( | const wIniFile * | ini | ) |
Clone a ini instance.
| ini | The instance to free, may be NULL |


|
static |

| void IniFile_Free | ( | wIniFile * | ini | ) |
Free a ini instance.
| ini | The instance to free, may be NULL |


|
static |


| int IniFile_GetKeyValueInt | ( | wIniFile * | ini, |
| const char * | section, | ||
| const char * | key | ||
| ) |
Get an ini [section/key] value of type int.
| ini | The instance to use, must not be NULL |
| section | The name of the section as '\0' terminated string. |
| key | The name of the key as '\0' terminated string. |


| const char* IniFile_GetKeyValueString | ( | wIniFile * | ini, |
| const char * | section, | ||
| const char * | key | ||
| ) |
Get an ini [section/key] value of type string.
| ini | The instance to use, must not be NULL |
| section | The name of the section as '\0' terminated string. |
| key | The name of the key as '\0' terminated string. |


|
static |


| 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.
| ini | The instance to use, must not be NULL |
| section | The name of the section as '\0' terminated string. |
| count | A buffer that will contain the number of sections |


| char** IniFile_GetSectionNames | ( | wIniFile * | ini, |
| size_t * | count | ||
| ) |
Get the number and names of sections in the ini instance.
| ini | The instance to use, must not be NULL |
| count | A buffer that will contain the number of sections |

|
static |

|
static |


|
static |


|
static |


|
static |


|
static |

|
static |


|
static |


| wIniFile* IniFile_New | ( | void | ) |
Create a new ini instance.


|
static |


| int IniFile_ReadBuffer | ( | wIniFile * | ini, |
| const char * | buffer | ||
| ) |
read an ini file from a buffer
| ini | The instance to use, must not be NULL |
| buffer | The buffer to read from, must be a '\0' terminated string. |


| int IniFile_ReadFile | ( | wIniFile * | ini, |
| const char * | filename | ||
| ) |
read an ini file from a file
| ini | The instance to use, must not be NULL |
| filename | The name of the file to read from, must be a '\0' terminated string. |


|
static |


|
static |


|
static |


|
static |


|
static |


| int IniFile_SetKeyValueInt | ( | wIniFile * | ini, |
| const char * | section, | ||
| const char * | key, | ||
| int | value | ||
| ) |
Set an ini [section/key] value of type int.
| ini | The instance to use, must not be NULL |
| section | The name of the section as '\0' terminated string. |
| key | The name of the key as '\0' terminated string. |
| value | The value of the [section/key] |


| int IniFile_SetKeyValueString | ( | wIniFile * | ini, |
| const char * | section, | ||
| const char * | key, | ||
| const char * | value | ||
| ) |
Set an ini [section/key] value of type string.
| ini | The instance to use, must not be NULL |
| section | The name of the section as '\0' terminated string. |
| key | The name of the key as '\0' terminated string. |
| value | The value of the [section/key] as '\0' terminated string. |


| char* IniFile_WriteBuffer | ( | wIniFile * | ini | ) |
write an ini instance to a buffer
| ini | The instance to use, must not be NULL |

| int IniFile_WriteFile | ( | wIniFile * | ini, |
| const char * | filename | ||
| ) |
write an ini instance to a file
| ini | The instance to use, must not be NULL |
| filename | The name of the file as '\0' terminated string. |

