#SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${EXTRA_CFLAGS} -fPIC -Wall -Werror -fprofile-arcs -ftest-coverage")
SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${EXTRA_CFLAGS} -fPIC -Wall -Werror")
+IF(TIZEN_FEATURE_WIFI_DIRECT_ON_DEMAND)
+ ADD_DEFINITIONS(-DTIZEN_FEATURE_WIFI_DIRECT_ON_DEMAND)
+ENDIF(TIZEN_FEATURE_WIFI_DIRECT_ON_DEMAND)
+
ADD_SUBDIRECTORY(src)
#ADD_SUBDIRECTORY(test)
cmake -DCMAKE_INSTALL_PREFIX=%{_prefix} \
%if "%{profile}" == "common"
+ -DTIZEN_FEATURE_WIFI_DIRECT_ON_DEMAND=1 \
-DTIZEN_FEATURE_SERVICE_DISCOVERY=1 \
-DTIZEN_FEATURE_WIFI_DISPLAY=1 \
%else
-DTIZEN_FEATURE_WIFI_DISPLAY=0 \
%else
%if "%{profile}" == "mobile"
+ -DTIZEN_FEATURE_WIFI_DIRECT_ON_DEMAND=1 \
-DTIZEN_FEATURE_SERVICE_DISCOVERY=1 \
-DTIZEN_FEATURE_WIFI_DISPLAY=1 \
%else
%if "%{profile}" == "tv"
+ -DTIZEN_FEATURE_WIFI_DIRECT_ON_DEMAND=1 \
-DTIZEN_FEATURE_SERVICE_DISCOVERY=1 \
-DTIZEN_FEATURE_WIFI_DISPLAY=1 \
%endif
ADD_DEFINITIONS(-DTIZEN_FEATURE_WIFI_DISPLAY)
SET(FEATURES "${FEATURES} -DTIZEN_FEATURE_WIFI_DISPLAY")
ENDIF(TIZEN_FEATURE_WIFI_DISPLAY)
+IF(TIZEN_FEATURE_WIFI_DIRECT_ON_DEMAND)
+ ADD_DEFINITIONS(-DTIZEN_FEATURE_WIFI_DIRECT_ON_DEMAND)
+ SET(FEATURES "${FEATURES} -DTIZEN_FEATURE_WIFI_DIRECT_ON_DEMAND")
+ENDIF(TIZEN_FEATURE_WIFI_DIRECT_ON_DEMAND)
# Linker flags
SET(CMAKE_EXE_LINKER_FLAGS "-Wl,--as-needed, --rpath=${LIBDIR}")
return WIFI_DIRECT_ERROR_OPERATION_FAILED; //LCOV_EXCL_LINE
}
+#ifdef TIZEN_FEATURE_WIFI_DIRECT_ON_DEMAND
+ reply = wifi_direct_dbus_method_call_sync(WFD_MANAGER_MANAGE_INTERFACE,
+ "AddClient", NULL, &error);
+ res = __net_wifidirect_gerror_to_enum(error);
+ if (res != WIFI_DIRECT_ERROR_NONE) {
+ WDC_LOGE("Failed to Add Active Client");
+ return res;
+ }
+
+ g_variant_get(reply, "(i)", &res);
+ WDC_LOGD("Active Client id Added, ret[%d]", res);
+#endif/* TIZEN_FEATURE_WIFI_DIRECT_ON_DEMAND */
+
reply = wifi_direct_dbus_method_call_sync(WFD_MANAGER_GROUP_INTERFACE,
"IsGroupOwner", NULL, &error);