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

Side by Side Diff: device/bluetooth/test/bluetooth_gatt_server_test.h

Issue 1919683002: Adapter changes for implementing local GATT attributes and tests. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@dbus_classes
Patch Set: Created 4 years, 7 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 2016 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 DEVICE_BLUETOOTH_TEST_BLUETOOTH_GATT_SERVER_TEST_H_
6 #define DEVICE_BLUETOOTH_TEST_BLUETOOTH_GATT_SERVER_TEST_H_
7
8 #include <device/bluetooth/test/test_bluetooth_local_gatt_service_delegate.h>
9 #include <cstdint>
10 #include <vector>
11
12 #include "base/memory/weak_ptr.h"
13 #include "device/bluetooth/bluetooth_local_gatt_service.h"
14
15 #if defined(OS_ANDROID)
16 #include "device/bluetooth/test/bluetooth_test_android.h"
17 #elif defined(OS_MACOSX)
18 #include "device/bluetooth/test/bluetooth_test_mac.h"
19 #elif defined(OS_WIN)
20 #include "device/bluetooth/test/bluetooth_test_win.h"
21 #elif defined(OS_CHROMEOS) || defined(OS_LINUX)
22 #include "device/bluetooth/test/bluetooth_test_bluez.h"
23 #endif
24
25 namespace device {
26
27 // Base class for BlueZ GATT server unit tests.
28 class BluetoothGattServerTest : public BluetoothTest {
29 public:
30 BluetoothGattServerTest();
31 ~BluetoothGattServerTest() override;
32
33 // Start and complete boilerplate setup steps.
34 void StartGattSetup();
35 void CompleteGattSetup();
36
37 // BluetoothTest overrides:
38 void SetUp() override;
39 void TearDown() override;
40
41 // Utility methods to deal with values.
42 static uint64_t GetInteger(const std::vector<uint8_t>& value);
43 static std::vector<uint8_t> GetValue(uint64_t int_value);
44
45 protected:
46 base::WeakPtr<BluetoothLocalGattService> service_;
47
48 std::unique_ptr<TestBluetoothLocalGattServiceDelegate> delegate_;
49 };
50
51 } // namespace device
52
53 #endif // DEVICE_BLUETOOTH_TEST_BLUETOOTH_GATT_SERVER_TEST_H_
OLDNEW
« no previous file with comments | « device/bluetooth/bluez/bluetooth_local_gatt_service_bluez.cc ('k') | device/bluetooth/test/bluetooth_gatt_server_test.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698