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

Side by Side Diff: remoting/jingle_glue/iq_sender.h

Issue 9005034: Refactor SignalStrategy so that it can be reused for multiple connections. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: - Created 8 years, 11 months 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « remoting/jingle_glue/fake_signal_strategy.cc ('k') | remoting/jingle_glue/iq_sender.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
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_
OLDNEW
« no previous file with comments | « remoting/jingle_glue/fake_signal_strategy.cc ('k') | remoting/jingle_glue/iq_sender.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698