Gammu API  1.38.0
gammu-inifile.h File Reference
#include <gammu-types.h>
#include <gammu-error.h>

Go to the source code of this file.

Data Structures

struct  _INI_Entry
 
struct  _INI_Section
 

Typedefs

typedef struct _INI_Entry INI_Entry
 
typedef struct _INI_Section INI_Section
 

Functions

void INI_Free (INI_Section *head)
 
GSM_Error INI_ReadFile (const char *FileName, gboolean Unicode, INI_Section **result)
 
INI_EntryINI_FindLastSectionEntry (INI_Section *file_info, const unsigned char *section, const gboolean Unicode)
 
unsigned char * INI_GetValue (INI_Section *file_info, const unsigned char *section, const unsigned char *key, const gboolean Unicode)
 
int INI_GetInt (INI_Section *cfg, const unsigned char *section, const unsigned char *key, int fallback)
 
gboolean INI_GetBool (INI_Section *cfg, const unsigned char *section, const unsigned char *key, gboolean fallback)
 
gboolean GSM_StringToBool (const char *value)
 

Detailed Description

Author
Michal Čihař

INI files manipulation.

Definition in file gammu-inifile.h.

Function Documentation

§ INI_GetBool()

gboolean INI_GetBool ( INI_Section cfg,
const unsigned char *  section,
const unsigned char *  key,
gboolean  fallback 
)

Returns boolean value from configuration. The file is automatically handled as not unicode.

Parameters
cfgFile data as returned by INI_ReadFile.
sectionSection to scan.
keyName of key to read.
fallbackFallback value.
Returns
Key value or fallback in case of failure.

§ INI_GetInt()

int INI_GetInt ( INI_Section cfg,
const unsigned char *  section,
const unsigned char *  key,
int  fallback 
)

Returns integer value from configuration. The file is automatically handled as not unicode.

Parameters
cfgFile data as returned by INI_ReadFile.
sectionSection to scan.
keyName of key to read.
fallbackFallback value.
Returns
Key value or fallback in case of failure.