~ubuntu-branches/debian/sid/ofono/sid

« back to all changes in this revision

Viewing changes to include/gprs.h

  • Committer: Bazaar Package Importer
  • Author(s): Andres Salomon
  • Date: 2009-11-02 18:46:37 UTC
  • mfrom: (1.2.2 upstream)
  • Revision ID: james.westby@ubuntu.com-20091102184637-rh8ik6v1lcdgdh10
Tags: 0.9-1
* New upstream release.
* Since it runs w/out it, change the udev Depends to a Recommends.

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/*
 
2
 *
 
3
 *  oFono - Open Source Telephony
 
4
 *
 
5
 *  Copyright (C) 2008-2009  Intel Corporation. All rights reserved.
 
6
 *
 
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.
 
10
 *
 
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.
 
15
 *
 
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
 
19
 *
 
20
 */
 
21
 
 
22
#ifndef __OFONO_GPRS_H
 
23
#define __OFONO_GPRS_H
 
24
 
 
25
#ifdef __cplusplus
 
26
extern "C" {
 
27
#endif
 
28
 
 
29
#include <ofono/types.h>
 
30
 
 
31
struct ofono_gprs;
 
32
struct ofono_gprs_context;
 
33
 
 
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);
 
37
 
 
38
typedef void (*ofono_gprs_cb_t)(const struct ofono_error *error, void *data);
 
39
 
 
40
struct ofono_gprs_driver {
 
41
        const char *name;
 
42
        int (*probe)(struct ofono_gprs *gprs, unsigned int vendor,
 
43
                        void *data);
 
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);
 
49
};
 
50
 
 
51
void ofono_gprs_status_notify(struct ofono_gprs *gprs,
 
52
                                int status, int lac, int ci, int tech);
 
53
 
 
54
void ofono_gprs_detached_notify(struct ofono_gprs *gprs);
 
55
 
 
56
int ofono_gprs_driver_register(const struct ofono_gprs_driver *d);
 
57
void ofono_gprs_driver_unregister(const struct ofono_gprs_driver *d);
 
58
 
 
59
struct ofono_gprs *ofono_gprs_create(struct ofono_modem *modem,
 
60
                                        unsigned int vendor, const char *driver,
 
61
                                        void *data);
 
62
void ofono_gprs_register(struct ofono_gprs *gprs);
 
63
void ofono_gprs_remove(struct ofono_gprs *gprs);
 
64
 
 
65
void ofono_gprs_set_data(struct ofono_gprs *gprs, void *data);
 
66
void *ofono_gprs_get_data(struct ofono_gprs *gprs);
 
67
 
 
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);
 
71
 
 
72
#ifdef __cplusplus
 
73
}
 
74
#endif
 
75
 
 
76
#endif /* __OFONO_GPRS_H */