Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(377)

Side by Side Diff: chromeos/dbus/bluetooth_advertisement_manager_client.h

Issue 1052363005: Add DBus bindings for BLE Advertisement. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
(Empty)
1 // Copyright 2013 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 #ifndef CHROMEOS_DBUS_BLUETOOTH_ADVERTISEMENT_MANAGER_CLIENT_H_
6 #define CHROMEOS_DBUS_BLUETOOTH_ADVERTISEMENT_MANAGER_CLIENT_H_
7
8 #include <string>
9 #include <vector>
10
11 #include "base/callback.h"
12 #include "base/memory/scoped_ptr.h"
13 #include "base/values.h"
14 #include "chromeos/chromeos_export.h"
15 #include "chromeos/dbus/dbus_client.h"
16 #include "dbus/object_path.h"
17
18 namespace chromeos {
19
20 // BluetoothAdvertisementManagerClient is used to communicate with the profile
21 // manager object of the Bluetooth daemon.
22 class CHROMEOS_EXPORT BluetoothAdvertisementManagerClient : public DBusClient {
23 public:
24 ~BluetoothAdvertisementManagerClient() override;
25
26 // The ErrorCallback is used by adapter methods to indicate failure.
27 // It receives two arguments: the name of the error in |error_name| and
28 // an optional message in |error_message|.
29 typedef base::Callback<void(const std::string& error_name,
30 const std::string& error_message)> ErrorCallback;
31
32 // Registers an advertisement with the DBus object path |obj_path| with
33 // BlueZ's advertisement manager.
34 virtual void RegisterAdvertisement(const dbus::ObjectPath& obj_path,
35 const base::Closure& callback,
36 const ErrorCallback& error_callback) = 0;
37
38 // Unregisters an advertisement with the DBus object path |obj_path| with
39 // BlueZ's advertisement manager.
40 virtual void UnregisterAdvertisement(const dbus::ObjectPath& profile_path,
41 const base::Closure& callback,
42 const ErrorCallback& error_callback) = 0;
43
44 // Creates the instance.
45 static BluetoothAdvertisementManagerClient* Create();
46
47 // Constants used to indicate exceptional error conditions.
48 static const char kNoResponseError[];
49
50 protected:
51 BluetoothAdvertisementManagerClient();
52
53 private:
54 DISALLOW_COPY_AND_ASSIGN(BluetoothAdvertisementManagerClient);
55 };
56
57 } // namespace chromeos
58
59 #endif // CHROMEOS_DBUS_BLUETOOTH_ADVERTISEMENT_MANAGER_CLIENT_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698