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

Side by Side Diff: chromeos/dbus/fake_bluetooth_le_advertisement_service_provider.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 (c) 2015 The Chromium Authors. All rights reserved.
oshima 2015/04/15 21:17:24 "(c)" is no longer required. please remove. same f
rkc 2015/04/15 21:59:54 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_FAKE_BLUETOOTH_LE_ADVERTISEMENT_SERVICE_PROVIDER_H_
6 #define CHROMEOS_DBUS_FAKE_BLUETOOTH_LE_ADVERTISEMENT_SERVICE_PROVIDER_H_
7
8 #include "base/bind.h"
9 #include "base/callback.h"
10 #include "base/memory/scoped_ptr.h"
11 #include "bluetooth_le_advertisement_service_provider.h"
oshima 2015/04/15 21:17:24 ditto
rkc 2015/04/15 21:59:54 Done.
12 #include "chromeos/chromeos_export.h"
13 #include "dbus/file_descriptor.h"
14 #include "dbus/object_path.h"
15
16 namespace chromeos {
17
18 // FakeBluetoothAdvertisementServiceProvider simulates the behavior of a local
19 // Bluetooth agent object and is used both in test cases in place of a
20 // mock and on the Linux desktop.
21 class CHROMEOS_EXPORT FakeBluetoothLEAdvertisementServiceProvider
22 : public BluetoothLEAdvertisementServiceProvider {
23 public:
24 FakeBluetoothLEAdvertisementServiceProvider(
25 const dbus::ObjectPath& object_path,
26 Delegate* delegate);
27 ~FakeBluetoothLEAdvertisementServiceProvider() override;
28
29 // Each of these calls the equivalent
30 // BluetoothAdvertisementServiceProvider::Delegate method on the object passed
31 // on construction.
32 void Release();
33
34 const dbus::ObjectPath& object_path() { return object_path_; }
35
36 private:
37 friend class FakeBluetoothLEAdvertisingManagerClient;
38
39 // D-Bus object path we are faking.
40 dbus::ObjectPath object_path_;
41
42 // All incoming method calls are passed on to the Delegate and a callback
43 // passed to generate the reply. |delegate_| is generally the object that
44 // owns this one, and must outlive it.
45 Delegate* delegate_;
46
47 DISALLOW_COPY_AND_ASSIGN(FakeBluetoothLEAdvertisementServiceProvider);
48 };
49
50 } // namespace chromeos
51
52 #endif // CHROMEOS_DBUS_FAKE_BLUETOOTH_LE_ADVERTISEMENT_SERVICE_PROVIDER_H_
OLDNEW
« no previous file with comments | « chromeos/dbus/dbus_thread_manager.cc ('k') | chromeos/dbus/fake_bluetooth_le_advertisement_service_provider.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698