2 * Copyright (c) 2011 Samsung Electronics Co., Ltd All Rights Reserved
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.
18 #ifndef _JS_TIZEN_CALENDAR_MANAGER_H_
19 #define _JS_TIZEN_CALENDAR_MANAGER_H_
21 #include <JavaScriptCore/JavaScript.h>
22 #include <CommonsJavaScript/PrivateObject.h>
23 #include <API/Calendar/ICalendarManager.h>
24 #include <API/Calendar/ICalendar.h>
30 typedef WrtDeviceApis::CommonsJavaScript::PrivateObject<TizenApis::Api::Calendar::ICalendarManagerPtr,
31 WrtDeviceApis::CommonsJavaScript::NoOwnership> CalendarManagerPrivObject;
33 #define TIZEN_CALENDAR_PROPERTY_VCALENDAR_20_FORMAT "ICALENDAR_20"
34 #define TIZEN_CALENDAR_PROPERTY_VCALENDAR_10_FORMAT "VCALENDAR_10"
36 #define TIZEN_CALENDAR_PROPERTY_TENTATIVE_STATUS "TENTATIVE"
37 #define TIZEN_CALENDAR_PROPERTY_CONFIRMED_STATUS "CONFIRMED"
38 #define TIZEN_CALENDAR_PROPERTY_CANCELLED_STATUS "CANCELLED"
39 #define TIZEN_CALENDAR_PROPERTY_NEEDS_ACTION_STATUS "NEEDS_ACTION"
40 #define TIZEN_CALENDAR_PROPERTY_IN_PROCESS_STATUS "IN_PROCESS"
41 #define TIZEN_CALENDAR_PROPERTY_COMPLETED_STATUS "COMPLETED"
43 #define TIZEN_CALENDAR_PROPERTY_HIGH_PRIORITY "HIGH"
44 #define TIZEN_CALENDAR_PROPERTY_MEDIUM_PRIORITY "MEDIUM"
45 #define TIZEN_CALENDAR_PROPERTY_LOW_PRIORITY "LOW"
47 #define TIZEN_CALENDAR_PROPERTY_PUBLIC_VISIBILITY "PUBLIC"
48 #define TIZEN_CALENDAR_PROPERTY_PRIVATE_VISIBILITY "PRIVATE"
49 #define TIZEN_CALENDAR_PROPERTY_CONFIDENTIAL_VISIBILITY "CONFIDENTIAL"
51 #define TIZEN_CALENDAR_PROPERTY_BUSY "BUSY"
52 #define TIZEN_CALENDAR_PROPERTY_BUSY_UNAVAILABLE_FB "BUSY_UNAVAILABLE"
53 #define TIZEN_CALENDAR_PROPERTY_FREE "FREE"
54 #define TIZEN_CALENDAR_PROPERTY_BUSY_TENTATIVE "BUSY_TENTATIVE"
56 #define TIZEN_CALENDAR_PROPERTY_REQ_PARTICIPANT_ROLE "REQ_PARTICIPANT"
57 #define TIZEN_CALENDAR_PROPERTY_OPT_PARTICIPANT_ROLE "OPT_PARTICIPANT"
58 #define TIZEN_CALENDAR_PROPERTY_NON_PARTICIPANT_ROLE "NON_PARTICIPANT"
59 #define TIZEN_CALENDAR_PROPERTY_CHAIR_ROLE "CHAIR"
61 #define TIZEN_CALENDAR_PROPERTY_PENDING_STATUS "PENDING"
62 #define TIZEN_CALENDAR_PROPERTY_ACCEPTED_STATUS "ACCEPTED"
63 #define TIZEN_CALENDAR_PROPERTY_DECLINED_STATUS "DECLINED"
64 #define TIZEN_CALENDAR_PROPERTY_TENTATIVE_STATUS "TENTATIVE"
65 #define TIZEN_CALENDAR_PROPERTY_DELEGATED_STATUS "DELEGATED"
66 #define TIZEN_CALENDAR_PROPERTY_COMPLETED_STATUS "COMPLETED"
67 #define TIZEN_CALENDAR_PROPERTY_IN_PROCESS_STATUS "IN_PROCESS"
69 #define TIZEN_CALENDAR_PROPERTY_INDIVIDUAL_TYPE "INDIVIDUAL"
70 #define TIZEN_CALENDAR_PROPERTY_GROUP_TYPE "GROUP"
71 #define TIZEN_CALENDAR_PROPERTY_RESOURCE_TYPE "RESOURCE"
72 #define TIZEN_CALENDAR_PROPERTY_ROOM_TYPE "ROOM"
73 #define TIZEN_CALENDAR_PROPERTY_UNKNOWN_TYPE "UNKNOWN"
75 //#define TIZEN_CALENDAR_PROPERTY_NO_RECURRENCE "NO_RECURRENCE"
76 #define TIZEN_CALENDAR_PROPERTY_DAILY_RECURRENCE "DAILY"
77 #define TIZEN_CALENDAR_PROPERTY_WEEKLY_RECURRENCE "WEEKLY"
78 #define TIZEN_CALENDAR_PROPERTY_MONTHLY_RECURRENCE "MONTHLY"
79 #define TIZEN_CALENDAR_PROPERTY_YEARLY_RECURRENCE "YEARLY"
81 //#define TIZEN_CALENDAR_PROPERTY_NO_ALARM "NO_ALARM"
82 #define TIZEN_CALENDAR_PROPERTY_SILENT_ALARM "SILENT"
83 #define TIZEN_CALENDAR_PROPERTY_SOUND_ALARM "SOUND"
85 #define TIZEN_CALENDAR_PROPERTY_TYPE_EVENT "EVENT"
86 #define TIZEN_CALENDAR_PROPERTY_TYPE_TASK "TASK"
88 class JSCalendarManager
99 static const JSClassDefinition* getClassInfo();
100 static const JSClassRef getClassRef();
104 * This structure describes a statically declared function property.
106 static JSStaticFunction m_function[];
109 * This member variable contains the initialization values for the
110 * properties of this class. The values are given according to
111 * the data structure JSPropertySpec
113 static JSStaticValue m_property[];
116 * This structure contains properties and callbacks
117 * that define a type of object.
119 static JSClassDefinition m_classInfo;
121 static JSClassRef m_jsClassRef;
124 * The callback invoked when an object is first created.
126 static void initialize(JSContextRef context,
130 * The callback invoked when an object is finalized.
132 static void finalize(JSObjectRef object);
137 static JSValueRef getCalendars(JSContextRef context,
139 JSObjectRef thisObject,
140 size_t argumentCount,
141 const JSValueRef arguments[],
142 JSValueRef* exception);
145 * Get a default calendar.
147 static JSValueRef getDefaultCalendar(JSContextRef context,
149 JSObjectRef thisObject,
150 size_t argumentCount,
151 const JSValueRef arguments[],
152 JSValueRef* exception);
158 #endif /* _JS_TIZEN_CALENDAR_MANAGER_H_ */