2 // Tizen Web Device API
3 // Copyright (c) 2012 Samsung Electronics Co., Ltd.
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
9 // http://www.apache.org/licenses/LICENSE-2.0
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.
19 #ifndef _EVENT_RECURRENCE_RULE_H_
20 #define _EVENT_RECURRENCE_RULE_H_
25 #include <dpl/shared_ptr.h>
30 typedef std::vector<std::string> StringArray;
31 typedef DPL::SharedPtr<StringArray> StringArrayPtr;
33 typedef std::vector<long long int> NumberArray;
34 typedef DPL::SharedPtr<NumberArray> NumberArrayPtr;
36 #define UNDEFINED_TIME -1
37 #define DEFAULT_TIMEZONE ""
38 #define DEFAULT_INTERVAL 1
40 class EventRecurrenceRule
54 EventRecurrenceRule();
55 virtual ~EventRecurrenceRule();
57 EventRecurrence getFrequency() const;
58 void setFrequency(const EventRecurrence &value);
60 int getInterval() const;
61 void setInterval(const int &value);
63 long long int getEndDate() const;
64 void setEndDate(long long int value);
66 long getOccurrenceCount() const;
67 void setOccurrenceCount(long value);
69 std::vector<int> getDaysOfTheMonth() const;
70 void setDaysOfTheMonth(std::vector<int> value);
72 StringArrayPtr getDaysOfTheWeek() const;
73 void setDaysOfTheWeek(StringArrayPtr value);
75 std::vector<int> getDaysOfTheYear() const;
76 void setDaysOfTheYear(std::vector<int> value);
78 std::vector<int> getWeeksOfTheYear() const;
79 void setWeeksOfTheYear(std::vector<int> value);
81 NumberArrayPtr getSetPositions() const;
82 void setSetPositions(NumberArrayPtr value);
84 NumberArrayPtr getExceptions() const;
85 void setExceptions(NumberArrayPtr value);
87 std::string getTimeZone() const;
88 void setTimeZone(std::string value);
91 EventRecurrence m_frequency;
93 long long int m_endDate;
94 long m_occurrenceCount;
95 std::vector<int> m_daysOfTheMonth;
96 StringArrayPtr m_daysOfTheWeek;
97 std::vector<int> m_daysOfTheYear;
98 std::vector<int> m_weeksOfTheYear;
99 NumberArrayPtr m_setPositions;
100 NumberArrayPtr m_exceptions;
101 std::string m_timeZone;
104 typedef DPL::SharedPtr<EventRecurrenceRule> EventRecurrenceRulePtr;
109 #endif /* _EVENT_RECURRENCE_RULE_H_ */