/usr/include/gloox/jinglepluginfactory.h is in libgloox-dev 1.0.11-1.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 | /*
Copyright (c) 2013-2014 by Jakob Schroeter <js@camaya.net>
This file is part of the gloox library. http://camaya.net/gloox
This software is distributed under a license. The full license
agreement can be found in the file LICENSE in this distribution.
This software may not be copied, modified, sold or distributed
other than expressed in the named license agreement.
This software is distributed without any warranty.
*/
#ifndef JINGLEPLUGINFACTORY_H__
#define JINGLEPLUGINFACTORY_H__
#include "jingleplugin.h"
#include "jinglesession.h"
namespace gloox
{
class Tag;
namespace Jingle
{
/**
* @brief A factory for which creates Plugin instances based on Tags. This is part of Jingle (@xep{0166}).
*
* Used by Jingle::SessionManager. You should not need to use this class directly.
*
* @author Jakob Schroeter <js@camaya.net>
* @since 1.0.7
*/
class PluginFactory
{
friend class SessionManager;
public:
/**
* Virtual destructor.
*/
virtual ~PluginFactory();
/**
* Registers an empty Plugin as a template with the factory.
* @param plugin The plugin to register.
*/
void registerPlugin( Plugin* plugin );
/**
* Based on the template plugins' filter string, this function checks the supplied tag for
* supported extensions and adds them as new plugins to the supplied Plugin instance.
* @param plugin The Plugin-derived object that will have the newly created plugins embedded.
* @param tag The Tag to check for supported extensions.
*/
void addPlugins( Plugin& plugin, const Tag* tag );
/**
* Based on the template plugins' filter string, this function checks the supplied tag for
* supported extensions and adds them as new plugins to the supplied Jingle instance.
* @param jingle The Jingle object that will have the newly created plugins embedded.
* @param tag The Tag to check for supported extensions.
*/
void addPlugins( Session::Jingle& jingle, const Tag* tag );
private:
/**
* Creates a new instance.
*/
PluginFactory();
PluginList m_plugins;
};
}
}
#endif // JINGLEPLUGINFACTORY_H__
|