3
* oFono - Open Source Telephony
5
* Copyright (C) 2008-2009 Intel Corporation. All rights reserved.
7
* This program is free software; you can redistribute it and/or modify
8
* it under the terms of the GNU General Public License version 2 as
9
* published by the Free Software Foundation.
11
* This program is distributed in the hope that it will be useful,
12
* but WITHOUT ANY WARRANTY; without even the implied warranty of
13
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14
* GNU General Public License for more details.
16
* You should have received a copy of the GNU General Public License
17
* along with this program; if not, write to the Free Software
18
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
22
#ifndef __OFONO_GPRS_H
23
#define __OFONO_GPRS_H
29
#include <ofono/types.h>
32
struct ofono_gprs_context;
34
typedef void (*ofono_gprs_status_cb_t)(const struct ofono_error *error,
35
int status, int lac, int ci,
36
int tech, void *data);
38
typedef void (*ofono_gprs_cb_t)(const struct ofono_error *error, void *data);
40
struct ofono_gprs_driver {
42
int (*probe)(struct ofono_gprs *gprs, unsigned int vendor,
44
void (*remove)(struct ofono_gprs *gprs);
45
void (*set_attached)(struct ofono_gprs *gprs, int attached,
46
ofono_gprs_cb_t cb, void *data);
47
void (*registration_status)(struct ofono_gprs *gprs,
48
ofono_gprs_status_cb_t cb, void *data);
51
void ofono_gprs_status_notify(struct ofono_gprs *gprs,
52
int status, int lac, int ci, int tech);
54
void ofono_gprs_detached_notify(struct ofono_gprs *gprs);
56
int ofono_gprs_driver_register(const struct ofono_gprs_driver *d);
57
void ofono_gprs_driver_unregister(const struct ofono_gprs_driver *d);
59
struct ofono_gprs *ofono_gprs_create(struct ofono_modem *modem,
60
unsigned int vendor, const char *driver,
62
void ofono_gprs_register(struct ofono_gprs *gprs);
63
void ofono_gprs_remove(struct ofono_gprs *gprs);
65
void ofono_gprs_set_data(struct ofono_gprs *gprs, void *data);
66
void *ofono_gprs_get_data(struct ofono_gprs *gprs);
68
void ofono_gprs_set_cid_range(struct ofono_gprs *gprs, int min, int max);
69
void ofono_gprs_add_context(struct ofono_gprs *gprs,
70
struct ofono_gprs_context *gc);
76
#endif /* __OFONO_GPRS_H */