Signed-off-by: suhyung Eom <suhyung.eom@samsung.com>
Change-Id: Ie79c69b679ab74a70bb21866d631de896fdeecf9
WatchTimeSignal& TimeTickSignal();
/**
- * @brief This signal is emitted at every second in ambient mode
+ * @brief This signal is emitted at each minute in ambient mode
* A callback of the following type may be connected:
* @code
* void YourCallbackName(Application& application, WatchTimeSignal &time);
* @endcode
* time(watch time handle) will not be available after returning this callback. It will be freed by the framework.
* @SINCE_1_1.37
+ * @remarks http://tizen.org/privilege/alarm.set privilege is needed to receive ambient ticks at each minute.
+ * The AmbientTickSignal() will be ignored if your app doesn't have the privilege
*/
WatchTimeSignal& AmbientTickSignal();
void *mTimeHandle;
};
-WatchTime::WatchTime()
- :mImpl(NULL)
-{
-}
-
WatchTime::WatchTime(void *time_handle)
{
mImpl = new Impl(time_handle);
#ifdef APPCORE_WATCH_AVAILABLE
+WatchTime::WatchTime()
+{
+ watch_time_h watch_time = {0,};
+
+ watch_time_get_current_time(&watch_time);
+ mImpl = new Impl(watch_time);
+}
+
int WatchTime::GetHour() const
{
int hour;
#else
+WatchTime::WatchTime()
+ :mImpl(NULL)
+{
+}
+
int WatchTime::GetHour() const
{
return 0;
return 0;
}
-#endif
+#endif // APPCORE_WATCH_AVAILABLE
} // namespace Dali