henrike@webrtc.org | 269fb4b | 2014-10-28 22:20:11 +0000 | [diff] [blame^] | 1 | /* |
| 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 | |
| 16 | namespace buzz { |
| 17 | |
| 18 | class 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. |
| 24 | class XmppModule { |
| 25 | public: |
| 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_ |