Enable the connection request event for custom obex server
[platform/core/connectivity/bluetooth-frwk.git] / bt-service-adaptation / services / obex / bt-service-obex-server.c
index d74263a..56c6eab 100644 (file)
@@ -1452,38 +1452,6 @@ int _bt_obex_server_is_receiving(gboolean *receiving)
        return BLUETOOTH_ERROR_NONE;
 }
 
-gboolean __bt_obex_server_accept_timeout_cb(gpointer user_data)
-{
-       request_info_t *req_info;
-       GVariant *out_param1 = NULL;
-       int result = BLUETOOTH_ERROR_TIMEOUT;
-
-       /* Already reply in _bt_obex_transfer_started */
-       retv_if(agent_info.accept_id == 0, FALSE);
-
-       req_info = _bt_get_request_info(agent_info.accept_id);
-       if (req_info == NULL || req_info->context == NULL) {
-               BT_ERR("info is NULL");
-               return FALSE;
-       }
-
-       agent_info.accept_id = 0;
-       GArray *g_out_param1 = NULL;
-       g_out_param1 = g_array_new(FALSE, FALSE, sizeof(gchar));
-       if (out_param1 == NULL) {
-               out_param1 = g_variant_new_from_data((const GVariantType *)"ay",
-                               g_out_param1->data, g_out_param1->len,
-                               TRUE, NULL, NULL);
-       }
-
-       g_dbus_method_invocation_return_value(req_info->context,
-                       g_variant_new("(iv)", result, out_param1));
-       g_array_free(g_out_param1, TRUE);
-       _bt_delete_request_list(req_info->req_id);
-
-       return FALSE;
-}
-
 void _bt_obex_server_set_pending_conn_auth_device_addr(const char *address)
 {
        if (pending_auth_address)
@@ -1510,10 +1478,6 @@ int _bt_obex_server_accept_connection(int request_id)
 
        agent_info.accept_id = request_id;
 
-       g_timeout_add(BT_SERVER_ACCEPT_TIMEOUT,
-                       (GSourceFunc)__bt_obex_server_accept_timeout_cb,
-                       NULL);
-
        return BLUETOOTH_ERROR_NONE;
 }
 
@@ -1551,3 +1515,9 @@ int _bt_opp_get_server_progress(int transfer_id, guint8 *progress)
        BT_DBG("Percentage: %d", *progress);
        return BLUETOOTH_ERROR_NONE;
 }
+
+gboolean _bt_obex_server_is_custom(void)
+{
+       return (agent_info.server_type == BT_CUSTOM_SERVER) ? TRUE : FALSE;
+}
+