Add CID range function

This commit is contained in:
Denis Kenzior 2009-10-22 17:39:57 -05:00 committed by Denis Kenzior
parent b745ebcf6f
commit 65f77b2b3a
2 changed files with 14 additions and 2 deletions

View File

@ -64,6 +64,8 @@ void ofono_gprs_remove(struct ofono_gprs *gprs);
void ofono_gprs_set_data(struct ofono_gprs *gprs, void *data); void ofono_gprs_set_data(struct ofono_gprs *gprs, void *data);
void *ofono_gprs_get_data(struct ofono_gprs *gprs); void *ofono_gprs_get_data(struct ofono_gprs *gprs);
void ofono_gprs_set_cid_range(struct ofono_gprs *gprs, int min, int max);
#ifdef __cplusplus #ifdef __cplusplus
} }
#endif #endif

View File

@ -58,6 +58,8 @@ struct ofono_gprs {
int technology; int technology;
int flags; int flags;
int next_context_id; int next_context_id;
int cid_min;
int cid_max;
DBusMessage *pending; DBusMessage *pending;
const struct ofono_gprs_driver *driver; const struct ofono_gprs_driver *driver;
void *driver_data; void *driver_data;
@ -966,8 +968,16 @@ void ofono_gprs_status_notify(struct ofono_gprs *gprs,
set_registration_technology(gprs, tech); set_registration_technology(gprs, tech);
} }
int ofono_gprs_driver_register( void ofono_gprs_set_cid_range(struct ofono_gprs *gprs, int min, int max)
const struct ofono_gprs_driver *d) {
if (gprs == NULL)
return;
gprs->cid_min = min;
gprs->cid_max = max;
}
int ofono_gprs_driver_register(const struct ofono_gprs_driver *d)
{ {
DBG("driver: %p, name: %s", d, d->name); DBG("driver: %p, name: %s", d, d->name);