sync with private git
authorJunghwan Song <jump.song@samsung.com>
Fri, 24 Aug 2012 12:27:59 +0000 (21:27 +0900)
committerJunghwan Song <jump.song@samsung.com>
Fri, 24 Aug 2012 12:27:59 +0000 (21:27 +0900)
include/TelCall.h
packaging/libslp-tapi.spec
src/tapi_call.c
src/tapi_common.c
src/tapi_log.h
src/tapi_sat.c
src/tapi_sim.c
src/tapi_ss.c

index c1cc6118957e0f75575e3e38dcccffd993c3a5f9..e2e3f25056f86d2f634ed6dce4f14d44f1e4cd15 100644 (file)
@@ -846,6 +846,10 @@ typedef enum {
 typedef enum {
        TAPI_SOUND_EQUALIZATION_MODE_OFF,
        TAPI_SOUND_EQUALIZATION_MODE_ON,
+       TAPI_SOUND_EQUALIZATION_MODE_FLAG_OFF,
+       TAPI_SOUND_EQUALIZATION_MODE_FLAG_ON,
+       TAPI_SOUND_EQUALIZATION_MODE_SOFT1,
+       TAPI_SOUND_EQUALIZATION_MODE_SOFT2,
 } TelSoundEqualizationMode_t;
 
 typedef enum {
@@ -854,11 +858,11 @@ typedef enum {
 } TelSoundDirection_t;
 
 
-#define MAX_SOUND_EQ_PARAMETER_SIZE 13
+#define MAX_SOUND_EQ_PARAMETER_SIZE 6
 typedef struct {
        TelSoundEqualizationMode_t mode;
        TelSoundDirection_t direction;
-       char parameter[MAX_SOUND_EQ_PARAMETER_SIZE];
+       unsigned short parameter[MAX_SOUND_EQ_PARAMETER_SIZE];
 } TelCallSoundEqualization_t;
 
 
index c6f54c5344c879bae80a90e0c6879f3258dac3ef..bd4883d4deb8bdd68f7164dd42f4d60112ca7822 100644 (file)
@@ -1,7 +1,7 @@
 #sbs-git:slp/pkgs/l/libslp-tapi libslp-tapi 0.1.1
 Name: libslp-tapi
 Summary: Telephony dbus client library
-Version: 0.6.4
+Version: 0.6.9
 Release:    1
 Group:      System/Libraries
 License:    Apache
index 50bb28206324b41545535318869d48d6c7d28e7e..b1034b14a14bca37c13fdb49b4a8f0139c1aeca3 100644 (file)
@@ -940,10 +940,13 @@ EXPORT_API  int tel_set_call_sound_equalization(TapiHandle *handle, TelCallSound
 {
        struct tapi_resp_data *evt_cb_data = 0;
        GVariant *param = 0;
+       char *eq_param = 0;
 
        dbg("Func Entrance ");
 
-       param = g_variant_new("(iis)", eq->mode, eq->direction, eq->parameter);
+       eq_param = (char*)eq->parameter;
+
+       param = g_variant_new("(iis)", eq->mode, eq->direction, eq_param);
 
        MAKE_RESP_CB_DATA(evt_cb_data, handle, callback, user_data);
 
index b830a0c33737f0e6650c74e5537c0187f341db26..7f3a41312da0b0a62901c6460023faa70cab1c55 100644 (file)
@@ -345,12 +345,12 @@ static void on_signal_callback(GDBusConnection *conn, const gchar *name, const g
                        gchar *title;
                        gint command_id, item_cnt;
                        gboolean b_present, b_helpinfo, b_updated;
-                       GVariant *items = NULL, *icon_id, *icon_list;
+                       GVariant *items = NULL;
 
                        memset(&setup_menu, 0, sizeof(TelSatSetupMenuInfo_t));
 
-                       g_variant_get(param, "(ibs@vibb@v@v)", &command_id, &b_present, &title, &items, &item_cnt,
-                                               &b_helpinfo, &b_updated, &icon_id, &icon_list);
+                       g_variant_get(param, "(ibs@vibb)", &command_id, &b_present, &title, &items, &item_cnt,
+                                               &b_helpinfo, &b_updated);
 
                        setup_menu.commandId = command_id;
                        setup_menu.bIsMainMenuPresent = (b_present ? 1 : 0);
@@ -394,12 +394,11 @@ static void on_signal_callback(GDBusConnection *conn, const gchar *name, const g
                        gchar* text;
                        gint command_id, text_len, duration;
                        gboolean high_priority, user_rsp_required, immediately_rsp;
-                       GVariant *icon_id = NULL;
 
                        memset(&display_text, 0, sizeof(TelSatDisplayTextInd_t));
 
-                       g_variant_get(param, "(isiibbb@v)", &command_id, &text, &text_len, &duration,
-                               &high_priority, &user_rsp_required, &immediately_rsp, &icon_id);
+                       g_variant_get(param, "(isiibbb)", &command_id, &text, &text_len, &duration,
+                               &high_priority, &user_rsp_required, &immediately_rsp);
 
                        display_text.commandId = command_id;
                        memcpy(display_text.text.string, text, TAPI_SAT_DEF_TEXT_STRING_LEN_MAX+1);
@@ -423,12 +422,12 @@ static void on_signal_callback(GDBusConnection *conn, const gchar *name, const g
                        gboolean help_info ;
                        gchar *selected_text;
                        gint command_id, default_item_id, menu_cnt, text_len =0;
-                       GVariant *menu_items, *icon_id, *icon_list;
+                       GVariant *menu_items;
 
                        memset(&select_item, 0, sizeof(TelSatSelectItemInd_t));
 
-                       g_variant_get(param, "(ibsiii@v@v@v)", &command_id, &help_info, &selected_text,
-                               &text_len, &default_item_id, &menu_cnt, &menu_items, &icon_id, &icon_list);
+                       g_variant_get(param, "(ibsiii@v)", &command_id, &help_info, &selected_text,
+                               &text_len, &default_item_id, &menu_cnt, &menu_items);
 
                        select_item.commandId = command_id;
                        select_item.bIsHelpInfoAvailable = (help_info ? 1 : 0);
@@ -474,12 +473,11 @@ static void on_signal_callback(GDBusConnection *conn, const gchar *name, const g
                        gint text_len, duration;
                        gboolean b_numeric, b_help_info;
                        gchar *text;
-                       GVariant *icon_id;
 
                        memset(&get_inkey, 0, sizeof(TelSatGetInkeyInd_t));
 
-                       g_variant_get(param, "(iiibbsii@v)", &command_id, &key_type, &input_character_mode,
-                               &b_numeric,&b_help_info, &text, &text_len, &duration, &icon_id);
+                       g_variant_get(param, "(iiibbsii)", &command_id, &key_type, &input_character_mode,
+                               &b_numeric,&b_help_info, &text, &text_len, &duration);
 
                        get_inkey.commandId = command_id;
                        get_inkey.keyType = key_type;
@@ -508,12 +506,11 @@ static void on_signal_callback(GDBusConnection *conn, const gchar *name, const g
                        gint text_len, def_text_len, rsp_len_min, rsp_len_max;
                        gboolean b_numeric, b_help_info, b_echo_input;
                        gchar *text, *def_text;
-                       GVariant *icon_id;
 
                        memset(&get_input, 0, sizeof(TelSatGetInputInd_t));
 
-                       g_variant_get(param, "(iibbbsiiisi@v)", &command_id, &input_character_mode, &b_numeric, &b_help_info, &b_echo_input,
-                               &text, &text_len, &rsp_len_max, &rsp_len_min, &def_text, &def_text_len, &icon_id);
+                       g_variant_get(param, "(iibbbsiiisi)", &command_id, &input_character_mode, &b_numeric, &b_help_info, &b_echo_input,
+                               &text, &text_len, &rsp_len_max, &rsp_len_min, &def_text, &def_text_len);
 
                        get_input.commandId = command_id;
                        get_input.inputCharMode = input_character_mode;
@@ -548,11 +545,11 @@ static void on_signal_callback(GDBusConnection *conn, const gchar *name, const g
                        gboolean b_packing_required;
                        gint text_len, number_len, tpdu_data_len, tmp_data_len;
                        gchar* text, *dialling_number;
-                       GVariant *tpdu_data, *icon_id;
+                       GVariant *tpdu_data;
 
                        memset(&send_sms, 0, sizeof(TelSatSendSmsIndSmsData_t));
 
-                       g_variant_get(param, "(isi@vbiisii@vi)", &command_id, &text, &text_len, &icon_id, &b_packing_required, &ton, &npi,
+                       g_variant_get(param, "(isibiisii@vi)", &command_id, &text, &text_len, &b_packing_required, &ton, &npi,
                                                &dialling_number, &number_len, &tpdu_type, &tpdu_data, &tpdu_data_len);
 
                        send_sms.commandId = command_id;
index 197bfcfc15909e2a429bdbe49783ae4d3251f07e..e26216bc50161c52e09dc174470d196ca3a171fb 100644 (file)
@@ -34,7 +34,7 @@ __BEGIN_DECLS
 #define msg(fmt,args...)  { RLOG(LOG_INFO, TAPI_LOG_TAG, fmt "\n", ##args); }
 #define dbg(fmt,args...)  { RLOG(LOG_DEBUG, TAPI_LOG_TAG, "<%s:%d> " fmt "\n", __func__, __LINE__, ##args); }
 #define warn(fmt,args...)  { RLOG(LOG_WARN, TAPI_LOG_TAG, "<%s:%d> " fmt "\n", __func__, __LINE__, ##args); }
-#define err(fmt,args...)  { RLOG(LOG_FATAL, TAPI_LOG_TAG, "<%s:%D> " fmt "\n", __func__, __LINE__, ##args); }
+#define err(fmt,args...)  { RLOG(LOG_FATAL, TAPI_LOG_TAG, "<%s:%d> " fmt "\n", __func__, __LINE__, ##args); }
 
 #else
 
index 10b051972d4b3cb833bb88d86d0fdeefbfa5cc61..f0c2e117f02f16ae4e7dbb9ae3783383d25c70fc 100644 (file)
@@ -362,7 +362,7 @@ EXPORT_API int tel_get_sat_main_menu_info(TapiHandle *handle, TelSatSetupMenuInf
        gchar *title;
        gint result, command_id, item_cnt;
        gboolean b_present, b_helpinfo, b_updated;
-       GVariant *items = NULL, *icon_id, *icon_list;
+       GVariant *items = NULL;
 
        dbg("Func Entrance ");
 
@@ -385,8 +385,8 @@ EXPORT_API int tel_get_sat_main_menu_info(TapiHandle *handle, TelSatSetupMenuInf
 
        dbg("menu_info type_format(%s)", g_variant_get_type_string(rst));
 
-       g_variant_get(rst, "(iibs@vibb@v@v)", &result, &command_id, &b_present, &title, &items, &item_cnt,
-                       &b_helpinfo, &b_updated, &icon_id, &icon_list);
+       g_variant_get(rst, "(iibs@vibb)", &result, &command_id, &b_present, &title, &items, &item_cnt,
+                       &b_helpinfo, &b_updated);
 
        pMainMenu->commandId = command_id;
        pMainMenu->bIsMainMenuPresent = (b_present ? 1 : 0);
index b9b4a40fde77271e413b7758b84c4529b9cd2248..48e0174e95a49fd778616e71150cece590122c96 100644 (file)
@@ -510,7 +510,7 @@ static void on_response_req_sim_authentication(GObject *source_object, GAsyncRes
                g_variant_get(ak, "ay", &iter);
                while (g_variant_iter_loop(iter, "y", &rt_i)) {
                        auth_resp.authentication_key[i] = rt_i;
-                       dbg("auth_resp.authentication_key[%d]=[0x%2x]", i, auth_resp.authentication_key);
+                       dbg("auth_resp.authentication_key[%d]=[0x%02x]", i, auth_resp.authentication_key[i]);
                        i++;
                }
                auth_resp.authentication_key_length = i;
@@ -521,7 +521,7 @@ static void on_response_req_sim_authentication(GObject *source_object, GAsyncRes
                g_variant_get(cp, "ay", &iter);
                while (g_variant_iter_loop(iter, "y", &rt_i)) {
                        auth_resp.cipher_data[i] = rt_i;
-                       dbg("auth_resp.cipher_data[%d]=[0x%2x]", i, auth_resp.cipher_data);
+                       dbg("auth_resp.cipher_data[%d]=[0x%02x]", i, auth_resp.cipher_data[i]);
                        i++;
                }
                auth_resp.cipher_length = i;
@@ -532,7 +532,7 @@ static void on_response_req_sim_authentication(GObject *source_object, GAsyncRes
                g_variant_get(it, "ay", &iter);
                while (g_variant_iter_loop(iter, "y", &rt_i)) {
                        auth_resp.integrity_data[i] = rt_i;
-                       dbg("auth_resp.integrity_data[%d]=[0x%2x]", i, auth_resp.integrity_data);
+                       dbg("auth_resp.integrity_data[%d]=[0x%02x]", i, auth_resp.integrity_data[i]);
                        i++;
                }
                auth_resp.integrity_length = i;
@@ -543,7 +543,7 @@ static void on_response_req_sim_authentication(GObject *source_object, GAsyncRes
                g_variant_get(resp, "ay", &iter);
                while (g_variant_iter_loop(iter, "y", &rt_i)) {
                        auth_resp.resp_data[i] = rt_i;
-                       dbg("auth_resp.resp_data[%d]=[0x%2x]", i, auth_resp.resp_data);
+                       dbg("auth_resp.resp_data[%d]=[0x%02x]", i, auth_resp.resp_data[i]);
                        i++;
                }
                auth_resp.resp_length = i;
@@ -802,7 +802,7 @@ static void on_response_req_sim_atr(GObject *source_object, GAsyncResult *res, g
        dbus_result = g_dbus_connection_call_finish(conn, res, &error);
 
        if (dbus_result) {
-               /*      dbg("dbus_result type_format(%s)", g_variant_get_type_string(dbus_result));*/
+               dbg("dbus_result type_format(%s)", g_variant_get_type_string(dbus_result));
                g_variant_get(dbus_result, "(i@v)", &result, &param_gv);
                inner_gv = g_variant_get_variant(param_gv);
 
index 5cd5cd54dd6742ffbab9283e2959542e73c7ffed..fc70f152440cbaa679e9828ff6f8dd05726c754b 100644 (file)
@@ -241,6 +241,7 @@ static void on_response_send_ss_ussd_request(GObject *source_object, GAsyncResul
        GDBusConnection *conn = 0;
        struct tapi_resp_data *evt_cb_data = user_data;
        int result = -1;
+       char *tmp_str = 0;
        TelSsUssdResp_t resp;
 
        GVariant *dbus_result = 0;
@@ -250,7 +251,13 @@ static void on_response_send_ss_ussd_request(GObject *source_object, GAsyncResul
        conn = G_DBUS_CONNECTION (source_object);
        dbus_result = g_dbus_connection_call_finish(conn, res, &error);
 
-       g_variant_get (dbus_result, "(iiiis)",  &result, &resp.Type, &resp.Status, &resp.Length, &resp.szString);
+       g_variant_get (dbus_result, "(iiiis)",  &result, &resp.Type, &resp.Status, &resp.Length, &tmp_str);
+
+
+       if ( !result ) {
+               memcpy( resp.szString, tmp_str, resp.Length );
+               g_free(tmp_str);
+       }
 
        if (evt_cb_data->cb_fn) {
                evt_cb_data->cb_fn(evt_cb_data->handle, result, &resp, evt_cb_data->user_data);
@@ -270,11 +277,11 @@ EXPORT_API int tel_set_ss_barring(TapiHandle *handle, TelSsBarringInfo_t *info,
        param = g_variant_new("(iis)", info->Class, info->Type, info->szPassword);
 
        if ( info->Mode == TAPI_SS_CB_MODE_ACTIVATE ) {
-               dbg("[ checke ] barring activate");
+               dbg("[ check ] barring activate");
                method = "ActivateBarring";
 
        } else {
-               dbg("[ checke ] barring deactivate");
+               dbg("[ check ] barring deactivate");
                method = "DeactivateBarring";
 
        }
@@ -374,7 +381,7 @@ EXPORT_API int tel_set_ss_forward(TapiHandle *handle, const TelSsForwardInfo_t *
 
                case TAPI_SS_CF_MODE_ENABLE_EV: {
                        dbg("[ check ] forwarding activate");
-                       method = "ActivateFowarding";
+                       method = "ActivateForwarding";
                } break;
 
                case TAPI_SS_CF_MODE_REGISTRATION_EV: {
@@ -455,11 +462,11 @@ EXPORT_API int tel_set_ss_waiting(TapiHandle *handle, const TelSsWaitingInfo_t *
        param = g_variant_new("(i)", info->Class);
 
        if ( info->Mode == TAPI_SS_CW_MODE_ACTIVATE ) {
-               dbg("[ checke ] waiting activate");
+               dbg("[ check ] waiting activate");
                method = "ActivateWaiting";
 
        } else {
-               dbg("[ checke ] waiting deactivate");
+               dbg("[ check ] waiting deactivate");
                method = "DeactivateWaiting";
 
        }