blob: 89a49716c94354c25f4aebdf31f8cd0d31ec46de [file] [log] [blame]
Darin Petkov096b3472012-05-15 10:26:22 +02001// Copyright (c) 2012 The Chromium OS 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 SHILL_WIMAX_DEVICE_PROXY_INTERFACE_
6#define SHILL_WIMAX_DEVICE_PROXY_INTERFACE_
7
8#include <string>
9
10#include <base/basictypes.h>
11
12#include "shill/callbacks.h"
13
14namespace shill {
15
16class Error;
17
18// These are the methods that a WiMaxManager.Device proxy must support. The
19// interface is provided so that it can be mocked in tests.
20class WiMaxDeviceProxyInterface {
21 public:
Darin Petkov9893d9c2012-05-17 15:27:31 -070022 typedef base::Callback<void(const RpcIdentifiers &)> NetworksChangedCallback;
23
Darin Petkov096b3472012-05-15 10:26:22 +020024 virtual ~WiMaxDeviceProxyInterface() {}
25
26 virtual void Enable(Error *error,
27 const ResultCallback &callback,
28 int timeout) = 0;
29 virtual void Disable(Error *error,
30 const ResultCallback &callback,
31 int timeout) = 0;
Darin Petkov9893d9c2012-05-17 15:27:31 -070032 virtual void ScanNetworks(Error *error,
33 const ResultCallback &callback,
34 int timeout) = 0;
Darin Petkov096b3472012-05-15 10:26:22 +020035 virtual void Connect(Error *error,
36 const ResultCallback &callback,
37 int timeout) = 0;
38 virtual void Disconnect(Error *error,
39 const ResultCallback &callback,
40 int timeout) = 0;
41
Darin Petkov9893d9c2012-05-17 15:27:31 -070042 virtual void set_networks_changed_callback(
43 const NetworksChangedCallback &callback) = 0;
44
Darin Petkov096b3472012-05-15 10:26:22 +020045 // Properties.
46 virtual uint8 Index(Error *error) = 0;
47 virtual std::string Name(Error *error) = 0;
48};
49
50} // namespace shill
51
52#endif // SHILL_WIMAX_DEVICE_PROXY_INTERFACE_H_