blob: 2d5aeea7b16e5f501ef3d08aaef945234720f13a [file] [log] [blame]
Paul Stewart21f2aae2013-01-17 17:10:08 -08001// Copyright (c) 2013 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_PROVIDER_
6#define SHILL_WIFI_PROVIDER_
7
8#include "shill/refptr_types.h"
9
10namespace shill {
11
12class ControlInterface;
13class Error;
14class EventDispatcher;
15class KeyValueStore;
16class Manager;
17class Metrics;
18class WiFiEndpoint;
19class WiFiService;
20
21// The WiFi Provider is the holder of all WiFi Services. It holds both
22// visible (created due to an Endpoint becoming visible) and invisible
23// (created due to user or storage configuration) Services.
24class WiFiProvider {
25 public:
26 WiFiProvider(ControlInterface *control_interface,
27 EventDispatcher *dispatcher,
28 Metrics *metrics,
29 Manager *manager);
30 virtual ~WiFiProvider();
31
32 virtual void Start();
33 virtual void Stop();
34
35 // Called by Manager.
36 void CreateServicesFromProfile(ProfileRefPtr profile);
37 virtual WiFiServiceRefPtr GetService(const KeyValueStore &args, Error *error);
38
39 // Called by WiFi device.
40 WiFiServiceRefPtr FindServiceForEndpoint(const WiFiEndpoint &endpoint);
41
42 private:
43 friend class WiFiProviderTest;
44
45 ControlInterface *control_interface_;
46 EventDispatcher *dispatcher_;
47 Metrics *metrics_;
48 Manager *manager_;
49
50 DISALLOW_COPY_AND_ASSIGN(WiFiProvider);
51};
52
53} // namespace shill
54
55#endif // SHILL_WIFI_PROVIDER_