blob: 410c04c9896d6ff58f8740e4aee94f94c8cf7f92 [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_SERVICE_H_
6#define SHILL_WIMAX_SERVICE_H_
7
Darin Petkove4b27022012-05-16 13:28:50 +02008#include <gtest/gtest_prod.h> // for FRIEND_TEST
9
Ben Chan99c8a4d2012-05-01 08:11:53 -070010#include "shill/refptr_types.h"
11#include "shill/service.h"
12
13namespace shill {
14
Darin Petkov9893d9c2012-05-17 15:27:31 -070015class WiMaxNetworkProxyInterface;
16
Ben Chan99c8a4d2012-05-01 08:11:53 -070017class WiMaxService : public Service {
18 public:
19 WiMaxService(ControlInterface *control,
20 EventDispatcher *dispatcher,
21 Metrics *metrics,
22 Manager *manager,
23 const WiMaxRefPtr &wimax);
24 virtual ~WiMaxService();
25
Darin Petkov9893d9c2012-05-17 15:27:31 -070026 // Returns true on success, false otherwise. Takes ownership of proxy,
27 // regardless of the result of the operation.
28 bool Start(WiMaxNetworkProxyInterface *proxy);
29
30 const std::string &network_name() const { return network_name_; }
31 uint32 network_identifier() const { return network_identifier_; }
32
Ben Chan99c8a4d2012-05-01 08:11:53 -070033 // Inherited from Service.
34 virtual bool TechnologyIs(const Technology::Identifier type) const;
35 virtual void Connect(Error *error);
36 virtual void Disconnect(Error *error);
Ben Chanc07362b2012-05-12 10:54:11 -070037 virtual std::string GetStorageIdentifier() const;
Ben Chan99c8a4d2012-05-01 08:11:53 -070038
39 private:
Darin Petkove4b27022012-05-16 13:28:50 +020040 FRIEND_TEST(WiMaxServiceTest, GetDeviceRpcId);
41
Ben Chanc07362b2012-05-12 10:54:11 -070042 virtual std::string GetDeviceRpcId(Error *error);
43
Ben Chan99c8a4d2012-05-01 08:11:53 -070044 WiMaxRefPtr wimax_;
Darin Petkov9893d9c2012-05-17 15:27:31 -070045 scoped_ptr<WiMaxNetworkProxyInterface> proxy_;
Darin Petkove4b27022012-05-16 13:28:50 +020046 std::string storage_id_;
Ben Chan99c8a4d2012-05-01 08:11:53 -070047
Darin Petkov9893d9c2012-05-17 15:27:31 -070048 uint32 network_identifier_;
49 std::string network_name_;
50
Ben Chan99c8a4d2012-05-01 08:11:53 -070051 DISALLOW_COPY_AND_ASSIGN(WiMaxService);
52};
53
54} // namespace shill
55
56#endif // SHILL_WIMAX_SERVICE_H_