2 * Copyright (c) 2016 Samsung Electronics Co., Ltd.
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
8 * http://www.apache.org/licenses/LICENSE-2.0
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
19 #include <watch-time.h>
22 #ifdef APPCORE_WATCH_AVAILABLE
23 #include <appcore-watch/watch_app.h>
29 struct WatchTime::Impl
31 Impl(void *time_handle)
32 : mTimeHandle(time_handle)
39 WatchTime::WatchTime()
44 WatchTime::WatchTime(void *time_handle)
46 mImpl = new Impl(time_handle);
49 WatchTime::~WatchTime()
58 #ifdef APPCORE_WATCH_AVAILABLE
60 int WatchTime::GetHour() const
64 watch_time_get_hour(reinterpret_cast<watch_time_h>(mImpl->mTimeHandle), &hour);
68 int WatchTime::GetHour24() const
72 watch_time_get_hour24(reinterpret_cast<watch_time_h>(mImpl->mTimeHandle), &hour24);
76 int WatchTime::GetMinute() const
80 watch_time_get_minute(reinterpret_cast<watch_time_h>(mImpl->mTimeHandle), &minute);
84 int WatchTime::GetSecond() const
88 watch_time_get_second(reinterpret_cast<watch_time_h>(mImpl->mTimeHandle), &second);
94 int WatchTime::GetHour() const
99 int WatchTime::GetHour24() const
104 int WatchTime::GetMinute() const
109 int WatchTime::GetSecond() const