diff options
author | erin_yueh <erin_yueh@99fdad57-331a-0410-800a-d7fa5415bdb3> | 2008-02-15 11:10:16 +0000 |
---|---|---|
committer | erin_yueh <erin_yueh@99fdad57-331a-0410-800a-d7fa5415bdb3> | 2008-02-15 11:10:16 +0000 |
commit | 9425af516e374f787bcb20244d931e7a355fd0f8 (patch) | |
tree | 1643a2db6e3d5c3dd57670e4ba4fb5e8c935d88e /include | |
parent | cabd52f1f0682bac467126e45b56680936c77e0b (diff) |
gsmd: add retrieving phone info (Erin Yueh)
git-svn-id: http://svn.openmoko.org/trunk/src/target/gsm@4067 99fdad57-331a-0410-800a-d7fa5415bdb3
Diffstat (limited to 'include')
-rw-r--r-- | include/gsmd/gsmd.h | 1 | ||||
-rw-r--r-- | include/gsmd/usock.h | 4 | ||||
-rw-r--r-- | include/libgsmd/misc.h | 22 |
3 files changed, 13 insertions, 14 deletions
diff --git a/include/gsmd/gsmd.h b/include/gsmd/gsmd.h index 0521dd5..fc26875 100644 --- a/include/gsmd/gsmd.h +++ b/include/gsmd/gsmd.h @@ -73,6 +73,7 @@ struct gsmd; #define GSMD_FLAG_SMS_FMT_TEXT 0x0002 /* TODO Use TEXT rather than PDU mode */ #define GSMD_ATCMD_TIMEOUT 60 /* If doesn get respond within 60 secs, discard */ +#define GSMD_MAX_INFO_LEN 64 /* by the standard it should be 2048, way too much :) */ struct gsmd { unsigned int flags; diff --git a/include/gsmd/usock.h b/include/gsmd/usock.h index 21ab54e..4263cad 100644 --- a/include/gsmd/usock.h +++ b/include/gsmd/usock.h @@ -135,6 +135,10 @@ enum gsmd_msg_phone { GSMD_PHONE_POWERUP = 1, GSMD_PHONE_POWERDOWN = 2, GSMD_PHONE_GET_IMSI = 3, + GSMD_PHONE_GET_MANUF = 4, + GSMD_PHONE_GET_MODEL = 5, + GSMD_PHONE_GET_REVISION = 6, + GSMD_PHONE_GET_SERIAL = 7, }; enum gsmd_msg_modem { diff --git a/include/libgsmd/misc.h b/include/libgsmd/misc.h index 4ced5b1..02483d3 100644 --- a/include/libgsmd/misc.h +++ b/include/libgsmd/misc.h @@ -11,20 +11,6 @@ extern int lgsm_phone_power(struct lgsm_handle *lh, int power); extern int lgsm_modem_power(struct lgsm_handle *lh, int power); -enum lgsm_info_type { - LGSM_INFO_TYPE_NONE = 0, - LGSM_INFO_TYPE_MANUF = 1, - LGSM_INFO_TYPE_MODEL = 2, - LGSM_INFO_TYPE_REVISION = 3, - LGSM_INFO_TYPE_SERIAL = 4, - LGSM_INFO_TYPE_IMSI = 5, -}; - -/* Get some information about the handset */ -extern int lgsm_get_info(struct lgsm_handle *lh, - enum lgsm_info_type type, - char *ret_string, u_int16_t len); - /* Authenticate to SIM Card using specified null-terminated pin */ extern int lgsm_pin_auth(struct lgsm_handle *lh, const char *pin); @@ -73,6 +59,14 @@ extern int lgsm_get_subscriber_num(struct lgsm_handle *lh); /* Retrieve IMSI information */ extern int lgsm_get_imsi(struct lgsm_handle *lh); +/* Retrieve manufacturer information */ +extern int lgsm_get_manufacturer(struct lgsm_handle *lh); +/* Retrieve model information */ +extern int lgsm_get_model(struct lgsm_handle *lh); +/* Retrieve revision information */ +extern int lgsm_get_revision(struct lgsm_handle *lh); +/* Retrieve serial information */ +extern int lgsm_get_serial(struct lgsm_handle *lh); /* Set voice mail number */ extern int lgsm_voicemail_set(struct lgsm_handle *lh, const char *number); /* Get currently configured voice mail number */ |