summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorDenis Kenzior <denkenz@gmail.com>2011-02-09 23:50:10 -0600
committerDenis Kenzior <denkenz@gmail.com>2011-02-10 00:34:47 -0600
commit3e69defe861e47464932f148cf0bc27c6d96e9d7 (patch)
treeb31f3975c07cf5728ac331f7204f52542e4c9465 /src
parent09bb5f7554eee7456beb63b54e577e472fd3c3d0 (diff)
downloadofono-3e69defe861e47464932f148cf0bc27c6d96e9d7.tar.bz2
modem: Tweak online & powered watch APIs
Diffstat (limited to 'src')
-rw-r--r--src/modem.c4
-rw-r--r--src/ofono.h9
2 files changed, 8 insertions, 5 deletions
diff --git a/src/modem.c b/src/modem.c
index 18d9bbe0..3c1bb52e 100644
--- a/src/modem.c
+++ b/src/modem.c
@@ -380,7 +380,7 @@ static void notify_online_watches(struct ofono_modem *modem)
for (l = modem->online_watches->items; l; l = l->next) {
item = l->data;
notify = item->notify;
- notify(modem->online, item->notify_data);
+ notify(modem, modem->online, item->notify_data);
}
}
@@ -396,7 +396,7 @@ static void notify_powered_watches(struct ofono_modem *modem)
for (l = modem->powered_watches->items; l; l = l->next) {
item = l->data;
notify = item->notify;
- notify(modem->powered, item->notify_data);
+ notify(modem, modem->powered, item->notify_data);
}
}
diff --git a/src/ofono.h b/src/ofono.h
index c3f1d519..dbe18624 100644
--- a/src/ofono.h
+++ b/src/ofono.h
@@ -182,15 +182,18 @@ unsigned int __ofono_modemwatch_add(ofono_modemwatch_cb_t cb, void *user,
ofono_destroy_func destroy);
gboolean __ofono_modemwatch_remove(unsigned int id);
-typedef void (*ofono_modem_online_notify_func)(ofono_bool_t online, void *data);
+typedef void (*ofono_modem_online_notify_func)(struct ofono_modem *modem,
+ ofono_bool_t online,
+ void *data);
unsigned int __ofono_modem_add_online_watch(struct ofono_modem *modem,
ofono_modem_online_notify_func notify,
void *data, ofono_destroy_func destroy);
void __ofono_modem_remove_online_watch(struct ofono_modem *modem,
unsigned int id);
-typedef void (*ofono_modem_powered_notify_func)(ofono_bool_t powered,
- void *data);
+typedef void (*ofono_modem_powered_notify_func)(struct ofono_modem *modem,
+ ofono_bool_t powered,
+ void *data);
unsigned int __ofono_modem_add_powered_watch(struct ofono_modem *modem,
ofono_modem_online_notify_func notify,