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

Side by Side Diff: third_party/xmpp/moduleimpl.cc

Issue 2443903004: Add xmllite and xmpp sources to third_party/ (Closed)
Patch Set: Restored includes in jingle/ as well 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 #include "third_party/xmpp/moduleimpl.h"
6 #include "webrtc/base/common.h"
7
8 namespace buzz {
9
10 XmppModuleImpl::XmppModuleImpl() :
11 engine_(NULL),
12 stanza_handler_(this) {
13 }
14
15 XmppModuleImpl::~XmppModuleImpl()
16 {
17 if (engine_ != NULL) {
18 engine_->RemoveStanzaHandler(&stanza_handler_);
19 engine_ = NULL;
20 }
21 }
22
23 XmppReturnStatus
24 XmppModuleImpl::RegisterEngine(XmppEngine* engine)
25 {
26 if (NULL == engine || NULL != engine_)
27 return XMPP_RETURN_BADARGUMENT;
28
29 engine->AddStanzaHandler(&stanza_handler_);
30 engine_ = engine;
31
32 return XMPP_RETURN_OK;
33 }
34
35 XmppEngine*
36 XmppModuleImpl::engine() {
37 ASSERT(NULL != engine_);
38 return engine_;
39 }
40
41 }
42
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698