diff options
-rw-r--r-- | include/gsmd/event.h | 1 | ||||
-rw-r--r-- | include/gsmd/gsmd.h | 2 | ||||
-rw-r--r-- | include/gsmd/state.h | 23 | ||||
-rw-r--r-- | include/gsmd/usock.h | 8 | ||||
-rw-r--r-- | src/libgsmd/libgsmd_voicecall.c | 6 |
5 files changed, 40 insertions, 0 deletions
diff --git a/include/gsmd/event.h b/include/gsmd/event.h index acffba5..15d070d 100644 --- a/include/gsmd/event.h +++ b/include/gsmd/event.h @@ -15,6 +15,7 @@ enum gsmd_events { GSMD_EVT_CALL_WAIT = 10, /* Call Waiting */ GSMD_EVT_TIMEZONE = 11, /* Timezone change */ GSMD_EVT_SUBSCRIPTIONS = 12, /* To which events are we subscribed to */ + GSMD_EVT_CIPHER = 13, /* Chiphering Information */ __NUM_GSMD_EVT }; diff --git a/include/gsmd/gsmd.h b/include/gsmd/gsmd.h index 22058b2..9f865a0 100644 --- a/include/gsmd/gsmd.h +++ b/include/gsmd/gsmd.h @@ -9,6 +9,7 @@ #include <gsmd/vendorplugin.h> #include <gsmd/select.h> +#include <gsmd/state.h> void *gsmd_tallocs; @@ -64,6 +65,7 @@ struct gsmd { struct llist_head pending_atcmds; /* our busy gsmd_atcmds */ struct llist_head busy_atcmds; /* our busy gsmd_atcmds */ struct gsmd_vendor_plugin *vendorpl; + struct gsmd_device_state dev_state; }; struct gsmd_user { diff --git a/include/gsmd/state.h b/include/gsmd/state.h new file mode 100644 index 0000000..62cd710 --- /dev/null +++ b/include/gsmd/state.h @@ -0,0 +1,23 @@ +#ifndef _GSMD_STATE_H +#define _GSMD_STATE_H + +#ifdef __GSMD__ + +#define GSMD_CIPHIND_CAPABLE 0x01 +#define GSMD_CIPHIND_DISABLED_SIM 0x02 +#define GSMD_CIPHIND_ACTIVE 0x04 + +struct gsmd_device_state { + struct { + unsigned int flags; + unsigned int network_state_gsm; + unsigned int network_state_gprs; + } ciph_ind; + + unsigned int on; + unsigned int registered; +}; + +#endif /* __GSMD__ */ + +#endif /* _GSMD_STATE_H */ diff --git a/include/gsmd/usock.h b/include/gsmd/usock.h index 1c3ccac..530eed7 100644 --- a/include/gsmd/usock.h +++ b/include/gsmd/usock.h @@ -35,6 +35,8 @@ enum gsmd_msg_voicecall_type { GSMD_VOICECALL_HANGUP = 2, GSMD_VOICECALL_ANSWER = 3, GSMD_VOICECALL_DTMF = 4, + GSMD_VOICECALL_VOL_SET = 5, + GSMD_VOICECALL_VOL_GET = 6, }; /* Handset / MT related commands */ @@ -58,6 +60,7 @@ enum gsmd_msg_network { GSMD_NETWORK_VMAIL_GET = 3, GSMD_NETWORK_VMAIL_SET = 4, GSMD_NETWORK_OPER_GET = 5, + GSMD_NETWORK_CIND_GET = 6, }; /* Length from 3GPP TS 04.08, Clause 10.5.4.7 */ @@ -119,6 +122,11 @@ struct gsmd_evt_auxdata { tch:1, dir:2; } call_status; + struct { + u_int16_t flags; + u_int16_t net_state_gsm; + u_int16_t net_state_gprs; + } cipher; } u; } __attribute__((packed)); diff --git a/src/libgsmd/libgsmd_voicecall.c b/src/libgsmd/libgsmd_voicecall.c index 6eb2c6f..d6965fa 100644 --- a/src/libgsmd/libgsmd_voicecall.c +++ b/src/libgsmd/libgsmd_voicecall.c @@ -107,3 +107,9 @@ int lgsm_voice_hangup(struct lgsm_handle *lh) { return lgsm_send_simple(lh, GSMD_MSG_VOICECALL, GSMD_VOICECALL_HANGUP); } + +int lgsm_voice_volume_set(struct lgsm_handle *lh, int volume) +{ + /* FIXME: we need to pass along the parameter */ + return lgsm_send_simple(lh, GSMD_MSG_VOICECALL, GSMD_VOICECALL_VOL_SET); +} |