diff options
Diffstat (limited to 'include/gsmd')
-rw-r--r-- | include/gsmd/sms.h | 5 | ||||
-rw-r--r-- | include/gsmd/usock.h | 42 |
2 files changed, 46 insertions, 1 deletions
diff --git a/include/gsmd/sms.h b/include/gsmd/sms.h index b48ce5d..c5ee0d8 100644 --- a/include/gsmd/sms.h +++ b/include/gsmd/sms.h @@ -8,10 +8,13 @@ int sms_cb_init(struct gsmd *gsmd); int sms_cb_network_init(struct gsmd *gsmd); -#define MAX_PDU_SIZE 180 +#define SMS_MAX_PDU_SIZE 180 +#define CBM_MAX_PDU_SIZE 88 +#define CBM_MAX_PDU_PAGES 15 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); +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); diff --git a/include/gsmd/usock.h b/include/gsmd/usock.h index 18ffa5e..ce5c25e 100644 --- a/include/gsmd/usock.h +++ b/include/gsmd/usock.h @@ -365,6 +365,48 @@ struct gsmd_sms_storage { struct __gsmd_sms_storage mem[3]; } __attribute__ ((packed)); +/* Refer to GSM 03.41 subclause 9.3.1 - note: this indicates display mode too */ +enum gsmd_geographical_scope { + GSMD_SCOPE_CELL_WIDE_OPER = 0, + GSMD_SCOPE_PLMN_WIDE, + GSMD_SCOPE_LOC_AREA_WIDE, + GSMD_SCOPE_CELL_WIDE, +}; + +enum gsmd_language { + GSMD_LANG_GERMAN = 0, + GSMD_LANG_ENGLISH, + GSMD_LANG_ITALIAN, + GSMD_LANG_FRENCH, + GSMD_LANG_SPANISH, + GSMD_LANG_DUTCH, + GSMD_LANG_SWEDISH, + GSMD_LANG_DANISH, + GSMD_LANG_PORTUGUESE, + GSMD_LANG_FINNISH, + GSMD_LANG_NORWEGIAN, + GSMD_LANG_GREEK, + GSMD_LANG_TURKISH, + GSMD_LANG_HUNGARIAN, + GSMD_LANG_POLISH, + GSMD_LANG_UNSPECIFIED, +}; + +/* Refer to GSM 03.41 subclause 9.3 */ +struct gsmd_cbm { + struct { + enum gsmd_geographical_scope scope; + int msg_code; + int update_num; + } serial; + u_int16_t msg_id; + enum gsmd_language language; + u_int8_t coding_scheme; + int pages; + int page; + u_int8_t data[82]; +}; + /* Refer to GSM 07.07 subclause 8.12 */ struct gsmd_phonebook_readrg { u_int8_t index1; |