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

Side by Side Diff: webrtc/libjingle/xmpp/receivetask.h

Issue 2617443003: Remove webrtc/libjingle/{xmllite,xmpp} (Closed)
Patch Set: Created 3 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
« no previous file with comments | « webrtc/libjingle/xmpp/pubsubtasks_unittest.cc ('k') | webrtc/libjingle/xmpp/receivetask.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 /*
2 * Copyright 2011 The WebRTC Project Authors. All rights reserved.
3 *
4 * Use of this source code is governed by a BSD-style license
5 * that can be found in the LICENSE file in the root of the source
6 * tree. An additional intellectual property rights grant can be found
7 * in the file PATENTS. All contributing project authors may
8 * be found in the AUTHORS file in the root of the source tree.
9 */
10
11 #ifndef WEBRTC_LIBJINGLE_XMPP_RECEIVETASK_H_
12 #define WEBRTC_LIBJINGLE_XMPP_RECEIVETASK_H_
13
14 #include "webrtc/libjingle/xmpp/xmpptask.h"
15
16 namespace buzz {
17
18 // A base class for receiving stanzas. Override WantsStanza to
19 // indicate that a stanza should be received and ReceiveStanza to
20 // process it. Once started, ReceiveStanza will be called for all
21 // stanzas that return true when passed to WantsStanza. This saves
22 // you from having to remember how to setup the queueing and the task
23 // states, etc.
24 class ReceiveTask : public XmppTask {
25 public:
26 explicit ReceiveTask(XmppTaskParentInterface* parent) :
27 XmppTask(parent, XmppEngine::HL_TYPE) {}
28 virtual int ProcessStart();
29
30 protected:
31 virtual bool HandleStanza(const XmlElement* stanza);
32
33 // Return true if the stanza should be received.
34 virtual bool WantsStanza(const XmlElement* stanza) = 0;
35 // Process the received stanza.
36 virtual void ReceiveStanza(const XmlElement* stanza) = 0;
37 };
38
39 } // namespace buzz
40
41 #endif // WEBRTC_LIBJINGLE_XMPP_RECEIVETASK_H_
OLDNEW
« no previous file with comments | « webrtc/libjingle/xmpp/pubsubtasks_unittest.cc ('k') | webrtc/libjingle/xmpp/receivetask.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698