From: Anjali Nijhara Date: Tue, 23 Jan 2024 05:07:29 +0000 (+0530) Subject: Add signal sending for p2p X-Git-Tag: accepted/tizen/unified/20240308.174040~1^2 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=df5ae385c862180fd42ad936316c4b9fa6f286d0;p=platform%2Fcore%2Fconnectivity%2Fmobileap-agent.git Add signal sending for p2p Change-Id: I771c690cf532d4b0f40bd3d05f92983349041b94 --- diff --git a/include/mobileap.h b/include/mobileap.h index 833f631..b9a36b0 100644 --- a/include/mobileap.h +++ b/include/mobileap.h @@ -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" diff --git a/include/tethering-dbus-interface.xml b/include/tethering-dbus-interface.xml index 6a0099d..46b0004 100755 --- a/include/tethering-dbus-interface.xml +++ b/include/tethering-dbus-interface.xml @@ -238,6 +238,13 @@ + + + + + + + diff --git a/src/mobileap_p2p.c b/src/mobileap_p2p.c index 43996ac..8556526 100644 --- a/src/mobileap_p2p.c +++ b/src/mobileap_p2p.c @@ -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);