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

Side by Side Diff: third_party/libjingle_xmpp/xmpp/discoitemsquerytask.h

Issue 2443903004: Add xmllite and xmpp sources to third_party/ (Closed)
Patch Set: Fix GN and sort includes Created 3 years, 12 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
OLDNEW
(Empty)
1 // Copyright 2004 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 // Fires a disco items query, such as the following example:
6 //
7 // <iq type='get'
8 // from='foo@gmail.com/asdf'
9 // to='bar@google.com'
10 // id='1234'>
11 // <query xmlns=' http://jabber.org/protocol/disco#items'
12 // node='blah '/>
13 // </iq>
14 //
15 // Sample response:
16 //
17 // <iq type='result'
18 // from=' hendriks@google.com'
19 // to='rsturgell@google.com/asdf'
20 // id='1234'>
21 // <query xmlns=' http://jabber.org/protocol/disco#items '
22 // node='blah'>
23 // <item something='somethingelse'/>
24 // </query>
25 // </iq>
26
27
28 #ifndef WEBRTC_LIBJINGLE_XMPP_DISCOITEMSQUERYTASK_H_
29 #define WEBRTC_LIBJINGLE_XMPP_DISCOITEMSQUERYTASK_H_
30
31 #include <string>
32 #include <vector>
33
34 #include "third_party/libjingle_xmpp/xmpp/iqtask.h"
35
36 namespace buzz {
37
38 struct DiscoItem {
39 std::string jid;
40 std::string node;
41 std::string name;
42 };
43
44 class DiscoItemsQueryTask : public IqTask {
45 public:
46 DiscoItemsQueryTask(XmppTaskParentInterface* parent,
47 const Jid& to, const std::string& node);
48
49 sigslot::signal1<std::vector<DiscoItem> > SignalResult;
50
51 private:
52 static XmlElement* MakeRequest(const std::string& node);
53 virtual void HandleResult(const XmlElement* result);
54 static bool ParseItem(const XmlElement* element, DiscoItem* item);
55 };
56
57 } // namespace buzz
58
59 #endif // WEBRTC_LIBJINGLE_XMPP_DISCOITEMSQUERYTASK_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698