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

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

Issue 7809003: Simplify IqRequest interface. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix windows Created 9 years, 3 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/mock_objects.h ('k') | remoting/jingle_glue/xmpp_iq_request.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_XMPP_IQ_REQUEST_H_ 5 #ifndef REMOTING_JINGLE_GLUE_XMPP_IQ_REQUEST_H_
6 #define REMOTING_JINGLE_GLUE_XMPP_IQ_REQUEST_H_ 6 #define REMOTING_JINGLE_GLUE_XMPP_IQ_REQUEST_H_
7 7
8 #include "base/compiler_specific.h" 8 #include "base/compiler_specific.h"
9 #include "remoting/jingle_glue/iq_request.h" 9 #include "remoting/jingle_glue/iq_request.h"
10 #include "third_party/libjingle/source/talk/base/sigslot.h" 10 #include "third_party/libjingle/source/talk/base/sigslot.h"
11 #include "third_party/libjingle/source/talk/xmpp/xmppengine.h" 11 #include "third_party/libjingle/source/talk/xmpp/xmppengine.h"
12 12
13 class MessageLoop; 13 class MessageLoop;
14 14
15 namespace buzz { 15 namespace buzz {
16 class XmppClient; 16 class XmppClient;
17 } // namespace buzz 17 } // namespace buzz
18 18
19 namespace remoting { 19 namespace remoting {
20 20
21 class XmppIqRequest : public IqRequest, public buzz::XmppIqHandler { 21 class XmppIqRequest : public IqRequest, public buzz::XmppIqHandler {
22 public: 22 public:
23 XmppIqRequest(MessageLoop* message_loop, buzz::XmppClient* xmpp_client); 23 XmppIqRequest(MessageLoop* message_loop, buzz::XmppClient* xmpp_client);
24 virtual ~XmppIqRequest(); 24 virtual ~XmppIqRequest();
25 25
26 // IqRequest interface. 26 // IqRequest interface.
27 virtual void SendIq(const std::string& type, const std::string& addressee, 27 virtual void SendIq(buzz::XmlElement* stanza) OVERRIDE;
28 buzz::XmlElement* iq_body) OVERRIDE;
29 virtual void set_callback(const ReplyCallback& callback) OVERRIDE; 28 virtual void set_callback(const ReplyCallback& callback) OVERRIDE;
30 29
31 // buzz::XmppIqHandler interface. 30 // buzz::XmppIqHandler interface.
32 virtual void IqResponse(buzz::XmppIqCookie cookie, 31 virtual void IqResponse(buzz::XmppIqCookie cookie,
33 const buzz::XmlElement* stanza) OVERRIDE; 32 const buzz::XmlElement* stanza) OVERRIDE;
34 33
35 private: 34 private:
36 FRIEND_TEST_ALL_PREFIXES(IqRequestTest, MakeIqStanza); 35 FRIEND_TEST_ALL_PREFIXES(IqRequestTest, MakeIqStanza);
37 36
38 void Unregister(); 37 void Unregister();
39 38
40 // TODO(ajwong): This used to hold a reference to the jingle client...make 39 // TODO(ajwong): This used to hold a reference to the jingle client...make
41 // sure the lifetime names sense now. 40 // sure the lifetime names sense now.
42 MessageLoop* message_loop_; 41 MessageLoop* message_loop_;
43 buzz::XmppClient* xmpp_client_; 42 buzz::XmppClient* xmpp_client_;
44 buzz::XmppIqCookie cookie_; 43 buzz::XmppIqCookie cookie_;
45 ReplyCallback callback_; 44 ReplyCallback callback_;
46 }; 45 };
47 46
48 } // namespace remoting 47 } // namespace remoting
49 48
50 #endif // REMOTING_JINGLE_GLUE_XMPP_IQ_REQUEST_H_ 49 #endif // REMOTING_JINGLE_GLUE_XMPP_IQ_REQUEST_H_
OLDNEW
« no previous file with comments | « remoting/jingle_glue/mock_objects.h ('k') | remoting/jingle_glue/xmpp_iq_request.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698