diff options
Diffstat (limited to 'include/gsmd')
-rw-r--r-- | include/gsmd/gsmd.h | 6 | ||||
-rw-r--r-- | include/gsmd/machineplugin.h | 4 | ||||
-rw-r--r-- | include/gsmd/sms.h | 3 | ||||
-rw-r--r-- | include/gsmd/unsolicited.h | 8 | ||||
-rw-r--r-- | include/gsmd/usock.h | 4 | ||||
-rw-r--r-- | include/gsmd/vendorplugin.h | 5 |
6 files changed, 21 insertions, 9 deletions
diff --git a/include/gsmd/gsmd.h b/include/gsmd/gsmd.h index de99238..ff63b58 100644 --- a/include/gsmd/gsmd.h +++ b/include/gsmd/gsmd.h @@ -4,6 +4,7 @@ #ifdef __GSMD__ #include <sys/types.h> +#include <sys/time.h> #include <common/linux_list.h> @@ -117,6 +118,8 @@ void __gsmd_log(int level, const char *file, int line, const char *function, con #define DEBUGP(x, args ...) gsmd_log(GSMD_DEBUG, x, ## args) extern int gsmd_simplecmd(struct gsmd *gsmd, char *cmdtxt); +extern int gsmd_initsettings(struct gsmd *gsmd); +extern int gsmd_alive_start(struct gsmd *gsmd); /*********************************************************************** * timer handling @@ -130,8 +133,7 @@ struct gsmd_timer { }; int gsmd_timer_init(void); -void gmsd_timer_check_n_run(void); - +void gsmd_timer_check_n_run(void); struct gsmd_timer *gsmd_timer_alloc(void); int gsmd_timer_register(struct gsmd_timer *timer); void gsmd_timer_unregister(struct gsmd_timer *timer); diff --git a/include/gsmd/machineplugin.h b/include/gsmd/machineplugin.h index c3ed801..8185fb6 100644 --- a/include/gsmd/machineplugin.h +++ b/include/gsmd/machineplugin.h @@ -10,13 +10,15 @@ struct gsmd; struct gsmd_machine_plugin { struct llist_head list; - unsigned char *name; + char *name; int (*power)(struct gsmd *g, int power); int (*ex_submit)(struct gsmd *g); int (*detect)(struct gsmd *g); int (*init)(struct gsmd *g, int fd); }; +extern int gsmd_machine_plugin_init(struct gsmd *g, + char *machine_name, char *vendor_name); extern int gsmd_machine_plugin_register(struct gsmd_machine_plugin *pl); extern void gsmd_machine_plugin_unregister(struct gsmd_machine_plugin *pl); extern int gsmd_machine_plugin_find(struct gsmd *g); diff --git a/include/gsmd/sms.h b/include/gsmd/sms.h index c5ee0d8..2519daf 100644 --- a/include/gsmd/sms.h +++ b/include/gsmd/sms.h @@ -18,7 +18,8 @@ int cbs_pdu_to_msg(struct gsmd_cbm *dst, u_int8_t *src, int pdulen, int len); int usock_rcv_sms(struct gsmd_user *gu, struct gsmd_msg_hdr *gph, int len); int usock_rcv_cb(struct gsmd_user *gu, struct gsmd_msg_hdr *gph, int len); - +int sms_pdu_decode_dcs(struct gsmd_sms_datacodingscheme *dcs, + const u_int8_t *data); #endif /* __GSMD__ */ #endif diff --git a/include/gsmd/unsolicited.h b/include/gsmd/unsolicited.h index fa0ee32..49bdcde 100644 --- a/include/gsmd/unsolicited.h +++ b/include/gsmd/unsolicited.h @@ -7,14 +7,18 @@ struct gsmd_unsolicit { const char *prefix; - int (*parse)(char *unsol, int len, const char *param, struct gsmd *gsmd); + int (*parse)(const char *unsol, + int len, const char *param, struct gsmd *gsmd); }; -extern int unsolicited_parse(struct gsmd *g, char *buf, int len, const char *param); +extern void unsolicited_init(struct gsmd *g); +extern int unsolicited_parse(struct gsmd *g, + const char *buf, int len, const char *param); extern int generate_event_from_cme(struct gsmd *g, unsigned int cme_error); extern void unsolicited_generic_init(struct gsmd *g); extern int unsolicited_register_array(const struct gsmd_unsolicit *arr, int len); +extern int generate_event_from_cms(struct gsmd *g, unsigned int cms_error); extern const int pintype_from_cme[]; #endif /* __GSMD__ */ diff --git a/include/gsmd/usock.h b/include/gsmd/usock.h index 8bd5686..6200118 100644 --- a/include/gsmd/usock.h +++ b/include/gsmd/usock.h @@ -741,7 +741,9 @@ extern struct gsmd_ucmd *usock_build_event(u_int8_t type, u_int8_t subtype, u_in extern int usock_evt_send(struct gsmd *gsmd, struct gsmd_ucmd *ucmd, u_int32_t evt); extern int gsmd_ucmd_submit(struct gsmd_user *gu, u_int8_t msg_type, u_int8_t msg_subtype, u_int16_t id, int len, const void *data); - +extern int gsmd_opname_init(struct gsmd *g); +extern int gsmd_opname_add(struct gsmd *g, const char *numeric_bcd_string, + const char *alnum_long); #endif /* __GSMD__ */ #endif diff --git a/include/gsmd/vendorplugin.h b/include/gsmd/vendorplugin.h index 1911fef..8669bb7 100644 --- a/include/gsmd/vendorplugin.h +++ b/include/gsmd/vendorplugin.h @@ -11,14 +11,15 @@ struct gsmd_unsolicit; struct gsmd_vendor_plugin { struct llist_head list; - unsigned char *name; - unsigned char *ext_chars; + char *name; + char *ext_chars; unsigned int num_unsolicit; const struct gsmd_unsolicit *unsolicit; int (*detect)(struct gsmd *g); int (*initsettings)(struct gsmd *g); }; +extern int gsmd_vendor_plugin_load(char *name); extern int gsmd_vendor_plugin_register(struct gsmd_vendor_plugin *pl); extern void gsmd_vendor_plugin_unregister(struct gsmd_vendor_plugin *pl); extern int gsmd_vendor_plugin_find(struct gsmd *g); |