Function

PurpleCmdFunc

since: 2.0

Declaration

PurpleCmdRet
(* PurpleCmdFunc) (
  PurpleConversation* conversation,
  const gchar* cmd,
  gchar** args,
  gchar** error,
  void* data
)

Description [src]

A function implementing a command, as passed to purple_cmd_register().

Available since: 2.0

Parameters

conversation

Type: PurpleConversation

The PurpleConversation where the command is being run.

The data is owned by the caller of the function.
cmd

Type: const gchar*

The name of the command.

The data is owned by the caller of the function.
The value is a NUL terminated UTF-8 string.
args

Type: gchar**

The arguments to the command.

The data is owned by the caller of the function.
The value is a NUL terminated UTF-8 string.
error

Type: gchar**

A return address for a GError.

The argument will be set by the function.
The called function takes ownership of the data, and is responsible for freeing it.
The value is a NUL terminated UTF-8 string.
data

Type: void*

User data to pass to the function.

The argument can be NULL.
The data is owned by the caller of the function.

Return value

Type: PurpleCmdRet

The result of the command.