Home | History | Annotate | Download | only in dbus
      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_FAKE_SHILL_DEVICE_CLIENT_H_
      6 #define CHROMEOS_DBUS_FAKE_SHILL_DEVICE_CLIENT_H_
      7 
      8 #include "base/callback_forward.h"
      9 #include "base/values.h"
     10 #include "chromeos/dbus/shill_device_client.h"
     11 #include "chromeos/dbus/shill_property_changed_observer.h"
     12 
     13 namespace chromeos {
     14 
     15 // A fake implementation of ShillDeviceClient. This class does nothing.
     16 class FakeShillDeviceClient : public ShillDeviceClient {
     17  public:
     18   FakeShillDeviceClient();
     19   virtual ~FakeShillDeviceClient();
     20 
     21   // ShillDeviceClient overrides.
     22   virtual void AddPropertyChangedObserver(
     23       const dbus::ObjectPath& device_path,
     24       ShillPropertyChangedObserver* observer) OVERRIDE;
     25   virtual void RemovePropertyChangedObserver(
     26       const dbus::ObjectPath& device_path,
     27       ShillPropertyChangedObserver* observer) OVERRIDE;
     28   virtual void GetProperties(const dbus::ObjectPath& device_path,
     29                              const DictionaryValueCallback& callback) OVERRIDE;
     30   virtual void ProposeScan(const dbus::ObjectPath& device_path,
     31                            const VoidDBusMethodCallback& callback) OVERRIDE;
     32   virtual void SetProperty(const dbus::ObjectPath& device_path,
     33                            const std::string& name,
     34                            const base::Value& value,
     35                            const base::Closure& callback,
     36                            const ErrorCallback& error_callback) OVERRIDE;
     37   virtual void ClearProperty(const dbus::ObjectPath& device_path,
     38                              const std::string& name,
     39                              const VoidDBusMethodCallback& callback) OVERRIDE;
     40   virtual void AddIPConfig(
     41       const dbus::ObjectPath& device_path,
     42       const std::string& method,
     43       const ObjectPathDBusMethodCallback& callback) OVERRIDE;
     44   virtual void RequirePin(const dbus::ObjectPath& device_path,
     45                           const std::string& pin,
     46                           bool require,
     47                           const base::Closure& callback,
     48                           const ErrorCallback& error_callback) OVERRIDE;
     49   virtual void EnterPin(const dbus::ObjectPath& device_path,
     50                         const std::string& pin,
     51                         const base::Closure& callback,
     52                         const ErrorCallback& error_callback) OVERRIDE;
     53   virtual void UnblockPin(const dbus::ObjectPath& device_path,
     54                           const std::string& puk,
     55                           const std::string& pin,
     56                           const base::Closure& callback,
     57                           const ErrorCallback& error_callback) OVERRIDE;
     58   virtual void ChangePin(const dbus::ObjectPath& device_path,
     59                          const std::string& old_pin,
     60                          const std::string& new_pin,
     61                          const base::Closure& callback,
     62                          const ErrorCallback& error_callback) OVERRIDE;
     63   virtual void Register(const dbus::ObjectPath& device_path,
     64                         const std::string& network_id,
     65                         const base::Closure& callback,
     66                         const ErrorCallback& error_callback) OVERRIDE;
     67   virtual void SetCarrier(const dbus::ObjectPath& device_path,
     68                           const std::string& carrier,
     69                           const base::Closure& callback,
     70                           const ErrorCallback& error_callback) OVERRIDE;
     71   virtual void Reset(const dbus::ObjectPath& device_path,
     72                      const base::Closure& callback,
     73                      const ErrorCallback& error_callback) OVERRIDE;
     74   virtual TestInterface* GetTestInterface() OVERRIDE;
     75 
     76  private:
     77   DISALLOW_COPY_AND_ASSIGN(FakeShillDeviceClient);
     78 };
     79 
     80 }  // namespace chromeos
     81 
     82 #endif  // CHROMEOS_DBUS_FAKE_SHILL_DEVICE_CLIENT_H_
     83