summaryrefslogtreecommitdiff
path: root/include/gprs.h
diff options
context:
space:
mode:
authorDenis Kenzior <denis.kenzior@intel.com>2009-10-22 17:14:50 -0500
committerDenis Kenzior <denkenz@gmail.com>2009-10-23 17:05:54 -0500
commitbb7945d6aa327cc16ee0dec4f25de16d91d531a8 (patch)
tree41dbfac34535caa397eefe720fae87332144fcaf /include/gprs.h
parent729d580692a79b006ca0d12a046dc7f00516b47a (diff)
Refactor: Split up GPRS into two atoms
Split up GPRS into two atoms: GPRS and GPRS Context. GPRS will handle the areas of GPRS network registration, basic GPRS capability detection and attach / detach. GPRS Context will handle setting up / activating / deactivating the indicidual contexts. This will allow us to use the generic GPRS atom for most devices while customizing the GPRS context accordingly.
Diffstat (limited to 'include/gprs.h')
-rw-r--r--include/gprs.h31
1 files changed, 1 insertions, 30 deletions
diff --git a/include/gprs.h b/include/gprs.h
index 9bbf51f1..2d40ef82 100644
--- a/include/gprs.h
+++ b/include/gprs.h
@@ -30,26 +30,12 @@ extern "C" {
struct ofono_gprs;
-struct ofono_gprs_primary_context {
- unsigned id;
- int type;
- int direction;
- int active;
- char *apn;
- char *username;
- char *password;
-};
-
typedef void (*ofono_gprs_status_cb_t)(const struct ofono_error *error,
int status, int lac, int ci,
int tech, void *data);
typedef void (*ofono_gprs_cb_t)(const struct ofono_error *error, void *data);
-typedef void (*ofono_gprs_alloc_cb_t)(const struct ofono_error *error,
- struct ofono_gprs_primary_context *ctx,
- void *data);
-
struct ofono_gprs_driver {
const char *name;
int (*probe)(struct ofono_gprs *gprs, unsigned int vendor,
@@ -57,17 +43,6 @@ struct ofono_gprs_driver {
void (*remove)(struct ofono_gprs *gprs);
void (*set_attached)(struct ofono_gprs *gprs, int attached,
ofono_gprs_cb_t cb, void *data);
- void (*set_active)(struct ofono_gprs *gprs, unsigned id,
- int active, ofono_gprs_cb_t cb,
- void *data);
- void (*set_active_all)(struct ofono_gprs *gprs,
- int active, ofono_gprs_cb_t cb,
- void *data);
- void (*create_context)(struct ofono_gprs *gprs,
- ofono_gprs_alloc_cb_t cb,
- void *data);
- void (*remove_context)(struct ofono_gprs *gprs, unsigned id,
- ofono_gprs_cb_t cb, void *data);
void (*registration_status)(struct ofono_gprs *gprs,
ofono_gprs_status_cb_t cb, void *data);
};
@@ -75,11 +50,7 @@ struct ofono_gprs_driver {
void ofono_gprs_status_notify(struct ofono_gprs *gprs,
int status, int lac, int ci, int tech);
-void ofono_gprs_notify(struct ofono_gprs *gprs,
- struct ofono_gprs_primary_context *ctx);
-void ofono_gprs_deactivated(struct ofono_gprs *gprs,
- unsigned id);
-void ofono_gprs_detached(struct ofono_gprs *gprs);
+void ofono_gprs_attach_notify(struct ofono_gprs *gprs, int attached);
int ofono_gprs_driver_register(const struct ofono_gprs_driver *d);
void ofono_gprs_driver_unregister(const struct ofono_gprs_driver *d);