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

Side by Side Diff: remoting/jingle_glue/signal_strategy.h

Issue 10161010: Handle IQ responses asynchronously. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 8 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
« no previous file with comments | « remoting/jingle_glue/iq_sender_unittest.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 REMOTING_JINGLE_GLUE_SIGNAL_STRATEGY_H_ 5 #ifndef REMOTING_JINGLE_GLUE_SIGNAL_STRATEGY_H_
6 #define REMOTING_JINGLE_GLUE_SIGNAL_STRATEGY_H_ 6 #define REMOTING_JINGLE_GLUE_SIGNAL_STRATEGY_H_
7 7
8 #include <string> 8 #include <string>
9 9
10 #include "base/basictypes.h" 10 #include "base/basictypes.h"
(...skipping 22 matching lines...) Expand all
33 // Callback interface for signaling event. Event handlers are not 33 // Callback interface for signaling event. Event handlers are not
34 // allowed to destroy SignalStrategy, but may add or remove other 34 // allowed to destroy SignalStrategy, but may add or remove other
35 // listeners. 35 // listeners.
36 class Listener { 36 class Listener {
37 public: 37 public:
38 virtual ~Listener() {} 38 virtual ~Listener() {}
39 39
40 // Called after state of the connection has changed. 40 // Called after state of the connection has changed.
41 virtual void OnSignalStrategyStateChange(State state) {} 41 virtual void OnSignalStrategyStateChange(State state) {}
42 42
43 // Must return true if the stanza was handled, false otherwise. 43 // Must return true if the stanza was handled, false
44 // otherwise. The signal strategy must not be deleted from a
45 // handler of this message.
44 virtual bool OnSignalStrategyIncomingStanza( 46 virtual bool OnSignalStrategyIncomingStanza(
45 const buzz::XmlElement* stanza) { return false; } 47 const buzz::XmlElement* stanza) { return false; }
46 }; 48 };
47 49
48 SignalStrategy() {} 50 SignalStrategy() {}
49 virtual ~SignalStrategy() {} 51 virtual ~SignalStrategy() {}
50 52
51 // Starts connection attempt. If connection is currently active 53 // Starts connection attempt. If connection is currently active
52 // disconnects it and opens a new connection (implicit disconnect 54 // disconnects it and opens a new connection (implicit disconnect
53 // triggers CLOSED notification). Connection is finished 55 // triggers CLOSED notification). Connection is finished
(...skipping 25 matching lines...) Expand all
79 // request. 81 // request.
80 virtual std::string GetNextId() = 0; 82 virtual std::string GetNextId() = 0;
81 83
82 private: 84 private:
83 DISALLOW_COPY_AND_ASSIGN(SignalStrategy); 85 DISALLOW_COPY_AND_ASSIGN(SignalStrategy);
84 }; 86 };
85 87
86 } // namespace remoting 88 } // namespace remoting
87 89
88 #endif // REMOTING_JINGLE_GLUE_SIGNAL_STRATEGY_H_ 90 #endif // REMOTING_JINGLE_GLUE_SIGNAL_STRATEGY_H_
OLDNEW
« no previous file with comments | « remoting/jingle_glue/iq_sender_unittest.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698