Remove unused code 67/241367/1
authorSungwook Park <sungwook79.park@samsung.com>
Wed, 19 Aug 2020 11:14:16 +0000 (20:14 +0900)
committerSungwook Park <sungwook79.park@samsung.com>
Wed, 19 Aug 2020 11:14:16 +0000 (20:14 +0900)
Change-Id: I794bd8c96e37c752fe30ca2130d10387726a6434
Signed-off-by: Sungwook Park <sungwook79.park@samsung.com>
client/gesture_client_dbus.c
engine/gesture_engine_dbus.c
server/gestured_dbus.c

index 91b139d..ce5eec6 100644 (file)
@@ -25,8 +25,6 @@
 #define LOG_TAG "GESTURE_CLIENT_DBUS"
 
 static int is_server_started = 0;
-static hand_gesture_recognition_cb g_callback;
-static hand_gesture_data_h g_gesture_data;
 
 static hand_gesture_handtype_e g_hand_type = HAND_GESTURE_LEFT_HAND;
 static hand_gesture_workmode_e g_work_mode = HAND_GESTURE_WORK_MODE_ONE_WAY;
@@ -36,12 +34,6 @@ static int g_sensitivity = 1;
 static char *g_engine_app_id;
 static char *g_engine_name;
 
-static void _free_gesture_data(hand_gesture_data_h gesture_data)
-{
-       free(gesture_data);
-       gesture_data = NULL;
-}
-
 static void _server_appeared_cb(GDBusConnection *connection, const gchar *name, const gchar *name_owner, gpointer user_data)
 {
        LOGD("name : %s, name_owner : %s", name, name_owner);
@@ -124,16 +116,6 @@ static void _handle_gesture_cb(GDBusConnection *connection,
                g_free(printmsg);
                LOGD("[event = %d] [gesture_type = %d] [ltype = %d] [levent = %d] [lcount = %d]", event, gesture_type, ltype, levent, lcount);
 #endif
-               if (g_gesture_data == NULL){
-                       LOGD("Can't send the result to Client because g_gesture_data is NULL");
-                       return;
-               }
-               LOGD("address = %p", g_gesture_data);
-               g_gesture_data->gesture_type = ltype;
-               g_gesture_data->event = levent;
-               g_gesture_data->detected_Count = lcount;
-
-//             g_callback(gesture_type, g_gesture_data, 0, HAND_GESTURE_ERROR_NONE, user_data);
                if (_handle->recog_cb) {
                        LOGD("[CLIENT DBUS] Send recognition result. gesture_type(%d)", gesture_type);
                        _handle->recog_cb(_handle, gesture_type, 0, HAND_GESTURE_ERROR_NONE, _handle->recog_user_data);
@@ -552,8 +534,6 @@ int gesture_client_dbus_start_recognition(GDBusConnection *gdbus_connection, han
 {
        LOGD("gesture_client_dbus_start_recognition start");
        LOGD("client busname: %s", g_dbus_connection_get_unique_name(gdbus_connection));
-       g_callback = callback;
-       g_gesture_data = gesture_data;
 
        GVariant *body = NULL;
        body = g_variant_new("(iiiii)", gesture_type, g_hand_type, g_work_mode, g_option, g_sensitivity);
@@ -572,9 +552,6 @@ int gesture_client_dbus_stop_recognition(GDBusConnection *gdbus_connection)
        GDBusMessage *reply = NULL;
        GVariant *body = NULL;
 
-       /* free for gesture data struct */
-       _free_gesture_data(g_gesture_data);
-
        body = g_variant_new("()");
        ret = gdbus_send_message_with_sync(gdbus_connection, body, &reply, GESTURE_CLIENT_MSG_STOP_RECOGNITION);
        if (ret != HAND_GESTURE_ERROR_NONE)
index f9d6199..c0aa267 100644 (file)
@@ -486,34 +486,7 @@ int gesture_engine_dbus_main_start(GDBusConnection *gdbus_connection, gesture_en
        body = g_variant_new("(i)", 100);
 
        ret = gdbus_send_message_with_async(gdbus_connection, body, GESTURE_ENGINE_MSG_MAIN_START);
-#if 0
-       GError *err = NULL;
-       if (!g_dbus_connection_emit_signal(gdbus_connection,
-                                               GESTURE_DBUS_NAME,
-                                               GESTURE_OBJECT_PATH,
-                                               GESTURE_INTERFACE_NAME,
-                                               "psw_test",
-                                               body,
-                                               &err)) {
-               if (err != NULL) {
-                       LOGE("Failed to send dbus message : %s", err->message);
-                       g_error_free(err);
-               }
 
-               return GESTURE_ENGINE_ERROR_NONE;
-       }
-
-       GDBusProxy *ap;
-       g_dbus_proxy_new (gdbus_connection,
-               G_DBUS_PROXY_FLAGS_NONE,
-               NULL,
-               GESTURE_DBUS_NAME, /* name */
-               GESTURE_OBJECT_PATH, /* object path */
-               GESTURE_INTERFACE_NAME,    /* interface name */
-               NULL,                      /* GCancellable */
-               (GAsyncReadyCallback) proxy_new_cb,
-               &ap);
-#endif
        if (body)
                g_variant_unref(body);
 
index b696ca3..88f7c5b 100644 (file)
@@ -430,9 +430,6 @@ static void _gestured_client_dbus_method_call_handler(GDBusConnection *conn, con
                LOGD("[GESTURE_ENGINE_MSG_SEND_ENGINE_GET_INFO] called");
                ret = gestured_engine_send_engine_get_info(parameters, &reply_body, sender);
        }
-       else if (g_strcmp0(method_name, "psw_test") == 0) {
-               LOGD("[psw_test] called");
-       }
 
        if (ret == GESTURED_ERROR_NONE) {
                LOGD("method_call successful, method_name : %s", method_name);
@@ -526,9 +523,6 @@ int gestured_register_dbus_interface(void)
                        "                       <arg type='s' name='engine_name' direction='in'/>"
                        "               </method>"
 
-                       "               <method name='psw_test'>"
-                       "               </method>"
-                       "               <signal name='psw_test'/>"
                        "       </interface>"
                        "       </node>";