diff options
Diffstat (limited to 'include')
-rw-r--r-- | include/gsmd/usock.h | 14 | ||||
-rw-r--r-- | include/libgsmd/misc.h | 2 |
2 files changed, 16 insertions, 0 deletions
diff --git a/include/gsmd/usock.h b/include/gsmd/usock.h index 4263cad..7df22b2 100644 --- a/include/gsmd/usock.h +++ b/include/gsmd/usock.h @@ -139,6 +139,7 @@ enum gsmd_msg_phone { GSMD_PHONE_GET_MODEL = 5, GSMD_PHONE_GET_REVISION = 6, GSMD_PHONE_GET_SERIAL = 7, + GSMD_PHONE_GET_BATTERY = 8, }; enum gsmd_msg_modem { @@ -371,6 +372,14 @@ enum gsmd_toa_reserved { /* Length from 3GPP TS 04.08, Clause 10.5.4.7 */ +/* battery connection status from 3GPP TS 07.07 subclause 8.4 */ +enum gsmd_bat_conn_status { + GSMD_BAT_NORMAL = 0, + GSMD_BAT_NOT_POWERED = 1, + GSMD_BAT_NO_BAT = 2, + GSMD_BAT_POWER_FAULT = 3, +}; + #define GSMD_ADDR_MAXLEN 32 struct gsmd_addr { u_int8_t type; @@ -392,6 +401,11 @@ struct gsmd_voicemail { struct gsmd_addr addr; } __attribute__ ((packed)); +struct gsmd_battery_charge { + enum gsmd_bat_conn_status bcs; + u_int8_t bcl; +} __attribute__ ((packed)); + #define GSMD_ALPHA_MAXLEN 20 /* call status from 3GPP TS 07.07 clause 07.17 */ diff --git a/include/libgsmd/misc.h b/include/libgsmd/misc.h index 02483d3..884e294 100644 --- a/include/libgsmd/misc.h +++ b/include/libgsmd/misc.h @@ -71,4 +71,6 @@ extern int lgsm_get_serial(struct lgsm_handle *lh); extern int lgsm_voicemail_set(struct lgsm_handle *lh, const char *number); /* Get currently configured voice mail number */ extern int lgsm_voicemail_get(struct lgsm_handle *lh); +/* Get Battery Connection status and charge level */ +extern int lgsm_get_battery(struct lgsm_handle *lh); #endif |