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

Unified Diff: remoting/jingle_glue/signal_strategy.h

Issue 8432009: Refactor IqRequest. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: - Created 9 years, 1 month 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: remoting/jingle_glue/signal_strategy.h
diff --git a/remoting/jingle_glue/signal_strategy.h b/remoting/jingle_glue/signal_strategy.h
index 1f90d0309dadb1f99955bdb5cd1d6ffd02eba056..c4bfabee1226562055182499720df6cc04671a26 100644
--- a/remoting/jingle_glue/signal_strategy.h
+++ b/remoting/jingle_glue/signal_strategy.h
@@ -15,8 +15,6 @@ class XmlElement;
namespace remoting {
-class IqRequest;
-
class SignalStrategy {
public:
class StatusObserver {
@@ -44,23 +42,20 @@ class SignalStrategy {
virtual void Init(StatusObserver* observer) = 0;
virtual void Close() = 0;
- // Set a listener that can listen to all incoming messages. Doesn't
- // take ownership of the |listener|. Can be called with |listener|
- // set to NULL to unset current listener. It must be unset before
- // object is destroyed.
- virtual void SetListener(Listener* listener) = 0;
+ // Add a |listener| that can listen to all incoming
+ // messages. Doesn't take ownership of the |listener|.
+ virtual void AddListener(Listener* listener) = 0;
+
+ // Remove a |listener| previously added with AddListener().
+ virtual void RemoveListener(Listener* listener) = 0;
// Sends a raw XMPP stanza. Takes ownership of the |stanza|.
- virtual void SendStanza(buzz::XmlElement* stanza) = 0;
+ virtual bool SendStanza(buzz::XmlElement* stanza) = 0;
// Returns new ID that should be used for the next outgoing IQ
// request.
virtual std::string GetNextId() = 0;
- // TODO(sergeyu): Do we really need this method to be part of this
- // interface?
- virtual IqRequest* CreateIqRequest() = 0;
-
private:
DISALLOW_COPY_AND_ASSIGN(SignalStrategy);
};

Powered by Google App Engine
This is Rietveld 408576698