gloox  1.0.20
stanzaextensionfactory.h
1 /*
2  Copyright (c) 2006-2017 by Jakob Schröter <js@camaya.net>
3  This file is part of the gloox library. http://camaya.net/gloox
4 
5  This software is distributed under a license. The full license
6  agreement can be found in the file LICENSE in this distribution.
7  This software may not be copied, modified, sold or distributed
8  other than expressed in the named license agreement.
9 
10  This software is distributed without any warranty.
11 */
12 
13 
14 #ifndef STANZAEXTENSIONFACTORY_H__
15 #define STANZAEXTENSIONFACTORY_H__
16 
17 #include "mutex.h"
18 
19 #include <list>
20 
21 namespace gloox
22 {
23 
24  class Tag;
25  class Stanza;
26  class StanzaExtension;
27 
42  {
43 
44  friend class ClientBase;
45 
46  public:
59 
65  bool removeExtension( int ext );
66 
71 
76 
82  void addExtensions( Stanza& stanza, Tag* tag );
83 
84  private:
85  typedef std::list<StanzaExtension*> SEList;
86  SEList m_extensions;
87  util::Mutex m_extensionsMutex;
88 
89  };
90 
91 }
92 
93 #endif // STANZAEXTENSIONFACTORY_H__
This is the base class for XMPP stanza abstractions.
Definition: stanza.h:33
A simple implementation of mutex as a wrapper around a pthread mutex or a win32 critical section...
Definition: mutex.h:33
void addExtensions(Stanza &stanza, Tag *tag)
The namespace for the gloox library.
Definition: adhoc.cpp:27
This class abstracts a stanza extension, which is usually an XML child element in a specific namespac...
A Factory that creates StanzaExtensions from Tags.
void registerExtension(StanzaExtension *ext)
This is the common base class for a Jabber/XMPP Client and a Jabber Component.
Definition: clientbase.h:76
This is an abstraction of an XML element.
Definition: tag.h:46