diff options
author | sergeyu@chromium.org <sergeyu@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-06-23 16:35:44 +0000 |
---|---|---|
committer | sergeyu@chromium.org <sergeyu@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-06-23 16:35:44 +0000 |
commit | 512ac40edc7551c76bbd9bf288afee209f6bba15 (patch) | |
tree | 1ff85ae2cf2b7d65fef41729225a62b9ecc1d1f1 /remoting/jingle_glue/signal_strategy.h | |
parent | 590742dc369f718055cded657f197d154639493e (diff) | |
download | chromium_src-512ac40edc7551c76bbd9bf288afee209f6bba15.zip chromium_src-512ac40edc7551c76bbd9bf288afee209f6bba15.tar.gz chromium_src-512ac40edc7551c76bbd9bf288afee209f6bba15.tar.bz2 |
Refactoring around SignalStrategy interface.
- Added AddListener/RemoveListener in the SignalStrategy interface.
- Remove dependancy on JavascriptIqRequest from JingleSignalingConnector.
BUG=None
TEST=Chromoting client still works
Review URL: http://codereview.chromium.org/7239005
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@90219 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'remoting/jingle_glue/signal_strategy.h')
-rw-r--r-- | remoting/jingle_glue/signal_strategy.h | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/remoting/jingle_glue/signal_strategy.h b/remoting/jingle_glue/signal_strategy.h index d4f3332..d4093b78 100644 --- a/remoting/jingle_glue/signal_strategy.h +++ b/remoting/jingle_glue/signal_strategy.h @@ -9,6 +9,10 @@ #include "base/basictypes.h" +namespace buzz { +class XmlElement; +} // namespace buzz + namespace cricket { class SessionManager; } // namespace cricket @@ -33,10 +37,24 @@ class SignalStrategy { virtual void OnJidChange(const std::string& full_jid) = 0; }; + class Listener { + public: + virtual void OnIncomingStanza(const buzz::XmlElement* stanza) = 0; + }; + SignalStrategy() {} virtual ~SignalStrategy() {} virtual void Init(StatusObserver* observer) = 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; + + // Sends a raw XMPP stanza. Takes ownership of the |stanza|. + virtual void SendStanza(buzz::XmlElement* stanza) = 0; + // TODO(sergeyu): Do these methods belong to this interface? virtual void StartSession(cricket::SessionManager* session_manager) = 0; virtual void EndSession() = 0; |