| 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 REMOTING_SIGNALING_SIGNAL_STRATEGY_H_ | 5 #ifndef REMOTING_SIGNALING_SIGNAL_STRATEGY_H_ |
| 6 #define REMOTING_SIGNALING_SIGNAL_STRATEGY_H_ | 6 #define REMOTING_SIGNALING_SIGNAL_STRATEGY_H_ |
| 7 | 7 |
| 8 #include <string> | 8 #include <string> |
| 9 | 9 |
| 10 #include "base/basictypes.h" | 10 #include "base/basictypes.h" |
| (...skipping 68 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 79 virtual std::string GetLocalJid() const = 0; | 79 virtual std::string GetLocalJid() const = 0; |
| 80 | 80 |
| 81 // Add a |listener| that can listen to all incoming | 81 // Add a |listener| that can listen to all incoming |
| 82 // messages. Doesn't take ownership of the |listener|. All listeners | 82 // messages. Doesn't take ownership of the |listener|. All listeners |
| 83 // must be removed before this object is destroyed. | 83 // must be removed before this object is destroyed. |
| 84 virtual void AddListener(Listener* listener) = 0; | 84 virtual void AddListener(Listener* listener) = 0; |
| 85 | 85 |
| 86 // Remove a |listener| previously added with AddListener(). | 86 // Remove a |listener| previously added with AddListener(). |
| 87 virtual void RemoveListener(Listener* listener) = 0; | 87 virtual void RemoveListener(Listener* listener) = 0; |
| 88 | 88 |
| 89 // Sends a raw XMPP stanza. | 89 // Sends a raw XMPP stanza. Returns false if the stanza couldn't be send. |
| 90 virtual bool SendStanza(scoped_ptr<buzz::XmlElement> stanza) = 0; | 90 virtual bool SendStanza(scoped_ptr<buzz::XmlElement> stanza) = 0; |
| 91 | 91 |
| 92 // Returns new ID that should be used for the next outgoing IQ | 92 // Returns new ID that should be used for the next outgoing IQ |
| 93 // request. | 93 // request. |
| 94 virtual std::string GetNextId() = 0; | 94 virtual std::string GetNextId() = 0; |
| 95 | 95 |
| 96 private: | 96 private: |
| 97 DISALLOW_COPY_AND_ASSIGN(SignalStrategy); | 97 DISALLOW_COPY_AND_ASSIGN(SignalStrategy); |
| 98 }; | 98 }; |
| 99 | 99 |
| 100 } // namespace remoting | 100 } // namespace remoting |
| 101 | 101 |
| 102 #endif // REMOTING_SIGNALING_SIGNAL_STRATEGY_H_ | 102 #endif // REMOTING_SIGNALING_SIGNAL_STRATEGY_H_ |
| OLD | NEW |