X-Git-Url: http://review.tizen.org/git/?a=blobdiff_plain;f=adaptors%2Fwearable%2Fwatch%2Fwatch-time.cpp;h=df7b0f44a260c2fd31ccb60d00d17bbcc4029a82;hb=b0179b9c02698741b2b5f2bc5a1d931bf2252459;hp=6c60b540444baf867a280f22d0ff083d58a7dfb7;hpb=0db96577889fb05af9084b01ef137c5ba8850158;p=platform%2Fcore%2Fuifw%2Fdali-adaptor.git diff --git a/adaptors/wearable/watch/watch-time.cpp b/adaptors/wearable/watch/watch-time.cpp index 6c60b54..df7b0f4 100644 --- a/adaptors/wearable/watch/watch-time.cpp +++ b/adaptors/wearable/watch/watch-time.cpp @@ -21,6 +21,7 @@ // EXTERNAL INCLUDES #ifdef APPCORE_WATCH_AVAILABLE #include +#include #endif namespace Dali @@ -92,6 +93,78 @@ int WatchTime::GetSecond() const return second; } +int WatchTime::GetMillisecond() const +{ + int millisecond; + + watch_time_get_millisecond(reinterpret_cast(mImpl->mTimeHandle), &millisecond); + return millisecond; +} + +int WatchTime::GetYear() const +{ + int year; + + watch_time_get_year(reinterpret_cast(mImpl->mTimeHandle), &year); + return year; +} + +int WatchTime::GetMonth() const +{ + int month; + + watch_time_get_month(reinterpret_cast(mImpl->mTimeHandle), &month); + return month; +} + +int WatchTime::GetDay() const +{ + int day; + + watch_time_get_day(reinterpret_cast(mImpl->mTimeHandle), &day); + return day; +} + +int WatchTime::GetDayOfWeek() const +{ + int dayOfWeek; + + watch_time_get_day_of_week(reinterpret_cast(mImpl->mTimeHandle), &dayOfWeek); + return dayOfWeek; +} + +struct tm WatchTime::GetUtcTime() const +{ + struct tm UtcTime; + + watch_time_get_utc_time(reinterpret_cast(mImpl->mTimeHandle), &UtcTime); + return UtcTime; +} + +time_t WatchTime::GetUtcTimeStamp() const +{ + time_t UtcTimeStamp; + + watch_time_get_utc_timestamp(reinterpret_cast(mImpl->mTimeHandle), &UtcTimeStamp); + return UtcTimeStamp; +} + +const char* WatchTime::GetTimeZone() const +{ + char* timeZone; + + watch_time_get_time_zone(reinterpret_cast(mImpl->mTimeHandle), &timeZone); + return timeZone; +} + +bool WatchTime::GetDaylightSavingTimeStatus() const +{ + bool daylight; + + watch_time_get_daylight_time_status(reinterpret_cast(mImpl->mTimeHandle), &daylight); + return daylight; +} + #else WatchTime::WatchTime() :mImpl(NULL) @@ -118,6 +191,52 @@ int WatchTime::GetSecond() const return 0; } +int WatchTime::GetMillisecond() const +{ + return 0; +} + +int WatchTime::GetYear() const +{ + return 0; +} + +int WatchTime::GetMonth() const +{ + return 0; +} + +int WatchTime::GetDay() const +{ + return 0; +} + +int WatchTime::GetDayOfWeek() const +{ + return 0; +} + +struct tm WatchTime::GetUtcTime() const +{ + time_t zero = time(0); + return *localtime(&zero); +} + +time_t WatchTime::GetUtcTimeStamp() const +{ + return 0; +} + +const char* WatchTime::GetTimeZone() const +{ + return 0; +} + +bool WatchTime::GetDaylightSavingTimeStatus() const +{ + return 0; +} + #endif } // namespace Dali