libpurple/conversation.h

changeset 37403
7143e2dbdd8d
parent 37224
6525f141a8bb
child 38240
0552f69f1996
child 38281
df274be2afa2
equal deleted inserted replaced
37402:404282320cf8 37403:7143e2dbdd8d
22 #ifndef _PURPLE_CONVERSATION_H_ 22 #ifndef _PURPLE_CONVERSATION_H_
23 #define _PURPLE_CONVERSATION_H_ 23 #define _PURPLE_CONVERSATION_H_
24 /** 24 /**
25 * SECTION:conversation 25 * SECTION:conversation
26 * @section_id: libpurple-conversation 26 * @section_id: libpurple-conversation
27 * @short_description: <filename>conversation.h</filename> 27 * @short_description: Conversation base class <filename>conversation.h</filename>
28 * @title: Conversation Base Class 28 * @title: Conversation Base Class
29 *
30 * This is the base class for the conversation abstraction on Libpurple.
31 *
32 * The present API manages the common functionallity for both kinds of conversations
33 * @PurpleIMConversation and @PurpleChatConversation.
29 */ 34 */
30 35
31 #define PURPLE_TYPE_CONVERSATION (purple_conversation_get_type()) 36 #define PURPLE_TYPE_CONVERSATION (purple_conversation_get_type())
32 #define PURPLE_CONVERSATION(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj), PURPLE_TYPE_CONVERSATION, PurpleConversation)) 37 #define PURPLE_CONVERSATION(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj), PURPLE_TYPE_CONVERSATION, PurpleConversation))
33 #define PURPLE_CONVERSATION_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST((klass), PURPLE_TYPE_CONVERSATION, PurpleConversationClass)) 38 #define PURPLE_CONVERSATION_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST((klass), PURPLE_TYPE_CONVERSATION, PurpleConversationClass))
38 #define PURPLE_TYPE_CONVERSATION_UI_OPS (purple_conversation_ui_ops_get_type()) 43 #define PURPLE_TYPE_CONVERSATION_UI_OPS (purple_conversation_ui_ops_get_type())
39 44
40 #define PURPLE_TYPE_CONVERSATION_MESSAGE (purple_conversation_message_get_type()) 45 #define PURPLE_TYPE_CONVERSATION_MESSAGE (purple_conversation_message_get_type())
41 46
42 /**************************************************************************/ 47 /**************************************************************************/
43 /** Data Structures */ 48 /* Data Structures */
44 /**************************************************************************/ 49 /**************************************************************************/
45 50
46 typedef struct _PurpleConversation PurpleConversation; 51 typedef struct _PurpleConversation PurpleConversation;
47 typedef struct _PurpleConversationClass PurpleConversationClass; 52 typedef struct _PurpleConversationClass PurpleConversationClass;
48 53
65 * @PURPLE_CONVERSATION_ACCOUNT_ONLINE: One of the user's accounts went online. 70 * @PURPLE_CONVERSATION_ACCOUNT_ONLINE: One of the user's accounts went online.
66 * @PURPLE_CONVERSATION_ACCOUNT_OFFLINE: One of the user's accounts went 71 * @PURPLE_CONVERSATION_ACCOUNT_OFFLINE: One of the user's accounts went
67 * offline. 72 * offline.
68 * @PURPLE_CONVERSATION_UPDATE_AWAY: The other user went away. 73 * @PURPLE_CONVERSATION_UPDATE_AWAY: The other user went away.
69 * @PURPLE_CONVERSATION_UPDATE_ICON: The other user's buddy icon changed. 74 * @PURPLE_CONVERSATION_UPDATE_ICON: The other user's buddy icon changed.
75 * @PURPLE_CONVERSATION_UPDATE_NAME: The name of the conversation was changed.
76 * @PURPLE_CONVERSATION_UPDATE_TITLE: The title of the conversation was updated.
77 * @PURPLE_CONVERSATION_UPDATE_CHATLEFT: The user left a chat.
70 * @PURPLE_CONVERSATION_UPDATE_FEATURES: The features for a chat have changed. 78 * @PURPLE_CONVERSATION_UPDATE_FEATURES: The features for a chat have changed.
71 * 79 *
72 * Conversation update type. 80 * Conversation update type.
73 */ 81 */
74 typedef enum 82 typedef enum
141 #include <glib.h> 149 #include <glib.h>
142 #include <glib-object.h> 150 #include <glib-object.h>
143 #include "message.h" 151 #include "message.h"
144 152
145 /**************************************************************************/ 153 /**************************************************************************/
146 /** PurpleConversation */ 154 /* PurpleConversation */
147 /**************************************************************************/ 155 /**************************************************************************/
148 /** 156 /**
149 * PurpleConversation: 157 * PurpleConversation:
150 * @ui_data: The UI data associated with this conversation. This is a 158 * @ui_data: The UI data associated with this conversation. This is a
151 * convenience field provided to the UIs -- it is not used by the 159 * convenience field provided to the UIs -- it is not used by the
192 #include "e2ee.h" 200 #include "e2ee.h"
193 #include "log.h" 201 #include "log.h"
194 #include "smiley-list.h" 202 #include "smiley-list.h"
195 203
196 /**************************************************************************/ 204 /**************************************************************************/
197 /** PurpleConversationUiOps */ 205 /* PurpleConversationUiOps */
198 /**************************************************************************/ 206 /**************************************************************************/
199 /** 207 /**
200 * PurpleConversationUiOps: 208 * PurpleConversationUiOps:
201 * @create_conversation: Called when @conv is created (but before the 209 * @create_conversation: Called when @conv is created (but before the
202 * <link linkend="conversations-conversation-created"><literal>"conversation-created"</literal></link> 210 * <link linkend="conversations-conversation-created"><literal>"conversation-created"</literal></link>
344 * Returns the specified conversation's purple_account. 352 * Returns the specified conversation's purple_account.
345 * 353 *
346 * This purple_account represents the user using purple, not the person the user 354 * This purple_account represents the user using purple, not the person the user
347 * is having a conversation/chat/flame with. 355 * is having a conversation/chat/flame with.
348 * 356 *
349 * Returns: The conversation's purple_account. 357 * Returns: (transfer none): The conversation's purple_account.
350 */ 358 */
351 PurpleAccount *purple_conversation_get_account(const PurpleConversation *conv); 359 PurpleAccount *purple_conversation_get_account(const PurpleConversation *conv);
352 360
353 /** 361 /**
354 * purple_conversation_get_connection: 362 * purple_conversation_get_connection:
355 * @conv: The conversation. 363 * @conv: The conversation.
356 * 364 *
357 * Returns the specified conversation's purple_connection. 365 * Returns the specified conversation's purple_connection.
358 * 366 *
359 * Returns: The conversation's purple_connection. 367 * Returns: (transfer none): The conversation's purple_connection.
360 */ 368 */
361 PurpleConnection *purple_conversation_get_connection(const PurpleConversation *conv); 369 PurpleConnection *purple_conversation_get_connection(const PurpleConversation *conv);
362 370
363 /** 371 /**
364 * purple_conversation_set_title: 372 * purple_conversation_set_title:
549 * purple_conversation_get_message_history: 557 * purple_conversation_get_message_history:
550 * @conv: The conversation 558 * @conv: The conversation
551 * 559 *
552 * Retrieve the message history of a conversation. 560 * Retrieve the message history of a conversation.
553 * 561 *
554 * Returns: (transfer none): A GList of PurpleMessage's. You must not modify the 562 * Returns: (element-type PurpleMessage) (transfer none):
563 * A GList of PurpleMessage's. You must not modify the
555 * list or the data within. The list contains the newest message at 564 * list or the data within. The list contains the newest message at
556 * the beginning, and the oldest message at the end. 565 * the beginning, and the oldest message at the end.
557 */ 566 */
558 GList *purple_conversation_get_message_history(PurpleConversation *conv); 567 GList *purple_conversation_get_message_history(PurpleConversation *conv);
559 568
578 * purple_conversation_get_ui_data: 587 * purple_conversation_get_ui_data:
579 * @conv: The conversation. 588 * @conv: The conversation.
580 * 589 *
581 * Get the UI data associated with this conversation. 590 * Get the UI data associated with this conversation.
582 * 591 *
583 * Returns: The UI data associated with this conversation. This is a 592 * Returns: (transfer none): The UI data associated with this conversation.
584 * convenience field provided to the UIs--it is not 593 * This is a convenience field provided to the UIs--it is not
585 * used by the libpurple core. 594 * used by the libpurple core.
586 */ 595 */
587 gpointer purple_conversation_get_ui_data(const PurpleConversation *conv); 596 gpointer purple_conversation_get_ui_data(const PurpleConversation *conv);
588 597
589 /** 598 /**
605 * purple_conversation_get_extended_menu: 614 * purple_conversation_get_extended_menu:
606 * @conv: The conversation. 615 * @conv: The conversation.
607 * 616 *
608 * Retrieves the extended menu items for the conversation. 617 * Retrieves the extended menu items for the conversation.
609 * 618 *
610 * Returns: A list of PurpleMenuAction items, harvested by the 619 * Returns: (element-type PurpleMenuAction):
620 * A list of PurpleMenuAction items, harvested by the
611 * chat-extended-menu signal. The list and the menuaction 621 * chat-extended-menu signal. The list and the menuaction
612 * items should be freed by the caller. 622 * items should be freed by the caller.
613 */ 623 */
614 GList * purple_conversation_get_extended_menu(PurpleConversation *conv); 624 GList * purple_conversation_get_extended_menu(PurpleConversation *conv);
615 625

mercurial