voicecall: remove ofono_cug_option
authorJeevaka Badrappan <jeevaka.badrappan@elektrobit.com>
Wed, 26 Jan 2011 22:17:52 +0000 (14:17 -0800)
committerDenis Kenzior <denkenz@gmail.com>
Wed, 26 Jan 2011 22:38:15 +0000 (16:38 -0600)
drivers/atmodem/voicecall.c
drivers/calypsomodem/voicecall.c
drivers/hfpmodem/voicecall.c
drivers/huaweimodem/voicecall.c
drivers/ifxmodem/voicecall.c
drivers/isimodem/voicecall.c
drivers/stemodem/voicecall.c
include/types.h
include/voicecall.h
src/voicecall.c

index 9e56999..10cac42 100644 (file)
@@ -367,8 +367,8 @@ out:
 
 static void at_dial(struct ofono_voicecall *vc,
                        const struct ofono_phone_number *ph,
-                       enum ofono_clir_option clir, enum ofono_cug_option cug,
-                       ofono_voicecall_cb_t cb, void *data)
+                       enum ofono_clir_option clir, ofono_voicecall_cb_t cb,
+                       void *data)
 {
        struct voicecall_data *vd = ofono_voicecall_get_data(vc);
        struct cb_data *cbd = cb_data_new(cb, data);
@@ -395,14 +395,6 @@ static void at_dial(struct ofono_voicecall *vc,
                break;
        }
 
-       switch (cug) {
-       case OFONO_CUG_OPTION_INVOCATION:
-               strcat(buf, "G");
-               break;
-       default:
-               break;
-       }
-
        strcat(buf, ";");
 
        if (g_at_chat_send(vd->chat, buf, atd_prefix,
index 837ff69..204ed14 100644 (file)
@@ -80,7 +80,6 @@ error:
 static void calypso_dial(struct ofono_voicecall *vc,
                                const struct ofono_phone_number *ph,
                                enum ofono_clir_option clir,
-                               enum ofono_cug_option cug,
                                ofono_voicecall_cb_t cb, void *data)
 {
        char buf[256];
@@ -101,14 +100,6 @@ static void calypso_dial(struct ofono_voicecall *vc,
                break;
        }
 
-       switch (cug) {
-       case OFONO_CUG_OPTION_INVOCATION:
-               strcat(buf, "G");
-               break;
-       default:
-               break;
-       }
-
        strcat(buf, ";");
 
        calypso_template(vc, buf, cb, data);
index d4d370e..d12a5ef 100644 (file)
@@ -355,8 +355,8 @@ out:
 
 static void hfp_dial(struct ofono_voicecall *vc,
                        const struct ofono_phone_number *ph,
-                       enum ofono_clir_option clir, enum ofono_cug_option cug,
-                       ofono_voicecall_cb_t cb, void *data)
+                       enum ofono_clir_option clir, ofono_voicecall_cb_t cb,
+                       void *data)
 {
        struct voicecall_data *vd = ofono_voicecall_get_data(vc);
        struct cb_data *cbd = cb_data_new(cb, data);
index 0c0aaa1..aef2a11 100644 (file)
@@ -115,7 +115,6 @@ error:
 static void huawei_dial(struct ofono_voicecall *vc,
                                const struct ofono_phone_number *ph,
                                enum ofono_clir_option clir,
-                               enum ofono_cug_option cug,
                                ofono_voicecall_cb_t cb, void *data)
 {
        char buf[256];
@@ -136,14 +135,6 @@ static void huawei_dial(struct ofono_voicecall *vc,
                break;
        }
 
-       switch (cug) {
-       case OFONO_CUG_OPTION_INVOCATION:
-               strcat(buf, "G");
-               break;
-       default:
-               break;
-       }
-
        strcat(buf, ";");
 
        huawei_template(vc, buf, cb, data);
index f673624..fcd0c7e 100644 (file)
@@ -298,8 +298,8 @@ static void atd_cb(gboolean ok, GAtResult *result, gpointer user_data)
 
 static void ifx_dial(struct ofono_voicecall *vc,
                        const struct ofono_phone_number *ph,
-                       enum ofono_clir_option clir, enum ofono_cug_option cug,
-                       ofono_voicecall_cb_t cb, void *data)
+                       enum ofono_clir_option clir, ofono_voicecall_cb_t cb,
+                       void *data)
 {
        struct voicecall_data *vd = ofono_voicecall_get_data(vc);
        struct cb_data *cbd = cb_data_new(cb, data);
@@ -326,14 +326,6 @@ static void ifx_dial(struct ofono_voicecall *vc,
                break;
        }
 
-       switch (cug) {
-       case OFONO_CUG_OPTION_INVOCATION:
-               strcat(buf, "G");
-               break;
-       default:
-               break;
-       }
-
        strcat(buf, ";");
 
        if (g_at_chat_send(vd->chat, buf, atd_prefix,
index 55f4c17..6a1e582 100644 (file)
@@ -927,9 +927,8 @@ static struct isi_call_req_ctx *isi_call_dtmf_send_req(struct ofono_voicecall *o
 
 static void isi_dial(struct ofono_voicecall *ovc,
                        const struct ofono_phone_number *restrict number,
-                       enum ofono_clir_option clir,
-                       enum ofono_cug_option cug,
-                       ofono_voicecall_cb_t cb, void *data)
+                       enum ofono_clir_option clir, ofono_voicecall_cb_t cb,
+                       void *data)
 {
        unsigned char presentation = CALL_GSM_PRESENTATION_DEFAULT;
 
@@ -945,15 +944,6 @@ static void isi_dial(struct ofono_voicecall *ovc,
                break;
        }
 
-       switch (cug) {
-       case OFONO_CUG_OPTION_DEFAULT:
-               break;
-       case OFONO_CUG_OPTION_INVOCATION:
-               /* Not implemented */
-               CALLBACK_WITH_FAILURE(cb, data);
-               return;
-       }
-
        isi_call_create_req(ovc, presentation, number->type, number->number,
                                cb, data);
 }
index ad505ff..5210483 100644 (file)
@@ -180,8 +180,8 @@ static void atd_cb(gboolean ok, GAtResult *result, gpointer user_data)
 
 static void ste_dial(struct ofono_voicecall *vc,
                        const struct ofono_phone_number *ph,
-                       enum ofono_clir_option clir, enum ofono_cug_option cug,
-                       ofono_voicecall_cb_t cb, void *data)
+                       enum ofono_clir_option clir, ofono_voicecall_cb_t cb,
+                       void *data)
 {
        struct voicecall_data *vd = ofono_voicecall_get_data(vc);
        struct cb_data *cbd = cb_data_new(cb, data);
@@ -208,14 +208,6 @@ static void ste_dial(struct ofono_voicecall *vc,
                break;
        }
 
-       switch (cug) {
-       case OFONO_CUG_OPTION_DEFAULT:
-               break;
-       case OFONO_CUG_OPTION_INVOCATION:
-               strcat(buf, "G");
-               break;
-       }
-
        strcat(buf, ";");
 
        if (g_at_chat_send(vd->chat, buf, none_prefix,
index 71d0988..0faff54 100644 (file)
@@ -49,12 +49,6 @@ enum ofono_clir_option {
        OFONO_CLIR_OPTION_SUPPRESSION
 };
 
-/* 27.007 Section 6.2 */
-enum ofono_cug_option {
-       OFONO_CUG_OPTION_DEFAULT = 0,
-       OFONO_CUG_OPTION_INVOCATION = 1,
-};
-
 enum ofono_error_type {
        OFONO_ERROR_TYPE_NO_ERROR = 0,
        OFONO_ERROR_TYPE_CME,
index f3c2bf4..f00eb08 100644 (file)
@@ -63,8 +63,8 @@ struct ofono_voicecall_driver {
         */
        void (*dial)(struct ofono_voicecall *vc,
                        const struct ofono_phone_number *number,
-                       enum ofono_clir_option clir, enum ofono_cug_option cug,
-                       ofono_voicecall_cb_t cb, void *data);
+                       enum ofono_clir_option clir, ofono_voicecall_cb_t cb,
+                       void *data);
        /* Answers an incoming call, this usually corresponds to ATA */
        void (*answer)(struct ofono_voicecall *vc,
                        ofono_voicecall_cb_t cb, void *data);
index e6bfe04..6246787 100644 (file)
@@ -1327,8 +1327,7 @@ static DBusMessage *manager_dial(DBusConnection *conn,
 
        string_to_phone_number(number, &ph);
 
-       vc->driver->dial(vc, &ph, clir, OFONO_CUG_OPTION_DEFAULT,
-                               manager_dial_callback, vc);
+       vc->driver->dial(vc, &ph, clir, manager_dial_callback, vc);
 
        return NULL;
 }
@@ -2463,7 +2462,7 @@ static void dial_request_cb(const struct ofono_error *error, void *data)
 static void dial_request(struct ofono_voicecall *vc)
 {
        vc->driver->dial(vc, &vc->dial_req->ph, OFONO_CLIR_OPTION_DEFAULT,
-                               OFONO_CUG_OPTION_DEFAULT, dial_request_cb, vc);
+                               dial_request_cb, vc);
 }
 
 static void dial_req_disconnect_cb(const struct ofono_error *error, void *data)