2 // Tizen Web Device API
\r
3 // Copyright (c) 2012 Samsung Electronics Co., Ltd.
\r
5 // Licensed under the Apache License, Version 2.0 (the License);
\r
6 // you may not use this file except in compliance with the License.
\r
7 // You may obtain a copy of the License at
\r
9 // http://www.apache.org/licenses/LICENSE-2.0
\r
11 // Unless required by applicable law or agreed to in writing, software
\r
12 // distributed under the License is distributed on an "AS IS" BASIS,
\r
13 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
\r
14 // See the License for the specific language governing permissions and
\r
15 // limitations under the License.
\r
18 #ifndef __TIZEN_JS_BLUETOOTH_HEALTH_APPLICATION_H__
\r
19 #define __TIZEN_JS_BLUETOOTH_HEALTH_APPLICATION_H__
\r
21 #include <JavaScriptCore/JavaScript.h>
\r
23 #include "BluetoothHealthApplication.h"
\r
25 namespace DeviceAPI {
\r
26 namespace Bluetooth {
\r
28 class BluetoothHealthApplicationHolder
\r
31 BluetoothHealthApplicationHolder(BluetoothHealthApplicationSharedPtr app) {mApp = app;}
\r
32 BluetoothHealthApplicationSharedPtr mApp;
\r
34 typedef BluetoothHealthApplicationHolder* BluetoothHealthApplicationHolderPtr;
\r
36 class JSBluetoothHealthApplication
\r
39 static const JSClassDefinition* getClassInfo();
\r
40 static const JSClassRef getClassRef();
\r
41 static JSObjectRef createJSObject(JSContextRef context, BluetoothHealthApplicationSharedPtr app);
\r
42 static BluetoothHealthApplicationSharedPtr toBluetoothHealthApplication(JSObjectRef appObj);
\r
47 * The callback invoked when an object is first created.
\r
49 static void initialize(JSContextRef context,
\r
50 JSObjectRef object);
\r
53 * The callback invoked when an object is finalized.
\r
55 static void finalize(JSObjectRef object);
\r
57 static JSValueRef getProperty(JSContextRef context,
\r
59 JSStringRef propertyName,
\r
60 JSValueRef* exception);
\r
62 static bool setProperty(JSContextRef context,
\r
64 JSStringRef propertyName,
\r
66 JSValueRef* exception);
\r
68 static JSValueRef unregister(JSContextRef context,
\r
70 JSObjectRef thisObject,
\r
71 size_t argumentCount,
\r
72 const JSValueRef arguments[],
\r
73 JSValueRef* exception);
\r
76 * This member variable contains the values which has to be passed
\r
77 * when the this class is embedded into JS Engine.
\r
79 static JSClassDefinition m_classInfo;
\r
82 * This structure describes a statically declared function property.
\r
84 static JSStaticFunction m_function[];
\r
87 * This member variable contains the initialization values for the
\r
88 * properties of this class. The values are given according to
\r
89 * the data structure JSPropertySpec
\r
91 static JSStaticValue m_property[];
\r
93 static JSClassRef m_jsClassRef;
\r
100 #endif // __TIZEN_JS_BLUETOOTH_HEALTH_APPLICATION_H__
\r