Updated this component to use Bluez 5 API calls. This fixes TIVI-2936
[profile/ivi/wrt-plugins-ivi-bt.git] / src / BluetoothDevice.h
index 86429ac..92670b4 100644 (file)
@@ -34,13 +34,14 @@ namespace Bluetooth {
 class BluetoothDevice
 {
 public:
-    BluetoothDevice(bt_adapter_device_discovery_info_s *discoveryInfo);
-    BluetoothDevice(bt_device_info_s *deviceInfo);
+    BluetoothDevice(bt_adapter_device_discovery_info_s *discoveryInfo, char *devicePath = NULL);
+    BluetoothDevice(bt_device_info_s *deviceInfo, char *devicePath = NULL);
     virtual ~BluetoothDevice();
 
     void updateInfo(bt_device_info_s *deviceInfo);
     std::string getName() const;
     std::string getAddress() const;
+    char* getDevicePath() const {return mDevicePath;}
     JSValueRef getDeviceClass(JSContextRef context);
     bool isBonded() const;
     bool isTrusted() const;
@@ -49,14 +50,15 @@ public:
 
 private:
     char *getDefaultAdapter() const;
+    char *deviceFromAddress() const;
     char *getDevice() const;
 
 private:
     std::string mName;
     std::string mAddress;
+    char *mDevicePath;
     BluetoothClassSharedPtr mDeviceClass;
     std::vector<std::string> mUUIDs;
-    //Common::PropertyBag mLocalProperty;
     bool isUpdated;
 };