gloox  1.0.22
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__
gloox::StanzaExtensionFactory::StanzaExtensionFactory
StanzaExtensionFactory()
Definition: stanzaextensionfactory.cpp:26
gloox::Stanza
This is the base class for XMPP stanza abstractions.
Definition: stanza.h:33
gloox::StanzaExtension
This class abstracts a stanza extension, which is usually an XML child element in a specific namespac...
Definition: stanzaextension.h:203
gloox::StanzaExtensionFactory::addExtensions
void addExtensions(Stanza &stanza, Tag *tag)
Definition: stanzaextensionfactory.cpp:73
gloox::StanzaExtensionFactory::~StanzaExtensionFactory
~StanzaExtensionFactory()
Definition: stanzaextensionfactory.cpp:30
gloox::StanzaExtensionFactory::registerExtension
void registerExtension(StanzaExtension *ext)
Definition: stanzaextensionfactory.cpp:37
gloox::StanzaExtensionFactory::removeExtension
bool removeExtension(int ext)
Definition: stanzaextensionfactory.cpp:57
gloox::util::Mutex
A simple implementation of mutex as a wrapper around a pthread mutex or a win32 critical section.
Definition: mutex.h:33
gloox
The namespace for the gloox library.
Definition: adhoc.cpp:27
gloox::Tag
This is an abstraction of an XML element.
Definition: tag.h:46
gloox::ClientBase
This is the common base class for a Jabber/XMPP Client and a Jabber Component.
Definition: clientbase.h:76
gloox::StanzaExtensionFactory
A Factory that creates StanzaExtensions from Tags.
Definition: stanzaextensionfactory.h:41