From 2da0fc60709f6672708b0dfa21f6ae532292f8c2 Mon Sep 17 00:00:00 2001 From: Denis Kenzior Date: Fri, 14 Aug 2009 15:13:58 -0500 Subject: Add call_watches utility --- src/modem.c | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) (limited to 'src') diff --git a/src/modem.c b/src/modem.c index e58dfad3..9c8f265c 100644 --- a/src/modem.c +++ b/src/modem.c @@ -153,6 +153,23 @@ struct ofono_modem *__ofono_atom_get_modem(struct ofono_atom *atom) return atom->modem; } +static void call_watches(struct ofono_atom *atom, + enum ofono_atom_watch_condition cond) +{ + struct ofono_modem *modem = atom->modem; + GSList *l; + struct ofono_atom_watch *watch; + + for (l = modem->atom_watches; l; l = l->next) { + watch = l->data; + + if (watch->type != atom->type) + continue; + + watch->notify(atom, cond, watch->notify_data); + } +} + void __ofono_atom_register(struct ofono_atom *atom, void (*unregister)(struct ofono_atom *)) { -- cgit v1.2.3