summaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorDenis Kenzior <denkenz@gmail.com>2009-10-19 16:58:13 -0500
committerDenis Kenzior <denkenz@gmail.com>2009-10-19 16:58:13 -0500
commit0ca88b36e73e15f505d9543705bf1d332c412189 (patch)
treeb0312d23f67c9ca120e26a4f9c66437a5d91d3cf /drivers
parentfb0c157c1199c5a46f87bfb7b38be0cd2b98243f (diff)
downloadofono-0ca88b36e73e15f505d9543705bf1d332c412189.tar.bz2
Refactor: Don't store indicator names
We already know the indicators we're interested in from the specification, malloc/free-ing the indicator names is thus pointless. Instead save off the indicator index positions in an array. Parse the current values instead of storing the unparsed list.
Diffstat (limited to 'drivers')
-rw-r--r--drivers/hfpmodem/hfp.h18
1 files changed, 14 insertions, 4 deletions
diff --git a/drivers/hfpmodem/hfp.h b/drivers/hfpmodem/hfp.h
index 831dd5ed..97e5d47f 100644
--- a/drivers/hfpmodem/hfp.h
+++ b/drivers/hfpmodem/hfp.h
@@ -34,12 +34,22 @@
#define AG_FEATURE_ENHANCED_CALL_CONTROL 0x80
#define AG_FEATURE_EXTENDED_RES_CODE 0x100
+enum hfp_indicator {
+ HFP_INDICATOR_SERVICE = 0,
+ HFP_INDICATOR_CALL,
+ HFP_INDICATOR_CALLSETUP,
+ HFP_INDICATOR_CALLHELD,
+ HFP_INDICATOR_SIGNAL,
+ HFP_INDICATOR_ROAM,
+ HFP_INDICATOR_BATTCHG,
+ HFP_INDICATOR_LAST
+};
+
struct hfp_data {
GAtChat *chat;
- int ag_features;
- char **cind_names;
- int *cind_values;
- int cind_length;
+ guint ag_features;
+ guint8 cind_pos[HFP_INDICATOR_LAST];
+ gint cind_val[HFP_INDICATOR_LAST];
};
extern void hfp_voicecall_init();