| OLD | NEW |
| 1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #ifndef CHROMEOS_DBUS_BLUETOOTH_LE_ADVERTISEMENT_SERVICE_PROVIDER_H_ | 5 #ifndef DEVICE_BLUETOOTH_DBUS_BLUETOOTH_LE_ADVERTISEMENT_SERVICE_PROVIDER_H_ |
| 6 #define CHROMEOS_DBUS_BLUETOOTH_LE_ADVERTISEMENT_SERVICE_PROVIDER_H_ | 6 #define DEVICE_BLUETOOTH_DBUS_BLUETOOTH_LE_ADVERTISEMENT_SERVICE_PROVIDER_H_ |
| 7 | 7 |
| 8 #include <stdint.h> | 8 #include <stdint.h> |
| 9 | 9 |
| 10 #include <map> | 10 #include <map> |
| 11 #include <string> | 11 #include <string> |
| 12 #include <vector> | 12 #include <vector> |
| 13 | 13 |
| 14 #include "base/basictypes.h" | 14 #include "base/basictypes.h" |
| 15 #include "base/callback.h" | 15 #include "base/callback.h" |
| 16 #include "base/memory/scoped_ptr.h" | 16 #include "base/memory/scoped_ptr.h" |
| 17 #include "chromeos/chromeos_export.h" | |
| 18 #include "dbus/bus.h" | 17 #include "dbus/bus.h" |
| 19 #include "dbus/file_descriptor.h" | 18 #include "dbus/file_descriptor.h" |
| 20 #include "dbus/object_path.h" | 19 #include "dbus/object_path.h" |
| 20 #include "device/bluetooth/bluetooth_export.h" |
| 21 | 21 |
| 22 namespace chromeos { | 22 namespace bluez { |
| 23 | 23 |
| 24 // BluetoothAdvertisementServiceProvider is used to provide a D-Bus object that | 24 // BluetoothAdvertisementServiceProvider is used to provide a D-Bus object that |
| 25 // the Bluetooth daemon can communicate with to advertise data. | 25 // the Bluetooth daemon can communicate with to advertise data. |
| 26 class CHROMEOS_EXPORT BluetoothLEAdvertisementServiceProvider { | 26 class DEVICE_BLUETOOTH_EXPORT BluetoothLEAdvertisementServiceProvider { |
| 27 public: | 27 public: |
| 28 using UUIDList = std::vector<std::string>; | 28 using UUIDList = std::vector<std::string>; |
| 29 using ManufacturerData = std::map<uint16_t, std::vector<uint8_t>>; | 29 using ManufacturerData = std::map<uint16_t, std::vector<uint8_t>>; |
| 30 using ServiceData = std::map<std::string, std::vector<uint8_t>>; | 30 using ServiceData = std::map<std::string, std::vector<uint8_t>>; |
| 31 | 31 |
| 32 // Type of advertisement. | 32 // Type of advertisement. |
| 33 enum AdvertisementType { | 33 enum AdvertisementType { |
| 34 ADVERTISEMENT_TYPE_BROADCAST, | 34 ADVERTISEMENT_TYPE_BROADCAST, |
| 35 ADVERTISEMENT_TYPE_PERIPHERAL | 35 ADVERTISEMENT_TYPE_PERIPHERAL |
| 36 }; | 36 }; |
| (...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 70 BluetoothLEAdvertisementServiceProvider(); | 70 BluetoothLEAdvertisementServiceProvider(); |
| 71 | 71 |
| 72 // D-Bus object path of object we are exporting, kept so we can unregister | 72 // D-Bus object path of object we are exporting, kept so we can unregister |
| 73 // again in our destructor. | 73 // again in our destructor. |
| 74 dbus::ObjectPath object_path_; | 74 dbus::ObjectPath object_path_; |
| 75 | 75 |
| 76 private: | 76 private: |
| 77 DISALLOW_COPY_AND_ASSIGN(BluetoothLEAdvertisementServiceProvider); | 77 DISALLOW_COPY_AND_ASSIGN(BluetoothLEAdvertisementServiceProvider); |
| 78 }; | 78 }; |
| 79 | 79 |
| 80 } // namespace chromeos | 80 } // namespace bluez |
| 81 | 81 |
| 82 #endif // CHROMEOS_DBUS_BLUETOOTH_LE_ADVERTISEMENT_SERVICE_PROVIDER_H_ | 82 #endif // DEVICE_BLUETOOTH_DBUS_BLUETOOTH_LE_ADVERTISEMENT_SERVICE_PROVIDER_H_ |
| OLD | NEW |