* @see device_display_change_state_by_reason()
*/
int device_display_change_state_by_reason(display_state_e type, const char *reason, int timeout, dbus_pending_cb cb);
+
+/**
+ * @platform
+ * @brief Check display feature(http://tizen.org/feature/display)
+ * @since_tizen 6.5
+ * @return @c 1 if it is supported,
+ * otherwise 0
+ */
+int is_feature_display_supported(void);
+
+/**
+ * @platform
+ * @brief Check display state feature(http://tizen.org/feature/display.state)
+ * @since_tizen 6.5
+ * @return @c 1 if it is supported,
+ * otherwise 0
+ */
+int is_feature_display_state_supported(void);
#ifdef __cplusplus
}
#endif
#define MODEL_NAME "http://tizen.org/system/model_name"
#define MODEL_EMULATOR "Emulator"
-#define DISPLAY_FEATURE "http://tizen.org/feature/display"
-#define DISPLAY_STATE_FEATURE "http://tizen.org/feature/display.state"
tizen_profile_t _get_tizen_profile()
{
return emul;
}
//LCOV_EXCL_STOP
-
-int is_display_supported(void)
-{
- int ret;
- bool display_avail;
-
- ret = system_info_get_platform_bool(DISPLAY_FEATURE, &display_avail);
- if (ret < 0) {
-//LCOV_EXCL_START System Error
- _E("Failed to get value of display feature");
- return false;
-//LCOV_EXCL_STOP
- } else if (ret == 0 && !display_avail) {
-//LCOV_EXCL_START System Error
- _D("Display feature is not supported");
- return false;
-//LCOV_EXCL_STOP
- } else
- return true;
-}
-
-int is_display_state_supported(void)
-{
- int ret;
- bool display_state_avail;
-
- ret = system_info_get_platform_bool(DISPLAY_STATE_FEATURE, &display_state_avail);
- if (ret < 0) {
-//LCOV_EXCL_START System Error
- _E("Failed to get value of display state feature");
- return false;
-//LCOV_EXCL_STOP
- } else if (ret == 0 && !display_state_avail) {
-//LCOV_EXCL_START System Error
- _D("Display state feature is not supported");
- return false;
-//LCOV_EXCL_STOP
- } else
- return true;
-}
#include <errno.h>
#include <vconf.h>
#include <libsyscommon/dbus-system.h>
+#include <system_info.h>
#include "display.h"
#include "display-internal.h"
#include "common.h"
+#define DISPLAY_FEATURE "http://tizen.org/feature/display"
+#define DISPLAY_STATE_FEATURE "http://tizen.org/feature/display.state"
+
#define METHOD_GET_DISPLAY_COUNT "GetDisplayCount"
#define METHOD_GET_MAX_BRIGHTNESS "GetMaxBrightness"
#define METHOD_GET_BRIGHTNESS "GetBrightness"
{
int ret;
- ret = is_display_supported();
+ ret = is_feature_display_supported();
if (!ret)
return DEVICE_ERROR_NOT_SUPPORTED;
{
int ret;
- ret = is_display_supported();
+ ret = is_feature_display_supported();
if (!ret)
return DEVICE_ERROR_NOT_SUPPORTED;
{
int ret;
- ret = is_display_supported();
+ ret = is_feature_display_supported();
if (!ret)
return DEVICE_ERROR_NOT_SUPPORTED;
{
int ret, max;
- ret = is_display_supported();
+ ret = is_feature_display_supported();
if (!ret)
return DEVICE_ERROR_NOT_SUPPORTED;
{
int ret, val;
- ret = is_display_supported();
+ ret = is_feature_display_supported();
if (!ret)
return DEVICE_ERROR_NOT_SUPPORTED;
static int privilege = -1;
static long num_calls = 0;
- ret = is_display_state_supported();
+ ret = is_feature_display_state_supported();
if (!ret)
return DEVICE_ERROR_NOT_SUPPORTED;
{
int ret;
- ret = is_display_supported();
+ ret = is_feature_display_supported();
if (!ret)
return DEVICE_ERROR_NOT_SUPPORTED;
{
int ret;
- ret = is_display_supported();
+ ret = is_feature_display_supported();
if (!ret)
return DEVICE_ERROR_NOT_SUPPORTED;
{
int ret, max;
- ret = is_display_supported();
+ ret = is_feature_display_supported();
if (!ret)
return DEVICE_ERROR_NOT_SUPPORTED;
return errno_to_device_error(ret);
}
//LCOV_EXCL_STOP
+
+int is_feature_display_supported(void)
+{
+ int ret;
+ bool display_avail;
+
+ ret = system_info_get_platform_bool(DISPLAY_FEATURE, &display_avail);
+ if (ret < 0) {
+//LCOV_EXCL_START System Error
+ _E("Failed to get value of display feature");
+ return false;
+//LCOV_EXCL_STOP
+ } else if (ret == 0 && !display_avail) {
+//LCOV_EXCL_START System Error
+ _D("Display feature is not supported");
+ return false;
+//LCOV_EXCL_STOP
+ } else
+ return true;
+}
+
+int is_feature_display_state_supported(void)
+{
+ int ret;
+ bool display_state_avail;
+
+ ret = system_info_get_platform_bool(DISPLAY_STATE_FEATURE, &display_state_avail);
+ if (ret < 0) {
+//LCOV_EXCL_START System Error
+ _E("Failed to get value of display state feature");
+ return false;
+//LCOV_EXCL_STOP
+ } else if (ret == 0 && !display_state_avail) {
+//LCOV_EXCL_START System Error
+ _D("Display state feature is not supported");
+ return false;
+//LCOV_EXCL_STOP
+ } else
+ return true;
+}