blob: b83a69fafb0aff882e81b948dac7e5edbe54d6ba [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"
Ben Chan4e5c1312012-05-18 18:45:38 -070013#include "shill/dbus_properties.h"
Darin Petkov096b3472012-05-15 10:26:22 +020014
15namespace shill {
16
17class Error;
18
19// These are the methods that a WiMaxManager.Device proxy must support. The
20// interface is provided so that it can be mocked in tests.
21class WiMaxDeviceProxyInterface {
22 public:
Darin Petkov9893d9c2012-05-17 15:27:31 -070023 typedef base::Callback<void(const RpcIdentifiers &)> NetworksChangedCallback;
24
Darin Petkov096b3472012-05-15 10:26:22 +020025 virtual ~WiMaxDeviceProxyInterface() {}
26
27 virtual void Enable(Error *error,
28 const ResultCallback &callback,
29 int timeout) = 0;
30 virtual void Disable(Error *error,
31 const ResultCallback &callback,
32 int timeout) = 0;
Darin Petkov9893d9c2012-05-17 15:27:31 -070033 virtual void ScanNetworks(Error *error,
34 const ResultCallback &callback,
35 int timeout) = 0;
Ben Chan4e5c1312012-05-18 18:45:38 -070036 virtual void Connect(const DBus::Path &network,
37 const DBusPropertiesMap &parameters,
38 Error *error,
Darin Petkov096b3472012-05-15 10:26:22 +020039 const ResultCallback &callback,
40 int timeout) = 0;
41 virtual void Disconnect(Error *error,
42 const ResultCallback &callback,
43 int timeout) = 0;
44
Darin Petkov9893d9c2012-05-17 15:27:31 -070045 virtual void set_networks_changed_callback(
46 const NetworksChangedCallback &callback) = 0;
47
Darin Petkov096b3472012-05-15 10:26:22 +020048 // Properties.
49 virtual uint8 Index(Error *error) = 0;
50 virtual std::string Name(Error *error) = 0;
51};
52
53} // namespace shill
54
55#endif // SHILL_WIMAX_DEVICE_PROXY_INTERFACE_H_