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_IQ_SENDER_H_ | 5 #ifndef REMOTING_SIGNALING_IQ_SENDER_H_ |
6 #define REMOTING_SIGNALING_IQ_SENDER_H_ | 6 #define REMOTING_SIGNALING_IQ_SENDER_H_ |
7 | 7 |
8 #include <map> | 8 #include <map> |
9 #include <string> | 9 #include <string> |
10 | 10 |
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
49 const ReplyCallback& callback); | 49 const ReplyCallback& callback); |
50 | 50 |
51 // Same as above, but also formats the message. | 51 // Same as above, but also formats the message. |
52 scoped_ptr<IqRequest> SendIq(const std::string& type, | 52 scoped_ptr<IqRequest> SendIq(const std::string& type, |
53 const std::string& addressee, | 53 const std::string& addressee, |
54 scoped_ptr<buzz::XmlElement> iq_body, | 54 scoped_ptr<buzz::XmlElement> iq_body, |
55 const ReplyCallback& callback); | 55 const ReplyCallback& callback); |
56 | 56 |
57 // SignalStrategy::Listener implementation. | 57 // SignalStrategy::Listener implementation. |
58 virtual void OnSignalStrategyStateChange( | 58 virtual void OnSignalStrategyStateChange( |
59 SignalStrategy::State state) OVERRIDE; | 59 SignalStrategy::State state) override; |
60 virtual bool OnSignalStrategyIncomingStanza( | 60 virtual bool OnSignalStrategyIncomingStanza( |
61 const buzz::XmlElement* stanza) OVERRIDE; | 61 const buzz::XmlElement* stanza) override; |
62 | 62 |
63 private: | 63 private: |
64 typedef std::map<std::string, IqRequest*> IqRequestMap; | 64 typedef std::map<std::string, IqRequest*> IqRequestMap; |
65 friend class IqRequest; | 65 friend class IqRequest; |
66 | 66 |
67 // Helper function used to create iq stanzas. | 67 // Helper function used to create iq stanzas. |
68 static scoped_ptr<buzz::XmlElement> MakeIqStanza( | 68 static scoped_ptr<buzz::XmlElement> MakeIqStanza( |
69 const std::string& type, | 69 const std::string& type, |
70 const std::string& addressee, | 70 const std::string& addressee, |
71 scoped_ptr<buzz::XmlElement> iq_body); | 71 scoped_ptr<buzz::XmlElement> iq_body); |
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
104 IqSender* sender_; | 104 IqSender* sender_; |
105 IqSender::ReplyCallback callback_; | 105 IqSender::ReplyCallback callback_; |
106 std::string addressee_; | 106 std::string addressee_; |
107 | 107 |
108 DISALLOW_COPY_AND_ASSIGN(IqRequest); | 108 DISALLOW_COPY_AND_ASSIGN(IqRequest); |
109 }; | 109 }; |
110 | 110 |
111 } // namespace remoting | 111 } // namespace remoting |
112 | 112 |
113 #endif // REMOTING_SIGNALING_IQ_SENDER_H_ | 113 #endif // REMOTING_SIGNALING_IQ_SENDER_H_ |
OLD | NEW |