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 * @file JSTizenServiceEvent.h
19 * @author Yunchan Cho (yunchan.cho@samsung.com)
24 #ifndef _WRT_PLUGIN_JS_TIZEN_SERVICE_EVENT_H_
25 #define _WRT_PLUGIN_JS_TIZEN_SERVICE_EVENT_H_
27 #include <JavaScriptCore/JavaScript.h>
28 #include <CommonsJavaScript/PrivateObject.h>
29 #include <TizenServiceEvent/ITizenServiceEvent.h>
31 namespace WrtPlugins {
33 typedef WrtDeviceApis::CommonsJavaScript::PrivateObjectT<
34 WrtDeviceApis::TizenServiceEvent::Api::ITizenServiceEventPtr>::Type
35 JSTizenServiceEventPrivateObject;
37 class JSTizenServiceEvent
41 * This method initializes this in the JS Engine.
43 static JSClassRef getClassRef();
46 * Gets object's class description.
48 static const JSClassDefinition* getClassInfo();
52 * The callback invoked when an object is first created.
54 static void initialize(JSContextRef context,
58 * The callback invoked when an object is finalized.
60 static void finalize(JSObjectRef object);
63 * This structure describes a statically declared value property.
65 static JSStaticValue m_property[];
68 * This structure contains properties and callbacks that define a type of
71 static JSClassDefinition m_classInfo;
73 static JSClassRef m_jsClassRef;
75 // getters for properties
76 static JSValueRef getScale(
79 JSStringRef propertyName,
80 JSValueRef* exception);
82 static JSValueRef getBundle(
85 JSStringRef propertyName,
86 JSValueRef* exception);
88 static WrtDeviceApis::TizenServiceEvent::Api::ITizenServiceEventPtr
89 getPrivateObject(JSObjectRef arg);
94 #endif // _WRT_PLUGIN_JS_TIZEN_SERVICE_EVENT_H_