blob: ac67b9276e5479be6dc9527d2c9f8a297ebb624c (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
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,
};
|