Infinoted.PluginManager

g GObject.Object GObject.Object Infinoted.PluginManager Infinoted.PluginManager GObject.Object->Infinoted.PluginManager

Subclasses:

None

Methods

Inherited:

GObject.Object (37)

Structs:

GObject.ObjectClass (5)

class

error_quark ()

class

new (directory, log, creds)

get_connection_info (plugin_info, connection)

get_credentials ()

get_directory ()

get_io ()

get_log ()

get_session_info (plugin_info, proxy)

load (plugin_path, plugins, options)

Virtual Methods

Inherited:

GObject.Object (7)

Properties

Name

Type

Flags

Short Description

credentials

Infinity.CertificateCredentials

r/w/co

The server’s TLS credentials

directory

Infinityd.Directory

r/w/co

The infinote directory served by the server

log

Infinoted.Log

r/w/co

The log object into which to write log messages

path

str

r

The path from which plugins are loaded

Signals

Inherited:

GObject.Object (1)

Fields

Inherited:

GObject.Object (1)

Name

Type

Access

Description

parent

GObject.Object

r

Class Details

class Infinoted.PluginManager(**kwargs)
Bases:

GObject.Object

Abstract:

No

Structure:

Infinoted.PluginManagerClass

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:

int

Returns the #GQuark for errors from the Infinoted.PluginManager module.

classmethod new(directory, log, creds)
Parameters:
Returns:

A new Infinoted.PluginManager.

Return type:

Infinoted.PluginManager

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 with Infinoted.PluginManager.load().

get_connection_info(plugin_info, connection)
Parameters:
Returns:

A pointer to the connection-specific plugin data, or None.

Return type:

object or None

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:

Infinity.CertificateCredentials

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:

Infinityd.Directory

Returns the Infinityd.Directory used by the plugin manager.

get_io()
Returns:

A Infinity.Io owned by the plugin manager.

Return type:

Infinity.Io

Returns the Infinity.Io of the Infinityd.Directory used by the plugin manager.

get_log()
Returns:

A Infinoted.Log owned by the plugin manager.

Return type:

Infinoted.Log

Returns the Infinoted.Log that the plugin manager and the plugins do write log messages to.

get_session_info(plugin_info, proxy)
Parameters:
Returns:

A pointer to the session-specific plugin data, or None.

Return type:

object or None

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] or None) – A list of plugins to load, or None.

  • options (GLib.KeyFile) – A GLib.KeyFile with configuration options for the plugins.

Raises:

GLib.Error

Returns:

True on success or False on error.

Return type:

bool

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 is None, 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:

Infinity.CertificateCredentials

Default Value:

None

Flags:

READABLE, WRITABLE, CONSTRUCT_ONLY

The server’s TLS credentials

Infinoted.PluginManager.props.directory
Name:

directory

Type:

Infinityd.Directory

Default Value:

None

Flags:

READABLE, WRITABLE, CONSTRUCT_ONLY

The infinote directory served by the server

Infinoted.PluginManager.props.log
Name:

log

Type:

Infinoted.Log

Default Value:

None

Flags:

READABLE, WRITABLE, CONSTRUCT_ONLY

The log object into which to write log messages

Infinoted.PluginManager.props.path
Name:

path

Type:

str

Default Value:

None

Flags:

READABLE

The path from which plugins are loaded