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_ATTENDEE_H_
19 #define _JS_ATTENDEE_H_
23 #include <JavaScriptCore/JavaScript.h>
24 #include <CommonsJavaScript/PrivateObject.h>
25 #include <API/Calendar/CalendarEvent.h>
26 #include <API/Calendar/EventAttendee.h>
28 using namespace TizenApis::Api::Calendar;
29 using namespace WrtDeviceApis::Commons;
30 using namespace WrtDeviceApis::CommonsJavaScript;
36 #define TIZEN_ATTENDEE_NAME "name"
37 #define TIZEN_ATTENDEE_URI "uri"
38 #define TIZEN_ATTENDEE_ROLE "role"
39 #define TIZEN_ATTENDEE_STATUS "status"
40 #define TIZEN_ATTENDEE_RSVP "RSVP"
41 #define TIZEN_ATTENDEE_TYPE "type"
42 #define TIZEN_ATTENDEE_GROUP "group"
43 #define TIZEN_ATTENDEE_DELEGATORURI "delegatorURI"
44 #define TIZEN_ATTENDEE_DELEGATEURI "delegateURI"
45 #define TIZEN_ATTENDEE_UID "uid"
47 typedef PrivateObject<Api::Calendar::EventAttendeePtr,
48 NoOwnership> AttendeePrivateObject;
54 static const JSClassDefinition* getClassInfo();
56 static JSClassRef getClassRef();
58 static JSObjectRef createJSAttendee(JSContextRef context, Api::Calendar::EventAttendeePtr event);
63 * The callback invoked when an object is first created.
65 static void initialize(JSContextRef context, JSObjectRef object);
68 * The callback invoked when an object is finalized.
70 static void finalize(JSObjectRef object);
72 static JSValueRef getProperty(JSContextRef context,
74 JSStringRef propertyName,
75 JSValueRef* exception);
77 static bool setProperty(JSContextRef context,
79 JSStringRef propertyName,
81 JSValueRef* exception);
83 static JSClassRef m_jsClassRef;
86 * This structure describes a statically declared function property.
88 static JSStaticFunction m_function[];
91 * This structure contains properties and callbacks that define a type of object.
93 static JSClassDefinition m_classInfo;
96 * This member variable contains the initialization values for the static properties of this class.
97 * The values are given according to the data structure JSPropertySpec
99 static JSStaticValue m_property[];
106 #endif /* _JS_ATTENDEE_H_ */