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_CALENDAR_TASK_H_
19 #define _JS_CALENDAR_TASK_H_
21 #include <JavaScriptCore/JavaScript.h>
22 #include <API/Calendar/CalendarEvent.h>
23 #include <CommonsJavaScript/PrivateObject.h>
29 #define TIZEN_CALENDAR_TASK_ID "id"
30 #define TIZEN_CALENDAR_TASK_LAST_MODIFICATION_DATE "lastModificationDate"
32 typedef WrtDeviceApis::CommonsJavaScript::PrivateObject<TizenApis::Api::Calendar::CalendarEventPtr,
33 WrtDeviceApis::CommonsJavaScript::NoOwnership> CalendarTaskPrivObject;
39 static const JSClassDefinition* getClassInfo();
41 static const JSClassRef getClassRef();
43 static TizenApis::Api::Calendar::CalendarEventPtr getPrivateObject(JSObjectRef object);
45 static void setPrivateObject(const TizenApis::Api::Calendar::CalendarEventPtr &event,
47 const JSObjectRef object);
49 static bool validate(JSContextRef ctx,
50 const JSObjectRef object,
51 JSValueRef* exception);
55 * This member variable contains the values which has to be passed when
56 * the this class is embedded into JS Engine.
58 static JSClassDefinition m_classInfo;
61 * This structure describes a statically declared function property.
63 static JSStaticFunction m_function[];
66 * This member variable contains the initialization values for the
67 * properties of this class. The values are given according to the
68 * data structure JSPropertySpec.
70 static JSStaticValue m_property[];
72 static JSClassRef m_jsClassRef;
75 * The callback invoked when an object is first created.
77 static void initialize(JSContextRef context,
81 * The callback invoked when an object is finalized.
83 static void finalize(JSObjectRef object);
86 * Getters and setters for properties
88 static JSValueRef getPropertyId(JSContextRef context,
90 JSStringRef propertyName,
91 JSValueRef* exception);
92 static JSValueRef getPropertyLastModificationDate(JSContextRef context,
94 JSStringRef propertyName,
95 JSValueRef* exception);
102 #endif /* _JS_CALENDAR_TASK_H_ */