blob: 2beadb8f6d0dc37313b4a30940cc82e5063876d2 [file] [log] [blame]
Ben Chan99c8a4d2012-05-01 08:11:53 -07001// 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_H_
6#define SHILL_WIMAX_H_
7
Darin Petkovb72b62e2012-05-15 16:55:36 +02008#include <gtest/gtest_prod.h> // for FRIEND_TEST
9
Ben Chan99c8a4d2012-05-01 08:11:53 -070010#include "shill/device.h"
11
12namespace shill {
13
Darin Petkovb72b62e2012-05-15 16:55:36 +020014class ProxyFactory;
15class WiMaxDeviceProxyInterface;
16
Ben Chan99c8a4d2012-05-01 08:11:53 -070017class WiMax : public Device {
18 public:
19 WiMax(ControlInterface *control,
20 EventDispatcher *dispatcher,
21 Metrics *metrics,
22 Manager *manager,
23 const std::string &link_name,
Ben Chan4e64d2d2012-05-16 00:02:25 -070024 const std::string &address,
Darin Petkovb72b62e2012-05-15 16:55:36 +020025 int interface_index,
26 const RpcIdentifier &path);
Ben Chan99c8a4d2012-05-01 08:11:53 -070027
28 virtual ~WiMax();
29
30 virtual void Start(Error *error, const EnabledStateChangedCallback &callback);
31 virtual void Stop(Error *error, const EnabledStateChangedCallback &callback);
32
33 virtual bool TechnologyIs(const Technology::Identifier type) const;
34
35 virtual void Connect(Error *error);
36 virtual void Disconnect(Error *error);
37
Darin Petkovb72b62e2012-05-15 16:55:36 +020038 const RpcIdentifier &path() const { return path_; }
39
Ben Chan99c8a4d2012-05-01 08:11:53 -070040 private:
Darin Petkovb72b62e2012-05-15 16:55:36 +020041 friend class WiMaxTest;
42 FRIEND_TEST(WiMaxTest, StartStop);
43
Darin Petkov912f0de2012-05-16 14:12:14 +020044 static const int kTimeoutDefault;
45
46 void OnConnectComplete(const Error &error);
47 void OnDisconnectComplete(const Error &error);
48 void OnEnableComplete(const EnabledStateChangedCallback &callback,
49 const Error &error);
50 void OnDisableComplete(const EnabledStateChangedCallback &callback,
51 const Error &error);
52
Darin Petkovb72b62e2012-05-15 16:55:36 +020053 const RpcIdentifier path_;
54
55 scoped_ptr<WiMaxDeviceProxyInterface> proxy_;
Darin Petkov912f0de2012-05-16 14:12:14 +020056 WiMaxServiceRefPtr service_;
Darin Petkovb72b62e2012-05-15 16:55:36 +020057
58 ProxyFactory *proxy_factory_;
59
Ben Chan99c8a4d2012-05-01 08:11:53 -070060 DISALLOW_COPY_AND_ASSIGN(WiMax);
61};
62
63} // namespace shill
64
65#endif // SHILL_WIMAX_H_