diff options
author | Jeevaka Badrappan <jeevaka.badrappan@elektrobit.com> | 2011-02-05 05:03:00 -0800 |
---|---|---|
committer | Marcel Holtmann <marcel@holtmann.org> | 2011-02-05 05:07:42 -0800 |
commit | 3fef7a3d2615eeaa0facdf8422f3167a8517e13f (patch) | |
tree | 4692f1d61f2bdd155b92af050d18ae7b3e1f2070 | |
parent | b9d24fc01673afab9e79f61948b953de56116256 (diff) | |
download | ofono-3fef7a3d2615eeaa0facdf8422f3167a8517e13f.tar.bz2 |
hfpmodem: Use defined call_status enum
-rw-r--r-- | drivers/hfpmodem/voicecall.c | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/drivers/hfpmodem/voicecall.c b/drivers/hfpmodem/voicecall.c index a87ddbea..f247bea4 100644 --- a/drivers/hfpmodem/voicecall.c +++ b/drivers/hfpmodem/voicecall.c @@ -33,7 +33,7 @@ #include <ofono/log.h> #include <ofono/modem.h> #include <ofono/voicecall.h> -#include <common.h> +#include "common.h" #include "gatchat.h" #include "gatresult.h" @@ -337,7 +337,7 @@ static void atd_cb(gboolean ok, GAtResult *result, gpointer user_data) for (l = vd->calls; l; l = l->next) { call = l->data; - if (call->status != 0) + if (call->status != CALL_STATUS_ACTIVE) continue; call->status = CALL_STATUS_HELD; @@ -436,7 +436,7 @@ static void hfp_release_all_held(struct ofono_voicecall *vc, ofono_voicecall_cb_t cb, void *data) { struct voicecall_data *vd = ofono_voicecall_get_data(vc); - unsigned int held_status = 0x1 << 1; + unsigned int held_status = 1 << CALL_STATUS_HELD; if (vd->ag_mpty_features & AG_CHLD_0) { hfp_template("AT+CHLD=0", vc, generic_cb, held_status, @@ -451,7 +451,8 @@ static void hfp_set_udub(struct ofono_voicecall *vc, ofono_voicecall_cb_t cb, void *data) { struct voicecall_data *vd = ofono_voicecall_get_data(vc); - unsigned int incoming_or_waiting = (0x1 << 4) | (0x1 << 5); + unsigned int incoming_or_waiting = + (1 << CALL_STATUS_INCOMING) | (1 << CALL_STATUS_WAITING); if (vd->ag_mpty_features & AG_CHLD_0) { hfp_template("AT+CHLD=0", vc, generic_cb, incoming_or_waiting, @@ -647,7 +648,8 @@ static void ccwa_notify(GAtResult *result, gpointer user_data) DBG("ccwa_notify: %s %d %d", num, num_type, validity); - call = create_call(vc, 0, 1, 5, num, num_type, validity); + call = create_call(vc, 0, 1, CALL_STATUS_WAITING, num, num_type, + validity); if (call == NULL) { ofono_error("malloc call struct failed. " |