diff options
author | Denis Kenzior <denis.kenzior@intel.com> | 2009-10-22 18:35:44 -0500 |
---|---|---|
committer | Denis Kenzior <denkenz@gmail.com> | 2009-10-23 17:05:55 -0500 |
commit | a12d252609e61a79a49f38de51fd8e809f526a9b (patch) | |
tree | 418b358b1fd206fc3685a5beb6444283efaeec20 /src | |
parent | 0b45287dbd8263fa503f93cd77758e9318f87c9a (diff) | |
download | ofono-a12d252609e61a79a49f38de51fd8e809f526a9b.tar.bz2 |
Add stub of gprs context deactivated
Diffstat (limited to 'src')
-rw-r--r-- | src/gprs.c | 32 |
1 files changed, 32 insertions, 0 deletions
@@ -66,6 +66,12 @@ struct ofono_gprs { struct ofono_atom *atom; }; +struct ofono_gprs_context { + struct ofono_gprs *gprs; + const struct ofono_gprs_context_driver *driver; + void *driver_data; +}; + struct pri_context { ofono_bool_t active; enum gprs_context_type type; @@ -893,6 +899,32 @@ void ofono_gprs_set_cid_range(struct ofono_gprs *gprs, int min, int max) gprs->cid_max = max; } +void ofono_gprs_context_deactivated(struct ofono_gprs_context *gc, unsigned cid) +{ + DBusConnection *conn = ofono_dbus_get_connection(); + GSList *l; + struct pri_context *ctx; + dbus_bool_t value; + + for (l = gc->gprs->contexts; l; l = l->next) { + ctx = l->data; + + if (ctx->active == FALSE) + continue; + + if (ctx->context.cid != cid) + continue; + + ctx->active = FALSE; + + value = FALSE; + ofono_dbus_signal_property_changed(conn, ctx->path, + DATA_CONTEXT_INTERFACE, + "Active", DBUS_TYPE_BOOLEAN, + &value); + } +} + int ofono_gprs_driver_register(const struct ofono_gprs_driver *d) { DBG("driver: %p, name: %s", d, d->name); |