tizen 2.3.1 release
[framework/web/wearable/wrt-plugins-tizen.git] / src / Bluetooth / JSBluetoothLowEnergyAdapter.h
1 //
2 // Tizen Web Device API
3 // Copyright (c) 2012 Samsung Electronics Co., Ltd.
4 //
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
8 //
9 // http://www.apache.org/licenses/LICENSE-2.0
10 //
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.
16 //
17
18 #ifndef __TIZEN_JS_BLUETOOTH_LOW_ENERGY_ADAPTER_H__
19 #define __TIZEN_JS_BLUETOOTH_LOW_ENERGY_ADAPTER_H__
20
21 #include <JavaScriptCore/JavaScript.h>
22 #include <Security.h>
23
24 namespace DeviceAPI {
25 namespace Bluetooth {
26
27 class JSBluetoothLowEnergyAdapter
28 {
29 public:
30     static const JSClassDefinition* getClassInfo();
31     static const JSClassRef getClassRef();
32     static JSObjectRef createJSObject(JSContextRef context);
33
34 private:
35
36     static JSValueRef startScan(JSContextRef context,
37             JSObjectRef object,
38             JSObjectRef thisObject,
39             size_t argumentCount,
40             const JSValueRef arguments[],
41             JSValueRef* exception);
42
43     static JSValueRef stopScan(JSContextRef context,
44             JSObjectRef object,
45             JSObjectRef thisObject,
46             size_t argumentCount,
47             const JSValueRef arguments[],
48             JSValueRef* exception);
49
50     static JSValueRef startAdvertise(JSContextRef context,
51             JSObjectRef object,
52             JSObjectRef thisObject,
53             size_t argumentCount,
54             const JSValueRef arguments[],
55             JSValueRef* exception);
56
57     static JSValueRef stopAdvertise(JSContextRef context,
58             JSObjectRef object,
59             JSObjectRef thisObject,
60             size_t argumentCount,
61             const JSValueRef arguments[],
62             JSValueRef* exception);
63
64     /**
65      * This member variable contains the values which has to be passed
66      * when the this class is embedded into JS Engine.
67      */
68     static JSClassDefinition m_classInfo;
69
70     /**
71      * This structure describes a statically declared function property.
72      */
73     static JSStaticFunction m_function[];
74
75     static JSClassRef m_jsClassRef;
76 };
77
78
79
80 } // Bluetooth
81 } // DeviceAPI
82
83 #endif // __TIZEN_JS_BLUETOOTH_LOW_ENERGY_ADAPTER_H__