2 * Copyright (c) 2013 Samsung Electronics Co., Ltd All Rights Reserved
4 * Licensed under the Flora License, Version 1.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://floralicense.org/license/
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.
17 * @file PeriodChanger.h
18 * @author Yunchan Cho (yunchan.cho@samsung.com)
20 #ifndef PERIOD_CHNAGER_H
21 #define PERIOD_CHNAGER_H
29 typedef std::shared_ptr<PeriodChanger> PeriodChangerPtr;
33 static PeriodChangerPtr create(
34 std::string& boxId, std::string& instanceId,
35 float currentPeriod, float requestedPeriod)
37 return PeriodChangerPtr(
38 new PeriodChanger(boxId, instanceId, currentPeriod, requestedPeriod));
44 void showPeriodPopup();
45 void destroyPeriodPopup(Evas_Object *obj);
46 void setPopupListData();
47 bool requestToPlatform(float newPeriod);
48 static Evas_Object* createWindow();
49 static void destroyWindow();
51 static void selectPeriodCallback(void *data, Evas_Object *obj, void *event_info);
52 static void cancelButtonCallback(void *data, Evas_Object *obj, void *event_info);
55 std::string& boxId, std::string& instanceId,
56 float currentPeriod, float requestedPeriod);
58 static Evas_Object* s_window;
60 std::string m_instanceId;
61 float m_currentPeriod;
62 float m_requestedPeriod;
64 struct PopupListData {
65 PeriodChanger* periodChanger;
70 PopupListData m_hour[5];
74 #endif // PERIOD_CHNAGER_H