gio-2.0
ua-api
)
-IF (SUSPEND_RESUME_TEST)
+IF (${SUSPEND_RESUME_TEST})
pkg_check_modules (PKGS REQUIRED ${PKG_MODULES}
deviced
power-defs
)
-ELSE (SUSPEND_RESUME_TEST)
+ELSE (${SUSPEND_RESUME_TEST})
pkg_check_modules (PKGS REQUIRED ${PKG_MODULES})
-ENDIF (SUSPEND_RESUME_TEST)
+ENDIF (${SUSPEND_RESUME_TEST})
+
+IF(${SUSPEND_RESUME_TEST})
+ ADD_DEFINITIONS(-DSUSPEND_RESUME_TEST)
+ENDIF(${SUPPORT_BLE_ADV})
INCLUDE_DIRECTORIES(${PKGS_INCLUDE_DIRS})
LINK_DIRECTORIES(${PKGS_LIBRARY_DIRS})
Name: capi-network-ua
Summary: User Awareness Framework CAPI
-Version: 0.11.9
+Version: 0.11.10
Release: 1
License: Apache-2.0
Source0: %{name}-%{version}.tar.gz
BuildRequires: pkgconfig(glib-2.0)
BuildRequires: pkgconfig(ua-api)
-%if 0%{?suspend_resume_test:1}
+%if 0%{?ptest:1}
BuildRequires: pkgconfig(deviced)
BuildRequires: pkgconfig(power-defs)
%endif
-DBIN_INSTALL_DIR=%{_bindir} \
-DINCLUDE_INSTALL_DIR=%{_includedir} \
-DLIB_PATH=%{_lib} \
- -DSUSPEND_RESUME_TEST=%{?suspend_resume_test:1}%{!?suspend_resume_test:0} \
+ -DSUSPEND_RESUME_TEST=%{?ptest:1}%{!?ptest:0} \
-DFULLVER=%{version} \
-DMAJORVER=${MAJORVER} \
-DBUILD_GCOV=%{?gcov:1}%{!?gcov:0}
msg("ua_enable_low_power_mode");
ret = ua_enable_low_power_mode();
-#ifdef SUSPEND_RESUME_TEST
- if (POWER_ERROR_NONE != device_power_set_state(POWER_STATE_STANDBY, 1)) {
- msgr("Fail to request power off");
- return RET_SUCCESS;
- }
-#endif
msg(" - ua_enable_low_power_mode() ret: [0x%X] [%s]",
ret, uat_get_error_str(ret));
MManager *mm, struct menu_data *menu)
{
int ret = UA_ERROR_NONE;
- int off_reason = POWER_OFF_REASON_POWER_KEY | POWER_OFF_TO_SUSPEND;
+ int off_reason = POWER_OFF_REASON_ART_APP_TO_SUSPEND | POWER_OFF_TO_SUSPEND;
msg("run_device_power_request_poweroff");
return false;
}
- ret = device_power_set_wakeup_reason(POWER_WAKEUP_REASON_REMOTE_CONTROLLER);
+ ret = device_power_set_wakeup_reason(POWER_WAKEUP_REASON_AMBIENT_READY);
if(POWER_ERROR_NONE != ret)
{
msgr("Fail to set wakeup reason");
return RET_SUCCESS;
}
- if(POWER_ERROR_NONE != device_power_set_state(POWER_STATE_STANDBY, 1)) {
+ ret = device_power_set_state(POWER_STATE_STANDBY, 1);
+ if(POWER_ERROR_NONE != ret) {
msgr("Failed to request TV to STANDBY!");
return RET_SUCCESS;
}
NULL, run_ua_enable_low_power_mode, NULL },
{ "13", "ua_disable_low_power_mode",
NULL, run_ua_disable_low_power_mode, NULL },
+#ifdef SUSPEND_RESUME_TEST
+ { "14", "request_power_off",
+ NULL, run_device_power_request_poweroff, NULL },
+#endif
{ NULL, NULL, },
};