summaryrefslogtreecommitdiff
path: root/mobile_src/Calendar/EventRecurrenceRule.h
diff options
context:
space:
mode:
Diffstat (limited to 'mobile_src/Calendar/EventRecurrenceRule.h')
-rwxr-xr-xmobile_src/Calendar/EventRecurrenceRule.h125
1 files changed, 125 insertions, 0 deletions
diff --git a/mobile_src/Calendar/EventRecurrenceRule.h b/mobile_src/Calendar/EventRecurrenceRule.h
new file mode 100755
index 0000000..f859e0b
--- /dev/null
+++ b/mobile_src/Calendar/EventRecurrenceRule.h
@@ -0,0 +1,125 @@
+//
+// Tizen Web Device API
+// Copyright (c) 2012 Samsung Electronics Co., Ltd.
+//
+// Licensed under the Apache License, Version 2.0 (the License);
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+
+#ifndef _EVENT_RECURRENCE_RULE_H_
+#define _EVENT_RECURRENCE_RULE_H_
+
+#include <string>
+#include <vector>
+#include <ctime>
+#include <dpl/shared_ptr.h>
+
+#include <JavaScriptCore/JavaScript.h>
+
+namespace DeviceAPI {
+namespace Calendar {
+
+typedef std::vector<std::string> StringArray;
+typedef DPL::SharedPtr<StringArray> StringArrayPtr;
+
+typedef std::vector<long long int> NumberArray;
+typedef DPL::SharedPtr<NumberArray> NumberArrayPtr;
+
+#define UNDEFINED_TIME -1
+#define DEFAULT_TIMEZONE ""
+#define DEFAULT_INTERVAL 1
+
+class EventRecurrenceRule
+{
+ public:
+
+ typedef enum
+ {
+ NO_RECURRENCE,
+ DAILY_RECURRENCE,
+ WEEKLY_RECURRENCE,
+ MONTHLY_RECURRENCE,
+ YEARLY_RECURRENCE,
+ UNDEFINED_RECURRENCE
+ } EventRecurrence;
+
+ EventRecurrenceRule();
+ virtual ~EventRecurrenceRule();
+
+ EventRecurrence getFrequency() const;
+ void setFrequency(const EventRecurrence &value);
+
+ int getInterval() const;
+ void setInterval(const int &value);
+
+ long long int getEndDate() const;
+ void setEndDate(long long int value);
+
+ long getOccurrenceCount() const;
+ void setOccurrenceCount(long value);
+
+ std::vector<int> getDaysOfTheMonth() const;
+ void setDaysOfTheMonth(std::vector<int> value);
+
+ StringArrayPtr getDaysOfTheWeek() const;
+ void setDaysOfTheWeek(StringArrayPtr value);
+ JSObjectRef getDaysOfTheWeekJSRef() const;
+ void setDaysOfTheWeekJSRef(const JSObjectRef value);
+
+ std::vector<int> getDaysOfTheYear() const;
+ void setDaysOfTheYear(std::vector<int> value);
+
+ std::vector<int> getWeeksOfTheYear() const;
+ void setWeeksOfTheYear(std::vector<int> value);
+
+ NumberArrayPtr getSetPositions() const;
+ void setSetPositions(NumberArrayPtr value);
+ JSObjectRef getSetPositionsJSRef() const;
+ void setSetPositionsJSRef(const JSObjectRef value);
+
+ NumberArrayPtr getExceptions() const;
+ void setExceptions(NumberArrayPtr value);
+ JSObjectRef getExceptionsJSRef() const;
+ void setExceptionsJSRef(const JSObjectRef value);
+
+ std::string getTimeZone() const;
+ void setTimeZone(std::string value);
+
+ JSContextRef getContext() const;
+ void setContext(const JSContextRef contextRef);
+
+ protected:
+ EventRecurrence m_frequency;
+ int m_interval;
+ long long int m_endDate;
+ long m_occurrenceCount;
+ std::vector<int> m_daysOfTheMonth;
+ StringArrayPtr m_daysOfTheWeek;
+ JSObjectRef m_daysOfTheWeekJSRef;
+ std::vector<int> m_daysOfTheYear;
+ std::vector<int> m_weeksOfTheYear;
+ NumberArrayPtr m_setPositions;
+ JSObjectRef m_setPositionsJSRef;
+ NumberArrayPtr m_exceptions;
+ JSObjectRef m_exceptionsJSRef;
+ std::string m_timeZone;
+
+ JSContextRef m_context;
+};
+
+typedef DPL::SharedPtr<EventRecurrenceRule> EventRecurrenceRulePtr;
+
+}
+}
+
+#endif /* _EVENT_RECURRENCE_RULE_H_ */