Update change log and spec for wrt-plugins-tizen_0.4.44
[framework/web/wrt-plugins-tizen.git] / src / Bluetooth / JSBluetoothHealthApplication.h
1 //\r
2 // Tizen Web Device API\r
3 // Copyright (c) 2012 Samsung Electronics Co., Ltd.\r
4 //\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
8 //\r
9 // http://www.apache.org/licenses/LICENSE-2.0\r
10 //\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
16 //\r
17 \r
18 #ifndef __TIZEN_JS_BLUETOOTH_HEALTH_APPLICATION_H__\r
19 #define __TIZEN_JS_BLUETOOTH_HEALTH_APPLICATION_H__\r
20 \r
21 #include <JavaScriptCore/JavaScript.h>\r
22 \r
23 #include "BluetoothHealthApplication.h"\r
24 \r
25 namespace DeviceAPI {\r
26 namespace Bluetooth {\r
27 \r
28 class BluetoothHealthApplicationHolder\r
29 {\r
30 public:\r
31     BluetoothHealthApplicationHolder(BluetoothHealthApplicationSharedPtr app) {mApp = app;}\r
32     BluetoothHealthApplicationSharedPtr mApp; \r
33 };\r
34 typedef BluetoothHealthApplicationHolder* BluetoothHealthApplicationHolderPtr;\r
35 \r
36 class JSBluetoothHealthApplication\r
37 {\r
38 public:\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
43     \r
44 private:\r
45 \r
46     /**\r
47      * The callback invoked when an object is first created.\r
48      */\r
49     static void initialize(JSContextRef context,\r
50             JSObjectRef object);\r
51 \r
52     /**\r
53      * The callback invoked when an object is finalized.\r
54      */\r
55     static void finalize(JSObjectRef object);\r
56 \r
57     static JSValueRef getProperty(JSContextRef context,\r
58             JSObjectRef object,\r
59             JSStringRef propertyName,\r
60             JSValueRef* exception);\r
61 \r
62     static bool setProperty(JSContextRef context,\r
63             JSObjectRef object,\r
64             JSStringRef propertyName,\r
65             JSValueRef value,\r
66             JSValueRef* exception);\r
67 \r
68     static JSValueRef unregister(JSContextRef context,\r
69         JSObjectRef object,\r
70         JSObjectRef thisObject,\r
71         size_t argumentCount,\r
72         const JSValueRef arguments[],\r
73         JSValueRef* exception);\r
74 \r
75     /**\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
78      */\r
79     static JSClassDefinition m_classInfo;\r
80 \r
81     /**\r
82      * This structure describes a statically declared function property.\r
83      */\r
84     static JSStaticFunction m_function[];\r
85 \r
86     /**\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
90      */\r
91     static JSStaticValue m_property[];\r
92 \r
93     static JSClassRef m_jsClassRef;\r
94 };\r
95 \r
96 \r
97 } // Bluetooth\r
98 } // DeviceAPI\r
99 \r
100 #endif // __TIZEN_JS_BLUETOOTH_HEALTH_APPLICATION_H__\r
101 \r
102 \r
103 \r