Class

PurpleProtocol

since: 3.0.0

Description [src]

abstract class Purple.Protocol : GObject.Object {
  parent_instance: GObject
}

PurpleProtocol is the base type for all protocols in libpurple.

Available since: 3.0.0

Ancestors

Functions

purple_protocol_change_account_status

Informs the server that our account’s status changed.

purple_protocol_get_media_caps

Determines if the contact supports the given media session type.

purple_protocol_get_statuses

Retrieves the list of stock status types from a protocol.

purple_protocol_got_media_caps

Signals that the protocol received capabilities for the given contact.

purple_protocol_got_user_idle

Notifies Purple that a buddy’s idle state and time have changed.

purple_protocol_got_user_status

Notifies Purple that a buddy’s status has been activated.

purple_protocol_got_user_status_deactive

Notifies libpurple that a buddy’s status has been deactivated.

purple_protocol_got_user_status_with_attributes

Notifies Purple that a buddy’s status has been activated.

since: 3.0.0

purple_protocol_initiate_media

Initiates a media session with the given contact.

Instance methods

purple_protocol_can_connect_async

Asks protocol if it can determine if account can be connected.

since: 3.0.0

purple_protocol_can_connect_finish

This should be called from the callback of purple_protocol_can_connect_async() to get the result of the call.

since: 3.0.0

purple_protocol_close

Closes connection using protocol.

since: 3.0.0

purple_protocol_create_connection

Creates a PurpleConnection for account.

since: 3.0.0

purple_protocol_get_account_options

Gets the account options for a protocol.

since: 3.0.0

purple_protocol_get_description

Gets the description of a protocol.

since: 3.0.0

purple_protocol_get_icon_name

Gets the name of the icon that the protocol made available via either purple_protocol_get_icon_search_path() or purple_protocol_get_resource_path().

since: 3.0.0

purple_protocol_get_icon_resource_path

Gets the icon resource path for protocol. This is used to make icons that have been embedded into a plugin available to libpurple. The returned value should be the path of where the icons are in the resource. See gtk_icon_theme_add_resource_path() for additional information.

since: 3.0.0

purple_protocol_get_icon_search_path

Gets the icon search path for protocol. This is used to allow protocol plugins to install their icons in any XDG icon theme compliant directory. The returned value should be the path of where the icons are on disk. See gtk_icon_theme_add_search_path() for additional information.

since: 3.0.0

purple_protocol_get_icon_spec

Gets the icon spec of a protocol.

since: 3.0.0

purple_protocol_get_id

Gets the ID of a protocol.

since: 3.0.0

purple_protocol_get_name

Gets the translated name of a protocol.

since: 3.0.0

purple_protocol_get_options

Gets the options of a protocol.

since: 3.0.0

purple_protocol_get_status_types

Gets all of the PurpleStatusTypes for account which uses protocol.

since: 3.0.0

purple_protocol_get_user_splits

Gets the user splits of a protocol.

since: 3.0.0

purple_protocol_get_whiteboard_ops

Gets the whiteboard ops of a protocol.

since: 3.0.0

purple_protocol_login

Logs account in to protocol.

since: 3.0.0

Methods inherited from GObject (43)

Please see GObject for a full list of methods.

Properties

Purple.Protocol:description

The description to show in user interface for the protocol.

since: 3.0.0

Purple.Protocol:icon-name

The name of an icon that has been installed to either the path specified via PurpleProtocol::icon-search-path or PurpleProtocol::icon-resource-path.

since: 3.0.0

Purple.Protocol:icon-resource-path

A GResource path which contains the icons for the protocol. See purple_protocol_get_icon_resource_path() for more information.

since: 3.0.0

Purple.Protocol:icon-search-path

The path to an XDG Icon Theme directory which contains the icons for the protocol. See purple_protocol_get_icon_search_path() for more information.

since: 3.0.0

Purple.Protocol:id

The identifier for the protocol.

since: 3.0.0

Purple.Protocol:name

The name to show in user interface for the protocol.

since: 3.0.0

Purple.Protocol:options

The PurpleProtocolOptions for the protocol.

since: 3.0.0

Signals

Signals inherited from GObject (1)
GObject::notify

The notify signal is emitted on an object when one of its properties has its value set through g_object_set_property(), g_object_set(), et al.

Class structure

struct PurpleProtocolClass {
  GObjectClass parent_class;
  GList* (* get_user_splits) (
    PurpleProtocol* protocol
  );
  GList* (* get_account_options) (
    PurpleProtocol* protocol
  );
  PurpleBuddyIconSpec* (* get_buddy_icon_spec) (
    PurpleProtocol* protocol
  );
  PurpleWhiteboardOps* (* get_whiteboard_ops) (
    PurpleProtocol* protocol
  );
  void (* login) (
    PurpleProtocol* protocol,
    PurpleAccount* account
  );
  void (* close) (
    PurpleProtocol* protocol,
    PurpleConnection* connection
  );
  void (* can_connect_async) (
    PurpleProtocol* protocol,
    PurpleAccount* account,
    GCancellable* cancellable,
    GAsyncReadyCallback callback,
    gpointer data
  );
  gboolean (* can_connect_finish) (
    PurpleProtocol* protocol,
    GAsyncResult* result,
    GError** error
  );
  PurpleConnection* (* create_connection) (
    PurpleProtocol* protocol,
    PurpleAccount* account,
    const char* password,
    GError** error
  );
  GList* (* status_types) (
    PurpleProtocol* protocol,
    PurpleAccount* account
  );
  
}

The base class for all protocols.

All protocol types must implement the methods in this class.

Class members
parent_class: GObjectClass
No description available.
get_user_splits: GList* (* get_user_splits) ( PurpleProtocol* protocol )
No description available.
get_account_options: GList* (* get_account_options) ( PurpleProtocol* protocol )
No description available.
get_buddy_icon_spec: PurpleBuddyIconSpec* (* get_buddy_icon_spec) ( PurpleProtocol* protocol )
No description available.
get_whiteboard_ops: PurpleWhiteboardOps* (* get_whiteboard_ops) ( PurpleProtocol* protocol )
No description available.
login: void (* login) ( PurpleProtocol* protocol, PurpleAccount* account )
No description available.
close: void (* close) ( PurpleProtocol* protocol, PurpleConnection* connection )
No description available.
can_connect_async: void (* can_connect_async) ( PurpleProtocol* protocol, PurpleAccount* account, GCancellable* cancellable, GAsyncReadyCallback callback, gpointer data )
No description available.
can_connect_finish: gboolean (* can_connect_finish) ( PurpleProtocol* protocol, GAsyncResult* result, GError** error )
No description available.
create_connection: PurpleConnection* (* create_connection) ( PurpleProtocol* protocol, PurpleAccount* account, const char* password, GError** error )
No description available.
status_types: GList* (* status_types) ( PurpleProtocol* protocol, PurpleAccount* account )
No description available.

Virtual methods

Purple.ProtocolClass.can_connect_async

Asks protocol if it can determine if account can be connected.

since: 3.0.0

Purple.ProtocolClass.can_connect_finish

This should be called from the callback of purple_protocol_can_connect_async() to get the result of the call.

since: 3.0.0

Purple.ProtocolClass.close

Closes connection using protocol.

since: 3.0.0

Purple.ProtocolClass.create_connection

Creates a PurpleConnection for account.

since: 3.0.0

Purple.ProtocolClass.get_account_options

Gets the account options for a protocol.

since: 3.0.0

Purple.ProtocolClass.get_buddy_icon_spec
No description available.

Purple.ProtocolClass.get_user_splits

Gets the user splits of a protocol.

since: 3.0.0

Purple.ProtocolClass.get_whiteboard_ops

Gets the whiteboard ops of a protocol.

since: 3.0.0

Purple.ProtocolClass.login

Logs account in to protocol.

since: 3.0.0

Purple.ProtocolClass.status_types
No description available.