| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 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 | 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_BROWSER_LOCAL_DISCOVERY_PRIVETV2_SETUP_OPERATION_H_ | 5 #ifndef CHROME_BROWSER_LOCAL_DISCOVERY_PRIVETV3_SETUP_OPERATION_H_ |
| 6 #define CHROME_BROWSER_LOCAL_DISCOVERY_PRIVETV2_SETUP_OPERATION_H_ | 6 #define CHROME_BROWSER_LOCAL_DISCOVERY_PRIVETV3_SETUP_OPERATION_H_ |
| 7 | 7 |
| 8 #include <string> | 8 #include <string> |
| 9 | 9 |
| 10 #include "base/callback.h" | 10 #include "base/callback.h" |
| 11 #include "base/memory/scoped_ptr.h" | 11 #include "base/memory/scoped_ptr.h" |
| 12 | 12 |
| 13 namespace local_discovery { | 13 namespace local_discovery { |
| 14 | 14 |
| 15 class PrivetV2Session; | 15 class PrivetV3Session; |
| 16 | 16 |
| 17 class PrivetV2SetupOperation { | 17 class PrivetV3SetupOperation { |
| 18 public: | 18 public: |
| 19 enum Status { STATUS_SUCCESS, STATUS_SETUP_ERROR, STATUS_SESSION_ERROR }; | 19 enum Status { STATUS_SUCCESS, STATUS_SETUP_ERROR, STATUS_SESSION_ERROR }; |
| 20 | 20 |
| 21 virtual ~PrivetV2SetupOperation() {} | 21 virtual ~PrivetV3SetupOperation() {} |
| 22 | 22 |
| 23 typedef base::Callback<void(Status status)> SetupStatusCallback; | 23 typedef base::Callback<void(Status status)> SetupStatusCallback; |
| 24 | 24 |
| 25 static scoped_ptr<PrivetV2SetupOperation> Create( | 25 static scoped_ptr<PrivetV3SetupOperation> Create( |
| 26 PrivetV2Session* session, | 26 PrivetV3Session* session, |
| 27 const SetupStatusCallback& callback, | 27 const SetupStatusCallback& callback, |
| 28 const std::string& ticket_id); | 28 const std::string& ticket_id); |
| 29 | 29 |
| 30 virtual void AddWifiCredentials(const std::string& ssid, | 30 virtual void AddWifiCredentials(const std::string& ssid, |
| 31 const std::string& passwd) = 0; | 31 const std::string& passwd) = 0; |
| 32 virtual void Start() = 0; | 32 virtual void Start() = 0; |
| 33 }; | 33 }; |
| 34 | 34 |
| 35 } // namespace local_discovery | 35 } // namespace local_discovery |
| 36 | 36 |
| 37 #endif // CHROME_BROWSER_LOCAL_DISCOVERY_PRIVETV2_SETUP_OPERATION_H_ | 37 #endif // CHROME_BROWSER_LOCAL_DISCOVERY_PRIVETV3_SETUP_OPERATION_H_ |
| OLD | NEW |