+gboolean handle_tdls_connect(Wifi *wifi, GDBusMethodInvocation *context,
+ gchar *peer_mac_Addr)
+{
+ DBG("[TizenMW-->WPAS]: TDLS Setup Request: [%s]", peer_mac_Addr);
+
+ if (is_connected) {
+ ERR(" Already active TDLS Connection !!!");
+ } else {
+ GVariant *message = NULL;
+ message = __netconfig_wifi_tdls_send_dbus_str("TDLSSetup", (const char*)peer_mac_Addr);
+
+ if (message == NULL) {
+ ERR(" TDLS : failed to connect !!!");
+ netconfig_error_dbus_method_return(context, NETCONFIG_ERROR_INTERNAL, "FailTdlsConnect");
+ return FALSE;
+ }
+
+ DBG("[TizenMW<--WPAS] TDLS DBUS Command sent successfully");
+ g_variant_unref(message);
+ is_connected = 1;
+ }
+
+ wifi_complete_tdls_connect(wifi, context, 1);
+ return TRUE;
+}
+
+gboolean handle_tdls_discover(Wifi *wifi, GDBusMethodInvocation *context)
+{
+ DBG("[TizenMW-->WPAS]: TDLS Discover Request ");
+
+ if (is_connected) {
+ ERR(" Already active TDLS Connection !!!");
+ } else {
+ GVariant *message = NULL;
+ message = __netconfig_wifi_tdls_send_dbus_str("TDLSDiscover", "ff:ff:ff:ff:ff:ff");
+
+ if (message == NULL) {
+ ERR(" TDLS : failed to discover !!!");
+ netconfig_error_dbus_method_return(context, NETCONFIG_ERROR_INTERNAL, "FailTdlsDiscover");
+ return FALSE;
+ }
+
+ DBG("[TizenMW<--WPAS] TDLS DBUS Command sent successfully");
+ g_variant_unref(message);
+ }
+
+ wifi_complete_tdls_discover(wifi, context);
+ return TRUE;
+}
+