diff options
Diffstat (limited to 'include')
| -rw-r--r-- | include/Makefile.am | 1 | ||||
| -rw-r--r-- | include/common/Makefile.am | 0 | ||||
| -rw-r--r-- | include/gsmd/Makefile.am | 0 | ||||
| -rw-r--r-- | include/gsmd/event.h | 4 | ||||
| -rw-r--r-- | include/gsmd/ts0707.h | 45 | ||||
| -rw-r--r-- | include/gsmd/usock.h | 7 | ||||
| -rw-r--r-- | include/libgsmd/Makefile.am | 2 | ||||
| -rw-r--r-- | include/libgsmd/libgsmd.h | 8 | 
8 files changed, 62 insertions, 5 deletions
diff --git a/include/Makefile.am b/include/Makefile.am new file mode 100644 index 0000000..3349edf --- /dev/null +++ b/include/Makefile.am @@ -0,0 +1 @@ +SUBDIRS = libgsmd # common gsmd diff --git a/include/common/Makefile.am b/include/common/Makefile.am new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/include/common/Makefile.am diff --git a/include/gsmd/Makefile.am b/include/gsmd/Makefile.am new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/include/gsmd/Makefile.am diff --git a/include/gsmd/event.h b/include/gsmd/event.h index 9403164..4500af9 100644 --- a/include/gsmd/event.h +++ b/include/gsmd/event.h @@ -13,6 +13,7 @@ enum gsmd_events {  	GSMD_EVT_OUT_STATUS	= 8,	/* Outgoing call status */  	GSMD_EVT_OUT_COLP	= 9,	/* Outgoing COLP */  	GSMD_EVT_CALL_WAIT	= 10,	/* Call Waiting */ +	__NUM_GSMD_EVT  };  /* Chapter 8.3 */ @@ -33,6 +34,7 @@ enum gsmd_pin_type {			/* waiting for ... */  	GSMD_PIN_PH_SP_PUK	= 13,	/* service provider personalisation PUK */  	GSMD_PIN_PH_CORP_PIN	= 14,	/* corporate personalisation PIN */  	GSMD_PIN_PH_CORP_PUK	= 15,	/* corporate personalisation PUK */ +	__NUM_GSMD_PIN  };  enum gsmd_call_type { @@ -43,10 +45,12 @@ enum gsmd_call_type {  	GSMD_CALL_DATA_SYNC	= 5,  	GSMD_CALL_DATA_REL_ASYNC= 6,  	GSMD_CALL_DATA_REL_SYNC	= 7, +	__NUM_GSMD_CALL  };  enum gsmd_netreg_state {  	GSMD_NETREG_NONE	= 0, +	__NUM_GSMD_NETREG  };  #endif diff --git a/include/gsmd/ts0707.h b/include/gsmd/ts0707.h new file mode 100644 index 0000000..fd97a86 --- /dev/null +++ b/include/gsmd/ts0707.h @@ -0,0 +1,45 @@ +#ifndef _GSM_0707_H +#define _GSM_0707_H + +/* Section 9.2.1 */ +enum gsm0707_cme_error { +	GSM0707_CME_PHONE_FAILURE		= 0, +	GSM0707_CME_PHONE_NOCONNECT		= 1, +	GSM0707_CME_PHONE_ADAPT_RESERVED	= 2, +	GSM0707_CME_OPERATION_NOT_ALLOWED	= 3, +	GSM0707_CME_OPERATUON_NOT_SUPPORTED	= 4, +	GSM0707_CME_PH_SIM_PIN_REQUIRED		= 5, +	GSM0707_CME_PH_FSIM_PIN_REQUIRED	= 6, +	GSM0707_CME_PH_FSIM_PUK_REQUIRED	= 7, +	GSM0707_CME_SIM_NOT_INSERTED		= 10, +	GSM0707_CME_SIM_PIN_REQUIRED		= 11, +	GSM0707_CME_SIM_PUK_REQUIRED		= 12, +	GSM0707_CME_SIM_FAILURE			= 13, +	GSM0707_CME_SIM_BUSY			= 14, +	GSM0707_CME_SIM_WRONG			= 15, +	GSM0707_CME_INCORRECT_PASSWORD		= 16, +	GSM0707_CME_SIM_PIN2_REQUIRED		= 17, +	GSM0707_CME_SIM_PUK2_REQUIRED		= 18, +	GSM0707_CME_MEMORY_FULL			= 20, +	GSM0707_CME_INVALID_INDEX		= 21, +	GSM0707_CME_NOT_FOUND			= 22, +	GSM0707_CME_MEMORY_FAILURE		= 23, +	GSM0707_CME_TEXT_STRING_TOO_LONG	= 24, +	GSM0707_CME_TEXT_STRING_INVAL_CHARS	= 25, +	GSM0707_CME_DIAL_STRING_TOO_LONG	= 26, +	GSM0707_CME_DIAL_STRING_INVAL_CHARS	= 27, +	GSM0707_CME_NO_NETWORK_SERVICE		= 30, +	GSM0707_CME_NETWORK_TIMEOUT		= 31, +	GSM0707_CME_NETWORK_NOT_ALLOWED		= 32, +	GSM0707_CME_NETPERS_PIN_REQUIRED	= 40, +	GSM0707_CME_NETPERS_PUK_REQUIRED	= 41, +	GSM0707_CME_NETSUBSET_PIN_REQUIRED	= 42, +	GSM0707_CME_NETSUBSET_PUK_REQUIRED	= 43, +	GSM0707_CME_PROVIDER_PIN_REQUIRED	= 44, +	GSM0707_CME_PROVIDER_PUK_REQUIRED	= 45, +	GSM0707_CME_CORPORATE_PIN_REQUIRED	= 46, +	GSM0707_CME_CORPORATE_PUK_REQUIRED	= 47, +	GSM0707_CME_UNKNOWN			= 100, +}; + +#endif /* _GSM_0707_H */ diff --git a/include/gsmd/usock.h b/include/gsmd/usock.h index 43ed792..f00ffc4 100644 --- a/include/gsmd/usock.h +++ b/include/gsmd/usock.h @@ -4,10 +4,13 @@  #include <gsmd/event.h>  #define GSMD_UNIX_SOCKET "\0gsmd" -#define GSMD_UNIX_SOCKET_TYPE SOCK_SEQPACKET +//#define GSMD_UNIX_SOCKET_TYPE SOCK_SEQPACKET +#define GSMD_UNIX_SOCKET_TYPE SOCK_STREAM  #define GSMD_PROTO_VERSION	1 +#define GSMD_MSGSIZE_MAX	4096 +  enum gsmd_prot_cmd {  	GSMD_PCMD_NONE,  	GSMD_PCMD_EVT_SUBSCRIPTIONS,		/* alter event subscriptions */ @@ -70,7 +73,7 @@ struct gsmd_evt_auxdata {  			u_int16_t ci;  		} netreg;  	} u; -}; +} __attribute__((packed));  struct gsmd_msg_hdr {  	u_int8_t version; diff --git a/include/libgsmd/Makefile.am b/include/libgsmd/Makefile.am new file mode 100644 index 0000000..7e7bb6b --- /dev/null +++ b/include/libgsmd/Makefile.am @@ -0,0 +1,2 @@ + +pkginclude_HEADERS = event.h handset.h libgsmd.h misc.h phonebook.h voicecall.h diff --git a/include/libgsmd/libgsmd.h b/include/libgsmd/libgsmd.h index 7673a68..d141361 100644 --- a/include/libgsmd/libgsmd.h +++ b/include/libgsmd/libgsmd.h @@ -28,8 +28,10 @@  /* Opaque data structure, content only known to libgsm implementation */  struct lgsm_handle; +#define LGSMD_DEVICE_GSMD	"gsmd" +  /* initialize usage of libgsmd, obtain handle for othe API calls */ -extern struct lgsm_handle *lgsm_init(void); +extern struct lgsm_handle *lgsm_init(const char *device);  /* Terminate usage of libgsmd */  extern int lgsm_exit(struct lgsm_handle *lh);  @@ -40,8 +42,8 @@ extern int lgsm_fd(struct lgsm_handle *lh);  /* Refer to GSM 04.08 [8] subclause 10.5.4.7 */  enum lgsm_addr_type {  	LGSM_ATYPE_ISDN_UNKN		= 161, -	LGSM_ATYPE_ISDN_INTL		= , -	LGSM_ATYPE_ISDN_NATIONAL	= , +	//LGSM_ATYPE_ISDN_INTL		= , +	//LGSM_ATYPE_ISDN_NATIONAL	= ,  };  #define LGSM_ADDR_MAXLEN	31  | 
