Update change log and spec for wrt-plugins-tizen_0.4.70
[framework/web/wrt-plugins-tizen.git] / src / Bluetooth / BluetoothHealthApplication.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_BLUETOOTH_HEALTH_APPLICATION_H__
19 #define __TIZEN_BLUETOOTH_HEALTH_APPLICATION_H__
20
21 #include <string>
22
23 #include <JavaScriptCore/JavaScript.h>
24 #include <boost/shared_ptr.hpp>
25
26 #include <MultiCallbackUserData.h>
27 #include <PropertyBag.h>
28 #include <Security.h>
29
30 namespace DeviceAPI {
31 namespace Bluetooth {
32
33 class BluetoothHealthApplication : public Common::SecurityAccessor
34 {
35 public:
36     BluetoothHealthApplication(std::string appID, std::string name, unsigned short dataType);
37     virtual ~BluetoothHealthApplication();
38
39     std::string getAppID() const;
40     unsigned short getDataType() const;
41     std::string getName() const;    
42     bool getRegistrationState() const;
43     void setRegistrationState(bool isRegistered);
44     Common::MultiCallbackUserDataPtr getOnConnect() const;
45     JSValueRef getOnConnect(JSContextRef context);
46     bool setOnConnect(JSContextRef context, JSObjectRef onConnect);
47
48
49 private:
50     std::string mAppID;
51     std::string mName;
52     bool mIsRegistered;
53     Common::MultiCallbackUserDataPtr mOnConnect;    
54     unsigned short mDataType;
55     Common::PropertyBag mLocalProperty;    
56 };
57
58 typedef boost::shared_ptr<BluetoothHealthApplication> BluetoothHealthApplicationSharedPtr;
59
60 } // Bluetooth
61 } // DeviceAPI
62
63 #endif // __TIZEN_BLUETOOTH_HEALTH_APPLICATION_H__