INI files


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, bool Unicode, INI_Section **result)
INI_EntryINI_FindLastSectionEntry (INI_Section *file_info, const unsigned char *section, const bool Unicode)
unsigned char * INI_GetValue (INI_Section *file_info, const unsigned char *section, const unsigned char *key, const bool Unicode)

Detailed Description

These functions parse ini file and make them available in easily accessable manner.

File format is standard ini file, comments are both # and ;.


Typedef Documentation

typedef struct _INI_Entry INI_Entry

Private structure holding information INI entry.

Definition at line 24 of file gammu-inifile.h.

typedef struct _INI_Section INI_Section

Private structure holding information INI section.

Definition at line 30 of file gammu-inifile.h.


Function Documentation

INI_Entry* INI_FindLastSectionEntry ( INI_Section file_info,
const unsigned char *  section,
const bool  Unicode 
)

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.

void INI_Free ( INI_Section head  ) 

Free INI data.

Parameters:
head INI section data.

unsigned char* INI_GetValue ( INI_Section file_info,
const unsigned char *  section,
const unsigned char *  key,
const bool  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.

GSM_Error INI_ReadFile ( const char *  FileName,
bool  Unicode,
INI_Section **  result 
)

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


Generated on Tue Jan 6 15:44:15 2009 for Gammu API by  doxygen 1.5.6