Index: chromeos/dbus/bluetooth_advertisement_manager_client.h |
diff --git a/chromeos/dbus/bluetooth_advertisement_manager_client.h b/chromeos/dbus/bluetooth_advertisement_manager_client.h |
new file mode 100644 |
index 0000000000000000000000000000000000000000..fba1b69530ff9bad68686ca7200d6596f221db36 |
--- /dev/null |
+++ b/chromeos/dbus/bluetooth_advertisement_manager_client.h |
@@ -0,0 +1,59 @@ |
+// Copyright 2013 The Chromium Authors. All rights reserved. |
+// Use of this source code is governed by a BSD-style license that can be |
+// found in the LICENSE file. |
+ |
+#ifndef CHROMEOS_DBUS_BLUETOOTH_ADVERTISEMENT_MANAGER_CLIENT_H_ |
+#define CHROMEOS_DBUS_BLUETOOTH_ADVERTISEMENT_MANAGER_CLIENT_H_ |
+ |
+#include <string> |
+#include <vector> |
+ |
+#include "base/callback.h" |
+#include "base/memory/scoped_ptr.h" |
+#include "base/values.h" |
+#include "chromeos/chromeos_export.h" |
+#include "chromeos/dbus/dbus_client.h" |
+#include "dbus/object_path.h" |
+ |
+namespace chromeos { |
+ |
+// BluetoothAdvertisementManagerClient is used to communicate with the profile |
+// manager object of the Bluetooth daemon. |
+class CHROMEOS_EXPORT BluetoothAdvertisementManagerClient : public DBusClient { |
+ public: |
+ ~BluetoothAdvertisementManagerClient() override; |
+ |
+ // The ErrorCallback is used by adapter methods to indicate failure. |
+ // It receives two arguments: the name of the error in |error_name| and |
+ // an optional message in |error_message|. |
+ typedef base::Callback<void(const std::string& error_name, |
+ const std::string& error_message)> ErrorCallback; |
+ |
+ // Registers an advertisement with the DBus object path |obj_path| with |
+ // BlueZ's advertisement manager. |
+ virtual void RegisterAdvertisement(const dbus::ObjectPath& obj_path, |
+ const base::Closure& callback, |
+ const ErrorCallback& error_callback) = 0; |
+ |
+ // Unregisters an advertisement with the DBus object path |obj_path| with |
+ // BlueZ's advertisement manager. |
+ virtual void UnregisterAdvertisement(const dbus::ObjectPath& profile_path, |
+ const base::Closure& callback, |
+ const ErrorCallback& error_callback) = 0; |
+ |
+ // Creates the instance. |
+ static BluetoothAdvertisementManagerClient* Create(); |
+ |
+ // Constants used to indicate exceptional error conditions. |
+ static const char kNoResponseError[]; |
+ |
+ protected: |
+ BluetoothAdvertisementManagerClient(); |
+ |
+ private: |
+ DISALLOW_COPY_AND_ASSIGN(BluetoothAdvertisementManagerClient); |
+}; |
+ |
+} // namespace chromeos |
+ |
+#endif // CHROMEOS_DBUS_BLUETOOTH_ADVERTISEMENT_MANAGER_CLIENT_H_ |