blob: fd5650ae636449d253ba135493d8a63e8f5e834f [file] [log] [blame]
mukesh agrawalb54601c2011-06-07 17:39:22 -07001// Copyright (c) 2011 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_WIFI_SERVICE_
6#define SHILL_WIFI_SERVICE_
7
8#include <string>
9#include <vector>
10
11#include "shill/wifi.h"
12#include "shill/shill_event.h"
13#include "shill/service.h"
14#include "shill/supplicant-interface.h"
15
16namespace shill {
17
18class WiFiService : public Service {
19 public:
20 WiFiService(ControlInterface *control_interface,
21 EventDispatcher *dispatcher,
22 WiFi *device,
23 const std::vector<uint8_t> ssid,
24 uint32_t mode,
25 const std::string &key_management,
26 const std::string &name);
27 ~WiFiService();
28 void Connect();
29 void Disconnect();
30
31 private:
32 static const char kSupplicantPropertySSID[];
33 static const char kSupplicantPropertyNetworkMode[];
34 static const char kSupplicantPropertyKeyMode[];
35
36 void RealConnect();
37
38 ScopedRunnableMethodFactory<WiFiService> task_factory_;
39 WiFi *wifi_;
40 const std::vector<uint8_t> ssid_;
41 uint32_t mode_;
42 const std::string key_management_;
43 DISALLOW_COPY_AND_ASSIGN(WiFiService);
44};
45
46} // namespace shill
47
48#endif // SHILL_WIFI_SERVICE_