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_ATTENDEE_H_
19 #define _JS_CALENDAR_ATTENDEE_H_
23 #include <JavaScriptCore/JavaScript.h>
24 #include <CommonsJavaScript/PrivateObject.h>
25 #include <API/Calendar/CalendarEvent.h>
26 #include <API/Calendar/EventAttendee.h>
32 #define TIZEN_INTERFACE_CALENDAR_ATTENDEE "CalendarAttendee"
34 #define TIZEN_ATTENDEE_NAME "name"
35 #define TIZEN_ATTENDEE_URI "uri"
36 #define TIZEN_ATTENDEE_ROLE "role"
37 #define TIZEN_ATTENDEE_STATUS "status"
38 #define TIZEN_ATTENDEE_RSVP "RSVP"
39 #define TIZEN_ATTENDEE_TYPE "type"
40 #define TIZEN_ATTENDEE_GROUP "group"
41 #define TIZEN_ATTENDEE_DELEGATORURI "delegatorURI"
42 #define TIZEN_ATTENDEE_DELEGATEURI "delegateURI"
43 #define TIZEN_ATTENDEE_CONTACT_REF "contactRef"
45 typedef WrtDeviceApis::CommonsJavaScript::PrivateObject<TizenApis::Api::Calendar::EventAttendeePtr,
46 WrtDeviceApis::CommonsJavaScript::NoOwnership> AttendeePrivateObject;
48 class JSCalendarAttendee
52 static const JSClassDefinition* getClassInfo();
54 static JSClassRef getClassRef();
56 static JSObjectRef createJSCalendarAttendee(JSContextRef context, TizenApis::Api::Calendar::EventAttendeePtr event);
58 static TizenApis::Api::Calendar::EventAttendeePtr getPrivateObject(JSObjectRef object);
60 static void setPrivateObject(const TizenApis::Api::Calendar::EventAttendeePtr &attendee,
62 const JSObjectRef object);
67 * The callback invoked when an object is first created.
69 static void initialize(JSContextRef context, JSObjectRef object);
72 * The callback invoked when an object is finalized.
74 static void finalize(JSObjectRef object);
77 * Constructor for the CalendarAttendee interface.
79 static JSObjectRef constructor(JSContextRef context,
80 JSObjectRef constructor,
82 const JSValueRef arguments[],
83 JSValueRef* exception);
85 static JSValueRef getProperty(JSContextRef context,
87 JSStringRef propertyName,
88 JSValueRef* exception);
90 static bool setProperty(JSContextRef context,
92 JSStringRef propertyName,
94 JSValueRef* exception);
96 static JSClassRef m_jsClassRef;
99 * This structure describes a statically declared function property.
101 static JSStaticFunction m_function[];
104 * This structure contains properties and callbacks that define a type of object.
106 static JSClassDefinition m_classInfo;
109 * This member variable contains the initialization values for the static properties of this class.
110 * The values are given according to the data structure JSPropertySpec
112 static JSStaticValue m_property[];
119 #endif /* _JS_CALENDAR_ATTENDEE_H_ */