Gammu internals  1.38.0
gammu-inifile.h
Go to the documentation of this file.
1 
7 #ifndef __gammu_inifile_h
8 #define __gammu_inifile_h
9 
10 #ifdef __cplusplus
11 extern "C" {
12 #endif
13 
14 #include <gammu-types.h>
15 #include <gammu-error.h>
28 typedef struct _INI_Entry INI_Entry;
29 
34 typedef struct _INI_Section INI_Section;
35 
41 struct _INI_Entry {
43  unsigned char *EntryName;
44  unsigned char *EntryValue;
45 };
46 
52 struct _INI_Section {
55  unsigned char *SectionName;
56 };
57 
65 void INI_Free(INI_Section * head);
66 
78 GSM_Error INI_ReadFile(const char *FileName, gboolean Unicode,
79  INI_Section ** result);
80 
95  const unsigned char *section,
96  const gboolean Unicode);
97 
112 unsigned char *INI_GetValue(INI_Section * file_info,
113  const unsigned char *section,
114  const unsigned char *key, const gboolean Unicode);
115 
127 int INI_GetInt(INI_Section *cfg,
128  const unsigned char *section,
129  const unsigned char *key,
130  int fallback);
131 
144  const unsigned char *section,
145  const unsigned char *key,
146  gboolean fallback);
147 
148 
161 gboolean GSM_StringToBool(const char *value);
162 
163 #ifdef __cplusplus
164 }
165 #endif
166 #endif
167 
168 /* Editor configuration
169  * vim: noexpandtab sw=8 ts=8 sts=8 tw=72:
170  */
gboolean GSM_StringToBool(const char *value)
Definition: cfg.c:470
void INI_Free(INI_Section *head)
Definition: cfg.c:454
GSM_Error
Definition: gammu-error.h:23
INI_Entry * Prev
Definition: gammu-inifile.h:42
INI_Entry * SubEntries
Definition: gammu-inifile.h:54
int gboolean
Definition: gammu-types.h:23
unsigned char * EntryValue
Definition: gammu-inifile.h:44
INI_Section * Prev
Definition: gammu-inifile.h:53
GSM_Error INI_ReadFile(const char *FileName, gboolean Unicode, INI_Section **result)
Definition: cfg.c:24
INI_Entry * INI_FindLastSectionEntry(INI_Section *file_info, const unsigned char *section, const gboolean Unicode)
Definition: cfg.c:409
Definition: gammu-inifile.h:41
gboolean INI_GetBool(INI_Section *cfg, const unsigned char *section, const unsigned char *key, gboolean fallback)
Definition: cfg.c:344
unsigned char * INI_GetValue(INI_Section *file_info, const unsigned char *section, const unsigned char *key, const gboolean Unicode)
Definition: cfg.c:365
unsigned char * SectionName
Definition: gammu-inifile.h:55
int INI_GetInt(INI_Section *cfg, const unsigned char *section, const unsigned char *key, int fallback)
Definition: cfg.c:329
unsigned char * EntryName
Definition: gammu-inifile.h:43
INI_Entry * Next
Definition: gammu-inifile.h:42