86 |
|
|
87 |
#include <gnokii/statemachine.h> |
#include <gnokii/statemachine.h> |
88 |
|
|
89 |
|
/* The global variable that keeps the current configuration. This should be |
90 |
|
* filled in before the phone initialization */ |
91 |
extern API struct gn_cfg_header *gn_cfg_info; |
extern API struct gn_cfg_header *gn_cfg_info; |
92 |
|
|
93 |
/* Files */ |
/* Files */ |
96 |
/* Misc */ |
/* Misc */ |
97 |
API gn_memory_type gn_str2memory_type(const char *s); |
API gn_memory_type gn_str2memory_type(const char *s); |
98 |
API char *gn_memory_type2str(gn_memory_type mt); |
API char *gn_memory_type2str(gn_memory_type mt); |
99 |
|
/* Zero the gn_data structure */ |
100 |
API void gn_data_clear(gn_data *data); |
API void gn_data_clear(gn_data *data); |
101 |
extern API gn_phone *gn_gsm_info; |
extern API gn_phone *gn_gsm_info; |
102 |
extern API gn_error (*gn_gsm_f)(gn_operation op, gn_data *data, |
extern API gn_error (*gn_gsm_f)(gn_operation op, gn_data *data, |
103 |
struct gn_statemachine *state); |
struct gn_statemachine *state); |
104 |
|
/* Initialise the connection and setup the driver according to the current |
105 |
|
* configuration */ |
106 |
API gn_error gn_gsm_initialise(struct gn_statemachine *sm); |
API gn_error gn_gsm_initialise(struct gn_statemachine *sm); |
107 |
API int gn_timestamp_isvalid(gn_timestamp dt); |
API int gn_timestamp_isvalid(gn_timestamp dt); |
108 |
|
|
109 |
/* Config file */ |
/* Config handling */ |
110 |
|
/* Get the key value from the given config, given section and the key name */ |
111 |
API char *gn_cfg_get(struct gn_cfg_header *cfg, const char *section, const char *key); |
API char *gn_cfg_get(struct gn_cfg_header *cfg, const char *section, const char *key); |
112 |
API int gn_cfg_read(char **bindir); /* DEPRECATED */ |
API int gn_cfg_read(char **bindir); /* DEPRECATED */ |
113 |
|
/* Read the config from the file filename */ |
114 |
API int gn_cfg_file_read(const char *filename); |
API int gn_cfg_file_read(const char *filename); |
115 |
|
/* Read the config from the file already put into the memory */ |
116 |
API int gn_cfg_memory_read(const char **lines); |
API int gn_cfg_memory_read(const char **lines); |
117 |
|
/* Read the config from the standard $HOME/.gnokiirc or /etc/gnokiirc locations */ |
118 |
API int gn_cfg_read_default(); |
API int gn_cfg_read_default(); |
119 |
|
/* Use phone_iname section for the communication. Default is the global section */ |
120 |
API int gn_cfg_phone_load(const char *iname, struct gn_statemachine *state); |
API int gn_cfg_phone_load(const char *iname, struct gn_statemachine *state); |
121 |
|
|
122 |
/* In/Out routines, file formats */ |
/* In/Out routines, file formats */ |
156 |
|
|
157 |
API int gn_line_get(FILE *file, char *line, int count); |
API int gn_line_get(FILE *file, char *line, int count); |
158 |
|
|
159 |
|
/* Place a lock for the given device in /var/lock or /var/run */ |
160 |
API char *gn_device_lock(const char *); |
API char *gn_device_lock(const char *); |
161 |
|
/* Remove a lock for the given device from /var/lock or /var/run */ |
162 |
API int gn_device_unlock(char *); |
API int gn_device_unlock(char *); |
163 |
|
|
164 |
API char *gn_model_get(const char *); |
API char *gn_model_get(const char *); |