2 // Tizen Web Device API
3 // Copyright (c) 2012 Samsung Electronics Co., Ltd.
5 // Licensed under the Apache License, Version 2.0 (the License);
6 // you may not use this file except in compliance with the License.
7 // You may obtain a copy of the License at
9 // http://www.apache.org/licenses/LICENSE-2.0
11 // Unless required by applicable law or agreed to in writing, software
12 // distributed under the License is distributed on an "AS IS" BASIS,
13 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 // See the License for the specific language governing permissions and
15 // limitations under the License.
18 #ifndef __TIZEN_JS_BLUETOOTH_ADAPTER_H__
19 #define __TIZEN_JS_BLUETOOTH_ADAPTER_H__
21 #include <JavaScriptCore/JavaScript.h>
26 class JSBluetoothAdapter
29 static const JSClassDefinition* getClassInfo();
30 static const JSClassRef getClassRef();
31 static JSObjectRef createJSObject(JSContextRef context);
36 * The callback invoked when an object is first created.
38 static void initialize(JSContextRef context,
42 * The callback invoked when an object is finalized.
44 static void finalize(JSObjectRef object);
46 static JSValueRef getProperty(JSContextRef context,
48 JSStringRef propertyName,
49 JSValueRef* exception);
51 static JSValueRef setName(JSContextRef context,
53 JSObjectRef thisObject,
55 const JSValueRef arguments[],
56 JSValueRef* exception);
58 static JSValueRef setPowered(JSContextRef context,
60 JSObjectRef thisObject,
62 const JSValueRef arguments[],
63 JSValueRef* exception);
65 static JSValueRef setVisible(JSContextRef context,
67 JSObjectRef thisObject,
69 const JSValueRef arguments[],
70 JSValueRef* exception);
72 static JSValueRef setChangeListener(JSContextRef context,
74 JSObjectRef thisObject,
76 const JSValueRef arguments[],
77 JSValueRef* exception);
79 static JSValueRef unsetChangeListener(JSContextRef context,
81 JSObjectRef thisObject,
83 const JSValueRef arguments[],
84 JSValueRef* exception);
86 static JSValueRef discoverDevices(JSContextRef context,
88 JSObjectRef thisObject,
90 const JSValueRef arguments[],
91 JSValueRef* exception);
93 static JSValueRef stopDiscovery(JSContextRef context,
95 JSObjectRef thisObject,
97 const JSValueRef arguments[],
98 JSValueRef* exception);
100 static JSValueRef getKnownDevices(JSContextRef context,
102 JSObjectRef thisObject,
103 size_t argumentCount,
104 const JSValueRef arguments[],
105 JSValueRef* exception);
107 static JSValueRef getDevice(JSContextRef context,
109 JSObjectRef thisObject,
110 size_t argumentCount,
111 const JSValueRef arguments[],
112 JSValueRef* exception);
114 static JSValueRef createBonding(JSContextRef context,
116 JSObjectRef thisObject,
117 size_t argumentCount,
118 const JSValueRef arguments[],
119 JSValueRef* exception);
121 static JSValueRef destroyBonding(JSContextRef context,
123 JSObjectRef thisObject,
124 size_t argumentCount,
125 const JSValueRef arguments[],
126 JSValueRef* exception);
128 static JSValueRef registerRFCOMMServiceByUUID(JSContextRef context,
130 JSObjectRef thisObject,
131 size_t argumentCount,
132 const JSValueRef arguments[],
133 JSValueRef* exception);
136 * This member variable contains the values which has to be passed
137 * when the this class is embedded into JS Engine.
139 static JSClassDefinition m_classInfo;
142 * This structure describes a statically declared function property.
144 static JSStaticFunction m_function[];
147 * This member variable contains the initialization values for the
148 * properties of this class. The values are given according to
149 * the data structure JSPropertySpec
151 static JSStaticValue m_property[];
153 static JSClassRef m_jsClassRef;
161 #endif // __TIZEN_JS_DOWNLOAD_MANAGER_H__