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_ITEM_H_
19 #define _JS_CALENDAR_ITEM_H_
21 #include <JavaScriptCore/JavaScript.h>
22 #include <API/Calendar/CalendarEvent.h>
23 #include <CommonsJavaScript/PrivateObject.h>
29 typedef WrtDeviceApis::CommonsJavaScript::PrivateObject<TizenApis::Api::Calendar::CalendarEventPtr,
30 WrtDeviceApis::CommonsJavaScript::NoOwnership> CalendarItemPrivObject;
36 static const JSClassDefinition* getClassInfo();
38 static const JSClassRef getClassRef();
40 static TizenApis::Api::Calendar::CalendarEventPtr getPrivateObject(JSObjectRef object);
42 static void setPrivateObject(const TizenApis::Api::Calendar::CalendarEventPtr &event,
44 const JSObjectRef object);
46 static bool validate(JSContextRef ctx,
47 const JSObjectRef object,
48 JSValueRef* exception);
52 * This member variable contains the values which has to be passed when
53 * the this class is embedded into JS Engine.
55 static JSClassDefinition m_classInfo;
58 * This structure describes a statically declared function property.
60 static JSStaticFunction m_function[];
63 * This member variable contains the initialization values for the
64 * properties of this class. The values are given according to the
65 * data structure JSPropertySpec.
67 static JSStaticValue m_property[];
69 static JSClassRef m_jsClassRef;
72 * The callback invoked when an object is first created.
74 static void initialize(JSContextRef context,
78 * The callback invoked when an object is finalized.
80 static void finalize(JSObjectRef object);
83 * Getters and setters for properties
85 static JSValueRef getPropertyId(JSContextRef context,
87 JSStringRef propertyName,
88 JSValueRef* exception);
89 static JSValueRef getPropertyLastModifiedDate(JSContextRef context,
91 JSStringRef propertyName,
92 JSValueRef* exception);
93 static JSValueRef getPropertyIsDetached(JSContextRef context,
95 JSStringRef propertyName,
96 JSValueRef* exception);
103 #endif /* _JS_CALENDAR_ITEM_H_ */