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

Side by Side Diff: chrome/browser/local_discovery/privetv3_session.h

Issue 305533007: Rename PrivetV2 to PrivetV3 (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 6 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 | Annotate | Revision Log
OLDNEW
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_SESSION_H_ 5 #ifndef CHROME_BROWSER_LOCAL_DISCOVERY_PRIVETV3_SESSION_H_
6 #define CHROME_BROWSER_LOCAL_DISCOVERY_PRIVETV2_SESSION_H_ 6 #define CHROME_BROWSER_LOCAL_DISCOVERY_PRIVETV3_SESSION_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 #include "base/values.h" 12 #include "base/values.h"
13 13
14 namespace local_discovery { 14 namespace local_discovery {
15 15
16 class PrivetHTTPClient; 16 class PrivetHTTPClient;
17 17
18 class PrivetV2Session { 18 class PrivetV3Session {
19 public: 19 public:
20 typedef base::Callback< 20 typedef base::Callback<
21 void(bool success, const base::DictionaryValue& response)> 21 void(bool success, const base::DictionaryValue& response)>
22 RequestCallback; 22 RequestCallback;
23 23
24 class Delegate { 24 class Delegate {
25 public: 25 public:
26 typedef base::Callback<void(bool confirm)> ConfirmationCallback; 26 typedef base::Callback<void(bool confirm)> ConfirmationCallback;
27 27
28 virtual ~Delegate() {} 28 virtual ~Delegate() {}
29 29
30 virtual void OnSetupConfirmationNeeded( 30 virtual void OnSetupConfirmationNeeded(
31 const std::string& confirmation_code, 31 const std::string& confirmation_code,
32 const ConfirmationCallback& callback) = 0; 32 const ConfirmationCallback& callback) = 0;
33 33
34 virtual void OnSessionEstablished() = 0; 34 virtual void OnSessionEstablished() = 0;
35 35
36 virtual void OnCannotEstablishSession() = 0; 36 virtual void OnCannotEstablishSession() = 0;
37 }; 37 };
38 38
39 class Request { 39 class Request {
40 public: 40 public:
41 virtual ~Request() {} 41 virtual ~Request() {}
42 42
43 virtual void Start() = 0; 43 virtual void Start() = 0;
44 }; 44 };
45 45
46 virtual ~PrivetV2Session() {} 46 virtual ~PrivetV3Session() {}
47 47
48 static scoped_ptr<PrivetV2Session> Create(PrivetHTTPClient* client); 48 static scoped_ptr<PrivetV3Session> Create(PrivetHTTPClient* client);
49 49
50 // Establish a session, will call |OnSetupConfirmationNeeded| and then 50 // Establish a session, will call |OnSetupConfirmationNeeded| and then
51 // |OnSessionEstablished|. 51 // |OnSessionEstablished|.
52 virtual void Start() = 0; 52 virtual void Start() = 0;
53 53
54 // Create a single /privet/v2/session/call request. 54 // Create a single /privet/v2/session/call request.
55 virtual scoped_ptr<Request> CreateRequest( 55 virtual scoped_ptr<Request> CreateRequest(
56 const char* api_name, 56 const char* api_name,
57 const base::DictionaryValue& request, 57 const base::DictionaryValue& request,
58 const RequestCallback& callback); 58 const RequestCallback& callback);
59 }; 59 };
60 60
61 } // namespace local_discovery 61 } // namespace local_discovery
62 62
63 #endif // CHROME_BROWSER_LOCAL_DISCOVERY_PRIVETV2_SESSION_H_ 63 #endif // CHROME_BROWSER_LOCAL_DISCOVERY_PRIVETV3_SESSION_H_
OLDNEW
« no previous file with comments | « chrome/browser/local_discovery/privetv2_setup_operation.cc ('k') | chrome/browser/local_discovery/privetv3_session.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698