OLD | NEW |
---|---|
(Empty) | |
1 // Copyright 2013 The Chromium Authors. All rights reserved. | |
armansito
2015/04/09 22:08:32
s/2013/2015
rkc
2015/04/13 19:47:46
Done.
| |
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_ | |
armansito
2015/04/09 22:08:32
This is called "LEAdvertisingManager1" in BlueZ, s
rkc
2015/04/13 19:47:46
Done.
| |
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 BlueZ daemon. | |
22 class CHROMEOS_EXPORT BluetoothAdvertisementManagerClient : public DBusClient { | |
armansito
2015/04/09 22:08:32
You'll need an observer interface for this class t
rkc
2015/04/13 19:47:46
Done.
| |
23 public: | |
24 ~BluetoothAdvertisementManagerClient() override; | |
25 | |
26 // The ErrorCallback is used by adapter methods to indicate failure. | |
armansito
2015/04/09 22:08:32
s/adapter methods/advertising manager methods/
rkc
2015/04/13 19:47:46
Done.
| |
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, | |
armansito
2015/04/09 22:08:32
'using' instead of 'typedef'
rkc
2015/04/13 19:47:46
Done.
| |
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. | |
armansito
2015/04/09 22:08:32
s/advertisement manager/advertising manager/, to b
rkc
2015/04/13 19:47:46
Done.
| |
34 virtual void RegisterAdvertisement(const dbus::ObjectPath& obj_path, | |
armansito
2015/04/09 22:08:32
s/obj_path/object_path/
armansito
2015/04/09 22:08:32
You'll need to take in the object path of the adve
rkc
2015/04/13 19:47:46
Done.
rkc
2015/04/13 19:47:46
Done.
| |
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, | |
armansito
2015/04/09 22:08:32
s/profile_path/object_path/, and add "advertisemen
rkc
2015/04/13 19:47:46
Done.
| |
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_ | |
OLD | NEW |