Class

PurpleCommandManager

unstable since: 3.0

[]

Description [src]

final class Purple.CommandManager : GObject.Object
  implements Gio.ListModel {
  /* No available fields */
}

A manager of PurpleCommand objects.

libpurple, user interfaces, and plugins can manage the commands that are available with purple_command_manager_add() and purple_command_manager_remove().

User interfaces can use purple_command_manager_find_and_execute() to quickly find and execute a command. They can also use purple_command_manager_find_all() to get a list of all commands which can be presented to a user.

Both purple_command_manager_find() and purple_command_manager_find_all() take an optional PurpleConversation parameter. If it is not NULL, its PurpleConversation:tags property will be searched with purple_tags_contains() using the PurpleCommand:tags as the needle to determine which commands are available for the PurpleConversation.

When plugins are being unloaded, they should call purple_command_manager_remove_all_with_source() to remove their commands.

Available since: 3.0

[]

Ancestors

[]

Implements

[]

Constructors

purple_command_manager_new

Creates a new instance.

unstable since: 3.0

[]

Functions

purple_command_manager_get_default

Gets the default instance that libpurple is using.

unstable since: 3.0

purple_command_manager_get_default_as_model

Gets the default instance of the manager but cast to GListModel.

unstable since: 3.0

[]

Instance methods

purple_command_manager_add

Adds command to manager.

unstable since: 3.0

purple_command_manager_find

Finds the command with a name of name with the highest priority.

unstable since: 3.0

purple_command_manager_find_all

Finds all commands that match name in manager.

unstable since: 3.0

purple_command_manager_find_and_execute

Attempts to find a PurpleCommand in manager and execute it.

unstable since: 3.0

purple_command_manager_get_commands_for_conversation

Gets a list of PurpleCommands that are available for conversation.

unstable since: 3.0

purple_command_manager_remove

Attempts to remove the first command with name and source from manager.

purple_command_manager_remove_all_with_source

Removes all commands from manager that have a source of source.

unstable since: 3.0

Methods inherited from GObject (43)
Methods inherited from GListModel (5)
[]

Signals

Signals inherited from GObject (1)
Signals inherited from GListModel (1)

Class structure