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.PluginManageris an opaque data type. You should only access it via the public API functions.- classmethod error_quark()¶
- Returns:
The error domain for the
Infinoted.PluginManagermodule.- Return type:
Returns the #GQuark for errors from the
Infinoted.PluginManagermodule.
- classmethod new(directory, log, creds)¶
- Parameters:
directory (
Infinityd.Directory) – TheInfinityd.Directoryon which plugins should operate.log (
Infinoted.Log) – TheInfinoted.Logto write log messages to.creds (
Infinity.CertificateCredentialsorNone) – TheInfinity.CertificateCredentialsused to secure data transfer with the clients, orNone.
- Returns:
A new
Infinoted.PluginManager.- Return type:
Creates a new
Infinoted.PluginManagerwith 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 (
objectorNone) – The plugin_info pointer of a plugin instance.connection (
Infinity.XmlConnection) – TheInfinity.XmlConnectionfor 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
Noneif no such object exists, i.e. when the plugin’s connection_info_size is set to 0.
- get_credentials()¶
- Returns:
A
Infinity.CertificateCredentialsobject owned by the plugin manager.- Return type:
Returns the
Infinity.CertificateCredentialsused for securing the data transfer with all clients.
- get_directory()¶
- Returns:
A
Infinityd.Directoryowned by the plugin manager.- Return type:
Returns the
Infinityd.Directoryused by the plugin manager.
- get_io()¶
- Returns:
A
Infinity.Ioowned by the plugin manager.- Return type:
Returns the
Infinity.Ioof theInfinityd.Directoryused by the plugin manager.
- get_log()¶
- Returns:
A
Infinoted.Logowned by the plugin manager.- Return type:
Returns the
Infinoted.Logthat the plugin manager and the plugins do write log messages to.
- get_session_info(plugin_info, proxy)¶
- Parameters:
plugin_info (
objectorNone) – The plugin_info pointer of a plugin instance.proxy (
Infinity.SessionProxy) – TheInfinity.SessionProxyfor 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
Noneif 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.KeyFilewith 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