| ft.h | | ft.h | |
| | | | |
| skipping to change at line 163 | | skipping to change at line 163 | |
| size_t bytes_sent; /**< The number of bytes sent.
*/ | | size_t bytes_sent; /**< The number of bytes sent.
*/ | |
| size_t bytes_remaining; /**< The number of bytes remaining.
*/ | | size_t bytes_remaining; /**< The number of bytes remaining.
*/ | |
| time_t start_time; /**< When the transfer of data began.
*/ | | time_t start_time; /**< When the transfer of data began.
*/ | |
| time_t end_time; /**< When the transfer of data ended.
*/ | | time_t end_time; /**< When the transfer of data ended.
*/ | |
| | | | |
| size_t current_buffer_size; /**< This gradually increases for fast | | size_t current_buffer_size; /**< This gradually increases for fast | |
| network connections. */ | | network connections. */ | |
| | | | |
| PurpleXferStatusType status; /**< File Transfer's status.
*/ | | PurpleXferStatusType status; /**< File Transfer's status.
*/ | |
| | | | |
|
| /* I/O operations. */ | | /** I/O operations, which should be set by the prpl using | |
| | | * purple_xfer_set_init_fnc() and friends. Setting #init is | |
| | | * mandatory; all others are optional. | |
| | | */ | |
| struct | | struct | |
| { | | { | |
| void (*init)(PurpleXfer *xfer); | | void (*init)(PurpleXfer *xfer); | |
| void (*request_denied)(PurpleXfer *xfer); | | void (*request_denied)(PurpleXfer *xfer); | |
| void (*start)(PurpleXfer *xfer); | | void (*start)(PurpleXfer *xfer); | |
| void (*end)(PurpleXfer *xfer); | | void (*end)(PurpleXfer *xfer); | |
| void (*cancel_send)(PurpleXfer *xfer); | | void (*cancel_send)(PurpleXfer *xfer); | |
| void (*cancel_recv)(PurpleXfer *xfer); | | void (*cancel_recv)(PurpleXfer *xfer); | |
| gssize (*read)(guchar **buffer, PurpleXfer *xfer); | | gssize (*read)(guchar **buffer, PurpleXfer *xfer); | |
| gssize (*write)(const guchar *buffer, size_t size, PurpleXfe
r *xfer); | | gssize (*write)(const guchar *buffer, size_t size, PurpleXfe
r *xfer); | |
| | | | |
| skipping to change at line 677 | | skipping to change at line 680 | |
| * the direction of the file transfer. Used when the UI is providing | | * the direction of the file transfer. Used when the UI is providing | |
| * read/write/data_not_sent UI ops. | | * read/write/data_not_sent UI ops. | |
| * | | * | |
| * @param xfer The file transfer which is ready. | | * @param xfer The file transfer which is ready. | |
| * | | * | |
| * @since 2.6.0 | | * @since 2.6.0 | |
| */ | | */ | |
| void purple_xfer_ui_ready(PurpleXfer *xfer); | | void purple_xfer_ui_ready(PurpleXfer *xfer); | |
| | | | |
| /** | | /** | |
|
| * Allows the prpl to signal it's readh to send/receive data (depending on | | * Allows the prpl to signal it's ready to send/receive data (depending on | |
| * the direction of the file transfer. Used when the prpl provides read/wri
te | | * the direction of the file transfer. Used when the prpl provides read/wri
te | |
| * ops and cannot/does not provide a raw fd to the core. | | * ops and cannot/does not provide a raw fd to the core. | |
| * | | * | |
| * @param xfer The file transfer which is ready. | | * @param xfer The file transfer which is ready. | |
| * | | * | |
| * @since 2.6.0 | | * @since 2.6.0 | |
| */ | | */ | |
| void purple_xfer_prpl_ready(PurpleXfer *xfer); | | void purple_xfer_prpl_ready(PurpleXfer *xfer); | |
| | | | |
| /*@}*/ | | /*@}*/ | |
| | | | |
End of changes. 2 change blocks. |
| 2 lines changed or deleted | | 5 lines changed or added | |
|
| prpl.h | | prpl.h | |
| | | | |
| skipping to change at line 92 | | skipping to change at line 92 | |
| char *format; | | char *format; | |
| | | | |
| int min_width; /**< Minimum width of this icon
*/ | | int min_width; /**< Minimum width of this icon
*/ | |
| int min_height; /**< Minimum height of this icon
*/ | | int min_height; /**< Minimum height of this icon
*/ | |
| int max_width; /**< Maximum width of this icon
*/ | | int max_width; /**< Maximum width of this icon
*/ | |
| int max_height; /**< Maximum height of this icon
*/ | | int max_height; /**< Maximum height of this icon
*/ | |
| size_t max_filesize; /**< Maximum size in bytes */ | | size_t max_filesize; /**< Maximum size in bytes */ | |
| PurpleIconScaleRules scale_rules; /**< How to stretch this icon */ | | PurpleIconScaleRules scale_rules; /**< How to stretch this icon */ | |
| }; | | }; | |
| | | | |
|
| | | /** Represents an entry containing information that must be supplied by the | |
| | | * user when joining a chat. | |
| | | */ | |
| struct proto_chat_entry { | | struct proto_chat_entry { | |
|
| const char *label; | | const char *label; /**< User-friendly name of the entry */ | |
| const char *identifier; | | const char *identifier; /**< Used by the PRPL to identify the optio | |
| gboolean required; | | n */ | |
| gboolean is_int; | | gboolean required; /**< True if it's required */ | |
| int min; | | gboolean is_int; /**< True if the entry expects an integer * | |
| int max; | | / | |
| gboolean secret; | | int min; /**< Minimum value in case of integer */ | |
| | | int max; /**< Maximum value in case of integer */ | |
| | | gboolean secret; /**< True if the entry is secret (password) | |
| | | */ | |
| }; | | }; | |
| | | | |
| /** Represents "nudges" and "buzzes" that you may send to a buddy to attrac
t | | /** Represents "nudges" and "buzzes" that you may send to a buddy to attrac
t | |
| * their attention (or vice-versa). | | * their attention (or vice-versa). | |
| */ | | */ | |
| struct _PurpleAttentionType | | struct _PurpleAttentionType | |
| { | | { | |
| const char *name; /**< Shown in GUI elements */ | | const char *name; /**< Shown in GUI elements */ | |
| const char *incoming_description; /**< Shown when sent */ | | const char *incoming_description; /**< Shown when sent */ | |
| const char *outgoing_description; /**< Shown when receied */ | | const char *outgoing_description; /**< Shown when receied */ | |
| | | | |
| skipping to change at line 253 | | skipping to change at line 256 | |
| * online states. | | * online states. | |
| */ | | */ | |
| GList *(*status_types)(PurpleAccount *account); | | GList *(*status_types)(PurpleAccount *account); | |
| | | | |
| /** | | /** | |
| * Returns a list of #PurpleMenuAction structs, which represent extr
a | | * Returns a list of #PurpleMenuAction structs, which represent extr
a | |
| * actions to be shown in (for example) the right-click menu for @a | | * actions to be shown in (for example) the right-click menu for @a | |
| * node. | | * node. | |
| */ | | */ | |
| GList *(*blist_node_menu)(PurpleBlistNode *node); | | GList *(*blist_node_menu)(PurpleBlistNode *node); | |
|
| | | | |
| | | /** | |
| | | * 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. | |
| | | * | |
| | | * @return A list of #proto_chat_entry structs | |
| | | */ | |
| GList *(*chat_info)(PurpleConnection *); | | GList *(*chat_info)(PurpleConnection *); | |
|
| | | | |
| | | /** | |
| | | * Returns a hashtable which maps #proto_chat_entry struct identifie | |
| | | rs | |
| | | * 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 ne | |
| | | ed | |
| | | * to extract a chat name from a hashtable. | |
| | | * | |
| | | * @param chat_name The chat name to be turned into components | |
| | | * @return Hashtable containing the information extracted from chat_ | |
| | | name | |
| | | */ | |
| GHashTable *(*chat_info_defaults)(PurpleConnection *, const char *ch
at_name); | | GHashTable *(*chat_info_defaults)(PurpleConnection *, const char *ch
at_name); | |
| | | | |
| /* All the server-related functions */ | | /* All the server-related functions */ | |
| | | | |
| /** This must be implemented. */ | | /** This must be implemented. */ | |
| void (*login)(PurpleAccount *); | | void (*login)(PurpleAccount *); | |
| | | | |
| /** This must be implemented. */ | | /** This must be implemented. */ | |
| void (*close)(PurpleConnection *); | | void (*close)(PurpleConnection *); | |
| | | | |
| | | | |
| skipping to change at line 315 | | skipping to change at line 337 | |
| */ | | */ | |
| void (*add_buddy)(PurpleConnection *, PurpleBuddy *buddy, PurpleGrou
p *group); | | void (*add_buddy)(PurpleConnection *, PurpleBuddy *buddy, PurpleGrou
p *group); | |
| void (*add_buddies)(PurpleConnection *, GList *buddies, GList *group
s); | | void (*add_buddies)(PurpleConnection *, GList *buddies, GList *group
s); | |
| void (*remove_buddy)(PurpleConnection *, PurpleBuddy *buddy, PurpleG
roup *group); | | void (*remove_buddy)(PurpleConnection *, PurpleBuddy *buddy, PurpleG
roup *group); | |
| void (*remove_buddies)(PurpleConnection *, GList *buddies, GList *gr
oups); | | void (*remove_buddies)(PurpleConnection *, GList *buddies, GList *gr
oups); | |
| void (*add_permit)(PurpleConnection *, const char *name); | | void (*add_permit)(PurpleConnection *, const char *name); | |
| void (*add_deny)(PurpleConnection *, const char *name); | | void (*add_deny)(PurpleConnection *, const char *name); | |
| void (*rem_permit)(PurpleConnection *, const char *name); | | void (*rem_permit)(PurpleConnection *, const char *name); | |
| void (*rem_deny)(PurpleConnection *, const char *name); | | void (*rem_deny)(PurpleConnection *, const char *name); | |
| void (*set_permit_deny)(PurpleConnection *); | | void (*set_permit_deny)(PurpleConnection *); | |
|
| | | | |
| | | /** | |
| | | * Called when the user requests joining a chat. Should arrange for | |
| | | * #serv_got_joined_chat to be called. | |
| | | * | |
| | | * @param components A hashtable containing information required to | |
| | | * join the chat as described by the entries retur | |
| | | ned | |
| | | * by #chat_info. It may also be called when accep | |
| | | ting | |
| | | * an invitation, in which case this matches the | |
| | | * data parameter passed to #serv_got_chat_invite. | |
| | | */ | |
| void (*join_chat)(PurpleConnection *, GHashTable *components); | | void (*join_chat)(PurpleConnection *, GHashTable *components); | |
|
| | | | |
| | | /** | |
| | | * Called when the user refuses a chat invitation. | |
| | | * | |
| | | * @param components A hashtable containing information required to | |
| | | * join the chat as passed to #serv_got_chat_invit | |
| | | e. | |
| | | */ | |
| void (*reject_chat)(PurpleConnection *, GHashTable *components); | | void (*reject_chat)(PurpleConnection *, 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. | |
| | | * | |
| | | * @param components A hashtable containing information about the ch | |
| | | at. | |
| | | */ | |
| char *(*get_chat_name)(GHashTable *components); | | char *(*get_chat_name)(GHashTable *components); | |
|
| | | | |
| | | /** | |
| | | * Invite a user to join a chat. | |
| | | * | |
| | | * @param id The id of the chat to invite the user to. | |
| | | * @param message A message displayed to the user when the invitatio | |
| | | n | |
| | | * is received. | |
| | | * @param who The name of the user to send the invation to. | |
| | | */ | |
| void (*chat_invite)(PurpleConnection *, int id, | | void (*chat_invite)(PurpleConnection *, int id, | |
| const char *message, const c
har *who); | | const char *message, const c
har *who); | |
|
| | | /** | |
| | | * Called when the user requests leaving a chat. | |
| | | * | |
| | | * @param id The id of the chat to leave | |
| | | */ | |
| void (*chat_leave)(PurpleConnection *, int id); | | void (*chat_leave)(PurpleConnection *, int id); | |
|
| | | | |
| | | /** | |
| | | * Send a whisper to a user in a chat. | |
| | | * | |
| | | * @param id The id of the chat. | |
| | | * @param who The name of the user to send the whisper to. | |
| | | * @param message The message of the whisper. | |
| | | */ | |
| void (*chat_whisper)(PurpleConnection *, int id, | | void (*chat_whisper)(PurpleConnection *, int id, | |
| const char *who, const char
*message); | | const char *who, const char
*message); | |
|
| | | | |
| | | /** | |
| | | * 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. If the message should | |
| | | * not be echoed to the conversation window, return 0. | |
| | | * | |
| | | * @param id The id of the chat to send the message to. | |
| | | * @param message The message to send to the chat. | |
| | | * @param flags A bitwise OR of #PurpleMessageFlags representing | |
| | | * message flags. | |
| | | * @return A positive number or 0 in case of succes, | |
| | | * a negative error number in case of failure. | |
| | | */ | |
| int (*chat_send)(PurpleConnection *, int id, const char *message, P
urpleMessageFlags flags); | | int (*chat_send)(PurpleConnection *, int id, const char *message, P
urpleMessageFlags flags); | |
| | | | |
| /** If implemented, this will be called regularly for this prpl's | | /** If implemented, this will be called regularly for this prpl's | |
| * active connections. You'd want to do this if you need to repeat
edly | | * active connections. You'd want to do this if you need to repeat
edly | |
| * send some kind of keepalive packet to the server to avoid being | | * send some kind of keepalive packet to the server to avoid being | |
| * disconnected. ("Regularly" is defined by | | * disconnected. ("Regularly" is defined by | |
| * <code>KEEPALIVE_INTERVAL</code> in <tt>libpurple/connection.c</t
t>.) | | * <code>KEEPALIVE_INTERVAL</code> in <tt>libpurple/connection.c</t
t>.) | |
| */ | | */ | |
| void (*keepalive)(PurpleConnection *); | | void (*keepalive)(PurpleConnection *); | |
| | | | |
| | | | |
End of changes. 11 change blocks. |
| 7 lines changed or deleted | | 107 lines changed or added | |
|
| server.h | | server.h | |
| | | | |
| skipping to change at line 170 | | skipping to change at line 170 | |
| * @param who The username of the person inviting the account. | | * @param who The username of the person inviting the account. | |
| * @param message The optional invite message. | | * @param message The optional invite message. | |
| * @param data The components necessary if you want to call serv_join_ch
at(). | | * @param data The components necessary if you want to call serv_join_ch
at(). | |
| * The hash function should be g_str_hash() and the equal | | * The hash function should be g_str_hash() and the equal | |
| * function should be g_str_equal(). | | * function should be g_str_equal(). | |
| */ | | */ | |
| void serv_got_chat_invite(PurpleConnection *gc, const char *name, | | void serv_got_chat_invite(PurpleConnection *gc, const char *name, | |
| const char *who, const cha
r *message, | | const char *who, const cha
r *message, | |
| GHashTable *data); | | GHashTable *data); | |
| | | | |
|
| | | /** | |
| | | * Called by a prpl when an account has joined a chat. | |
| | | * | |
| | | * @param gc The connection on which the chat was joined. | |
| | | * @param id The id of the chat, assigned by the prpl. | |
| | | * @param name The name of the chat. | |
| | | * @return The resulting conversation | |
| | | */ | |
| PurpleConversation *serv_got_joined_chat(PurpleConnection *gc, | | PurpleConversation *serv_got_joined_chat(PurpleConnection *gc, | |
| i
nt id, const char *name); | | i
nt id, const char *name); | |
| /** | | /** | |
| * Called by a prpl when an attempt to join a chat via serv_join_chat() | | * Called by a prpl when an attempt to join a chat via serv_join_chat() | |
| * fails. | | * fails. | |
| * | | * | |
| * @param gc The connection on which chat joining failed | | * @param gc The connection on which chat joining failed | |
| * @param data The components passed to serv_join_chat() originally. | | * @param data The components passed to serv_join_chat() originally. | |
| * The hash function should be g_str_hash() and the equal | | * The hash function should be g_str_hash() and the equal | |
| * function should be g_str_equal(). | | * function should be g_str_equal(). | |
| */ | | */ | |
| void purple_serv_got_join_chat_failed(PurpleConnection *gc, GHashTable *dat
a); | | void purple_serv_got_join_chat_failed(PurpleConnection *gc, GHashTable *dat
a); | |
| | | | |
|
| | | /** | |
| | | * Called by a prpl when an account has left a chat. | |
| | | * | |
| | | * @param g The connection on which the chat was left. | |
| | | * @param id The id of the chat, as assigned by the prpl. | |
| | | */ | |
| void serv_got_chat_left(PurpleConnection *g, int id); | | void serv_got_chat_left(PurpleConnection *g, int id); | |
|
| | | | |
| | | /** | |
| | | * Called by a prpl when a message has been received in a chat. | |
| | | * | |
| | | * @param g The connection on which the message was received. | |
| | | * @param id The id of the chat, as assigned by the prpl. | |
| | | * @param who The name of the user who sent the message. | |
| | | * @param flags The flags of the message. | |
| | | * @param message The message received in the chat. | |
| | | * @param mtime The time when the message was received. | |
| | | */ | |
| void serv_got_chat_in(PurpleConnection *g, int id, const char *who, | | void serv_got_chat_in(PurpleConnection *g, int id, const char *who, | |
| PurpleMessageFlags flags, const ch
ar *message, time_t mtime); | | PurpleMessageFlags flags, const ch
ar *message, time_t mtime); | |
| void serv_send_file(PurpleConnection *gc, const char *who, const char *file
); | | void serv_send_file(PurpleConnection *gc, const char *who, const char *file
); | |
| | | | |
| #ifdef __cplusplus | | #ifdef __cplusplus | |
| } | | } | |
| #endif | | #endif | |
| | | | |
| #endif /* _PURPLE_SERVER_H_ */ | | #endif /* _PURPLE_SERVER_H_ */ | |
| | | | |
End of changes. 3 change blocks. |
| 0 lines changed or deleted | | 25 lines changed or added | |
|