aboutsummaryrefslogtreecommitdiffstats
path: root/src/zeitansage/zeitansage.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/zeitansage/zeitansage.h')
-rw-r--r--src/zeitansage/zeitansage.h29
1 files changed, 29 insertions, 0 deletions
diff --git a/src/zeitansage/zeitansage.h b/src/zeitansage/zeitansage.h
new file mode 100644
index 0000000..64dd986
--- /dev/null
+++ b/src/zeitansage/zeitansage.h
@@ -0,0 +1,29 @@
+#include "../libfm/fm.h"
+#include "../libmobile/sender.h"
+#include "../libtimer/timer.h"
+
+/* current state of incoming call */
+enum zeit_call_state {
+ ZEIT_CALL_NULL = 0,
+ ZEIT_CALL_BEEP, /* play beep at the beginnung of each 10 seconds period */
+ ZEIT_CALL_INTRO, /* play intro sample */
+ ZEIT_CALL_HOUR, /* play hour sample */
+ ZEIT_CALL_MINUTE, /* play minute sample */
+ ZEIT_CALL_SECOND, /* play second sample */
+ ZEIT_CALL_PAUSE, /* pause until next 10 seconds period */
+};
+
+/* instance of incoming call */
+typedef struct zeit_call {
+ struct zeit_call *next;
+ int callref; /* call reference */
+ struct timer timer;
+ enum zeit_call_state state; /* current state */
+ char caller_id[32]; /* caller id to be displayed */
+ int spl_time; /* sample offset within 10 seconds */
+ int h, m, s; /* what hour, minute, second to play */
+} zeit_call_t;
+
+int zeit_init(double audio_level_dBm, int alerting);
+void zeit_exit(void);
+