diff options
author | Johan Hedberg <johan.hedberg@nokia.com> | 2008-09-05 11:38:07 +0300 |
---|---|---|
committer | Johan Hedberg <johan.hedberg@nokia.com> | 2008-09-05 11:38:07 +0300 |
commit | 1b971b060ba37714d970089e978fa720a2c9326c (patch) | |
tree | 14b87bf835c41d3c6664d06259064c5c65769dc1 /audio/telephony.h | |
parent | a3634219a1f00b7386c55f34d6707690ff73b605 (diff) |
Implement last number dialed (AT+BLDN) support
Diffstat (limited to 'audio/telephony.h')
-rw-r--r-- | audio/telephony.h | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/audio/telephony.h b/audio/telephony.h index 4cc74ede..398f98df 100644 --- a/audio/telephony.h +++ b/audio/telephony.h @@ -23,6 +23,8 @@ */ #include <stdint.h> +#include <errno.h> +#include <glib.h> #define AG_FEATURE_THREE_WAY_CALLING 0x0001 #define AG_FEATURE_EC_ANDOR_NR 0x0002 @@ -48,7 +50,32 @@ int telephony_response_and_hold_req(int rh); int telephony_response_and_hold_ind(int rh); +int telephony_last_dialed_number(void); + int telephony_ready(uint32_t features, struct indicator *indicators, int rh); +/* Helper function for quick indicator updates */ +static inline int telephony_update_indicator(struct indicator *indicators, + const char *desc, + int new_val) +{ + int i; + struct indicator *ind = NULL; + + for (i = 0; indicators[i].desc != NULL; i++) { + if (g_str_equal(indicators[i].desc, desc)) { + ind = &indicators[i]; + break; + } + } + + if (!ind) + return -ENOENT; + + ind->val = new_val; + + return telephony_event_ind(i); +} + int telephony_init(void); void telephony_exit(void); |