summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorlaforge <laforge@99fdad57-331a-0410-800a-d7fa5415bdb3>2007-06-02 13:45:46 +0000
committerlaforge <laforge@99fdad57-331a-0410-800a-d7fa5415bdb3>2007-06-02 13:45:46 +0000
commit028df7942f5ac593e116aac0d192d8a8201e8093 (patch)
tree470f5fe25076818b3bbfe931bd6d5d2ce8452f24 /include
parent9c50224314e4316837d2fa0cccddc01482dbc0fe (diff)
Add 'modem alive' detection. We inquire every five minutes if the modem is still alive.
git-svn-id: http://svn.openmoko.org/trunk/src/target/gsm@2130 99fdad57-331a-0410-800a-d7fa5415bdb3
Diffstat (limited to 'include')
-rw-r--r--include/gsmd/gsmd.h21
1 files changed, 21 insertions, 0 deletions
diff --git a/include/gsmd/gsmd.h b/include/gsmd/gsmd.h
index 65ca568..b4dfa62 100644
--- a/include/gsmd/gsmd.h
+++ b/include/gsmd/gsmd.h
@@ -98,6 +98,27 @@ void __gsmd_log(int level, const char *file, int line, const char *function, con
extern int gsmd_simplecmd(struct gsmd *gsmd, char *cmdtxt);
+/***********************************************************************
+ * timer handling
+ ***********************************************************************/
+
+struct gsmd_timer {
+ struct llist_head list;
+ struct timeval expires;
+ void (*cb)(struct gsmd_timer *tmr, void *data);
+ void *data;
+};
+
+int gsmd_timer_init(void);
+void gmsd_timer_check_n_run(void);
+
+struct gsmd_timer *gsmd_timer_alloc(void);
+int gsmd_timer_register(struct gsmd_timer *timer);
+void gsmd_timer_unregister(struct gsmd_timer *timer);
+
+struct gsmd_timer *gsmd_timer_create(struct timeval *expires,
+ void (*cb)(struct gsmd_timer *tmr, void *data), void *data);
+#define gsmd_timer_free(x) talloc_free(x)
#endif /* __GSMD__ */
#endif /* _GSMD_H */
personal git repositories of Harald Welte. Your mileage may vary