diff options
author | Denis Kenzior <denkenz@gmail.com> | 2009-08-14 15:13:58 -0500 |
---|---|---|
committer | Denis Kenzior <denkenz@gmail.com> | 2009-08-14 16:33:48 -0500 |
commit | 2da0fc60709f6672708b0dfa21f6ae532292f8c2 (patch) | |
tree | b7d54c8b9c68b665f9a90849dc0c8ccd2e11652f /src | |
parent | c1c04e8c8dc594dfbc09346bb704a0e3d7167fe3 (diff) | |
download | ofono-2da0fc60709f6672708b0dfa21f6ae532292f8c2.tar.bz2 |
Add call_watches utility
Diffstat (limited to 'src')
-rw-r--r-- | src/modem.c | 17 |
1 files changed, 17 insertions, 0 deletions
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 *)) { |