These functions parse ini file and make them available in easily accessable manner.
File format is standard ini file, comments are both # and ;.
§ INI_Entry
Private structure holding information INI entry.
Definition at line 28 of file gammu-inifile.h.
§ INI_Section
Private structure holding information INI section.
Definition at line 34 of file gammu-inifile.h.
§ GSM_StringToBool()
gboolean GSM_StringToBool |
( |
const char * |
value | ) |
|
Converts value to boolean.
It just takes the string and checks whether there is true/yes/t/y/1 or false/no/f/n/0.
- Parameters
-
- Returns
- Boolean value, -1 on failure.
§ INI_FindLastSectionEntry()
Returns pointer to last INI entry of given section.
- Parameters
-
file_info | File data as returned by INI_ReadFile. |
section | Section to scan. |
Unicode | Whether file is unicode. |
- Returns
- Last entry in section.
- Bug:
- Unicode should be part of file_info.
§ INI_Free()
Free INI data.
- Parameters
-
§ INI_GetValue()
unsigned char* INI_GetValue |
( |
INI_Section * |
file_info, |
|
|
const unsigned char * |
section, |
|
|
const unsigned char * |
key, |
|
|
const gboolean |
Unicode |
|
) |
| |
Returns value of INI file entry.
- Parameters
-
file_info | File data as returned by INI_ReadFile. |
section | Section to scan. |
key | Name of key to read. |
Unicode | Whether file is unicode. |
- Returns
- Entry value.
- Bug:
- Unicode should be part of file_info.
§ INI_ReadFile()
Reads INI data.
- Parameters
-
FileName | File to read. |
Unicode | Whether file shoul be treated like unicode. |
result | Pointer where file will be read. |
- Returns
- Error code