summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
Diffstat (limited to 'include')
-rw-r--r--include/modem.h22
-rw-r--r--include/types.h10
2 files changed, 30 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
}
diff --git a/include/types.h b/include/types.h
index 7f99f80c..6a9681d0 100644
--- a/include/types.h
+++ b/include/types.h
@@ -26,6 +26,16 @@
extern "C" {
#endif
+#ifndef FALSE
+#define FALSE (0)
+#endif
+
+#ifndef TRUE
+#define TRUE (!FALSE)
+#endif
+
+typedef int ofono_bool_t;
+
/* MCC is always three digits. MNC is either two or three digits */
#define OFONO_MAX_MCC_LENGTH 3
#define OFONO_MAX_MNC_LENGTH 3