30 #ifndef _PURPLE_PRPL_H_ 31 #define _PURPLE_PRPL_H_ 65 #define NO_BUDDY_ICONS {NULL, 0, 0, 0, 0, 0, 0} 264 void (*tooltip_text)(
PurpleBuddy *buddy, PurpleNotifyUserInfo *user_info, gboolean full);
307 void (*close)(PurpleConnection *);
318 int (*send_im)(PurpleConnection *,
const char *who,
322 void (*set_info)(PurpleConnection *,
const char *info);
337 void (*get_info)(PurpleConnection *,
const char *who);
338 void (*set_status)(
PurpleAccount *account, PurpleStatus *status);
340 void (*set_idle)(PurpleConnection *,
int idletime);
341 void (*change_passwd)(PurpleConnection *,
const char *old_pass,
342 const char *new_pass);
355 void (*add_buddies)(PurpleConnection *, GList *buddies, GList *groups);
357 void (*remove_buddies)(PurpleConnection *, GList *buddies, GList *groups);
358 void (*add_permit)(PurpleConnection *,
const char *name);
359 void (*add_deny)(PurpleConnection *,
const char *name);
360 void (*rem_permit)(PurpleConnection *,
const char *name);
361 void (*rem_deny)(PurpleConnection *,
const char *name);
362 void (*set_permit_deny)(PurpleConnection *);
374 void (*join_chat)(PurpleConnection *, GHashTable *components);
382 void (*reject_chat)(PurpleConnection *, GHashTable *components);
391 char *(*get_chat_name)(GHashTable *components);
401 void (*chat_invite)(PurpleConnection *,
int id,
402 const char *message,
const char *who);
408 void (*chat_leave)(PurpleConnection *,
int id);
417 void (*chat_whisper)(PurpleConnection *,
int id,
418 const char *who,
const char *message);
444 void (*keepalive)(PurpleConnection *);
452 void (*get_cb_info)(PurpleConnection *, int,
const char *who);
457 void (*get_cb_away)(PurpleConnection *, int,
const char *who);
460 void (*alias_buddy)(PurpleConnection *,
const char *who,
464 void (*group_buddy)(PurpleConnection *,
const char *who,
465 const char *old_group,
const char *new_group);
468 void (*rename_group)(PurpleConnection *,
const char *old_name,
473 void (*convo_closed)(PurpleConnection *,
const char *who);
489 void (*remove_group)(PurpleConnection *gc,
PurpleGroup *group);
500 char *(*get_cb_real_name)(PurpleConnection *gc,
int id,
const char *who);
502 void (*set_chat_topic)(PurpleConnection *gc,
int id,
const char *topic);
504 PurpleChat *(*find_blist_chat)(PurpleAccount *account,
const char *name);
512 gboolean (*can_receive_file)(PurpleConnection *,
const char *who);
513 void (*send_file)(PurpleConnection *,
const char *who,
const char *filename);
514 PurpleXfer *(*new_xfer)(PurpleConnection *,
const char *who);
525 int (*send_raw)(PurpleConnection *gc,
const char *buf,
int len);
537 void (*unregister_user)(PurpleAccount *, PurpleAccountUnregistrationCb cb,
void *user_data);
540 gboolean (*send_attention)(PurpleConnection *gc,
const char *username, guint type);
541 GList *(*get_attention_types)(PurpleAccount *acct);
573 GHashTable *(*get_account_text_table)(PurpleAccount *account);
583 gboolean (*initiate_media)(PurpleAccount *account,
const char *who,
584 PurpleMediaSessionType type);
593 PurpleMediaCaps (*get_media_caps)(PurpleAccount *account,
621 void (*set_public_alias)(PurpleConnection *gc,
const char *alias,
622 PurpleSetPublicAliasSuccessCallback success_cb,
623 PurpleSetPublicAliasFailureCallback failure_cb);
638 void (*get_public_alias)(PurpleConnection *gc,
639 PurpleGetPublicAliasSuccessCallback success_cb,
640 PurpleGetPublicAliasFailureCallback failure_cb);
655 void (*add_buddies_with_invite)(PurpleConnection *pc, GList *buddies, GList *groups,
const char *message);
668 char *(*get_cb_alias)(PurpleConnection *gc,
int id,
const char *who);
671 #define PURPLE_PROTOCOL_PLUGIN_HAS_FUNC(prpl, member) \ 672 (((G_STRUCT_OFFSET(PurplePluginProtocolInfo, member) < G_STRUCT_OFFSET(PurplePluginProtocolInfo, struct_size)) \ 673 || (G_STRUCT_OFFSET(PurplePluginProtocolInfo, member) < prpl->struct_size)) && \ 674 prpl->member != NULL) 677 #define PURPLE_IS_PROTOCOL_PLUGIN(plugin) \ 678 ((plugin)->info->type == PURPLE_PLUGIN_PROTOCOL) 680 #define PURPLE_PLUGIN_PROTOCOL_INFO(plugin) \ 681 ((PurplePluginProtocolInfo *)(plugin)->info->extra_info) 706 const char *inc_desc,
const char *out_desc);
846 const char *status_id, ...) G_GNUC_NULL_TERMINATED;
876 gboolean idle, time_t idle_time);
902 const char *status_id, ...) G_GNUC_NULL_TERMINATED;
914 const char *status_id);
925 PurpleStatus *old_status,
926 PurpleStatus *new_status);
1001 PurpleMediaSessionType type);
1035 #undef PURPLE_PROTOCOL_PLUGIN_HAS_FUNC 1036 #define PURPLE_PROTOCOL_PLUGIN_HAS_FUNC(prpl, member) (prpl->member != NULL)
const char * label
User-friendly name of the entry.
PurpleMessageFlags
Flags applicable to a message.
PurpleAttentionType * purple_attention_type_new(const char *ulname, const char *name, const char *inc_desc, const char *out_desc)
Creates a new PurpleAttentionType object and sets its mandatory parameters.
const char * purple_attention_type_get_outgoing_desc(const PurpleAttentionType *type)
Get the attention type's description shown when the event is sent.
PurpleProtocolOptions
Protocol options.
size_t max_filesize
Maximum size in bytes.
void purple_prpl_got_user_status_deactive(PurpleAccount *account, const char *name, const char *status_id)
Notifies libpurple that a buddy's status has been deactivated.
PurpleMediaCaps purple_prpl_get_media_caps(PurpleAccount *account, const char *who)
Determines if the contact supports the given media session type.
struct _PurpleStoredImage PurpleStoredImage
A set of utility functions that provide a reference-counted immutable wrapper around an image's data ...
void purple_prpl_got_media_caps(PurpleAccount *account, const char *who)
Signals that the prpl received capabilities for the given contact.
GList * user_splits
A GList of PurpleAccountUserSplit.
void purple_prpl_got_account_status(PurpleAccount *account, const char *status_id,...) G_GNUC_NULL_TERMINATED
Notifies Purple that our account's status has changed.
const char * purple_attention_type_get_name(const PurpleAttentionType *type)
Get the attention type's name as displayed by the UI.
unsigned long struct_size
The size of the PurplePluginProtocolInfo.
const char * name
Shown in GUI elements.
void purple_prpl_got_user_login_time(PurpleAccount *account, const char *name, time_t login_time)
Notifies Purple of a buddy's log-in time.
const char * purple_attention_type_get_icon_name(const PurpleAttentionType *type)
Get the attention type's icon name.
Structure representing an account.
void purple_prpl_send_attention(PurpleConnection *gc, const char *who, guint type_code)
Send an attention request message.
void purple_attention_type_set_outgoing_desc(PurpleAttentionType *type, const char *desc)
Sets the description of the attention-demanding event shown in conversations when the event is sent...
void purple_prpl_got_attention(PurpleConnection *gc, const char *who, guint type_code)
Process an incoming attention message.
We scale the icon when we display it.
Set the Register button active even when the username has not been specified.
PurpleTypingState
The typing state of a user.
void purple_prpl_got_account_login_time(PurpleAccount *account, time_t login_time)
Notifies Purple of our account's log-in time.
PurpleProtocolOptions options
Protocol options.
void purple_prpl_got_attention_in_chat(PurpleConnection *gc, int id, const char *who, guint type_code)
Process an incoming attention message in a chat.
gboolean required
True if it's required.
gboolean purple_prpl_initiate_media(PurpleAccount *account, const char *who, PurpleMediaSessionType type)
Initiates a media session with the given contact.
Indicates that this protocol supports creating invisible buddies for reporting presence/alias of IM p...
Allow passwords to be optional.
void purple_prpl_got_account_idle(PurpleAccount *account, gboolean idle, time_t idle_time)
Notifies Purple that our account's idle state and time have changed.
A protocol plugin information structure.
We scale the icon before we send it to the server.
Represents an entry containing information that must be supplied by the user when joining a chat...
Don't require passwords for sign-in.
int max_height
Maximum height of this icon.
Indicates that slash commands are native to this protocol.
Represents "nudges" and "buzzes" that you may send to a buddy to attract their attention (or vice-ver...
PurpleBuddyIconSpec icon_spec
The icon spec.
const char * purple_attention_type_get_unlocalized_name(const PurpleAttentionType *type)
Get the attention type's unlocalized name; this is useful for some UIs.
const char * incoming_description
Shown when sent.
PurpleWhiteboard PRPL Operations.
PurplePlugin * purple_find_prpl(const char *id)
Finds a protocol plugin structure of the specified type.
void purple_attention_type_set_incoming_desc(PurpleAttentionType *type, const char *desc)
Sets the description of the attention-demanding event shown in conversations when the event is receiv...
GList * protocol_options
A GList of PurpleAccountOption.
const char * icon_name
Icon to display (optional)
char * format
This is a comma-delimited list of image formats or NULL if icons are not supported.
Indicates that this protocol supports sending a user-supplied message along with an invitation...
int max_width
Maximum width of this icon.
int max
Maximum value in case of integer.
int min
Minimum value in case of integer.
Status APIA brief explanation of the status API:
GList * purple_prpl_get_statuses(PurpleAccount *account, PurplePresence *presence)
Retrieves the list of stock status types from a prpl.
PurpleIconScaleRules scale_rules
How to stretch this icon.
void purple_prpl_change_account_status(PurpleAccount *account, PurpleStatus *old_status, PurpleStatus *new_status)
Informs the server that our account's status changed.
A description of a Buddy Icon specification.
void purple_prpl_got_user_status(PurpleAccount *account, const char *name, const char *status_id,...) G_GNUC_NULL_TERMINATED
Notifies Purple that a buddy's status has been activated.
int min_width
Minimum width of this icon.
User names are unique to a chat and are not shared between rooms.
The PurpleWhiteboard core object.
void purple_attention_type_set_name(PurpleAttentionType *type, const char *name)
Sets the displayed name of the attention-demanding event.
const char * purple_attention_type_get_incoming_desc(const PurpleAttentionType *type)
Get the attention type's description shown when the event is received.
gboolean secret
True if the entry is secret (password)
const char * outgoing_description
Shown when receied.
int min_height
Minimum height of this icon.
const char * unlocalized_name
Unlocalized name for UIs needing it.
void purple_attention_type_set_unlocalized_name(PurpleAttentionType *type, const char *ulname)
Sets the unlocalized name of the attention event; some UIs may need this, thus it is required...
Allows font size to be specified in sane point size.
void purple_attention_type_set_icon_name(PurpleAttentionType *type, const char *name)
Sets the name of the icon to display for the attention event; this is optional.
void purple_prpl_got_user_idle(PurpleAccount *account, const char *name, gboolean idle, time_t idle_time)
Notifies Purple that a buddy's idle state and time have changed.
struct _PurpleThumbnailSpec PurpleThumbnailSpec
A description of a file transfer thumbnail specification.
gboolean is_int
True if the entry expects an integer.
A core representation of a file transfer.
void purple_prpl_got_account_actions(PurpleAccount *account)
Notifies Purple that our account's actions have changed.
const char * identifier
Used by the PRPL to identify the option.