Infinoted.PluginManager¶
- Subclasses:
None
Methods¶
- Inherited:
- Structs:
class |
|
class |
|
|
|
|
|
|
|
|
|
|
Virtual Methods¶
- Inherited:
Properties¶
Name |
Type |
Flags |
Short Description |
---|---|---|---|
r/w/co |
The server’s TLS credentials |
||
r/w/co |
The infinote directory served by the server |
||
r/w/co |
The log object into which to write log messages |
||
r |
The path from which plugins are loaded |
Signals¶
- Inherited:
Fields¶
- Inherited:
Name |
Type |
Access |
Description |
---|---|---|---|
parent |
r |
Class Details¶
- class Infinoted.PluginManager(**kwargs)¶
- Bases:
- Abstract:
No
- Structure:
Infinoted.PluginManager
is an opaque data type. You should only access it via the public API functions.- classmethod error_quark()¶
- Returns:
The error domain for the
Infinoted.PluginManager
module.- Return type:
Returns the #GQuark for errors from the
Infinoted.PluginManager
module.
- classmethod new(directory, log, creds)¶
- Parameters:
directory (
Infinityd.Directory
) – TheInfinityd.Directory
on which plugins should operate.log (
Infinoted.Log
) – TheInfinoted.Log
to write log messages to.creds (
Infinity.CertificateCredentials
orNone
) – TheInfinity.CertificateCredentials
used to secure data transfer with the clients, orNone
.
- Returns:
A new
Infinoted.PluginManager
.- Return type:
Creates a new
Infinoted.PluginManager
with the given directory, log and credentials. These three objects will be available for plugins to enhance the infinoted functionality. Plugins can be loaded withInfinoted.PluginManager.load
().
- get_connection_info(plugin_info, connection)¶
- Parameters:
plugin_info (
object
orNone
) – The plugin_info pointer of a plugin instance.connection (
Infinity.XmlConnection
) – TheInfinity.XmlConnection
for which to retrieve plugin data.
- Returns:
A pointer to the connection-specific plugin data, or
None
.- Return type:
Queries the connection-specfic plugin data for the plugin instance plugin_info. Returns
None
if no such object exists, i.e. when the plugin’s connection_info_size is set to 0.
- get_credentials()¶
- Returns:
A
Infinity.CertificateCredentials
object owned by the plugin manager.- Return type:
Returns the
Infinity.CertificateCredentials
used for securing the data transfer with all clients.
- get_directory()¶
- Returns:
A
Infinityd.Directory
owned by the plugin manager.- Return type:
Returns the
Infinityd.Directory
used by the plugin manager.
- get_io()¶
- Returns:
A
Infinity.Io
owned by the plugin manager.- Return type:
Returns the
Infinity.Io
of theInfinityd.Directory
used by the plugin manager.
- get_log()¶
- Returns:
A
Infinoted.Log
owned by the plugin manager.- Return type:
Returns the
Infinoted.Log
that the plugin manager and the plugins do write log messages to.
- get_session_info(plugin_info, proxy)¶
- Parameters:
plugin_info (
object
orNone
) – The plugin_info pointer of a plugin instance.proxy (
Infinity.SessionProxy
) – TheInfinity.SessionProxy
for which to retrieve plugin data.
- Returns:
A pointer to the session-specific plugin data, or
None
.- Return type:
Queries the session-specfic plugin data for the plugin instance plugin_info. Returns
None
if no such object exists, i.e. when the plugin’s session_info_size is set to 0.
- load(plugin_path, plugins, options)¶
- Parameters:
plugin_path (
str
) – The path from which to load plugins.plugins ([
str
] orNone
) – A list of plugins to load, orNone
.options (
GLib.KeyFile
) – AGLib.KeyFile
with configuration options for the plugins.
- Raises:
- Returns:
- Return type:
Loads all plugins specified in plugins from the location at plugin_path. If loading one of the module fails the function sets error and returns
False
, and the object ends up with no plugins loaded. If plugins isNone
, no plugins are loaded.If this function is called while there are already plugins loaded, all existing plugins are unloaded first.
Property Details¶
- Infinoted.PluginManager.props.credentials¶
- Name:
credentials
- Type:
- Default Value:
- Flags:
The server’s TLS credentials
- Infinoted.PluginManager.props.directory¶
- Name:
directory
- Type:
- Default Value:
- Flags:
The infinote directory served by the server
- Infinoted.PluginManager.props.log¶
- Name:
log
- Type:
- Default Value:
- Flags:
The log object into which to write log messages