Chromium Code Reviews| 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_ |