summaryrefslogtreecommitdiffstats
path: root/chromeos/network/fake_network_device_handler.h
blob: ea0d143311e182cb686bd6129b1896b5a0500a6e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
// Copyright 2013 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

#ifndef CHROMEOS_NETWORK_FAKE_NETWORK_DEVICE_HANDLER_H_
#define CHROMEOS_NETWORK_FAKE_NETWORK_DEVICE_HANDLER_H_

#include "base/basictypes.h"
#include "base/compiler_specific.h"
#include "chromeos/chromeos_export.h"
#include "chromeos/network/network_device_handler.h"

namespace chromeos {

// This is a fake implementation which does nothing. Use this as a base class
// for concrete fake handlers.
class CHROMEOS_EXPORT FakeNetworkDeviceHandler : public NetworkDeviceHandler {
 public:
  FakeNetworkDeviceHandler();
  virtual ~FakeNetworkDeviceHandler();

  // NetworkDeviceHandler overrides
  virtual void GetDeviceProperties(
      const std::string& device_path,
      const network_handler::DictionaryResultCallback& callback,
      const network_handler::ErrorCallback& error_callback) const OVERRIDE;

  virtual void SetDeviceProperty(
      const std::string& device_path,
      const std::string& property_name,
      const base::Value& value,
      const base::Closure& callback,
      const network_handler::ErrorCallback& error_callback) OVERRIDE;

  virtual void RequestRefreshIPConfigs(
      const std::string& device_path,
      const base::Closure& callback,
      const network_handler::ErrorCallback& error_callback) OVERRIDE;

  virtual void ProposeScan(const std::string& device_path,
                           const base::Closure& callback,
                           const network_handler::ErrorCallback& error_callback)
      OVERRIDE;

  virtual void RegisterCellularNetwork(
      const std::string& device_path,
      const std::string& network_id,
      const base::Closure& callback,
      const network_handler::ErrorCallback& error_callback) OVERRIDE;

  virtual void SetCarrier(const std::string& device_path,
                          const std::string& carrier,
                          const base::Closure& callback,
                          const network_handler::ErrorCallback& error_callback)
      OVERRIDE;

  virtual void RequirePin(const std::string& device_path,
                          bool require_pin,
                          const std::string& pin,
                          const base::Closure& callback,
                          const network_handler::ErrorCallback& error_callback)
      OVERRIDE;

  virtual void EnterPin(const std::string& device_path,
                        const std::string& pin,
                        const base::Closure& callback,
                        const network_handler::ErrorCallback& error_callback)
      OVERRIDE;

  virtual void UnblockPin(const std::string& device_path,
                          const std::string& puk,
                          const std::string& new_pin,
                          const base::Closure& callback,
                          const network_handler::ErrorCallback& error_callback)
      OVERRIDE;

  virtual void ChangePin(const std::string& device_path,
                         const std::string& old_pin,
                         const std::string& new_pin,
                         const base::Closure& callback,
                         const network_handler::ErrorCallback& error_callback)
      OVERRIDE;

  virtual void SetCellularAllowRoaming(bool allow_roaming) OVERRIDE;

  virtual void SetWifiTDLSEnabled(
      const std::string& ip_or_mac_address,
      bool enabled,
      const network_handler::StringResultCallback& callback,
      const network_handler::ErrorCallback& error_callback) OVERRIDE;

  virtual void GetWifiTDLSStatus(
      const std::string& ip_or_mac_address,
      const network_handler::StringResultCallback& callback,
      const network_handler::ErrorCallback& error_callback) OVERRIDE;

 private:
  DISALLOW_COPY_AND_ASSIGN(FakeNetworkDeviceHandler);
};

}  // namespace chromeos

#endif  // CHROMEOS_NETWORK_FAKE_NETWORK_DEVICE_HANDLER_H_