Home | History | Annotate | Download | only in dbus
      1 // Copyright 2014 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_FAKE_BLUETOOTH_SERVICE_SERVICE_PROVIDER_H_
      6 #define CHROMEOS_DBUS_FAKE_BLUETOOTH_SERVICE_SERVICE_PROVIDER_H_
      7 
      8 #include <string>
      9 #include <vector>
     10 
     11 #include "chromeos/chromeos_export.h"
     12 #include "chromeos/dbus/bluetooth_gatt_service_service_provider.h"
     13 #include "dbus/object_path.h"
     14 
     15 namespace chromeos {
     16 
     17 // FakeBluetoothGattServiceServiceProvider simulates behavior of a local GATT
     18 // service object and is used both in test cases in place of a mock and on the
     19 // Linux desktop.
     20 class CHROMEOS_EXPORT FakeBluetoothGattServiceServiceProvider
     21     : public BluetoothGattServiceServiceProvider {
     22  public:
     23   FakeBluetoothGattServiceServiceProvider(
     24       const dbus::ObjectPath& object_path,
     25       const std::string& uuid,
     26       const std::vector<dbus::ObjectPath>& includes);
     27   virtual ~FakeBluetoothGattServiceServiceProvider();
     28 
     29   const dbus::ObjectPath& object_path() const { return object_path_; }
     30   const std::string& uuid() const { return uuid_; }
     31 
     32  private:
     33   // D-Bus object path of the fake GATT service.
     34   dbus::ObjectPath object_path_;
     35 
     36   // 128-bit GATT service UUID.
     37   std::string uuid_;
     38 
     39   // List of included GATT services.
     40   std::vector<dbus::ObjectPath> includes_;
     41 
     42   DISALLOW_COPY_AND_ASSIGN(FakeBluetoothGattServiceServiceProvider);
     43 };
     44 
     45 }  // namespace chromeos
     46 
     47 #endif  // CHROMEOS_DBUS_FAKE_BLUETOOTH_SERVICE_SERVICE_PROVIDER_H_
     48