diff options
author | Andreas Eversberg <jolly@eversberg.eu> | 2020-01-11 18:00:25 +0100 |
---|---|---|
committer | Andreas Eversberg <jolly@eversberg.eu> | 2020-01-18 18:54:28 +0100 |
commit | b2089bb529a43ea136609b099eb77e88e21c087a (patch) | |
tree | 08c0347f1562aad7fbaa73c92f0ca395580e38aa /src/zeitansage/zeitansage.h | |
parent | b1ea4e574f3d76c28de0c79ce253d5d9634c00cf (diff) |
Implementation of German "Zeitansage", spoken by Elvira Bader
Diffstat (limited to 'src/zeitansage/zeitansage.h')
-rw-r--r-- | src/zeitansage/zeitansage.h | 29 |
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); + |