Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(186)

Side by Side Diff: chrome/utility/wifi/wifi_service.h

Issue 32193015: WlanConnect to BSS with given frequency. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Sync up to r231308 Created 7 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « chrome/utility/networking_private_handler.cc ('k') | chrome/utility/wifi/wifi_service_mock.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef CHROME_UTILITY_WIFI_WIFI_SERVICE_H_ 5 #ifndef CHROME_UTILITY_WIFI_WIFI_SERVICE_H_
6 #define CHROME_UTILITY_WIFI_WIFI_SERVICE_H_ 6 #define CHROME_UTILITY_WIFI_WIFI_SERVICE_H_
7 7
8 #include <list> 8 #include <list>
9 #include <string> 9 #include <string>
10 10
11 #include "base/callback.h" 11 #include "base/callback.h"
12 #include "base/memory/ref_counted.h" 12 #include "base/memory/ref_counted.h"
13 #include "base/values.h" 13 #include "base/values.h"
14 14
15 namespace wifi { 15 namespace wifi {
16 16
17 // WiFiService interface used by implementation of chrome.networkingPrivate 17 // WiFiService interface used by implementation of chrome.networkingPrivate
18 // JavaScript extension API. 18 // JavaScript extension API.
19 class WiFiService { 19 class WiFiService {
20 public: 20 public:
21 typedef int32 Frequency; 21 typedef int32 Frequency;
22 enum FrequencyEnum { 22 enum FrequencyEnum {
23 kFrequencyAny = 0,
23 kFrequencyUnknown = 0, 24 kFrequencyUnknown = 0,
24 kFrequency2400 = 2400, 25 kFrequency2400 = 2400,
25 kFrequency5000 = 5000 26 kFrequency5000 = 5000
26 }; 27 };
27 28
28 typedef std::list<Frequency> FrequencyList; 29 typedef std::list<Frequency> FrequencyList;
29 30
30 // Network Properties, used as result of |GetProperties| and 31 // Network Properties, used as result of |GetProperties| and
31 // |GetVisibleNetworks|. 32 // |GetVisibleNetworks|.
32 // TODO(mef): Replace with |DictionaryValue| once onc_constants are moved into 33 // TODO(mef): Replace with |DictionaryValue| once onc_constants are moved into
(...skipping 87 matching lines...) Expand 10 before | Expand all | Expand 10 after
120 // Get list of visible networks. Run |callback| on success, |error_callback| 121 // Get list of visible networks. Run |callback| on success, |error_callback|
121 // on failure. 122 // on failure.
122 virtual void GetVisibleNetworks(const NetworkListCallback& callback, 123 virtual void GetVisibleNetworks(const NetworkListCallback& callback,
123 const ErrorCallback& error_callback) = 0; 124 const ErrorCallback& error_callback) = 0;
124 125
125 // Request network scan. Send |NetworkListChanged| event on completion. 126 // Request network scan. Send |NetworkListChanged| event on completion.
126 virtual void RequestNetworkScan() = 0; 127 virtual void RequestNetworkScan() = 0;
127 128
128 // Start connect to network identified by |network_guid|. Run |callback| on 129 // Start connect to network identified by |network_guid|. Run |callback| on
129 // success, |error_callback| on failure. Send |NetworksChanged| event 130 // success, |error_callback| on failure. Send |NetworksChanged| event
130 // on completion. 131 // on completion. If |frequency| is not 0 (kFrequencyUnknown), then only
132 // connect to BSS running on that frequency (2400 or 5000).
131 virtual void StartConnect(const std::string& network_guid, 133 virtual void StartConnect(const std::string& network_guid,
134 Frequency frequency,
132 const StringResultCallback& callback, 135 const StringResultCallback& callback,
133 const ErrorCallback& error_callback) = 0; 136 const ErrorCallback& error_callback) = 0;
134 137
135 // Start disconnect from network identified by |network_guid|. Run |callback| 138 // Start disconnect from network identified by |network_guid|. Run |callback|
136 // on success, |error_callback| on failure. Send |NetworksChanged| event on 139 // on success, |error_callback| on failure. Send |NetworksChanged| event on
137 // completion. 140 // completion.
138 virtual void StartDisconnect(const std::string& network_guid, 141 virtual void StartDisconnect(const std::string& network_guid,
139 const StringResultCallback& callback, 142 const StringResultCallback& callback,
140 const ErrorCallback& error_callback) = 0; 143 const ErrorCallback& error_callback) = 0;
141 144
(...skipping 12 matching lines...) Expand all
154 static WiFiService* CreateServiceMock(); 157 static WiFiService* CreateServiceMock();
155 158
156 protected: 159 protected:
157 WiFiService() {} 160 WiFiService() {}
158 161
159 private: 162 private:
160 DISALLOW_COPY_AND_ASSIGN(WiFiService); 163 DISALLOW_COPY_AND_ASSIGN(WiFiService);
161 }; 164 };
162 } // namespace wifi 165 } // namespace wifi
163 #endif // CHROME_UTILITY_WIFI_WIFI_SERVICE_H_ 166 #endif // CHROME_UTILITY_WIFI_WIFI_SERVICE_H_
OLDNEW
« no previous file with comments | « chrome/utility/networking_private_handler.cc ('k') | chrome/utility/wifi/wifi_service_mock.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698