diff options
Diffstat (limited to 'src/gsmd/vendor_ti.c')
-rw-r--r-- | src/gsmd/vendor_ti.c | 53 |
1 files changed, 53 insertions, 0 deletions
diff --git a/src/gsmd/vendor_ti.c b/src/gsmd/vendor_ti.c new file mode 100644 index 0000000..ac67b92 --- /dev/null +++ b/src/gsmd/vendor_ti.c @@ -0,0 +1,53 @@ +/* TI [Calypso] compatible backend */ + +#include <stdlib.h> +#include <unistd.h> +#include <string.h> +#include <errno.h> + +#include "vendorplugin.h" + +static int +ti_getopt(struct gsmd *gh, int optname, void *optval, int *optlen) +{ + switch (optname) { + case GSMD_OPT_CIPHER_IND: + /* FIXME: send AT%CPRI=? */ + break; + default: + return -EINVAL; + } +} + +static int +ti_setopt(struct gsmd *gh, int optname, const void *optval, int optlen) +{ + switch (optname) { + case GSMD_OPT_CIPHER_IND: + /* FIXME: send AT%CPRI= */ + break; + default: + return -EINVAL; + } +} + +static int ti_parseunsolicit(struct gsmd *gh) +{ + /* FIXME: parse all the below and generate the respective events */ + + /* %CPROAM: CPHS Home Country Roaming Indicator */ + /* %CPVWI: CPHS Voice Message Waiting */ + /* %CGREG: reports extended information about GPRS registration state */ + /* %CTZV: reports network time and date information */ + /* %CNIV: reports network name information */ + /* %CPKY: Press Key */ + /* %CMGRS: Message Retransmission Service */ + /* %CGEV: reports GPRS network events */ + return -EINVAL; +} + +struct gsmd_vendorspecific ti_vendorspec = { + .getopt = &ti_getopt, + .setopt = &ti_setopt, + .parse_unsolicit = &ti_parseunsolicit, +}; |