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_GEO_H_
19 #define _JS_CALENDAR_ITEM_GEO_H_
21 #include <JavaScriptCore/JavaScript.h>
22 #include <CommonsJavaScript/PrivateObject.h>
23 #include <API/Calendar/CalendarItemGeo.h>
29 #define TIZEN_CALENDAR_ITEM_GEO_LATITUDE "latitude"
30 #define TIZEN_CALENDAR_ITEM_GEO_LONGITUDE "longitude"
32 typedef WrtDeviceApis::CommonsJavaScript::PrivateObject<TizenApis::Api::Calendar::CalendarItemGeoPtr,
33 WrtDeviceApis::CommonsJavaScript::NoOwnership> CalendarItemGeoPrivateObject;
35 class JSCalendarItemGeo
39 static const JSClassDefinition* getClassInfo();
41 static JSClassRef getClassRef();
43 static TizenApis::Api::Calendar::CalendarItemGeoPtr getPrivateObject(JSObjectRef object);
48 * The callback invoked when an object is first created.
50 static void initialize(JSContextRef context, JSObjectRef object);
53 * The callback invoked when an object is finalized.
55 static void finalize(JSObjectRef object);
57 static JSValueRef getProperty(JSContextRef context,
59 JSStringRef propertyName,
60 JSValueRef* exception);
62 static bool setProperty(JSContextRef context,
64 JSStringRef propertyName,
66 JSValueRef* exception);
68 static JSClassRef m_jsClassRef;
71 * This structure describes a statically declared function property.
73 static JSStaticFunction m_function[];
76 * This structure contains properties and callbacks that define a type of object.
78 static JSClassDefinition m_classInfo;
81 * This member variable contains the initialization values for the static properties of this class.
82 * The values are given according to the data structure JSPropertySpec
84 static JSStaticValue m_property[];
91 #endif /* _JS_CALENDAR_ITEM_GEO_H_ */