_PurplePluginProtocolInfo Struct Reference

A protocol plugin information structure. More...

#include <prpl.h>

Collaboration diagram for _PurplePluginProtocolInfo:

Collaboration graph
[legend]

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)
 This must be implemented, and must add at least the offline and online states.
GList *(* blist_node_menu )(PurpleBlistNode *node)
GList *(* chat_info )(PurpleConnection *)
GHashTable *(* chat_info_defaults )(PurpleConnection *, const char *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)
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)
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)
void(* reject_chat )(PurpleConnection *, GHashTable *components)
char *(* get_chat_name )(GHashTable *components)
void(* chat_invite )(PurpleConnection *, int id, const char *message, const char *who)
void(* chat_leave )(PurpleConnection *, int id)
void(* chat_whisper )(PurpleConnection *, int id, const char *who, const char *message)
int(* chat_send )(PurpleConnection *, int id, const char *message, PurpleMessageFlags flags)
void(* keepalive )(PurpleConnection *)
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)
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)
PurpleWhiteboardPrplOpswhiteboard_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)
gboolean(* send_attention )(PurpleConnection *gc, const char *username, guint type)
GList *(* get_attention_types )(PurpleAccount *acct)
void(* _purple_reserved4 )(void)

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 this callbacks can be NULL. If a callback must be implemented, it has a comment indicating so.

Definition at line 192 of file prpl.h.


Field Documentation

PurpleProtocolOptions _PurplePluginProtocolInfo::options

Protocol options.

Definition at line 194 of file prpl.h.

PurpleBuddyIconSpec _PurplePluginProtocolInfo::icon_spec

The icon spec.

Definition at line 199 of file prpl.h.

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.

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

Gets a short string representing this buddy's status.

This will be shown on the buddy list.

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

This must be implemented.

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

This must be implemented.

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.

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.)

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.


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