Add signal sending for p2p 67/304767/1
authorAnjali Nijhara <a.nijhara@samsung.com>
Tue, 23 Jan 2024 05:07:29 +0000 (10:37 +0530)
committerAnjali Nijhara <a.nijhara@samsung.com>
Tue, 23 Jan 2024 08:59:33 +0000 (14:29 +0530)
Change-Id: I771c690cf532d4b0f40bd3d05f92983349041b94

include/mobileap.h
include/tethering-dbus-interface.xml
src/mobileap_p2p.c

index 833f631..b9a36b0 100644 (file)
@@ -38,6 +38,8 @@ extern "C" {
 #define SIGNAL_NAME_USB_TETHER_OFF     "usb_off"
 #define SIGNAL_NAME_BT_TETHER_ON       "bluetooth_on"
 #define SIGNAL_NAME_BT_TETHER_OFF      "bluetooth_off"
+#define SIGNAL_NAME_P2P_TETHER_ON      "p2p_on"
+#define SIGNAL_NAME_P2P_TETHER_OFF     "p2p_off"
 #define SIGNAL_NAME_WIFI_AP_ON         "wifi_ap_on"
 #define SIGNAL_NAME_WIFI_AP_OFF                "wifi_ap_off"
 #define SIGNAL_NAME_NO_DATA_TIMEOUT    "no_data_timeout"
index 6a0099d..46b0004 100755 (executable)
                        <arg type="s" name="arg1" direction="out"/>
                </signal>
 
+               <signal name="p2p_on">
+               </signal>
+
+               <signal name="p2p_off">
+                       <arg type="s" name="arg1" direction="out"/>
+               </signal>
+
                <signal name="wifi_ap_on">
                </signal>
 
index 43996ac..8556526 100644 (file)
@@ -254,6 +254,10 @@ static void p2p_group_created(int error, void *user_data)
                        __handle_p2p_tethering_error();
                        return;
                }
+
+               DBG("Send p2p_on signal");
+               tethering_emit_p2p_on(request_data->object);
+
 #ifndef TIZEN_FEATURE_UNITTEST
                tethering_complete_enable_p2p_tethering(request_data->object, g_context, ret);
 #endif
@@ -566,6 +570,9 @@ gboolean tethering_p2p_disable(Tethering *obj,
 
        g_context = context;
 
+       DBG("Send p2p_off signal");
+       tethering_emit_p2p_off(obj, "");
+
 #ifndef TIZEN_FEATURE_UNITTEST
        tethering_complete_disable_p2p_tethering(obj, context,
         MOBILE_AP_DISABLE_P2P_TETHERING_CFM, MOBILE_AP_ERROR_NONE);