blob: fa26df34c5c8023d0c282f4565162cc94baeb2cd [file] [log] [blame]
henrike@webrtc.org269fb4b2014-10-28 22:20:11 +00001/*
2 * Copyright 2004 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_MODULE_H_
12#define WEBRTC_LIBJINGLE_XMPP_MODULE_H_
13
14#include "webrtc/libjingle/xmpp/xmppengine.h"
15
16namespace buzz {
17
18class XmppEngine;
19
20//! This is the base class for extension modules.
21//! An engine is registered with the module and the module then hooks the
22//! appropriate parts of the engine to implement that set of features. It is
23//! important to unregister modules before destructing the engine.
24class XmppModule {
25public:
26 virtual ~XmppModule() {}
27
28 //! Register the engine with the module. Only one engine can be associated
29 //! with a module at a time. This method will return an error if there is
30 //! already an engine registered.
31 virtual XmppReturnStatus RegisterEngine(XmppEngine* engine) = 0;
32};
33
34}
35#endif // WEBRTC_LIBJINGLE_XMPP_MODULE_H_