diff options
author | Denis Kenzior <denkenz@gmail.com> | 2009-08-21 19:11:32 -0500 |
---|---|---|
committer | Denis Kenzior <denkenz@gmail.com> | 2009-08-21 19:25:51 -0500 |
commit | 038251eac50dd7ae2d6b640890bbe948664910d9 (patch) | |
tree | 2be41c99841d52c22492ed38f7d98bac2485c841 /include/modem.h | |
parent | 6ac46cee4f90346e588f37077d11f0f701039e9a (diff) | |
download | ofono-038251eac50dd7ae2d6b640890bbe948664910d9.tar.bz2 |
Introduce the Modem driver API
Diffstat (limited to 'include/modem.h')
-rw-r--r-- | include/modem.h | 22 |
1 files changed, 20 insertions, 2 deletions
diff --git a/include/modem.h b/include/modem.h index b021c6cc..0a5ef604 100644 --- a/include/modem.h +++ b/include/modem.h @@ -26,6 +26,8 @@ extern "C" { #endif +#include <ofono/types.h> + struct ofono_modem; void ofono_modem_add_interface(struct ofono_modem *modem, @@ -39,8 +41,24 @@ const char *ofono_modem_get_path(struct ofono_modem *modem); void ofono_modem_set_data(struct ofono_modem *modem, void *data); void *ofono_modem_get_data(struct ofono_modem *modem); -struct ofono_modem *ofono_modem_register(); -int ofono_modem_unregister(struct ofono_modem *modem); +struct ofono_modem *ofono_modem_create(const char *node, const char *type); +int ofono_modem_register(struct ofono_modem *modem); +void ofono_modem_remove(struct ofono_modem *modem); + +void ofono_modem_set_powered(struct ofono_modem *modem, ofono_bool_t powered); +ofono_bool_t ofono_modem_get_powered(struct ofono_modem *modem); + +struct ofono_modem_driver { + const char *name; + int (*probe)(struct ofono_modem *modem); + int (*remove)(struct ofono_modem *modem); + int (*enable)(struct ofono_modem *modem); + int (*disable)(struct ofono_modem *modem); + int (*populate)(struct ofono_modem *modem); +}; + +int ofono_modem_driver_register(const struct ofono_modem_driver *); +void ofono_modem_driver_unregister(const struct ofono_modem_driver *); #ifdef __cplusplus } |