From 1584a74a4acdfb17aab0d6a2b13b18a7799aa37d Mon Sep 17 00:00:00 2001 From: laforge Date: Sat, 2 Sep 2006 10:32:06 +0000 Subject: first compiling (unfinished, not-working) version of userspace gsm infrastructure git-svn-id: http://svn.openmoko.org/trunk/src/target/gsm@40 99fdad57-331a-0410-800a-d7fa5415bdb3 --- include/libgsmd/misc.h | 72 ++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 72 insertions(+) create mode 100644 include/libgsmd/misc.h (limited to 'include/libgsmd/misc.h') diff --git a/include/libgsmd/misc.h b/include/libgsmd/misc.h new file mode 100644 index 0000000..e191ce6 --- /dev/null +++ b/include/libgsmd/misc.h @@ -0,0 +1,72 @@ +#ifndef _LIBGSMD_H +#define _LIBGSMD_H + +/* libgsmd.h - Library API for gsmd, the GSM Daemon + * (C) 2006 by Harald Welte + * Development funded by First International Computers, Inc. + */ + +#include + +enum lgsm_netreg_state { + LGSM_NETREG_ST_NOTREG = 0, + LGSM_NETREG_ST_REG_HOME = 1, + LGSM_NETREG_ST_NOTREG_SEARCH = 2, + LGSM_NETREG_ST_DENIED = 3, + LGSM_NETREG_ST_UNKNOWN = 4, + LGSM_NETREG_ST_REG_ROAMING = 5, +}; + +/* Get the current network registration status */ +extern int lgsm_get_netreg_state(struct lgsm_handle *lh, + enum lgsm_netreg_state *state); + +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); + + +/* General Commands */ + +/* Get Signal Strehngth (Chapter 8.5) */ +extern int lgsm_get_signal_quality(struct lgsm_handle *h, + unsigned int *rssi); + +/* Set voice mail number */ +extern int lgsm_voicemail_set(struct lgsm_handle *lh, + struct lgsm_addr *addr); + +/* Get currently configured voice mail number */ +extern int lgsm_voicemail_get(struct lgsm_handle *lh, + struct lgsm_addr *addr); + +/* Operator Selection, Network Registration */ +/* TBD */ + + +/* CLIP, CLIR, COLP, Call Forwarding, Call Waiting, Call Deflecting */ +/* TBD */ + + +/* SMS related functions */ +/* TBD */ + + +/* GPRS related functions */ +/* TBD */ + + +#endif -- cgit v1.2.3