diff options
Diffstat (limited to 'audio')
-rw-r--r-- | audio/telephony-dummy.c | 19 | ||||
-rw-r--r-- | audio/telephony.h | 20 |
2 files changed, 30 insertions, 9 deletions
diff --git a/audio/telephony-dummy.c b/audio/telephony-dummy.c index 8acb3586..828a9c39 100644 --- a/audio/telephony-dummy.c +++ b/audio/telephony-dummy.c @@ -74,26 +74,27 @@ int telephony_response_and_hold_req(int rh) int telephony_last_dialed_number(void) { /* Notify outgoing call set-up successfully initiated */ - telephony_update_indicator(dummy_indicators, "callsetup", 2); - + telephony_update_indicator(dummy_indicators, "callsetup", + EV_CALLSETUP_OUTGOING); return 0; } int telephony_terminate_call(void) { - if (telephony_get_indicator(dummy_indicators, "callsetup" > 0)) - telephony_update_indicator(dummy_indicators, "callsetup", 0); + if (telephony_get_indicator(dummy_indicators, "callsetup") > 0) + telephony_update_indicator(dummy_indicators, "callsetup", + EV_CALLSETUP_INACTIVE); else - telephony_update_indicator(dummy_indicators, "call", 0); - + telephony_update_indicator(dummy_indicators, "call", + EV_CALL_INACTIVE); return 0; } int telephony_answer_call(void) { - telephony_update_indicator(dummy_indicators, "call", 1); - telephony_update_indicator(dummy_indicators, "callsetup", 0); - + telephony_update_indicator(dummy_indicators, "call", EV_CALL_ACTIVE); + telephony_update_indicator(dummy_indicators, "callsetup", + EV_CALLSETUP_INACTIVE); return 0; } diff --git a/audio/telephony.h b/audio/telephony.h index 55e64e98..38eb6a11 100644 --- a/audio/telephony.h +++ b/audio/telephony.h @@ -26,6 +26,7 @@ #include <errno.h> #include <glib.h> +/* HFP feature bits */ #define AG_FEATURE_THREE_WAY_CALLING 0x0001 #define AG_FEATURE_EC_ANDOR_NR 0x0002 #define AG_FEATURE_VOICE_RECOGNITION 0x0004 @@ -36,6 +37,25 @@ #define AG_FEATURE_ENHANCES_CALL_CONTROL 0x0080 #define AG_FEATURE_EXTENDED_ERROR_RESULT_CODES 0x0100 +/* Indicator event values */ +#define EV_SERVICE_NONE 0 +#define EV_SERVICE_PRESENT 1 + +#define EV_CALL_INACTIVE 0 +#define EV_CALL_ACTIVE 1 + +#define EV_CALLSETUP_INACTIVE 0 +#define EV_CALLSETUP_INCOMING 1 +#define EV_CALLSETUP_OUTGOING 2 +#define EV_CALLSETUP_ALERTING 3 + +#define EV_CALLHELD_NONE 0 +#define EV_CALLHELD_MULTIPLE 1 +#define EV_CALLHELD_ON_HOLD 2 + +#define EV_ROAM_INACTIVE 0 +#define EV_ROAM_ACTIVE 1 + struct indicator { const char *desc; const char *range; |