pidgin: _PurplePluginProtocolInfo Struct Reference

pidgin 2.14.4

Loading...
Searching...
No Matches
Data Fields
_PurplePluginProtocolInfo Struct Reference

A protocol plugin information structure. More...

`#include <prpl.h>`

## Data Fields
PurpleProtocolOptions | options
| Protocol options.
GList * | user_splits
| A GList of PurpleAccountUserSplit.
GList * | protocol_options
| A GList of PurpleAccountOption
PurpleBuddyIconSpec | icon_spec
| The icon spec.
const char *(* | list_icon )(PurpleAccount *account, PurpleBuddy *buddy)
| Returns the base icon name for the given buddy and account.
const char *(* | list_emblem )(PurpleBuddy *buddy)
| Fills the four char**'s with string identifiers for "emblems" that the UI will interpret and display as relevant.
char *(* | status_text )(PurpleBuddy *buddy)
| Gets a short string representing this buddy's status.
void(* | tooltip_text )(PurpleBuddy *buddy, PurpleNotifyUserInfo *user_info, gboolean full)
| Allows the prpl to add text to a buddy's tooltip.
GList *(* | status_types )(PurpleAccount *account)
| Returns a list of PurpleStatusType which exist for this account; this must be implemented, and must add at least the offline and online states.
GList *(* | blist_node_menu )(PurpleBlistNode *node)
| Returns a list of PurpleMenuAction structs, which represent extra actions to be shown in (for example) the right-click menu for node.
GList *(* | chat_info )(PurpleConnection *)
| Returns a list of proto_chat_entry structs, which represent information required by the PRPL to join a chat.
GHashTable *(* | chat_info_defaults )(PurpleConnection *, const char *chat_name)
| Returns a hashtable which maps proto_chat_entry struct identifiers to default options as strings based on chat_name.
void(* | login )(PurpleAccount *)
| This must be implemented.
void(* | close )(PurpleConnection *)
| This must be implemented.
int(* | send_im )(PurpleConnection *, const char *who, const char *message, PurpleMessageFlags flags)
| This PRPL function should return a positive value on success.
void(* | set_info )(PurpleConnection *, const char *info)
unsigned int(* | send_typing )(PurpleConnection *, const char *name, PurpleTypingState state)
void(* | get_info )(PurpleConnection *, const char *who)
| Should arrange for purple_notify_userinfo() to be called with who's user info.
void(* | set_status )(PurpleAccount *account, PurpleStatus *status)
void(* | set_idle )(PurpleConnection *, int idletime)
void(* | change_passwd )(PurpleConnection *, const char *old_pass, const char *new_pass)
void(* | add_buddy )(PurpleConnection *, PurpleBuddy *buddy, PurpleGroup *group)
| Add a buddy to a group on the server.
void(* | add_buddies )(PurpleConnection *, GList *buddies, GList *groups)
void(* | remove_buddy )(PurpleConnection *, PurpleBuddy *buddy, PurpleGroup *group)
void(* | remove_buddies )(PurpleConnection *, GList *buddies, GList *groups)
void(* | add_permit )(PurpleConnection *, const char *name)
void(* | add_deny )(PurpleConnection *, const char *name)
void(* | rem_permit )(PurpleConnection *, const char *name)
void(* | rem_deny )(PurpleConnection *, const char *name)
void(* | set_permit_deny )(PurpleConnection *)
void(* | join_chat )(PurpleConnection *, GHashTable *components)
| Called when the user requests joining a chat.
void(* | reject_chat )(PurpleConnection *, GHashTable *components)
| Called when the user refuses a chat invitation.
char *(* | get_chat_name )(GHashTable *components)
| Returns a chat name based on the information in components.
void(* | chat_invite )(PurpleConnection *, int id, const char *message, const char *who)
| Invite a user to join a chat.
void(* | chat_leave )(PurpleConnection *, int id)
| Called when the user requests leaving a chat.
void(* | chat_whisper )(PurpleConnection *, int id, const char *who, const char *message)
| Send a whisper to a user in a chat.
int(* | chat_send )(PurpleConnection *, int id, const char *message, PurpleMessageFlags flags)
| Send a message to a chat.
void(* | keepalive )(PurpleConnection *)
| If implemented, this will be called regularly for this prpl's active connections.
void(* | register_user )(PurpleAccount *)
| new user registration
void(* | get_cb_info )(PurpleConnection *, int, const char *who)
void(* | get_cb_away )(PurpleConnection *, int, const char *who)
void(* | alias_buddy )(PurpleConnection *, const char *who, const char *alias)
| save/store buddy's alias on server list/roster
void(* | group_buddy )(PurpleConnection *, const char *who, const char *old_group, const char *new_group)
| change a buddy's group on a server list/roster
void(* | rename_group )(PurpleConnection *, const char *old_name, PurpleGroup *group, GList *moved_buddies)
| rename a group on a server list/roster
void(* | buddy_free )(PurpleBuddy *)
void(* | convo_closed )(PurpleConnection *, const char *who)
const char *(* | normalize )(const PurpleAccount *, const char *who)
| Convert the username who to its canonical form.
void(* | set_buddy_icon )(PurpleConnection *, PurpleStoredImage *img)
| Set the buddy icon for the given connection to img.
void(* | remove_group )(PurpleConnection *gc, PurpleGroup *group)
char *(* | get_cb_real_name )(PurpleConnection *gc, int id, const char *who)
| Gets the real name of a participant in a chat.
void(* | set_chat_topic )(PurpleConnection *gc, int id, const char *topic)
PurpleChat *(* | find_blist_chat )(PurpleAccount *account, const char *name)
PurpleRoomlist *(* | roomlist_get_list )(PurpleConnection *gc)
void(* | roomlist_cancel )(PurpleRoomlist *list)
void(* | roomlist_expand_category )(PurpleRoomlist *list, PurpleRoomlistRoom *category)
gboolean(* | can_receive_file )(PurpleConnection *, const char *who)
void(* | send_file )(PurpleConnection *, const char *who, const char *filename)
PurpleXfer *(* | new_xfer )(PurpleConnection *, const char *who)
gboolean(* | offline_message )(const PurpleBuddy *buddy)
| Checks whether offline messages to buddy are supported.
PurpleWhiteboardPrplOps * | whiteboard_prpl_ops
int(* | send_raw )(PurpleConnection *gc, const char *buf, int len)
| For use in plugins that may understand the underlying protocol.
char *(* | roomlist_room_serialize )(PurpleRoomlistRoom *room)
void(* | unregister_user )(PurpleAccount *, PurpleAccountUnregistrationCb cb, void *user_data)
| Remove the user from the server.
gboolean(* | send_attention )(PurpleConnection *gc, const char *username, guint type)
GList *(* | get_attention_types )(PurpleAccount *acct)
unsigned long | struct_size
| The size of the PurplePluginProtocolInfo.
GHashTable *(* | get_account_text_table )(PurpleAccount *account)
| This allows protocols to specify additional strings to be used for various purposes.
gboolean(* | initiate_media )(PurpleAccount *account, const char *who, PurpleMediaSessionType type)
| Initiate a media session with the given contact.
PurpleMediaCaps(* | get_media_caps )(PurpleAccount *account, const char *who)
| Checks to see if the given contact supports the given type of media session.
PurpleMood *(* | get_moods )(PurpleAccount *account)
| Returns an array of "PurpleMood"s, with the last one having "mood" set to `NULL`.
void(* | set_public_alias )(PurpleConnection *gc, const char *alias, PurpleSetPublicAliasSuccessCallback success_cb, PurpleSetPublicAliasFailureCallback failure_cb)
| Set the user's "friendly name" (or alias or nickname or whatever term you want to call it) on the server.
void(* | get_public_alias )(PurpleConnection *gc, PurpleGetPublicAliasSuccessCallback success_cb, PurpleGetPublicAliasFailureCallback failure_cb)
| Retrieve the user's "friendly name" as set on the server.
void(* | add_buddy_with_invite )(PurpleConnection *pc, PurpleBuddy *buddy, PurpleGroup *group, const char *message)
| Add a buddy to a group on the server.
void(* | add_buddies_with_invite )(PurpleConnection *pc, GList *buddies, GList *groups, const char *message)
char *(* | get_cb_alias )(PurpleConnection *gc, int id, const char *who)
| Get the display alias of a participant in a chat.
gboolean(* | chat_can_receive_file )(PurpleConnection *, int id)
| Determine whether a chat can receive a file.
void(* | chat_send_file )(PurpleConnection *, int id, const char *filename)
| Send a file to a chat room.

## Detailed Description

A protocol plugin information structure.

Every protocol plugin initializes this structure. It is the gateway between purple and the protocol plugin. Many of these callbacks can be NULL. If a callback must be implemented, it has a comment indicating so.

Definition at line 230 of file prpl.h.

## Field Documentation

## ◆ add_buddies

void(* _PurplePluginProtocolInfo::add_buddies) (PurpleConnection *, GList *buddies, GList *groups)

Definition at line 355 of file prpl.h.

## ◆ add_buddies_with_invite

void(* _PurplePluginProtocolInfo::add_buddies_with_invite) (PurpleConnection *pc, GList *buddies, GList *groups, const char *message)

Definition at line 655 of file prpl.h.

## ◆ add_buddy

void(* _PurplePluginProtocolInfo::add_buddy) (PurpleConnection *, PurpleBuddy *buddy, PurpleGroup *group)

Add a buddy to a group on the server.

This PRPL function may be called in situations in which the buddy is already in the specified group. If the protocol supports authorization and the user is not already authorized to see the status of buddy, add_buddy should request authorization.

Deprecated:
  Since 2.8.0, add_buddy_with_invite is preferred.

See also
  add_buddy_with_invite

Definition at line 354 of file prpl.h.

## ◆ add_buddy_with_invite

void(* _PurplePluginProtocolInfo::add_buddy_with_invite) (PurpleConnection *pc, PurpleBuddy *buddy, PurpleGroup *group, const char *message)

Add a buddy to a group on the server.

This PRPL function may be called in situations in which the buddy is already in the specified group. If the protocol supports authorization and the user is not already authorized to see the status of buddy, add_buddy should request authorization.

If authorization is required, then use the supplied invite message.

Since
  2.8.0

Definition at line 654 of file prpl.h.

## ◆ add_deny

void(* _PurplePluginProtocolInfo::add_deny) (PurpleConnection *, const char *name)

Definition at line 359 of file prpl.h.

## ◆ add_permit

void(* _PurplePluginProtocolInfo::add_permit) (PurpleConnection *, const char *name)

Definition at line 358 of file prpl.h.

## ◆ alias_buddy

void(* _PurplePluginProtocolInfo::alias_buddy) (PurpleConnection *, const char *who, const char *alias)

save/store buddy's alias on server list/roster

Definition at line 460 of file prpl.h.

## ◆ blist_node_menu

GList *(* _PurplePluginProtocolInfo::blist_node_menu) (PurpleBlistNode *node)

Returns a list of PurpleMenuAction structs, which represent extra actions to be shown in (for example) the right-click menu for node.

Definition at line 278 of file prpl.h.

## ◆ buddy_free

void(* _PurplePluginProtocolInfo::buddy_free) (PurpleBuddy *)

Definition at line 471 of file prpl.h.

## ◆ can_receive_file

gboolean(* _PurplePluginProtocolInfo::can_receive_file) (PurpleConnection *, const char *who)

Definition at line 512 of file prpl.h.

## ◆ change_passwd

void(* _PurplePluginProtocolInfo::change_passwd) (PurpleConnection *, const char *old_pass, const char *new_pass)

Definition at line 341 of file prpl.h.

## ◆ chat_can_receive_file

gboolean(* _PurplePluginProtocolInfo::chat_can_receive_file) (PurpleConnection *, int id)

Determine whether a chat can receive a file.

Parameters

  gc | the connection on which the room is.
  id | the ID of the chat room.

Returns
  whether it is OK to use chat_send_file() to send a file to this chat.

Since
  2.14.0

Definition at line 681 of file prpl.h.

## ◆ chat_info

GList *(* _PurplePluginProtocolInfo::chat_info) (PurpleConnection *)

Returns a list of proto_chat_entry structs, which represent information required by the PRPL to join a chat.

libpurple will call join_chat along with the information filled by the user.

Returns
  A list of proto_chat_entry structs

Definition at line 287 of file prpl.h.

## ◆ chat_info_defaults

GHashTable *(* _PurplePluginProtocolInfo::chat_info_defaults) (PurpleConnection *, const char *chat_name)

Returns a hashtable which maps proto_chat_entry struct identifiers to default options as strings based on chat_name.

The resulting hashtable should be created with g_hash_table_new_full(g_str_hash, g_str_equal, NULL, g_free);. Use get_chat_name if you instead need to extract a chat name from a hashtable.

Parameters

  chat_name | The chat name to be turned into components

Returns
  Hashtable containing the information extracted from chat_name

Definition at line 299 of file prpl.h.

## ◆ chat_invite

void(* _PurplePluginProtocolInfo::chat_invite) (PurpleConnection *, int id, const char *message, const char *who)

Invite a user to join a chat.

Parameters

  id | The id of the chat to invite the user to.
  message | A message displayed to the user when the invitation is received.
  who | The name of the user to send the invation to.

Definition at line 401 of file prpl.h.

## ◆ chat_leave

void(* _PurplePluginProtocolInfo::chat_leave) (PurpleConnection *, int id)

Called when the user requests leaving a chat.

Parameters

  id | The id of the chat to leave

Definition at line 408 of file prpl.h.

## ◆ chat_send

int(* _PurplePluginProtocolInfo::chat_send) (PurpleConnection *, int id, const char *message, PurpleMessageFlags flags)

Send a message to a chat.

This PRPL function should return a positive value on success. If the message is too big to be sent, return -E2BIG. If the account is not connected, return -ENOTCONN. If the PRPL is unable to send the message for another reason, return some other negative value. You can use one of the valid errno values, or just big something.

Parameters

  id | The id of the chat to send the message to.
  message | The message to send to the chat.
  flags | A bitwise OR of PurpleMessageFlags representing message flags.

Returns
  A positive number or 0 in case of success, a negative error number in case of failure.

Definition at line 436 of file prpl.h.

## ◆ chat_send_file

void(* _PurplePluginProtocolInfo::chat_send_file) (PurpleConnection *, int id, const char *filename)

Send a file to a chat room.

Parameters

  gc | the connection on which the room is.
  id | the ID of the chat room.
  filename | the file to be sent.

Since
  2.14.0

Definition at line 692 of file prpl.h.

## ◆ chat_whisper

void(* _PurplePluginProtocolInfo::chat_whisper) (PurpleConnection *, int id, const char *who, const char *message)

Send a whisper to a user in a chat.

Parameters

  id | The id of the chat.
  who | The name of the user to send the whisper to.
  message | The message of the whisper.

Definition at line 417 of file prpl.h.

## ◆ close

void(* _PurplePluginProtocolInfo::close) (PurpleConnection *)

This must be implemented.

Definition at line 307 of file prpl.h.

## ◆ convo_closed

void(* _PurplePluginProtocolInfo::convo_closed) (PurpleConnection *, const char *who)

Definition at line 473 of file prpl.h.

## ◆ find_blist_chat

PurpleChat *(* _PurplePluginProtocolInfo::find_blist_chat) (PurpleAccount *account, const char *name)

Definition at line 504 of file prpl.h.

## ◆ get_account_text_table

GHashTable *(* _PurplePluginProtocolInfo::get_account_text_table) (PurpleAccount *account)

This allows protocols to specify additional strings to be used for various purposes.

The idea is to stuff a bunch of strings in this hash table instead of expanding the struct for every addition. This hash table is allocated every call and MUST be unrefed by the caller.

Parameters

  account | The account to specify. This can be NULL.

Returns
  The protocol's string hash table. The hash table should be destroyed by the caller when it's no longer needed.

Definition at line 573 of file prpl.h.

## ◆ get_attention_types

GList *(* _PurplePluginProtocolInfo::get_attention_types) (PurpleAccount *acct)

Definition at line 541 of file prpl.h.

## ◆ get_cb_alias

char *(* _PurplePluginProtocolInfo::get_cb_alias) (PurpleConnection *gc, int id, const char *who)

Get the display alias of a participant in a chat.

Parameters

  gc | the connection on which the room is.
  id | the ID of the chat room.
  who | the nickname of the chat participant.

Returns
  the display alias of the participant. This string must be freed by the caller.

Since
  2.14.0

Definition at line 668 of file prpl.h.

## ◆ get_cb_away

void(* _PurplePluginProtocolInfo::get_cb_away) (PurpleConnection *, int, const char *who)

Deprecated:
  Use PurplePluginProtocolInfo.get_cb_real_name and PurplePluginProtocolInfo.status_text instead.

Definition at line 457 of file prpl.h.

## ◆ get_cb_info

void(* _PurplePluginProtocolInfo::get_cb_info) (PurpleConnection *, int, const char *who)

Deprecated:
  Use PurplePluginProtocolInfo.get_info instead.

Definition at line 452 of file prpl.h.

## ◆ get_cb_real_name

char *(* _PurplePluginProtocolInfo::get_cb_real_name) (PurpleConnection *gc, int id, const char *who)

Gets the real name of a participant in a chat.

For example, on XMPP this turns a chat room nick `foo` into `room@server/foo`

Parameters

  gc | the connection on which the room is.
  id | the ID of the chat room.
  who | the nickname of the chat participant.

Returns
  the real name of the participant. This string must be freed by the caller.

Definition at line 500 of file prpl.h.

## ◆ get_chat_name

char *(* _PurplePluginProtocolInfo::get_chat_name) (GHashTable *components)

Returns a chat name based on the information in components.

Use chat_info_defaults if you instead need to generate a hashtable from a chat name.

Parameters

  components | A hashtable containing information about the chat.

Definition at line 391 of file prpl.h.

## ◆ get_info

void(* _PurplePluginProtocolInfo::get_info) (PurpleConnection *, const char *who)

Should arrange for purple_notify_userinfo() to be called with who's user info.

Definition at line 337 of file prpl.h.

## ◆ get_media_caps

PurpleMediaCaps(* _PurplePluginProtocolInfo::get_media_caps) (PurpleAccount *account, const char *who)

Checks to see if the given contact supports the given type of media session.

Parameters

  account | The account the contact is on.
  who | The remote user to check for media capability with.

Returns
  The media caps the contact supports.

Definition at line 593 of file prpl.h.

## ◆ get_moods

PurpleMood *(* _PurplePluginProtocolInfo::get_moods) (PurpleAccount *account)

Returns an array of "PurpleMood"s, with the last one having "mood" set to `NULL`.

Since
  2.7.0

Definition at line 601 of file prpl.h.

## ◆ get_public_alias

void(* _PurplePluginProtocolInfo::get_public_alias) (PurpleConnection *gc, PurpleGetPublicAliasSuccessCallback success_cb, PurpleGetPublicAliasFailureCallback failure_cb)

Retrieve the user's "friendly name" as set on the server.

The protocol plugin should call success_cb or failure_cb asynchronously (even if it knows immediately that the get will fail, call one of the callbacks from an idle/0-second timeout) depending on if the nickname is retrieved.

Parameters

  gc | The connection for which to retireve the alias
  success_cb | Callback to be called with the retrieved alias
  failure_cb | Callback to be called if the prpl is unable to retrieve the alias

See also
  purple_account_get_public_alias

Since
  2.7.0

Definition at line 638 of file prpl.h.

## ◆ group_buddy

void(* _PurplePluginProtocolInfo::group_buddy) (PurpleConnection *, const char *who, const char *old_group, const char *new_group)

change a buddy's group on a server list/roster

Definition at line 464 of file prpl.h.

## ◆ icon_spec

PurpleBuddyIconSpec _PurplePluginProtocolInfo::icon_spec

The icon spec.

Definition at line 237 of file prpl.h.

## ◆ initiate_media

gboolean(* _PurplePluginProtocolInfo::initiate_media) (PurpleAccount *account, const char *who, PurpleMediaSessionType type)

Initiate a media session with the given contact.

Parameters

  account | The account to initiate the media session on.
  who | The remote user to initiate the session with.
  type | The type of media session to initiate.

Returns
  TRUE if the call succeeded else FALSE. (Doesn't imply the media session or stream will be successfully created)

Definition at line 583 of file prpl.h.

## ◆ join_chat

void(* _PurplePluginProtocolInfo::join_chat) (PurpleConnection *, GHashTable *components)

Called when the user requests joining a chat.

Should arrange for serv_got_joined_chat to be called.

Parameters

  components | A hashtable containing information required to join the chat as described by the entries returned by chat_info. It may also be called when accepting an invitation, in which case this matches the data parameter passed to serv_got_chat_invite.

Definition at line 374 of file prpl.h.

## ◆ keepalive

void(* _PurplePluginProtocolInfo::keepalive) (PurpleConnection *)

If implemented, this will be called regularly for this prpl's active connections.

You'd want to do this if you need to repeatedly send some kind of keepalive packet to the server to avoid being disconnected. ("Regularly" is defined by `KEEPALIVE_INTERVAL` in `libpurple/connection.c`.)

Definition at line 444 of file prpl.h.

## ◆ list_emblem

const char *(* _PurplePluginProtocolInfo::list_emblem) (PurpleBuddy *buddy)

Fills the four char**'s with string identifiers for "emblems" that the UI will interpret and display as relevant.

Definition at line 253 of file prpl.h.

## ◆ list_icon

const char *(* _PurplePluginProtocolInfo::list_icon) (PurpleAccount *account, PurpleBuddy *buddy)

Returns the base icon name for the given buddy and account.

If buddy is NULL and the account is non-NULL, it will return the name to use for the account's icon. If both are NULL, it will return the name to use for the protocol's icon.

This must be implemented.

Definition at line 247 of file prpl.h.

## ◆ login

void(* _PurplePluginProtocolInfo::login) (PurpleAccount *)

This must be implemented.

Definition at line 304 of file prpl.h.

## ◆ new_xfer

PurpleXfer *(* _PurplePluginProtocolInfo::new_xfer) (PurpleConnection *, const char *who)

Definition at line 514 of file prpl.h.

## ◆ normalize

const char *(* _PurplePluginProtocolInfo::normalize) (const PurpleAccount *, const char *who)

Convert the username who to its canonical form.

(For example, AIM treats "fOo BaR" and "foobar" as the same user; this function should return the same normalized string for both of those.)

Definition at line 480 of file prpl.h.

## ◆ offline_message

gboolean(* _PurplePluginProtocolInfo::offline_message) (const PurpleBuddy *buddy)

Checks whether offline messages to buddy are supported.

Returns
  `TRUE` if buddy can be sent messages while they are offline, or `FALSE` if not.

Definition at line 520 of file prpl.h.

## ◆ options

PurpleProtocolOptions _PurplePluginProtocolInfo::options

Protocol options.

Definition at line 232 of file prpl.h.

## ◆ protocol_options

GList* _PurplePluginProtocolInfo::protocol_options

A GList of PurpleAccountOption

Definition at line 235 of file prpl.h.

## ◆ register_user

void(* _PurplePluginProtocolInfo::register_user) (PurpleAccount *)

new user registration

Definition at line 447 of file prpl.h.

## ◆ reject_chat

void(* _PurplePluginProtocolInfo::reject_chat) (PurpleConnection *, GHashTable *components)

Called when the user refuses a chat invitation.

Parameters

  components | A hashtable containing information required to join the chat as passed to serv_got_chat_invite.

Definition at line 382 of file prpl.h.

## ◆ rem_deny

void(* _PurplePluginProtocolInfo::rem_deny) (PurpleConnection *, const char *name)

Definition at line 361 of file prpl.h.

## ◆ rem_permit

void(* _PurplePluginProtocolInfo::rem_permit) (PurpleConnection *, const char *name)

Definition at line 360 of file prpl.h.

## ◆ remove_buddies

void(* _PurplePluginProtocolInfo::remove_buddies) (PurpleConnection *, GList *buddies, GList *groups)

Definition at line 357 of file prpl.h.

## ◆ remove_buddy

void(* _PurplePluginProtocolInfo::remove_buddy) (PurpleConnection *, PurpleBuddy *buddy, PurpleGroup *group)

Definition at line 356 of file prpl.h.

## ◆ remove_group

void(* _PurplePluginProtocolInfo::remove_group) (PurpleConnection *gc, PurpleGroup *group)

Definition at line 489 of file prpl.h.

## ◆ rename_group

void(* _PurplePluginProtocolInfo::rename_group) (PurpleConnection *, const char *old_name, PurpleGroup *group, GList *moved_buddies)

rename a group on a server list/roster

Definition at line 468 of file prpl.h.

## ◆ roomlist_cancel

void(* _PurplePluginProtocolInfo::roomlist_cancel) (PurpleRoomlist *list)

Definition at line 508 of file prpl.h.

## ◆ roomlist_expand_category

void(* _PurplePluginProtocolInfo::roomlist_expand_category) (PurpleRoomlist *list, PurpleRoomlistRoom *category)

Definition at line 509 of file prpl.h.

## ◆ roomlist_get_list

PurpleRoomlist *(* _PurplePluginProtocolInfo::roomlist_get_list) (PurpleConnection *gc)

Definition at line 507 of file prpl.h.

## ◆ roomlist_room_serialize

char *(* _PurplePluginProtocolInfo::roomlist_room_serialize) (PurpleRoomlistRoom *room)

Definition at line 528 of file prpl.h.

## ◆ send_attention

gboolean(* _PurplePluginProtocolInfo::send_attention) (PurpleConnection *gc, const char *username, guint type)

Definition at line 540 of file prpl.h.

## ◆ send_file

void(* _PurplePluginProtocolInfo::send_file) (PurpleConnection *, const char *who, const char *filename)

Definition at line 513 of file prpl.h.

## ◆ send_im

int(* _PurplePluginProtocolInfo::send_im) (PurpleConnection *, const char *who, const char *message, PurpleMessageFlags flags)

This PRPL function should return a positive value on success.

If the message is too big to be sent, return -E2BIG. If the account is not connected, return -ENOTCONN. If the PRPL is unable to send the message for another reason, return some other negative value. You can use one of the valid errno values, or just big something. If the message should not be echoed to the conversation window, return 0.

Definition at line 318 of file prpl.h.

## ◆ send_raw

int(* _PurplePluginProtocolInfo::send_raw) (PurpleConnection *gc, const char *buf, int len)

For use in plugins that may understand the underlying protocol.

Definition at line 525 of file prpl.h.

## ◆ send_typing

unsigned int(* _PurplePluginProtocolInfo::send_typing) (PurpleConnection *, const char *name, PurpleTypingState state)

Returns
  If this protocol requires the PURPLE_TYPING message to be sent repeatedly to signify that the user is still typing, then the PRPL should return the number of seconds to wait before sending a subsequent notification. Otherwise the PRPL should return 0.

Definition at line 331 of file prpl.h.

## ◆ set_buddy_icon

void(* _PurplePluginProtocolInfo::set_buddy_icon) (PurpleConnection *, PurpleStoredImage *img)

Set the buddy icon for the given connection to img.

The prpl does NOT own a reference to img; if it needs one, it must purple_imgstore_ref(img) itself.

Definition at line 487 of file prpl.h.

## ◆ set_chat_topic

void(* _PurplePluginProtocolInfo::set_chat_topic) (PurpleConnection *gc, int id, const char *topic)

Definition at line 502 of file prpl.h.

## ◆ set_idle

void(* _PurplePluginProtocolInfo::set_idle) (PurpleConnection *, int idletime)

Definition at line 340 of file prpl.h.

## ◆ set_info

void(* _PurplePluginProtocolInfo::set_info) (PurpleConnection *, const char *info)

Definition at line 322 of file prpl.h.

## ◆ set_permit_deny

void(* _PurplePluginProtocolInfo::set_permit_deny) (PurpleConnection *)

Definition at line 362 of file prpl.h.

## ◆ set_public_alias

void(* _PurplePluginProtocolInfo::set_public_alias) (PurpleConnection *gc, const char *alias, PurpleSetPublicAliasSuccessCallback success_cb, PurpleSetPublicAliasFailureCallback failure_cb)

Set the user's "friendly name" (or alias or nickname or whatever term you want to call it) on the server.

The protocol plugin should call success_cb or failure_cb asynchronously (if it knows immediately that the set will fail, call one of the callbacks from an idle/0-second timeout) depending on if the nickname is set successfully.

Parameters

  gc | The connection for which to set an alias
  alias | The new server-side alias/nickname for this account, or NULL to unset the alias/nickname (or return it to a protocol-specific "default").
  success_cb | Callback to be called if the public alias is set
  failure_cb | Callback to be called if setting the public alias fails

See also
  purple_account_set_public_alias

Since
  2.7.0

Definition at line 621 of file prpl.h.

## ◆ set_status

void(* _PurplePluginProtocolInfo::set_status) (PurpleAccount *account, PurpleStatus *status)

Definition at line 338 of file prpl.h.

## ◆ status_text

char *(* _PurplePluginProtocolInfo::status_text) (PurpleBuddy *buddy)

Gets a short string representing this buddy's status.

This will be shown on the buddy list.

Definition at line 259 of file prpl.h.

## ◆ status_types

GList *(* _PurplePluginProtocolInfo::status_types) (PurpleAccount *account)

Returns a list of PurpleStatusType which exist for this account; this must be implemented, and must add at least the offline and online states.

Definition at line 271 of file prpl.h.

## ◆ struct_size

unsigned long _PurplePluginProtocolInfo::struct_size

The size of the PurplePluginProtocolInfo.

This should always be sizeof(PurplePluginProtocolInfo). This allows adding more functions to this struct without requiring a major version bump.

Definition at line 547 of file prpl.h.

## ◆ tooltip_text

void(* _PurplePluginProtocolInfo::tooltip_text) (PurpleBuddy *buddy, PurpleNotifyUserInfo *user_info, gboolean full)

Allows the prpl to add text to a buddy's tooltip.

Definition at line 264 of file prpl.h.

## ◆ unregister_user

void(* _PurplePluginProtocolInfo::unregister_user) (PurpleAccount *, PurpleAccountUnregistrationCb cb, void *user_data)

Remove the user from the server.

The account can either be connected or disconnected. After the removal is finished, the connection will stay open and has to be closed!

Definition at line 537 of file prpl.h.

## ◆ user_splits

GList* _PurplePluginProtocolInfo::user_splits

A GList of PurpleAccountUserSplit.

Definition at line 234 of file prpl.h.

## ◆ whiteboard_prpl_ops

PurpleWhiteboardPrplOps* _PurplePluginProtocolInfo::whiteboard_prpl_ops

Definition at line 522 of file prpl.h.

The documentation for this struct was generated from the following file:

- prpl.h