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

Unified 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 side-by-side diff with in-line comments
Download patch
Index: chrome/browser/local_discovery/wifi/wifi_client.h
diff --git a/chrome/browser/local_discovery/wifi/wifi_client.h b/chrome/browser/local_discovery/wifi/wifi_client.h
new file mode 100644
index 0000000000000000000000000000000000000000..d5356ca6be2a038852b90acc2a57f45129fddf9a
--- /dev/null
+++ b/chrome/browser/local_discovery/wifi/wifi_client.h
@@ -0,0 +1,59 @@
+// Copyright 2014 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#ifndef CHROME_BROWSER_LOCAL_DISCOVERY_WIFI_WIFI_CLIENT_H_
+#define CHROME_BROWSER_LOCAL_DISCOVERY_WIFI_WIFI_CLIENT_H_
+
+#include <string>
+#include <vector>
+
+#include "base/callback.h"
+#include "base/memory/scoped_ptr.h"
+#include "chrome/browser/profiles/profile.h"
stevenjb 2014/05/05 21:11:59 Not used
Noam Samuel 2014/05/05 21:42:51 Done.
+
+namespace local_discovery {
+
+namespace wifi {
+
+struct NetworkProperties {
+ std::string internal_id;
+ std::string ssid;
+ bool connected;
+};
+
+class WifiClient {
+ public:
+ typedef base::Callback<void(const std::vector<NetworkProperties>& ssids)>
+ SSIDListCallback;
+ typedef base::Callback<void(bool success)> SuccessCallback;
+ typedef base::Callback<
+ void(bool success, const std::string& ssid, const std::string& password)>
+ CredentialsCallback;
+
+ virtual ~WifiClient() {}
+
+ static scoped_ptr<WifiClient> Create();
+
+ virtual void Start() = 0;
+
+ virtual void GetSSIDList(const SSIDListCallback& callback) = 0;
+ virtual void RequestScan(const SuccessCallback& callback) = 0;
+
+ virtual void ConnectToNetwork(const std::string& ssid,
+ const std::string& internal_id,
+ const std::string& password,
+ const SuccessCallback& callback) = 0;
+
+ virtual void ConnectToNetworkByID(const std::string& internal_id,
+ const SuccessCallback& callback) = 0;
+
+ virtual void GetNetworkCredentials(const std::string& internal_id,
+ const CredentialsCallback& callback) = 0;
+};
+
+} // namespace wifi
+
+} // namespace local_discovery
+
+#endif // CHROME_BROWSER_LOCAL_DISCOVERY_WIFI_WIFI_CLIENT_H_

Powered by Google App Engine
This is Rietveld 408576698