LdmPlugin

LdmPlugin — Find providers for the hardware

Functions

Properties

gchar * name Read / Write
gint priority Read / Write

Types and Values

Object Hierarchy

    GObject
    ╰── GInitiallyUnowned
        ╰── LdmPlugin
            ╰── LdmModaliasPlugin

Description

An LdmPlugin is used to find potential software that the user should have present or install to facilitate some hardware support.

The base LdmPlugin implementation does nothing by itself, and must be extended to be useful.

Functions

ldm_plugin_get_name ()

const gchar *
ldm_plugin_get_name (LdmPlugin *plugin);

Get the name of this plugin

Returns

Name for this plugin.

[transfer none]


ldm_plugin_set_name ()

void
ldm_plugin_set_name (LdmPlugin *plugin,
                     const gchar *name);

Set the name of the plugin

Parameters

name

New name for this plugin.

[transfer none]

ldm_plugin_get_priority ()

gint
ldm_plugin_get_priority (LdmPlugin *plugin);

Get the set priority of this plugin

Returns

Plugin priority.


ldm_plugin_set_priority ()

void
ldm_plugin_set_priority (LdmPlugin *plugin,
                         gint priority);

Set the plugin priority, useful for sorting.

Parameters

priority

New priority for the plugin

 

ldm_plugin_get_provider ()

LdmProvider *
ldm_plugin_get_provider (LdmPlugin *self,
                         LdmDevice *device);

Virtual method that must be overridden by plugin implementations to provide the required LdmProvider solution for the given hardware.

This may return NULL if the plugin doesn't support the given device.

Returns

A new LdmProvider if possible.

[transfer full][nullable]

Types and Values

struct LdmPluginClass

struct LdmPluginClass {
        GInitiallyUnownedClass parent_class;

        LdmProvider *(*get_provider)(LdmPlugin *plugin, LdmDevice *device);
};

Members

get_provider ()

Virtual get_provider function

 

Property Details

The “name” property

  “name”                     gchar *

The display name for this plugin

Flags: Read / Write

Default value: NULL


The “priority” property

  “priority”                 gint

Priority for this plugin implementation. This can be useful in cases where multiple plugins match some hardware, and the implementation can opt to use the highest priority plugin (i.e. multiple nvidia providers)

Flags: Read / Write

Allowed values: [0,1000]

Default value: 0

See Also

LdmDevice, LdmModaliasPlugin