wrt-plugins-tizen_0.4.23
[framework/web/wrt-plugins-tizen.git] / src / Alarm / AlarmRelative.h
1 //
2 // Tizen Web Device API
3 // Copyright (c) 2012 Samsung Electronics Co., Ltd.
4 //
5 // Licensed under the Apache License, Version 2.0 (the License);
6 // you may not use this file except in compliance with the License.
7 // You may obtain a copy of the License at
8 //
9 // http://www.apache.org/licenses/LICENSE-2.0
10 //
11 // Unless required by applicable law or agreed to in writing, software
12 // distributed under the License is distributed on an AS IS BASIS,
13 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 // See the License for the specific language governing permissions and
15 // limitations under the License.
16 //
17
18  
19 #ifndef TIZENAPIS_API_ALARMRELATIVE_H_
20 #define TIZENAPIS_API_ALARMRELATIVE_H_
21
22 #include <string>
23 #include <vector>
24 #include <dpl/shared_ptr.h>
25 #include <time.h>
26 #include <app.h>
27 #include "alarm_common.h"
28
29 namespace DeviceAPI {
30 namespace Alarm {
31
32 class AlarmRelative;
33 typedef DPL::SharedPtr<AlarmRelative> AlarmRelativePtr;
34 typedef std::vector<AlarmRelativePtr> AlarmRelativeArrayPtr;
35
36 class AlarmRelative
37 {
38   public:
39     typedef enum {
40         ALARM_TYPE_DELAY,
41         ALARM_TYPE_DATE,
42         ALARM_TYPE_INVALID,
43     } alarm_type_e;
44     
45     AlarmRelative();
46     AlarmRelative(service_h handle);
47     ~AlarmRelative();
48     void setIsRecurrence(bool value);
49     int getId() const;
50     void setId(const int id);
51     void setDelay(int delay);
52     int getDelay();
53     bool isRecurrence();
54     void setPeriod(int value);
55     int getPeriod();
56     service_h getService();
57
58   private:
59     int m_id;
60     int m_delay;
61     bool m_isRecurrence;
62     int m_Period;
63     service_h m_service_handle;
64     
65 };
66
67 }
68 }
69
70 #endif