| OLD | NEW |
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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_IQ_SENDER_H_ | 5 #ifndef REMOTING_JINGLE_GLUE_IQ_SENDER_H_ |
| 6 #define REMOTING_JINGLE_GLUE_IQ_SENDER_H_ | 6 #define REMOTING_JINGLE_GLUE_IQ_SENDER_H_ |
| 7 | 7 |
| 8 #include <map> | 8 #include <map> |
| 9 #include <string> | 9 #include <string> |
| 10 | 10 |
| (...skipping 30 matching lines...) Expand all Loading... |
| 41 const ReplyCallback& callback) WARN_UNUSED_RESULT; | 41 const ReplyCallback& callback) WARN_UNUSED_RESULT; |
| 42 | 42 |
| 43 // Same as above, but also formats the message. Takes ownership of | 43 // Same as above, but also formats the message. Takes ownership of |
| 44 // |iq_body|. | 44 // |iq_body|. |
| 45 IqRequest* SendIq(const std::string& type, | 45 IqRequest* SendIq(const std::string& type, |
| 46 const std::string& addressee, | 46 const std::string& addressee, |
| 47 buzz::XmlElement* iq_body, | 47 buzz::XmlElement* iq_body, |
| 48 const ReplyCallback& callback) WARN_UNUSED_RESULT; | 48 const ReplyCallback& callback) WARN_UNUSED_RESULT; |
| 49 | 49 |
| 50 // SignalStrategy::Listener implementation. | 50 // SignalStrategy::Listener implementation. |
| 51 virtual bool OnIncomingStanza(const buzz::XmlElement* stanza) OVERRIDE; | 51 virtual void OnSignalStrategyStateChange( |
| 52 SignalStrategy::State state) OVERRIDE; |
| 53 virtual bool OnSignalStrategyIncomingStanza( |
| 54 const buzz::XmlElement* stanza) OVERRIDE; |
| 52 | 55 |
| 53 private: | 56 private: |
| 54 typedef std::map<std::string, IqRequest*> IqRequestMap; | 57 typedef std::map<std::string, IqRequest*> IqRequestMap; |
| 55 friend class IqRequest; | 58 friend class IqRequest; |
| 56 | 59 |
| 57 // Helper function used to create iq stanzas. | 60 // Helper function used to create iq stanzas. |
| 58 static buzz::XmlElement* MakeIqStanza(const std::string& type, | 61 static buzz::XmlElement* MakeIqStanza(const std::string& type, |
| 59 const std::string& addressee, | 62 const std::string& addressee, |
| 60 buzz::XmlElement* iq_body); | 63 buzz::XmlElement* iq_body); |
| 61 | 64 |
| (...skipping 20 matching lines...) Expand all Loading... |
| 82 | 85 |
| 83 IqSender* sender_; | 86 IqSender* sender_; |
| 84 IqSender::ReplyCallback callback_; | 87 IqSender::ReplyCallback callback_; |
| 85 | 88 |
| 86 DISALLOW_COPY_AND_ASSIGN(IqRequest); | 89 DISALLOW_COPY_AND_ASSIGN(IqRequest); |
| 87 }; | 90 }; |
| 88 | 91 |
| 89 } // namespace remoting | 92 } // namespace remoting |
| 90 | 93 |
| 91 #endif // REMOTING_JINGLE_GLUE_IQ_SENDER_H_ | 94 #endif // REMOTING_JINGLE_GLUE_IQ_SENDER_H_ |
| OLD | NEW |