Paul Stewart | 21f2aae | 2013-01-17 17:10:08 -0800 | [diff] [blame] | 1 | // 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 | |
| 10 | namespace shill { |
| 11 | |
| 12 | class ControlInterface; |
| 13 | class Error; |
| 14 | class EventDispatcher; |
| 15 | class KeyValueStore; |
| 16 | class Manager; |
| 17 | class Metrics; |
| 18 | class WiFiEndpoint; |
| 19 | class 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. |
| 24 | class 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_ |