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

Side by Side Diff: chrome/browser/local_discovery/wifi/wifi_client.h

Issue 226883002: WiFi client for GCD bootstrapping (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 7 months 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
OLDNEW
(Empty)
1 // Copyright 2014 The Chromium 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 CHROME_BROWSER_LOCAL_DISCOVERY_WIFI_WIFI_CLIENT_H_
6 #define CHROME_BROWSER_LOCAL_DISCOVERY_WIFI_WIFI_CLIENT_H_
7
8 #include <string>
9 #include <vector>
10
11 #include "base/callback.h"
12 #include "base/memory/scoped_ptr.h"
13 #include "chrome/browser/profiles/profile.h"
stevenjb 2014/05/05 21:11:59 Not used
Noam Samuel 2014/05/05 21:42:51 Done.
14
15 namespace local_discovery {
16
17 namespace wifi {
18
19 struct NetworkProperties {
20 std::string internal_id;
21 std::string ssid;
22 bool connected;
23 };
24
25 class WifiClient {
26 public:
27 typedef base::Callback<void(const std::vector<NetworkProperties>& ssids)>
28 SSIDListCallback;
29 typedef base::Callback<void(bool success)> SuccessCallback;
30 typedef base::Callback<
31 void(bool success, const std::string& ssid, const std::string& password)>
32 CredentialsCallback;
33
34 virtual ~WifiClient() {}
35
36 static scoped_ptr<WifiClient> Create();
37
38 virtual void Start() = 0;
39
40 virtual void GetSSIDList(const SSIDListCallback& callback) = 0;
41 virtual void RequestScan(const SuccessCallback& callback) = 0;
42
43 virtual void ConnectToNetwork(const std::string& ssid,
44 const std::string& internal_id,
45 const std::string& password,
46 const SuccessCallback& callback) = 0;
47
48 virtual void ConnectToNetworkByID(const std::string& internal_id,
49 const SuccessCallback& callback) = 0;
50
51 virtual void GetNetworkCredentials(const std::string& internal_id,
52 const CredentialsCallback& callback) = 0;
53 };
54
55 } // namespace wifi
56
57 } // namespace local_discovery
58
59 #endif // CHROME_BROWSER_LOCAL_DISCOVERY_WIFI_WIFI_CLIENT_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698