return ret;
}
+static int __wfd_check_display_feature()
+{
+ CHECK_FEATURE_SUPPORTED(WIFIDIRECT_DISPLAY_FEATURE);
+
+ return WIFI_DIRECT_ERROR_NONE;
+}
+
//LCOV_EXCL_START
void __wfd_vconf_state_changed_cb(keynode_t *key, void *data)
{
info->secondary_device_type = g_variant_get_uint16(var);
} else if (!g_strcmp0(key, "IsWfdDevice")) {
-#ifdef TIZEN_FEATURE_WIFI_DISPLAY
- info->is_miracast_device = g_variant_get_boolean(var);
-#endif /* TIZEN_FEATURE_WIFI_DISPLAY */
+ if (g_client_info.is_display_supported)
+ info->is_miracast_device = g_variant_get_boolean(var);
} else {
;/* Do Nothing */
}
g_client_info.is_registered = TRUE;
+ if (__wfd_check_display_feature() == WIFI_DIRECT_ERROR_NONE)
+ g_client_info.is_display_supported = TRUE;
+ else
+ g_client_info.is_display_supported = FALSE;
+
/* Initialize callbacks */
g_client_info.activation_cb = NULL;
g_client_info.user_data_for_cb_activation = NULL;
peer_list->secondary_device_type = g_variant_get_uint16(var);
} else if (!g_strcmp0(key, "IsWfdDevice")) {
-#ifdef TIZEN_FEATURE_WIFI_DISPLAY
- peer_list->is_miracast_device = g_variant_get_boolean(var);
-#endif /* TIZEN_FEATURE_WIFI_DISPLAY */
+
+ if (g_client_info.is_display_supported)
+ peer_list->is_miracast_device = g_variant_get_boolean(var);
} else if (!g_strcmp0(key, "IsP2P")) {
peer_list->p2p_supported = g_variant_get_boolean(var);
peer->secondary_device_type = g_variant_get_uint16(var);
} else if (!g_strcmp0(key, "IsWfdDevice")) {
-#ifdef TIZEN_FEATURE_WIFI_DISPLAY
- peer->is_miracast_device = g_variant_get_boolean(var);
-#endif /* TIZEN_FEATURE_WIFI_DISPLAY */
+ if (g_client_info.is_display_supported)
+ peer->is_miracast_device = g_variant_get_boolean(var);
} else {
;/* Do Nothing */
}
int wifi_direct_init_display(void)
{
__WDC_LOG_FUNC_START__;
-#ifdef TIZEN_FEATURE_WIFI_DISPLAY
CHECK_FEATURE_SUPPORTED(WIFIDIRECT_DISPLAY_FEATURE);
WDC_LOGD("%s() return : [%d]", __func__, ret);
__WDC_LOG_FUNC_END__;
+
return ret;
-#else /* TIZEN_FEATURE_WIFI_DISPLAY */
- return WIFI_DIRECT_ERROR_NOT_SUPPORTED;
-#endif /* TIZEN_FEATURE_WIFI_DISPLAY */
}
int wifi_direct_deinit_display(void)
{
__WDC_LOG_FUNC_START__;
-#ifdef TIZEN_FEATURE_WIFI_DISPLAY
CHECK_FEATURE_SUPPORTED(WIFIDIRECT_DISPLAY_FEATURE);
WDC_LOGD("%s() return : [%d]", __func__, ret);
__WDC_LOG_FUNC_END__;
+
return ret;
-#else /* TIZEN_FEATURE_WIFI_DISPLAY */
- return WIFI_DIRECT_ERROR_NOT_SUPPORTED;
-#endif /* TIZEN_FEATURE_WIFI_DISPLAY */
}
int wifi_direct_set_display(wifi_direct_display_type_e type, int port, int hdcp)
{
__WDC_LOG_FUNC_START__;
-#ifdef TIZEN_FEATURE_WIFI_DISPLAY
CHECK_FEATURE_SUPPORTED(WIFIDIRECT_DISPLAY_FEATURE);
WDC_LOGD("%s() return : [%d]", __func__, ret);
__WDC_LOG_FUNC_END__;
+
return ret;
-#else /* TIZEN_FEATURE_WIFI_DISPLAY */
- return WIFI_DIRECT_ERROR_NOT_SUPPORTED;
-#endif /* TIZEN_FEATURE_WIFI_DISPLAY */
}
int wifi_direct_set_display_availability(bool availability)
{
__WDC_LOG_FUNC_START__;
-#ifdef TIZEN_FEATURE_WIFI_DISPLAY
CHECK_FEATURE_SUPPORTED(WIFIDIRECT_DISPLAY_FEATURE);
WDC_LOGD("%s() return : [%d]", __func__, ret);
__WDC_LOG_FUNC_END__;
+
return ret;
-#else /* TIZEN_FEATURE_WIFI_DISPLAY */
- return WIFI_DIRECT_ERROR_NOT_SUPPORTED;
-#endif /* TIZEN_FEATURE_WIFI_DISPLAY */
}
//LCOV_EXCL_START
int wifi_direct_get_peer_display_type(char *mac_address, wifi_direct_display_type_e *type)
{
__WDC_LOG_FUNC_START__;
-#ifdef TIZEN_FEATURE_WIFI_DISPLAY
CHECK_FEATURE_SUPPORTED(WIFIDIRECT_DISPLAY_FEATURE);
WDC_LOGD("%s() return : [%d]", __func__, ret);
__WDC_LOG_FUNC_END__;
+
return ret;
-#else /* TIZEN_FEATURE_WIFI_DISPLAY */
- return WIFI_DIRECT_ERROR_NOT_SUPPORTED;
-#endif /* TIZEN_FEATURE_WIFI_DISPLAY */
}
int wifi_direct_get_peer_display_availability(char *mac_address, bool *availability)
{
__WDC_LOG_FUNC_START__;
-#ifdef TIZEN_FEATURE_WIFI_DISPLAY
CHECK_FEATURE_SUPPORTED(WIFIDIRECT_DISPLAY_FEATURE);
WDC_LOGD("%s() return : [%d]", __func__, ret);
__WDC_LOG_FUNC_END__;
+
return ret;
-#else /* TIZEN_FEATURE_WIFI_DISPLAY */
- return WIFI_DIRECT_ERROR_NOT_SUPPORTED;
-#endif /* TIZEN_FEATURE_WIFI_DISPLAY */
}
int wifi_direct_get_peer_display_hdcp(char *mac_address, int *hdcp)
{
__WDC_LOG_FUNC_START__;
-#ifdef TIZEN_FEATURE_WIFI_DISPLAY
CHECK_FEATURE_SUPPORTED(WIFIDIRECT_DISPLAY_FEATURE);
WDC_LOGD("%s() return : [%d]", __func__, ret);
__WDC_LOG_FUNC_END__;
+
return ret;
-#else /* TIZEN_FEATURE_WIFI_DISPLAY */
- return WIFI_DIRECT_ERROR_NOT_SUPPORTED;
-#endif /* TIZEN_FEATURE_WIFI_DISPLAY */
}
int wifi_direct_get_peer_display_port(char *mac_address, int *port)
{
__WDC_LOG_FUNC_START__;
-#ifdef TIZEN_FEATURE_WIFI_DISPLAY
CHECK_FEATURE_SUPPORTED(WIFIDIRECT_DISPLAY_FEATURE);
WDC_LOGD("%s() return : [%d]", __func__, ret);
__WDC_LOG_FUNC_END__;
+
return ret;
-#else /* TIZEN_FEATURE_WIFI_DISPLAY */
- return WIFI_DIRECT_ERROR_NOT_SUPPORTED;
-#endif /* TIZEN_FEATURE_WIFI_DISPLAY */
}
int wifi_direct_get_peer_display_throughput(char *mac_address, int *throughput)
{
__WDC_LOG_FUNC_START__;
-#ifdef TIZEN_FEATURE_WIFI_DISPLAY
CHECK_FEATURE_SUPPORTED(WIFIDIRECT_DISPLAY_FEATURE);
WDC_LOGD("%s() return : [%d]", __func__, ret);
__WDC_LOG_FUNC_END__;
+
return ret;
-#else /* TIZEN_FEATURE_WIFI_DISPLAY */
- return WIFI_DIRECT_ERROR_NOT_SUPPORTED;
-#endif /* TIZEN_FEATURE_WIFI_DISPLAY */
}
int wifi_direct_set_session_timer(int seconds)