diff options
Diffstat (limited to 'include')
-rw-r--r-- | include/gsmd/event.h | 2 | ||||
-rw-r--r-- | include/gsmd/sms.h | 5 | ||||
-rw-r--r-- | include/gsmd/usock.h | 19 | ||||
-rw-r--r-- | include/libgsmd/sms.h | 7 |
4 files changed, 28 insertions, 5 deletions
diff --git a/include/gsmd/event.h b/include/gsmd/event.h index 15d070d..395c488 100644 --- a/include/gsmd/event.h +++ b/include/gsmd/event.h @@ -16,6 +16,8 @@ enum gsmd_events { GSMD_EVT_TIMEZONE = 11, /* Timezone change */ GSMD_EVT_SUBSCRIPTIONS = 12, /* To which events are we subscribed to */ GSMD_EVT_CIPHER = 13, /* Chiphering Information */ + GSMD_EVT_IN_CBM = 14, /* Incoming Cell Broadcat message */ + GSMD_EVT_IN_DS = 15, /* SMS Status Report */ __NUM_GSMD_EVT }; diff --git a/include/gsmd/sms.h b/include/gsmd/sms.h index 3192472..f4def25 100644 --- a/include/gsmd/sms.h +++ b/include/gsmd/sms.h @@ -7,12 +7,13 @@ int sms_cb_init(struct gsmd *gsmd); +#define MAX_PDU_SIZE 180 int sms_pdu_make_smssubmit(char *dest, const struct gsmd_sms_submit *src); int sms_pdu_to_msg(struct gsmd_sms_list *dst, const u_int8_t *src, int pdulen, int len); -extern const char *ts0705_memtype_name[]; -int parse_memtype(char *memtype); +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); #endif /* __GSMD__ */ diff --git a/include/gsmd/usock.h b/include/gsmd/usock.h index bcff129..18ffa5e 100644 --- a/include/gsmd/usock.h +++ b/include/gsmd/usock.h @@ -22,6 +22,7 @@ enum gsmd_msg_type { GSMD_MSG_PHONE = 7, GSMD_MSG_PIN = 8, GSMD_MSG_SMS = 9, + GSMD_MSG_CB = 10, __NUM_GSMD_MSGS }; @@ -259,10 +260,21 @@ struct gsmd_evt_auxdata { struct gsmd_addr addr; } colp; struct { + int inlined; u_int8_t memtype; int index; } sms; struct { + int inlined; + u_int8_t memtype; + int index; + } cbm; + struct { + int inlined; + u_int8_t memtype; + int index; + } ds; + struct { enum gsmd_pin_type type; } pin; struct { @@ -289,7 +301,8 @@ struct gsmd_evt_auxdata { u_int16_t net_state_gprs; } cipher; } u; -} __attribute__((packed)); + u_int8_t data[0]; +} __attribute__ ((packed)); /* Refer to GSM 07.05 subclause 3.5.4 */ struct gsmd_sms_delete { @@ -431,8 +444,10 @@ struct gsmd_ucmd { extern struct gsmd_ucmd *ucmd_alloc(int extra_size); extern int usock_init(struct gsmd *g); extern void usock_cmd_enqueue(struct gsmd_ucmd *ucmd, struct gsmd_user *gu); -extern struct gsmd_ucmd *usock_build_event(u_int8_t type, u_int8_t subtype, u_int8_t len); +extern struct gsmd_ucmd *usock_build_event(u_int8_t type, u_int8_t subtype, u_int16_t len); extern int usock_evt_send(struct gsmd *gsmd, struct gsmd_ucmd *ucmd, u_int32_t evt); +extern struct gsmd_ucmd *gsmd_ucmd_fill(int len, u_int8_t msg_type, + u_int8_t msg_subtype, u_int16_t id); #endif /* __GSMD__ */ diff --git a/include/libgsmd/sms.h b/include/libgsmd/sms.h index d389b21..69363e7 100644 --- a/include/libgsmd/sms.h +++ b/include/libgsmd/sms.h @@ -109,5 +109,10 @@ extern int packing_UCS2_82(char *src, char *dest); /* Refer to 3GPP TS 11.11 Annex B */ extern int unpacking_UCS2_82(char *src, char *dest); -#endif +/* This phone wants to receive Cell Broadcast Messages */ +extern int lgsm_cb_subscribe(struct lgsm_handle *lh); + +/* This phone wants no more Cell Broadcast Messages */ +extern int lgsm_cb_unsubscribe(struct lgsm_handle *lh); +#endif |