Fri, 11 Oct 2013 14:51:45 +0530
Cleaned up properties and added g_object_notify calls for PurpleConnection and PurpleConversation's
| 4359 | 1 | /** |
|
34651
88c104a20f4b
Refactored the PurpleConversation subclasses and subsystem to use the GObject conversation API.
Ankit Vani <a@nevitus.org>
parents:
34648
diff
changeset
|
2 | * @file conversation.h Conversation base class API |
|
5034
077678f7b048
[gaim-migrate @ 5377]
Christian Hammond <chipx86@chipx86.com>
parents:
4890
diff
changeset
|
3 | * @ingroup core |
|
20147
66f05a854eee
applied changes from 8a731bbd0197fbcc91a705c2d8f528154216defa
Richard Laager <rlaager@pidgin.im>
parents:
19904
diff
changeset
|
4 | */ |
|
66f05a854eee
applied changes from 8a731bbd0197fbcc91a705c2d8f528154216defa
Richard Laager <rlaager@pidgin.im>
parents:
19904
diff
changeset
|
5 | |
|
66f05a854eee
applied changes from 8a731bbd0197fbcc91a705c2d8f528154216defa
Richard Laager <rlaager@pidgin.im>
parents:
19904
diff
changeset
|
6 | /* purple |
| 4359 | 7 | * |
| 15884 | 8 | * Purple is the legal property of its developers, whose names are too numerous |
| 8046 | 9 | * to list here. Please refer to the COPYRIGHT file distributed with this |
| 10 | * source distribution. | |
|
6485
3c7ba18e32f1
[gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
6414
diff
changeset
|
11 | * |
| 4359 | 12 | * This program is free software; you can redistribute it and/or modify |
| 13 | * it under the terms of the GNU General Public License as published by | |
| 14 | * the Free Software Foundation; either version 2 of the License, or | |
| 15 | * (at your option) any later version. | |
| 16 | * | |
| 17 | * This program is distributed in the hope that it will be useful, | |
| 18 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | |
| 19 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
| 20 | * GNU General Public License for more details. | |
| 21 | * | |
| 22 | * You should have received a copy of the GNU General Public License | |
| 23 | * along with this program; if not, write to the Free Software | |
|
19859
71d37b57eff2
The FSF changed its address a while ago; our files were out of date.
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
19733
diff
changeset
|
24 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1301 USA |
| 4359 | 25 | */ |
| 15884 | 26 | #ifndef _PURPLE_CONVERSATION_H_ |
| 27 | #define _PURPLE_CONVERSATION_H_ | |
| 4359 | 28 | |
|
34609
28b0f26f011f
Added GObject boilerplate code for headers, also _new() and _get_type() functions.
Ankit Vani <a@nevitus.org>
parents:
34608
diff
changeset
|
29 | #define PURPLE_TYPE_CONVERSATION (purple_conversation_get_type()) |
|
28b0f26f011f
Added GObject boilerplate code for headers, also _new() and _get_type() functions.
Ankit Vani <a@nevitus.org>
parents:
34608
diff
changeset
|
30 | #define PURPLE_CONVERSATION(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj), PURPLE_TYPE_CONVERSATION, PurpleConversation)) |
|
28b0f26f011f
Added GObject boilerplate code for headers, also _new() and _get_type() functions.
Ankit Vani <a@nevitus.org>
parents:
34608
diff
changeset
|
31 | #define PURPLE_CONVERSATION_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST((klass), PURPLE_TYPE_CONVERSATION, PurpleConversationClass)) |
|
28b0f26f011f
Added GObject boilerplate code for headers, also _new() and _get_type() functions.
Ankit Vani <a@nevitus.org>
parents:
34608
diff
changeset
|
32 | #define PURPLE_IS_CONVERSATION(obj) (G_TYPE_CHECK_INSTANCE_TYPE((obj), PURPLE_TYPE_CONVERSATION)) |
|
28b0f26f011f
Added GObject boilerplate code for headers, also _new() and _get_type() functions.
Ankit Vani <a@nevitus.org>
parents:
34608
diff
changeset
|
33 | #define PURPLE_IS_CONVERSATION_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE((klass), PURPLE_TYPE_CONVERSATION)) |
|
28b0f26f011f
Added GObject boilerplate code for headers, also _new() and _get_type() functions.
Ankit Vani <a@nevitus.org>
parents:
34608
diff
changeset
|
34 | #define PURPLE_CONVERSATION_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS((obj), PURPLE_TYPE_CONVERSATION, PurpleConversationClass)) |
|
28b0f26f011f
Added GObject boilerplate code for headers, also _new() and _get_type() functions.
Ankit Vani <a@nevitus.org>
parents:
34608
diff
changeset
|
35 | |
|
34724
5a5d2f63e9a8
Added PURPLE_TYPE_CONVERSATION_MESSAGE macro to return GType of PurpleConversationMessage boxed structure
Ankit Vani <a@nevitus.org>
parents:
34691
diff
changeset
|
36 | #define PURPLE_TYPE_CONVERSATION_MESSAGE (purple_conversation_message_get_type()) |
|
5a5d2f63e9a8
Added PURPLE_TYPE_CONVERSATION_MESSAGE macro to return GType of PurpleConversationMessage boxed structure
Ankit Vani <a@nevitus.org>
parents:
34691
diff
changeset
|
37 | |
| 4359 | 38 | /**************************************************************************/ |
| 39 | /** Data Structures */ | |
| 40 | /**************************************************************************/ | |
| 41 | ||
|
34599
0b1b22f5e2ec
Begun GObjectification of PurpleConversation.
Ankit Vani <a@nevitus.org>
parents:
34595
diff
changeset
|
42 | /** @copydoc _PurpleConversation */ |
|
0b1b22f5e2ec
Begun GObjectification of PurpleConversation.
Ankit Vani <a@nevitus.org>
parents:
34595
diff
changeset
|
43 | typedef struct _PurpleConversation PurpleConversation; |
|
0b1b22f5e2ec
Begun GObjectification of PurpleConversation.
Ankit Vani <a@nevitus.org>
parents:
34595
diff
changeset
|
44 | /** @copydoc _PurpleConversation */ |
|
0b1b22f5e2ec
Begun GObjectification of PurpleConversation.
Ankit Vani <a@nevitus.org>
parents:
34595
diff
changeset
|
45 | typedef struct _PurpleConversationClass PurpleConversationClass; |
| 11581 | 46 | |
|
23514
f5c4c1cb7b6f
Sprinkle @copydoc around to squash "ref could not be resolved" Doxygen warnings,
Will Thompson <resiak@pidgin.im>
parents:
23063
diff
changeset
|
47 | /** @copydoc _PurpleConversationUiOps */ |
|
34599
0b1b22f5e2ec
Begun GObjectification of PurpleConversation.
Ankit Vani <a@nevitus.org>
parents:
34595
diff
changeset
|
48 | typedef struct _PurpleConversationUiOps PurpleConversationUiOps; |
|
0b1b22f5e2ec
Begun GObjectification of PurpleConversation.
Ankit Vani <a@nevitus.org>
parents:
34595
diff
changeset
|
49 | /** @copydoc _PurpleConversationMessage */ |
|
0b1b22f5e2ec
Begun GObjectification of PurpleConversation.
Ankit Vani <a@nevitus.org>
parents:
34595
diff
changeset
|
50 | typedef struct _PurpleConversationMessage PurpleConversationMessage; |
| 4359 | 51 | |
| 52 | /** | |
| 53 | * Conversation update type. | |
| 54 | */ | |
|
5944
f19df037ac58
[gaim-migrate @ 6385]
Christian Hammond <chipx86@chipx86.com>
parents:
5872
diff
changeset
|
55 | typedef enum |
| 4359 | 56 | { |
|
34599
0b1b22f5e2ec
Begun GObjectification of PurpleConversation.
Ankit Vani <a@nevitus.org>
parents:
34595
diff
changeset
|
57 | PURPLE_CONVERSATION_UPDATE_ADD = 0, /**< The buddy associated with the conversation |
|
0b1b22f5e2ec
Begun GObjectification of PurpleConversation.
Ankit Vani <a@nevitus.org>
parents:
34595
diff
changeset
|
58 | was added. */ |
|
0b1b22f5e2ec
Begun GObjectification of PurpleConversation.
Ankit Vani <a@nevitus.org>
parents:
34595
diff
changeset
|
59 | PURPLE_CONVERSATION_UPDATE_REMOVE, /**< The buddy associated with the conversation |
|
0b1b22f5e2ec
Begun GObjectification of PurpleConversation.
Ankit Vani <a@nevitus.org>
parents:
34595
diff
changeset
|
60 | was removed. */ |
|
0b1b22f5e2ec
Begun GObjectification of PurpleConversation.
Ankit Vani <a@nevitus.org>
parents:
34595
diff
changeset
|
61 | PURPLE_CONVERSATION_UPDATE_ACCOUNT, /**< The purple_account was changed. */ |
|
0b1b22f5e2ec
Begun GObjectification of PurpleConversation.
Ankit Vani <a@nevitus.org>
parents:
34595
diff
changeset
|
62 | PURPLE_CONVERSATION_UPDATE_TYPING, /**< The typing state was updated. */ |
|
0b1b22f5e2ec
Begun GObjectification of PurpleConversation.
Ankit Vani <a@nevitus.org>
parents:
34595
diff
changeset
|
63 | PURPLE_CONVERSATION_UPDATE_UNSEEN, /**< The unseen state was updated. */ |
|
0b1b22f5e2ec
Begun GObjectification of PurpleConversation.
Ankit Vani <a@nevitus.org>
parents:
34595
diff
changeset
|
64 | PURPLE_CONVERSATION_UPDATE_LOGGING, /**< Logging for this conversation was |
|
0b1b22f5e2ec
Begun GObjectification of PurpleConversation.
Ankit Vani <a@nevitus.org>
parents:
34595
diff
changeset
|
65 | enabled or disabled. */ |
|
0b1b22f5e2ec
Begun GObjectification of PurpleConversation.
Ankit Vani <a@nevitus.org>
parents:
34595
diff
changeset
|
66 | PURPLE_CONVERSATION_UPDATE_TOPIC, /**< The topic for a chat was updated. */ |
| 4359 | 67 | /* |
| 68 | * XXX These need to go when we implement a more generic core/UI event | |
| 69 | * system. | |
| 70 | */ | |
|
34599
0b1b22f5e2ec
Begun GObjectification of PurpleConversation.
Ankit Vani <a@nevitus.org>
parents:
34595
diff
changeset
|
71 | PURPLE_CONVERSATION_ACCOUNT_ONLINE, /**< One of the user's accounts went online. */ |
|
0b1b22f5e2ec
Begun GObjectification of PurpleConversation.
Ankit Vani <a@nevitus.org>
parents:
34595
diff
changeset
|
72 | PURPLE_CONVERSATION_ACCOUNT_OFFLINE, /**< One of the user's accounts went offline. */ |
|
0b1b22f5e2ec
Begun GObjectification of PurpleConversation.
Ankit Vani <a@nevitus.org>
parents:
34595
diff
changeset
|
73 | PURPLE_CONVERSATION_UPDATE_AWAY, /**< The other user went away. */ |
|
0b1b22f5e2ec
Begun GObjectification of PurpleConversation.
Ankit Vani <a@nevitus.org>
parents:
34595
diff
changeset
|
74 | PURPLE_CONVERSATION_UPDATE_ICON, /**< The other user's buddy icon changed. */ |
|
35012
e07a9b9c6bda
Cleaned up properties and added g_object_notify calls for PurpleConnection and PurpleConversation's
Ankit Vani <a@nevitus.org>
parents:
34904
diff
changeset
|
75 | PURPLE_CONVERSATION_UPDATE_NAME, |
|
34599
0b1b22f5e2ec
Begun GObjectification of PurpleConversation.
Ankit Vani <a@nevitus.org>
parents:
34595
diff
changeset
|
76 | PURPLE_CONVERSATION_UPDATE_TITLE, |
|
0b1b22f5e2ec
Begun GObjectification of PurpleConversation.
Ankit Vani <a@nevitus.org>
parents:
34595
diff
changeset
|
77 | PURPLE_CONVERSATION_UPDATE_CHATLEFT, |
| 4359 | 78 | |
|
34599
0b1b22f5e2ec
Begun GObjectification of PurpleConversation.
Ankit Vani <a@nevitus.org>
parents:
34595
diff
changeset
|
79 | PURPLE_CONVERSATION_UPDATE_FEATURES /**< The features for a chat have changed */ |
|
5872
754c63f29b77
[gaim-migrate @ 6304]
Christian Hammond <chipx86@chipx86.com>
parents:
5858
diff
changeset
|
80 | |
|
34599
0b1b22f5e2ec
Begun GObjectification of PurpleConversation.
Ankit Vani <a@nevitus.org>
parents:
34595
diff
changeset
|
81 | } PurpleConversationUpdateType; |
|
5872
754c63f29b77
[gaim-migrate @ 6304]
Christian Hammond <chipx86@chipx86.com>
parents:
5858
diff
changeset
|
82 | |
|
6621
2a18ef3e5224
[gaim-migrate @ 7145]
Robert McQueen <robot101@debian.org>
parents:
6605
diff
changeset
|
83 | /** |
|
2a18ef3e5224
[gaim-migrate @ 7145]
Robert McQueen <robot101@debian.org>
parents:
6605
diff
changeset
|
84 | * Flags applicable to a message. Most will have send, recv or system. |
|
2a18ef3e5224
[gaim-migrate @ 7145]
Robert McQueen <robot101@debian.org>
parents:
6605
diff
changeset
|
85 | */ |
|
34599
0b1b22f5e2ec
Begun GObjectification of PurpleConversation.
Ankit Vani <a@nevitus.org>
parents:
34595
diff
changeset
|
86 | typedef enum /*< flags >*/ |
|
6621
2a18ef3e5224
[gaim-migrate @ 7145]
Robert McQueen <robot101@debian.org>
parents:
6605
diff
changeset
|
87 | { |
| 15884 | 88 | PURPLE_MESSAGE_SEND = 0x0001, /**< Outgoing message. */ |
| 89 | PURPLE_MESSAGE_RECV = 0x0002, /**< Incoming message. */ | |
| 90 | PURPLE_MESSAGE_SYSTEM = 0x0004, /**< System message. */ | |
| 91 | PURPLE_MESSAGE_AUTO_RESP = 0x0008, /**< Auto response. */ | |
| 92 | PURPLE_MESSAGE_ACTIVE_ONLY = 0x0010, /**< Hint to the UI that this | |
|
34654
adffcd91c9a3
A little rearranging and added reminders
Ankit Vani <a@nevitus.org>
parents:
34651
diff
changeset
|
93 | message should not be |
|
adffcd91c9a3
A little rearranging and added reminders
Ankit Vani <a@nevitus.org>
parents:
34651
diff
changeset
|
94 | shown in conversations |
|
adffcd91c9a3
A little rearranging and added reminders
Ankit Vani <a@nevitus.org>
parents:
34651
diff
changeset
|
95 | which are only open for |
|
adffcd91c9a3
A little rearranging and added reminders
Ankit Vani <a@nevitus.org>
parents:
34651
diff
changeset
|
96 | internal UI purposes |
|
adffcd91c9a3
A little rearranging and added reminders
Ankit Vani <a@nevitus.org>
parents:
34651
diff
changeset
|
97 | (e.g. for contact-aware |
|
adffcd91c9a3
A little rearranging and added reminders
Ankit Vani <a@nevitus.org>
parents:
34651
diff
changeset
|
98 | conversations). */ |
| 15884 | 99 | PURPLE_MESSAGE_NICK = 0x0020, /**< Contains your nick. */ |
| 100 | PURPLE_MESSAGE_NO_LOG = 0x0040, /**< Do not log. */ | |
| 101 | PURPLE_MESSAGE_WHISPER = 0x0080, /**< Whispered message. */ | |
| 102 | PURPLE_MESSAGE_ERROR = 0x0200, /**< Error message. */ | |
| 103 | PURPLE_MESSAGE_DELAYED = 0x0400, /**< Delayed message. */ | |
| 104 | PURPLE_MESSAGE_RAW = 0x0800, /**< "Raw" message - don't | |
|
34654
adffcd91c9a3
A little rearranging and added reminders
Ankit Vani <a@nevitus.org>
parents:
34651
diff
changeset
|
105 | apply formatting */ |
|
16007
3d954c38cf0c
Patch from Zac West which (1) adds a message flag, PURPLE_MESSAGE_NOTIFY, used to indicate that a message is a protocol-level notification from a user ('buzz' in yahoo, 'nudge' in msn, for example) and (2) uses it along with improving the text displayed when sending/receiving buzzes and nudges. The addition of this flag means that a plugin could implement custom behavior, such as playing a sound or triggerring some other event, reliably and easily.
Evan Schoenberg <evands@pidgin.im>
parents:
15884
diff
changeset
|
106 | PURPLE_MESSAGE_IMAGES = 0x1000, /**< Message contains images */ |
|
18087
b56ec2e9dae6
add a PURPLE_MESSAGE_NO_LINKIFY to prevent things from getting linkified
Nathan Walp <nwalp@pidgin.im>
parents:
16743
diff
changeset
|
107 | PURPLE_MESSAGE_NOTIFY = 0x2000, /**< Message is a notification */ |
|
19674
371069ae12fd
Add a new flag PURPLE_MESSAGE_INVISIBLE which can be used to send a message
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
19590
diff
changeset
|
108 | PURPLE_MESSAGE_NO_LINKIFY = 0x4000, /**< Message should not be auto- |
|
34654
adffcd91c9a3
A little rearranging and added reminders
Ankit Vani <a@nevitus.org>
parents:
34651
diff
changeset
|
109 | linkified */ |
|
25105
fe13c190ca13
Remove the commas at the end of enumerator lists. This resolves warnings
Florian Quèze <florian@instantbird.org>
parents:
24422
diff
changeset
|
110 | PURPLE_MESSAGE_INVISIBLE = 0x8000 /**< Message should not be displayed */ |
| 15884 | 111 | } PurpleMessageFlags; |
|
6621
2a18ef3e5224
[gaim-migrate @ 7145]
Robert McQueen <robot101@debian.org>
parents:
6605
diff
changeset
|
112 | |
|
34620
e49aa67344e1
Renamed PurpleConversationMessageFlags back to PurpleMessageFlags.
Ankit Vani <a@nevitus.org>
parents:
34616
diff
changeset
|
113 | #include <glib.h> |
|
e49aa67344e1
Renamed PurpleConversationMessageFlags back to PurpleMessageFlags.
Ankit Vani <a@nevitus.org>
parents:
34616
diff
changeset
|
114 | #include <glib-object.h> |
|
5872
754c63f29b77
[gaim-migrate @ 6304]
Christian Hammond <chipx86@chipx86.com>
parents:
5858
diff
changeset
|
115 | |
|
34601
bccb29d7be14
Removed GObject for PurpleConversationMessage, this will be a GBoxed
Ankit Vani <a@nevitus.org>
parents:
34600
diff
changeset
|
116 | /**************************************************************************/ |
|
bccb29d7be14
Removed GObject for PurpleConversationMessage, this will be a GBoxed
Ankit Vani <a@nevitus.org>
parents:
34600
diff
changeset
|
117 | /** PurpleConversation */ |
|
bccb29d7be14
Removed GObject for PurpleConversationMessage, this will be a GBoxed
Ankit Vani <a@nevitus.org>
parents:
34600
diff
changeset
|
118 | /**************************************************************************/ |
|
9554
1609ba3612c3
[gaim-migrate @ 10387]
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
9260
diff
changeset
|
119 | /** |
|
34747
2d77da77b594
Fixed documentation for PurpleConversation and PurpleConversationPrivate structs
Ankit Vani <a@nevitus.org>
parents:
34724
diff
changeset
|
120 | * A core representation of a conversation between two or more people. |
|
2d77da77b594
Fixed documentation for PurpleConversation and PurpleConversationPrivate structs
Ankit Vani <a@nevitus.org>
parents:
34724
diff
changeset
|
121 | * |
|
2d77da77b594
Fixed documentation for PurpleConversation and PurpleConversationPrivate structs
Ankit Vani <a@nevitus.org>
parents:
34724
diff
changeset
|
122 | * The conversation can be an IM or a chat. |
|
34772
618830ebcdcb
Added a note about destruction of a conversation in PurpleConversation's documentation
Ankit Vani <a@nevitus.org>
parents:
34747
diff
changeset
|
123 | * |
|
34835
704ff889e9f6
Reworded the conversation destruction note
Ankit Vani <a@nevitus.org>
parents:
34772
diff
changeset
|
124 | * @note When a conversation is destroyed with the last g_object_unref(), the |
|
704ff889e9f6
Reworded the conversation destruction note
Ankit Vani <a@nevitus.org>
parents:
34772
diff
changeset
|
125 | * specified conversation is removed from the parent window. If this |
|
704ff889e9f6
Reworded the conversation destruction note
Ankit Vani <a@nevitus.org>
parents:
34772
diff
changeset
|
126 | * conversation is the only one contained in the parent window, that |
|
704ff889e9f6
Reworded the conversation destruction note
Ankit Vani <a@nevitus.org>
parents:
34772
diff
changeset
|
127 | * window is also destroyed. |
|
9554
1609ba3612c3
[gaim-migrate @ 10387]
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
9260
diff
changeset
|
128 | */ |
|
34599
0b1b22f5e2ec
Begun GObjectification of PurpleConversation.
Ankit Vani <a@nevitus.org>
parents:
34595
diff
changeset
|
129 | struct _PurpleConversation |
|
9554
1609ba3612c3
[gaim-migrate @ 10387]
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
9260
diff
changeset
|
130 | { |
|
34599
0b1b22f5e2ec
Begun GObjectification of PurpleConversation.
Ankit Vani <a@nevitus.org>
parents:
34595
diff
changeset
|
131 | /*< private >*/ |
|
0b1b22f5e2ec
Begun GObjectification of PurpleConversation.
Ankit Vani <a@nevitus.org>
parents:
34595
diff
changeset
|
132 | GObject gparent; |
|
0b1b22f5e2ec
Begun GObjectification of PurpleConversation.
Ankit Vani <a@nevitus.org>
parents:
34595
diff
changeset
|
133 | |
|
34682
5eed877cb061
Moved ui_data to the object structure, and added back [gs]et_ui_data() methods
Ankit Vani <a@nevitus.org>
parents:
34681
diff
changeset
|
134 | /** The UI data associated with this conversation. This is a convenience |
|
5eed877cb061
Moved ui_data to the object structure, and added back [gs]et_ui_data() methods
Ankit Vani <a@nevitus.org>
parents:
34681
diff
changeset
|
135 | * field provided to the UIs -- it is not used by the libpurple core. |
|
5eed877cb061
Moved ui_data to the object structure, and added back [gs]et_ui_data() methods
Ankit Vani <a@nevitus.org>
parents:
34681
diff
changeset
|
136 | */ |
|
5eed877cb061
Moved ui_data to the object structure, and added back [gs]et_ui_data() methods
Ankit Vani <a@nevitus.org>
parents:
34681
diff
changeset
|
137 | gpointer ui_data; |
|
34599
0b1b22f5e2ec
Begun GObjectification of PurpleConversation.
Ankit Vani <a@nevitus.org>
parents:
34595
diff
changeset
|
138 | }; |
| 11581 | 139 | |
|
34601
bccb29d7be14
Removed GObject for PurpleConversationMessage, this will be a GBoxed
Ankit Vani <a@nevitus.org>
parents:
34600
diff
changeset
|
140 | /** Base class for all #PurpleConversation's */ |
|
34599
0b1b22f5e2ec
Begun GObjectification of PurpleConversation.
Ankit Vani <a@nevitus.org>
parents:
34595
diff
changeset
|
141 | struct _PurpleConversationClass { |
|
0b1b22f5e2ec
Begun GObjectification of PurpleConversation.
Ankit Vani <a@nevitus.org>
parents:
34595
diff
changeset
|
142 | /*< private >*/ |
|
0b1b22f5e2ec
Begun GObjectification of PurpleConversation.
Ankit Vani <a@nevitus.org>
parents:
34595
diff
changeset
|
143 | GObjectClass parent_class; |
|
0b1b22f5e2ec
Begun GObjectification of PurpleConversation.
Ankit Vani <a@nevitus.org>
parents:
34595
diff
changeset
|
144 | |
|
34648
a6587d8cf907
Added missing API implementations to PurpleConversation and subclasses
Ankit Vani <a@nevitus.org>
parents:
34646
diff
changeset
|
145 | /** Writes a message to a chat or IM conversation. |
|
34615
5f7212d27557
Removed send from PurpleConversation's virtual methods, renamed the remaining methods.
Ankit Vani <a@nevitus.org>
parents:
34612
diff
changeset
|
146 | * @see purple_conversation_write_message() |
|
5f7212d27557
Removed send from PurpleConversation's virtual methods, renamed the remaining methods.
Ankit Vani <a@nevitus.org>
parents:
34612
diff
changeset
|
147 | */ |
|
5f7212d27557
Removed send from PurpleConversation's virtual methods, renamed the remaining methods.
Ankit Vani <a@nevitus.org>
parents:
34612
diff
changeset
|
148 | void (*write_message)(PurpleConversation *conv, const char *who, |
|
34648
a6587d8cf907
Added missing API implementations to PurpleConversation and subclasses
Ankit Vani <a@nevitus.org>
parents:
34646
diff
changeset
|
149 | const char *message, PurpleMessageFlags flags, time_t mtime); |
|
34611
255148c286ab
Added some PurpleConversation virtual class methods.
Ankit Vani <a@nevitus.org>
parents:
34609
diff
changeset
|
150 | |
|
34599
0b1b22f5e2ec
Begun GObjectification of PurpleConversation.
Ankit Vani <a@nevitus.org>
parents:
34595
diff
changeset
|
151 | void (*_purple_reserved1)(void); |
|
0b1b22f5e2ec
Begun GObjectification of PurpleConversation.
Ankit Vani <a@nevitus.org>
parents:
34595
diff
changeset
|
152 | void (*_purple_reserved2)(void); |
|
0b1b22f5e2ec
Begun GObjectification of PurpleConversation.
Ankit Vani <a@nevitus.org>
parents:
34595
diff
changeset
|
153 | void (*_purple_reserved3)(void); |
|
0b1b22f5e2ec
Begun GObjectification of PurpleConversation.
Ankit Vani <a@nevitus.org>
parents:
34595
diff
changeset
|
154 | void (*_purple_reserved4)(void); |
|
0b1b22f5e2ec
Begun GObjectification of PurpleConversation.
Ankit Vani <a@nevitus.org>
parents:
34595
diff
changeset
|
155 | }; |
|
9554
1609ba3612c3
[gaim-migrate @ 10387]
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
9260
diff
changeset
|
156 | |
|
5872
754c63f29b77
[gaim-migrate @ 6304]
Christian Hammond <chipx86@chipx86.com>
parents:
5858
diff
changeset
|
157 | #include "account.h" |
|
9718
aeee69c6c784
[gaim-migrate @ 10579]
Mark Doliner <markdoliner@pidgin.im>
parents:
9627
diff
changeset
|
158 | #include "buddyicon.h" |
| 7431 | 159 | #include "log.h" |
|
5872
754c63f29b77
[gaim-migrate @ 6304]
Christian Hammond <chipx86@chipx86.com>
parents:
5858
diff
changeset
|
160 | |
|
34601
bccb29d7be14
Removed GObject for PurpleConversationMessage, this will be a GBoxed
Ankit Vani <a@nevitus.org>
parents:
34600
diff
changeset
|
161 | /**************************************************************************/ |
|
bccb29d7be14
Removed GObject for PurpleConversationMessage, this will be a GBoxed
Ankit Vani <a@nevitus.org>
parents:
34600
diff
changeset
|
162 | /** PurpleConversationUiOps */ |
|
bccb29d7be14
Removed GObject for PurpleConversationMessage, this will be a GBoxed
Ankit Vani <a@nevitus.org>
parents:
34600
diff
changeset
|
163 | /**************************************************************************/ |
|
5872
754c63f29b77
[gaim-migrate @ 6304]
Christian Hammond <chipx86@chipx86.com>
parents:
5858
diff
changeset
|
164 | /** |
| 4359 | 165 | * Conversation operations and events. |
| 166 | * | |
| 167 | * Any UI representing a conversation must assign a filled-out | |
| 15884 | 168 | * PurpleConversationUiOps structure to the PurpleConversation. |
| 4359 | 169 | */ |
| 15884 | 170 | struct _PurpleConversationUiOps |
| 4359 | 171 | { |
|
19120
18082e7316a9
Document most of PurpleConversationUiOps.
Will Thompson <resiak@pidgin.im>
parents:
18190
diff
changeset
|
172 | /** Called when @a conv is created (but before the @ref |
|
18082e7316a9
Document most of PurpleConversationUiOps.
Will Thompson <resiak@pidgin.im>
parents:
18190
diff
changeset
|
173 | * conversation-created signal is emitted). |
|
18082e7316a9
Document most of PurpleConversationUiOps.
Will Thompson <resiak@pidgin.im>
parents:
18190
diff
changeset
|
174 | */ |
| 15884 | 175 | void (*create_conversation)(PurpleConversation *conv); |
|
19120
18082e7316a9
Document most of PurpleConversationUiOps.
Will Thompson <resiak@pidgin.im>
parents:
18190
diff
changeset
|
176 | |
|
18082e7316a9
Document most of PurpleConversationUiOps.
Will Thompson <resiak@pidgin.im>
parents:
18190
diff
changeset
|
177 | /** Called just before @a conv is freed. */ |
| 15884 | 178 | void (*destroy_conversation)(PurpleConversation *conv); |
|
19120
18082e7316a9
Document most of PurpleConversationUiOps.
Will Thompson <resiak@pidgin.im>
parents:
18190
diff
changeset
|
179 | /** Write a message to a chat. If this field is @c NULL, libpurple will |
|
18082e7316a9
Document most of PurpleConversationUiOps.
Will Thompson <resiak@pidgin.im>
parents:
18190
diff
changeset
|
180 | * fall back to using #write_conv. |
|
34599
0b1b22f5e2ec
Begun GObjectification of PurpleConversation.
Ankit Vani <a@nevitus.org>
parents:
34595
diff
changeset
|
181 | * @see purple_chat_conversation_write() |
|
19120
18082e7316a9
Document most of PurpleConversationUiOps.
Will Thompson <resiak@pidgin.im>
parents:
18190
diff
changeset
|
182 | */ |
|
34641
3b8a466c18c5
Changed conversation UI ops arguments to subclasses wherever possible
Ankit Vani <a@nevitus.org>
parents:
34622
diff
changeset
|
183 | void (*write_chat)(PurpleChatConversation *chat, const char *who, |
|
34620
e49aa67344e1
Renamed PurpleConversationMessageFlags back to PurpleMessageFlags.
Ankit Vani <a@nevitus.org>
parents:
34616
diff
changeset
|
184 | const char *message, PurpleMessageFlags flags, |
|
34599
0b1b22f5e2ec
Begun GObjectification of PurpleConversation.
Ankit Vani <a@nevitus.org>
parents:
34595
diff
changeset
|
185 | time_t mtime); |
|
19120
18082e7316a9
Document most of PurpleConversationUiOps.
Will Thompson <resiak@pidgin.im>
parents:
18190
diff
changeset
|
186 | /** Write a message to an IM conversation. If this field is @c NULL, |
|
18082e7316a9
Document most of PurpleConversationUiOps.
Will Thompson <resiak@pidgin.im>
parents:
18190
diff
changeset
|
187 | * libpurple will fall back to using #write_conv. |
|
34599
0b1b22f5e2ec
Begun GObjectification of PurpleConversation.
Ankit Vani <a@nevitus.org>
parents:
34595
diff
changeset
|
188 | * @see purple_im_conversation_write() |
|
19120
18082e7316a9
Document most of PurpleConversationUiOps.
Will Thompson <resiak@pidgin.im>
parents:
18190
diff
changeset
|
189 | */ |
|
34641
3b8a466c18c5
Changed conversation UI ops arguments to subclasses wherever possible
Ankit Vani <a@nevitus.org>
parents:
34622
diff
changeset
|
190 | void (*write_im)(PurpleIMConversation *im, const char *who, |
| 15884 | 191 | const char *message, PurpleMessageFlags flags, |
| 8155 | 192 | time_t mtime); |
|
21099
584da62ea174
Documentation tweaks for the write_conv uiop and for prpl_info.offline_message.
Will Thompson <resiak@pidgin.im>
parents:
20971
diff
changeset
|
193 | /** Write a message to a conversation. This is used rather than the |
|
584da62ea174
Documentation tweaks for the write_conv uiop and for prpl_info.offline_message.
Will Thompson <resiak@pidgin.im>
parents:
20971
diff
changeset
|
194 | * chat- or im-specific ops for errors, system messages (such as "x is |
|
584da62ea174
Documentation tweaks for the write_conv uiop and for prpl_info.offline_message.
Will Thompson <resiak@pidgin.im>
parents:
20971
diff
changeset
|
195 | * now know as y"), and as the fallback if #write_im and #write_chat |
|
584da62ea174
Documentation tweaks for the write_conv uiop and for prpl_info.offline_message.
Will Thompson <resiak@pidgin.im>
parents:
20971
diff
changeset
|
196 | * are not implemented. It should be implemented, or the UI will miss |
|
584da62ea174
Documentation tweaks for the write_conv uiop and for prpl_info.offline_message.
Will Thompson <resiak@pidgin.im>
parents:
20971
diff
changeset
|
197 | * conversation error messages and your users will hate you. |
|
584da62ea174
Documentation tweaks for the write_conv uiop and for prpl_info.offline_message.
Will Thompson <resiak@pidgin.im>
parents:
20971
diff
changeset
|
198 | * |
|
19120
18082e7316a9
Document most of PurpleConversationUiOps.
Will Thompson <resiak@pidgin.im>
parents:
18190
diff
changeset
|
199 | * @see purple_conversation_write() |
|
18082e7316a9
Document most of PurpleConversationUiOps.
Will Thompson <resiak@pidgin.im>
parents:
18190
diff
changeset
|
200 | */ |
|
18082e7316a9
Document most of PurpleConversationUiOps.
Will Thompson <resiak@pidgin.im>
parents:
18190
diff
changeset
|
201 | void (*write_conv)(PurpleConversation *conv, |
|
18082e7316a9
Document most of PurpleConversationUiOps.
Will Thompson <resiak@pidgin.im>
parents:
18190
diff
changeset
|
202 | const char *name, |
|
18082e7316a9
Document most of PurpleConversationUiOps.
Will Thompson <resiak@pidgin.im>
parents:
18190
diff
changeset
|
203 | const char *alias, |
|
18082e7316a9
Document most of PurpleConversationUiOps.
Will Thompson <resiak@pidgin.im>
parents:
18190
diff
changeset
|
204 | const char *message, |
|
18082e7316a9
Document most of PurpleConversationUiOps.
Will Thompson <resiak@pidgin.im>
parents:
18190
diff
changeset
|
205 | PurpleMessageFlags flags, |
| 8155 | 206 | time_t mtime); |
| 4359 | 207 | |
|
19120
18082e7316a9
Document most of PurpleConversationUiOps.
Will Thompson <resiak@pidgin.im>
parents:
18190
diff
changeset
|
208 | /** Add @a cbuddies to a chat. |
|
34670
9bd5bd903dc7
Renamed chat buddies to chat users, and IM conversation typing state to IM typing state.
Ankit Vani <a@nevitus.org>
parents:
34667
diff
changeset
|
209 | * @param cbuddies A @c GList of #PurpleChatUser structs. |
|
19120
18082e7316a9
Document most of PurpleConversationUiOps.
Will Thompson <resiak@pidgin.im>
parents:
18190
diff
changeset
|
210 | * @param new_arrivals Whether join notices should be shown. |
|
18082e7316a9
Document most of PurpleConversationUiOps.
Will Thompson <resiak@pidgin.im>
parents:
18190
diff
changeset
|
211 | * (Join notices are actually written to the |
|
34599
0b1b22f5e2ec
Begun GObjectification of PurpleConversation.
Ankit Vani <a@nevitus.org>
parents:
34595
diff
changeset
|
212 | * conversation by |
|
0b1b22f5e2ec
Begun GObjectification of PurpleConversation.
Ankit Vani <a@nevitus.org>
parents:
34595
diff
changeset
|
213 | * #purple_chat_conversation_add_users().) |
|
19120
18082e7316a9
Document most of PurpleConversationUiOps.
Will Thompson <resiak@pidgin.im>
parents:
18190
diff
changeset
|
214 | */ |
|
34641
3b8a466c18c5
Changed conversation UI ops arguments to subclasses wherever possible
Ankit Vani <a@nevitus.org>
parents:
34622
diff
changeset
|
215 | void (*chat_add_users)(PurpleChatConversation *chat, |
|
19120
18082e7316a9
Document most of PurpleConversationUiOps.
Will Thompson <resiak@pidgin.im>
parents:
18190
diff
changeset
|
216 | GList *cbuddies, |
|
18082e7316a9
Document most of PurpleConversationUiOps.
Will Thompson <resiak@pidgin.im>
parents:
18190
diff
changeset
|
217 | gboolean new_arrivals); |
|
18082e7316a9
Document most of PurpleConversationUiOps.
Will Thompson <resiak@pidgin.im>
parents:
18190
diff
changeset
|
218 | /** Rename the user in this chat named @a old_name to @a new_name. (The |
|
18082e7316a9
Document most of PurpleConversationUiOps.
Will Thompson <resiak@pidgin.im>
parents:
18190
diff
changeset
|
219 | * rename message is written to the conversation by libpurple.) |
|
18082e7316a9
Document most of PurpleConversationUiOps.
Will Thompson <resiak@pidgin.im>
parents:
18190
diff
changeset
|
220 | * @param new_alias @a new_name's new alias, if they have one. |
|
34599
0b1b22f5e2ec
Begun GObjectification of PurpleConversation.
Ankit Vani <a@nevitus.org>
parents:
34595
diff
changeset
|
221 | * @see purple_chat_conversation_add_users() |
|
19120
18082e7316a9
Document most of PurpleConversationUiOps.
Will Thompson <resiak@pidgin.im>
parents:
18190
diff
changeset
|
222 | */ |
|
34641
3b8a466c18c5
Changed conversation UI ops arguments to subclasses wherever possible
Ankit Vani <a@nevitus.org>
parents:
34622
diff
changeset
|
223 | void (*chat_rename_user)(PurpleChatConversation *chat, const char *old_name, |
|
11485
fe334b13d1d0
[gaim-migrate @ 13727]
Peter Lawler <pidgin@bleeter.id.au>
parents:
11454
diff
changeset
|
224 | const char *new_name, const char *new_alias); |
|
19120
18082e7316a9
Document most of PurpleConversationUiOps.
Will Thompson <resiak@pidgin.im>
parents:
18190
diff
changeset
|
225 | /** Remove @a users from a chat. |
|
19862
3aa48ac21c45
This will silence a few warnings when building the Doxygen docs.
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
19859
diff
changeset
|
226 | * @param users A @c GList of <tt>const char *</tt>s. |
|
34599
0b1b22f5e2ec
Begun GObjectification of PurpleConversation.
Ankit Vani <a@nevitus.org>
parents:
34595
diff
changeset
|
227 | * @see purple_chat_conversation_rename_user() |
|
19120
18082e7316a9
Document most of PurpleConversationUiOps.
Will Thompson <resiak@pidgin.im>
parents:
18190
diff
changeset
|
228 | */ |
|
34641
3b8a466c18c5
Changed conversation UI ops arguments to subclasses wherever possible
Ankit Vani <a@nevitus.org>
parents:
34622
diff
changeset
|
229 | void (*chat_remove_users)(PurpleChatConversation *chat, GList *users); |
|
19120
18082e7316a9
Document most of PurpleConversationUiOps.
Will Thompson <resiak@pidgin.im>
parents:
18190
diff
changeset
|
230 | /** Called when a user's flags are changed. |
|
34670
9bd5bd903dc7
Renamed chat buddies to chat users, and IM conversation typing state to IM typing state.
Ankit Vani <a@nevitus.org>
parents:
34667
diff
changeset
|
231 | * @see purple_chat_user_set_flags() |
|
19120
18082e7316a9
Document most of PurpleConversationUiOps.
Will Thompson <resiak@pidgin.im>
parents:
18190
diff
changeset
|
232 | */ |
|
34670
9bd5bd903dc7
Renamed chat buddies to chat users, and IM conversation typing state to IM typing state.
Ankit Vani <a@nevitus.org>
parents:
34667
diff
changeset
|
233 | void (*chat_update_user)(PurpleChatUser *cb); |
| 4359 | 234 | |
|
19120
18082e7316a9
Document most of PurpleConversationUiOps.
Will Thompson <resiak@pidgin.im>
parents:
18190
diff
changeset
|
235 | /** Present this conversation to the user; for example, by displaying |
|
18082e7316a9
Document most of PurpleConversationUiOps.
Will Thompson <resiak@pidgin.im>
parents:
18190
diff
changeset
|
236 | * the IM dialog. |
|
18082e7316a9
Document most of PurpleConversationUiOps.
Will Thompson <resiak@pidgin.im>
parents:
18190
diff
changeset
|
237 | */ |
| 15884 | 238 | void (*present)(PurpleConversation *conv); |
| 4359 | 239 | |
|
19120
18082e7316a9
Document most of PurpleConversationUiOps.
Will Thompson <resiak@pidgin.im>
parents:
18190
diff
changeset
|
240 | /** If this UI has a concept of focus (as in a windowing system) and |
|
18082e7316a9
Document most of PurpleConversationUiOps.
Will Thompson <resiak@pidgin.im>
parents:
18190
diff
changeset
|
241 | * this conversation has the focus, return @c TRUE; otherwise, return |
|
18082e7316a9
Document most of PurpleConversationUiOps.
Will Thompson <resiak@pidgin.im>
parents:
18190
diff
changeset
|
242 | * @c FALSE. |
|
18082e7316a9
Document most of PurpleConversationUiOps.
Will Thompson <resiak@pidgin.im>
parents:
18190
diff
changeset
|
243 | */ |
| 15884 | 244 | gboolean (*has_focus)(PurpleConversation *conv); |
|
9260
82d7b380220a
[gaim-migrate @ 10059]
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
9166
diff
changeset
|
245 | |
| 10526 | 246 | /* Custom Smileys */ |
|
34599
0b1b22f5e2ec
Begun GObjectification of PurpleConversation.
Ankit Vani <a@nevitus.org>
parents:
34595
diff
changeset
|
247 | gboolean (*custom_smiley_add)(PurpleConversation *conv, const char *smile, |
|
34605
89e6c5346d63
Begun refactoring for PurpleConversation
Ankit Vani <a@nevitus.org>
parents:
34602
diff
changeset
|
248 | gboolean remote); |
| 15884 | 249 | void (*custom_smiley_write)(PurpleConversation *conv, const char *smile, |
|
11137
cf40226ddff7
[gaim-migrate @ 13201]
Mark Doliner <markdoliner@pidgin.im>
parents:
11035
diff
changeset
|
250 | const guchar *data, gsize size); |
| 15884 | 251 | void (*custom_smiley_close)(PurpleConversation *conv, const char *smile); |
| 14582 | 252 | |
|
19120
18082e7316a9
Document most of PurpleConversationUiOps.
Will Thompson <resiak@pidgin.im>
parents:
18190
diff
changeset
|
253 | /** Prompt the user for confirmation to send @a message. This function |
|
18082e7316a9
Document most of PurpleConversationUiOps.
Will Thompson <resiak@pidgin.im>
parents:
18190
diff
changeset
|
254 | * should arrange for the message to be sent if the user accepts. If |
|
18082e7316a9
Document most of PurpleConversationUiOps.
Will Thompson <resiak@pidgin.im>
parents:
18190
diff
changeset
|
255 | * this field is @c NULL, libpurple will fall back to using |
|
18082e7316a9
Document most of PurpleConversationUiOps.
Will Thompson <resiak@pidgin.im>
parents:
18190
diff
changeset
|
256 | * #purple_request_action(). |
|
18082e7316a9
Document most of PurpleConversationUiOps.
Will Thompson <resiak@pidgin.im>
parents:
18190
diff
changeset
|
257 | */ |
| 15884 | 258 | void (*send_confirm)(PurpleConversation *conv, const char *message); |
|
16743
1ce5ffe12e2a
Initial addition of padding for ui_ops and other class-like structs
Gary Kramlich <grim@reaperworld.com>
parents:
16007
diff
changeset
|
259 | |
|
1ce5ffe12e2a
Initial addition of padding for ui_ops and other class-like structs
Gary Kramlich <grim@reaperworld.com>
parents:
16007
diff
changeset
|
260 | void (*_purple_reserved1)(void); |
|
1ce5ffe12e2a
Initial addition of padding for ui_ops and other class-like structs
Gary Kramlich <grim@reaperworld.com>
parents:
16007
diff
changeset
|
261 | void (*_purple_reserved2)(void); |
|
1ce5ffe12e2a
Initial addition of padding for ui_ops and other class-like structs
Gary Kramlich <grim@reaperworld.com>
parents:
16007
diff
changeset
|
262 | void (*_purple_reserved3)(void); |
|
1ce5ffe12e2a
Initial addition of padding for ui_ops and other class-like structs
Gary Kramlich <grim@reaperworld.com>
parents:
16007
diff
changeset
|
263 | void (*_purple_reserved4)(void); |
| 4359 | 264 | }; |
| 265 | ||
|
32787
7072f190d6ad
Use G_BEGIN/END_DECLS in public libpurple files. This was
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
32698
diff
changeset
|
266 | G_BEGIN_DECLS |
|
5944
f19df037ac58
[gaim-migrate @ 6385]
Christian Hammond <chipx86@chipx86.com>
parents:
5872
diff
changeset
|
267 | |
| 4359 | 268 | /**************************************************************************/ |
| 269 | /** @name Conversation API */ | |
| 270 | /**************************************************************************/ | |
| 271 | /*@{*/ | |
| 272 | ||
| 273 | /** | |
|
34609
28b0f26f011f
Added GObject boilerplate code for headers, also _new() and _get_type() functions.
Ankit Vani <a@nevitus.org>
parents:
34608
diff
changeset
|
274 | * Returns the GType for the Conversation object. |
| 4359 | 275 | */ |
|
34609
28b0f26f011f
Added GObject boilerplate code for headers, also _new() and _get_type() functions.
Ankit Vani <a@nevitus.org>
parents:
34608
diff
changeset
|
276 | GType purple_conversation_get_type(void); |
|
12624
c1c92f08976b
[gaim-migrate @ 14960]
Christopher O'Brien <siege@pidgin.im>
parents:
12618
diff
changeset
|
277 | |
|
c1c92f08976b
[gaim-migrate @ 14960]
Christopher O'Brien <siege@pidgin.im>
parents:
12618
diff
changeset
|
278 | /** |
|
c1c92f08976b
[gaim-migrate @ 14960]
Christopher O'Brien <siege@pidgin.im>
parents:
12618
diff
changeset
|
279 | * Present a conversation to the user. This allows core code to initiate a |
|
c1c92f08976b
[gaim-migrate @ 14960]
Christopher O'Brien <siege@pidgin.im>
parents:
12618
diff
changeset
|
280 | * conversation by displaying the IM dialog. |
|
c1c92f08976b
[gaim-migrate @ 14960]
Christopher O'Brien <siege@pidgin.im>
parents:
12618
diff
changeset
|
281 | * @param conv The conversation to present |
|
c1c92f08976b
[gaim-migrate @ 14960]
Christopher O'Brien <siege@pidgin.im>
parents:
12618
diff
changeset
|
282 | */ |
| 15884 | 283 | void purple_conversation_present(PurpleConversation *conv); |
|
12624
c1c92f08976b
[gaim-migrate @ 14960]
Christopher O'Brien <siege@pidgin.im>
parents:
12618
diff
changeset
|
284 | |
| 4359 | 285 | /** |
| 286 | * Sets the specified conversation's UI operations structure. | |
| 287 | * | |
| 288 | * @param conv The conversation. | |
| 289 | * @param ops The UI conversation operations structure. | |
| 290 | */ | |
| 15884 | 291 | void purple_conversation_set_ui_ops(PurpleConversation *conv, |
| 292 | PurpleConversationUiOps *ops); | |
| 4359 | 293 | |
| 294 | /** | |
| 295 | * Returns the specified conversation's UI operations structure. | |
|
6585
8fcd3639e544
[gaim-migrate @ 7107]
Christian Hammond <chipx86@chipx86.com>
parents:
6488
diff
changeset
|
296 | * |
| 4359 | 297 | * @param conv The conversation. |
| 298 | * | |
| 299 | * @return The operations structure. | |
| 300 | */ | |
|
34600
3180ebbd06be
Added GObject structures, moved things around, renamed functions as GObject methods.
Ankit Vani <a@nevitus.org>
parents:
34599
diff
changeset
|
301 | PurpleConversationUiOps *purple_conversation_get_ui_ops(const PurpleConversation *conv); |
| 4359 | 302 | |
| 303 | /** | |
| 15884 | 304 | * Sets the specified conversation's purple_account. |
| 4359 | 305 | * |
| 15884 | 306 | * This purple_account represents the user using purple, not the person the user |
| 4359 | 307 | * is having a conversation/chat/flame with. |
| 308 | * | |
| 309 | * @param conv The conversation. | |
| 15884 | 310 | * @param account The purple_account. |
| 4359 | 311 | */ |
| 15884 | 312 | void purple_conversation_set_account(PurpleConversation *conv, |
| 313 | PurpleAccount *account); | |
| 4359 | 314 | |
| 315 | /** | |
| 15884 | 316 | * Returns the specified conversation's purple_account. |
| 4359 | 317 | * |
| 15884 | 318 | * This purple_account represents the user using purple, not the person the user |
| 4359 | 319 | * is having a conversation/chat/flame with. |
| 320 | * | |
| 321 | * @param conv The conversation. | |
| 322 | * | |
| 15884 | 323 | * @return The conversation's purple_account. |
| 4359 | 324 | */ |
| 15884 | 325 | PurpleAccount *purple_conversation_get_account(const PurpleConversation *conv); |
| 4359 | 326 | |
| 327 | /** | |
| 15884 | 328 | * Returns the specified conversation's purple_connection. |
| 4359 | 329 | * |
| 330 | * @param conv The conversation. | |
| 331 | * | |
| 15884 | 332 | * @return The conversation's purple_connection. |
| 4359 | 333 | */ |
|
32698
154e4a2a6287
Our API really shouldn't have a 'gc' in it anymore.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
32690
diff
changeset
|
334 | PurpleConnection *purple_conversation_get_connection(const PurpleConversation *conv); |
| 4359 | 335 | |
| 336 | /** | |
| 337 | * Sets the specified conversation's title. | |
| 338 | * | |
| 339 | * @param conv The conversation. | |
| 340 | * @param title The title. | |
| 341 | */ | |
| 15884 | 342 | void purple_conversation_set_title(PurpleConversation *conv, const char *title); |
| 4359 | 343 | |
| 344 | /** | |
| 345 | * Returns the specified conversation's title. | |
| 346 | * | |
|
6720
cdc5348dd848
[gaim-migrate @ 7247]
Christian Hammond <chipx86@chipx86.com>
parents:
6622
diff
changeset
|
347 | * @param conv The conversation. |
| 4359 | 348 | * |
| 349 | * @return The title. | |
| 350 | */ | |
| 15884 | 351 | const char *purple_conversation_get_title(const PurpleConversation *conv); |
| 4359 | 352 | |
| 353 | /** | |
| 354 | * Automatically sets the specified conversation's title. | |
| 355 | * | |
| 356 | * This function takes OPT_IM_ALIAS_TAB into account, as well as the | |
| 357 | * user's alias. | |
| 358 | * | |
| 359 | * @param conv The conversation. | |
| 360 | */ | |
| 15884 | 361 | void purple_conversation_autoset_title(PurpleConversation *conv); |
| 4359 | 362 | |
| 363 | /** | |
|
7256
311c8febfc92
[gaim-migrate @ 7833]
Christian Hammond <chipx86@chipx86.com>
parents:
7122
diff
changeset
|
364 | * Sets the specified conversation's name. |
|
311c8febfc92
[gaim-migrate @ 7833]
Christian Hammond <chipx86@chipx86.com>
parents:
7122
diff
changeset
|
365 | * |
|
311c8febfc92
[gaim-migrate @ 7833]
Christian Hammond <chipx86@chipx86.com>
parents:
7122
diff
changeset
|
366 | * @param conv The conversation. |
|
311c8febfc92
[gaim-migrate @ 7833]
Christian Hammond <chipx86@chipx86.com>
parents:
7122
diff
changeset
|
367 | * @param name The conversation's name. |
|
311c8febfc92
[gaim-migrate @ 7833]
Christian Hammond <chipx86@chipx86.com>
parents:
7122
diff
changeset
|
368 | */ |
| 15884 | 369 | void purple_conversation_set_name(PurpleConversation *conv, const char *name); |
|
7256
311c8febfc92
[gaim-migrate @ 7833]
Christian Hammond <chipx86@chipx86.com>
parents:
7122
diff
changeset
|
370 | |
|
311c8febfc92
[gaim-migrate @ 7833]
Christian Hammond <chipx86@chipx86.com>
parents:
7122
diff
changeset
|
371 | /** |
| 4359 | 372 | * Returns the specified conversation's name. |
| 373 | * | |
| 374 | * @param conv The conversation. | |
| 375 | * | |
|
22082
617ac5b2b597
Docu patch from Simon Wenner. Closes #4497.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
21453
diff
changeset
|
376 | * @return The conversation's name. If the conversation is an IM with a PurpleBuddy, |
|
617ac5b2b597
Docu patch from Simon Wenner. Closes #4497.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
21453
diff
changeset
|
377 | * then it's the name of the PurpleBuddy. |
| 4359 | 378 | */ |
| 15884 | 379 | const char *purple_conversation_get_name(const PurpleConversation *conv); |
| 4359 | 380 | |
| 381 | /** | |
| 382 | * Enables or disables logging for this conversation. | |
| 383 | * | |
|
6720
cdc5348dd848
[gaim-migrate @ 7247]
Christian Hammond <chipx86@chipx86.com>
parents:
6622
diff
changeset
|
384 | * @param conv The conversation. |
|
cdc5348dd848
[gaim-migrate @ 7247]
Christian Hammond <chipx86@chipx86.com>
parents:
6622
diff
changeset
|
385 | * @param log @c TRUE if logging should be enabled, or @c FALSE otherwise. |
| 4359 | 386 | */ |
| 15884 | 387 | void purple_conversation_set_logging(PurpleConversation *conv, gboolean log); |
| 4359 | 388 | |
| 389 | /** | |
| 390 | * Returns whether or not logging is enabled for this conversation. | |
| 391 | * | |
|
6720
cdc5348dd848
[gaim-migrate @ 7247]
Christian Hammond <chipx86@chipx86.com>
parents:
6622
diff
changeset
|
392 | * @param conv The conversation. |
|
cdc5348dd848
[gaim-migrate @ 7247]
Christian Hammond <chipx86@chipx86.com>
parents:
6622
diff
changeset
|
393 | * |
| 4359 | 394 | * @return @c TRUE if logging is enabled, or @c FALSE otherwise. |
| 395 | */ | |
| 15884 | 396 | gboolean purple_conversation_is_logging(const PurpleConversation *conv); |
| 4359 | 397 | |
| 398 | /** | |
|
11672
018c70c8134c
[gaim-migrate @ 13958]
Richard Laager <rlaager@pidgin.im>
parents:
11664
diff
changeset
|
399 | * Closes any open logs for this conversation. |
|
018c70c8134c
[gaim-migrate @ 13958]
Richard Laager <rlaager@pidgin.im>
parents:
11664
diff
changeset
|
400 | * |
|
018c70c8134c
[gaim-migrate @ 13958]
Richard Laager <rlaager@pidgin.im>
parents:
11664
diff
changeset
|
401 | * Note that new logs will be opened as necessary (e.g. upon receipt of a |
|
018c70c8134c
[gaim-migrate @ 13958]
Richard Laager <rlaager@pidgin.im>
parents:
11664
diff
changeset
|
402 | * message, if the conversation has logging enabled. To disable logging for |
| 15884 | 403 | * the remainder of the conversation, use purple_conversation_set_logging(). |
|
11672
018c70c8134c
[gaim-migrate @ 13958]
Richard Laager <rlaager@pidgin.im>
parents:
11664
diff
changeset
|
404 | * |
|
018c70c8134c
[gaim-migrate @ 13958]
Richard Laager <rlaager@pidgin.im>
parents:
11664
diff
changeset
|
405 | * @param conv The conversation. |
|
018c70c8134c
[gaim-migrate @ 13958]
Richard Laager <rlaager@pidgin.im>
parents:
11664
diff
changeset
|
406 | */ |
| 15884 | 407 | void purple_conversation_close_logs(PurpleConversation *conv); |
|
11672
018c70c8134c
[gaim-migrate @ 13958]
Richard Laager <rlaager@pidgin.im>
parents:
11664
diff
changeset
|
408 | |
|
018c70c8134c
[gaim-migrate @ 13958]
Richard Laager <rlaager@pidgin.im>
parents:
11664
diff
changeset
|
409 | /** |
| 4359 | 410 | * Writes to a conversation window. |
| 411 | * | |
| 412 | * This function should not be used to write IM or chat messages. Use | |
|
34615
5f7212d27557
Removed send from PurpleConversation's virtual methods, renamed the remaining methods.
Ankit Vani <a@nevitus.org>
parents:
34612
diff
changeset
|
413 | * purple_conversation_write_message() instead. This function will |
|
5f7212d27557
Removed send from PurpleConversation's virtual methods, renamed the remaining methods.
Ankit Vani <a@nevitus.org>
parents:
34612
diff
changeset
|
414 | * most likely call this anyway, but it may do it's own formatting, |
|
5f7212d27557
Removed send from PurpleConversation's virtual methods, renamed the remaining methods.
Ankit Vani <a@nevitus.org>
parents:
34612
diff
changeset
|
415 | * sound playback, etc. depending on whether the conversation is a chat or an |
|
5f7212d27557
Removed send from PurpleConversation's virtual methods, renamed the remaining methods.
Ankit Vani <a@nevitus.org>
parents:
34612
diff
changeset
|
416 | * IM. |
| 4359 | 417 | * |
| 418 | * This can be used to write generic messages, such as "so and so closed | |
| 419 | * the conversation window." | |
| 420 | * | |
| 421 | * @param conv The conversation. | |
| 422 | * @param who The user who sent the message. | |
| 423 | * @param message The message. | |
|
6621
2a18ef3e5224
[gaim-migrate @ 7145]
Robert McQueen <robot101@debian.org>
parents:
6605
diff
changeset
|
424 | * @param flags The message flags. |
| 4359 | 425 | * @param mtime The time the message was sent. |
| 426 | * | |
|
34615
5f7212d27557
Removed send from PurpleConversation's virtual methods, renamed the remaining methods.
Ankit Vani <a@nevitus.org>
parents:
34612
diff
changeset
|
427 | * @see purple_conversation_write_message() |
| 4359 | 428 | */ |
| 15884 | 429 | void purple_conversation_write(PurpleConversation *conv, const char *who, |
| 430 | const char *message, PurpleMessageFlags flags, | |
| 10665 | 431 | time_t mtime); |
| 432 | ||
| 433 | /** | |
|
34615
5f7212d27557
Removed send from PurpleConversation's virtual methods, renamed the remaining methods.
Ankit Vani <a@nevitus.org>
parents:
34612
diff
changeset
|
434 | * Writes to a chat or an IM. |
|
5f7212d27557
Removed send from PurpleConversation's virtual methods, renamed the remaining methods.
Ankit Vani <a@nevitus.org>
parents:
34612
diff
changeset
|
435 | * |
|
5f7212d27557
Removed send from PurpleConversation's virtual methods, renamed the remaining methods.
Ankit Vani <a@nevitus.org>
parents:
34612
diff
changeset
|
436 | * @param conv The conversation. |
|
5f7212d27557
Removed send from PurpleConversation's virtual methods, renamed the remaining methods.
Ankit Vani <a@nevitus.org>
parents:
34612
diff
changeset
|
437 | * @param who The user who sent the message. |
|
5f7212d27557
Removed send from PurpleConversation's virtual methods, renamed the remaining methods.
Ankit Vani <a@nevitus.org>
parents:
34612
diff
changeset
|
438 | * @param message The message to write. |
|
5f7212d27557
Removed send from PurpleConversation's virtual methods, renamed the remaining methods.
Ankit Vani <a@nevitus.org>
parents:
34612
diff
changeset
|
439 | * @param flags The message flags. |
|
5f7212d27557
Removed send from PurpleConversation's virtual methods, renamed the remaining methods.
Ankit Vani <a@nevitus.org>
parents:
34612
diff
changeset
|
440 | * @param mtime The time the message was sent. |
|
5f7212d27557
Removed send from PurpleConversation's virtual methods, renamed the remaining methods.
Ankit Vani <a@nevitus.org>
parents:
34612
diff
changeset
|
441 | */ |
|
5f7212d27557
Removed send from PurpleConversation's virtual methods, renamed the remaining methods.
Ankit Vani <a@nevitus.org>
parents:
34612
diff
changeset
|
442 | void purple_conversation_write_message(PurpleConversation *conv, |
|
5f7212d27557
Removed send from PurpleConversation's virtual methods, renamed the remaining methods.
Ankit Vani <a@nevitus.org>
parents:
34612
diff
changeset
|
443 | const char *who, const char *message, |
|
34620
e49aa67344e1
Renamed PurpleConversationMessageFlags back to PurpleMessageFlags.
Ankit Vani <a@nevitus.org>
parents:
34616
diff
changeset
|
444 | PurpleMessageFlags flags, time_t mtime); |
|
34615
5f7212d27557
Removed send from PurpleConversation's virtual methods, renamed the remaining methods.
Ankit Vani <a@nevitus.org>
parents:
34612
diff
changeset
|
445 | |
|
34648
a6587d8cf907
Added missing API implementations to PurpleConversation and subclasses
Ankit Vani <a@nevitus.org>
parents:
34646
diff
changeset
|
446 | /** |
|
34615
5f7212d27557
Removed send from PurpleConversation's virtual methods, renamed the remaining methods.
Ankit Vani <a@nevitus.org>
parents:
34612
diff
changeset
|
447 | * Sends a message to this conversation. This function calls |
|
34651
88c104a20f4b
Refactored the PurpleConversation subclasses and subsystem to use the GObject conversation API.
Ankit Vani <a@nevitus.org>
parents:
34648
diff
changeset
|
448 | * purple_conversation_send_with_flags() with no additional flags. |
|
34612
ec739e43a71c
Added purple_conversation_* functions to API to redirect to virtual methods
Ankit Vani <a@nevitus.org>
parents:
34611
diff
changeset
|
449 | * |
|
ec739e43a71c
Added purple_conversation_* functions to API to redirect to virtual methods
Ankit Vani <a@nevitus.org>
parents:
34611
diff
changeset
|
450 | * @param conv The conversation. |
|
ec739e43a71c
Added purple_conversation_* functions to API to redirect to virtual methods
Ankit Vani <a@nevitus.org>
parents:
34611
diff
changeset
|
451 | * @param message The message to send. |
|
ec739e43a71c
Added purple_conversation_* functions to API to redirect to virtual methods
Ankit Vani <a@nevitus.org>
parents:
34611
diff
changeset
|
452 | */ |
|
ec739e43a71c
Added purple_conversation_* functions to API to redirect to virtual methods
Ankit Vani <a@nevitus.org>
parents:
34611
diff
changeset
|
453 | void purple_conversation_send(PurpleConversation *conv, const char *message); |
|
ec739e43a71c
Added purple_conversation_* functions to API to redirect to virtual methods
Ankit Vani <a@nevitus.org>
parents:
34611
diff
changeset
|
454 | |
|
34648
a6587d8cf907
Added missing API implementations to PurpleConversation and subclasses
Ankit Vani <a@nevitus.org>
parents:
34646
diff
changeset
|
455 | /** |
|
34612
ec739e43a71c
Added purple_conversation_* functions to API to redirect to virtual methods
Ankit Vani <a@nevitus.org>
parents:
34611
diff
changeset
|
456 | * Sends a message to this conversation with specified flags. |
|
ec739e43a71c
Added purple_conversation_* functions to API to redirect to virtual methods
Ankit Vani <a@nevitus.org>
parents:
34611
diff
changeset
|
457 | * |
|
ec739e43a71c
Added purple_conversation_* functions to API to redirect to virtual methods
Ankit Vani <a@nevitus.org>
parents:
34611
diff
changeset
|
458 | * @param conv The conversation. |
|
ec739e43a71c
Added purple_conversation_* functions to API to redirect to virtual methods
Ankit Vani <a@nevitus.org>
parents:
34611
diff
changeset
|
459 | * @param message The message to send. |
|
34620
e49aa67344e1
Renamed PurpleConversationMessageFlags back to PurpleMessageFlags.
Ankit Vani <a@nevitus.org>
parents:
34616
diff
changeset
|
460 | * @param flags The PurpleMessageFlags flags to use in addition to |
|
e49aa67344e1
Renamed PurpleConversationMessageFlags back to PurpleMessageFlags.
Ankit Vani <a@nevitus.org>
parents:
34616
diff
changeset
|
461 | * PURPLE_MESSAGE_SEND. |
|
34612
ec739e43a71c
Added purple_conversation_* functions to API to redirect to virtual methods
Ankit Vani <a@nevitus.org>
parents:
34611
diff
changeset
|
462 | */ |
|
34651
88c104a20f4b
Refactored the PurpleConversation subclasses and subsystem to use the GObject conversation API.
Ankit Vani <a@nevitus.org>
parents:
34648
diff
changeset
|
463 | void purple_conversation_send_with_flags(PurpleConversation *conv, const char *message, |
|
34620
e49aa67344e1
Renamed PurpleConversationMessageFlags back to PurpleMessageFlags.
Ankit Vani <a@nevitus.org>
parents:
34616
diff
changeset
|
464 | PurpleMessageFlags flags); |
|
34612
ec739e43a71c
Added purple_conversation_* functions to API to redirect to virtual methods
Ankit Vani <a@nevitus.org>
parents:
34611
diff
changeset
|
465 | |
| 10665 | 466 | /** |
| 467 | Set the features as supported for the given conversation. | |
| 468 | @param conv The conversation | |
| 469 | @param features Bitset defining supported features | |
| 470 | */ | |
| 15884 | 471 | void purple_conversation_set_features(PurpleConversation *conv, |
| 472 | PurpleConnectionFlags features); | |
| 10665 | 473 | |
| 474 | ||
| 475 | /** | |
| 476 | Get the features supported by the given conversation. | |
| 477 | @param conv The conversation | |
| 478 | */ | |
| 15884 | 479 | PurpleConnectionFlags purple_conversation_get_features(PurpleConversation *conv); |
| 4359 | 480 | |
| 481 | /** | |
|
9260
82d7b380220a
[gaim-migrate @ 10059]
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
9166
diff
changeset
|
482 | * Determines if a conversation has focus |
|
82d7b380220a
[gaim-migrate @ 10059]
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
9166
diff
changeset
|
483 | * |
|
82d7b380220a
[gaim-migrate @ 10059]
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
9166
diff
changeset
|
484 | * @param conv The conversation. |
|
82d7b380220a
[gaim-migrate @ 10059]
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
9166
diff
changeset
|
485 | * |
|
82d7b380220a
[gaim-migrate @ 10059]
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
9166
diff
changeset
|
486 | * @return @c TRUE if the conversation has focus, @c FALSE if |
|
82d7b380220a
[gaim-migrate @ 10059]
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
9166
diff
changeset
|
487 | * it does not or the UI does not have a concept of conversation focus |
|
82d7b380220a
[gaim-migrate @ 10059]
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
9166
diff
changeset
|
488 | */ |
| 15884 | 489 | gboolean purple_conversation_has_focus(PurpleConversation *conv); |
|
9260
82d7b380220a
[gaim-migrate @ 10059]
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
9166
diff
changeset
|
490 | |
|
82d7b380220a
[gaim-migrate @ 10059]
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
9166
diff
changeset
|
491 | /** |
| 4359 | 492 | * Updates the visual status and UI of a conversation. |
| 493 | * | |
| 494 | * @param conv The conversation. | |
| 495 | * @param type The update type. | |
| 496 | */ | |
|
34599
0b1b22f5e2ec
Begun GObjectification of PurpleConversation.
Ankit Vani <a@nevitus.org>
parents:
34595
diff
changeset
|
497 | void purple_conversation_update(PurpleConversation *conv, PurpleConversationUpdateType type); |
| 4359 | 498 | |
|
19590
cf4e3e71bbc0
Store message history in a conversation, and provide API to access the history.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
19120
diff
changeset
|
499 | /** |
|
cf4e3e71bbc0
Store message history in a conversation, and provide API to access the history.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
19120
diff
changeset
|
500 | * Retrieve the message history of a conversation. |
|
cf4e3e71bbc0
Store message history in a conversation, and provide API to access the history.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
19120
diff
changeset
|
501 | * |
|
cf4e3e71bbc0
Store message history in a conversation, and provide API to access the history.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
19120
diff
changeset
|
502 | * @param conv The conversation |
|
cf4e3e71bbc0
Store message history in a conversation, and provide API to access the history.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
19120
diff
changeset
|
503 | * |
|
34599
0b1b22f5e2ec
Begun GObjectification of PurpleConversation.
Ankit Vani <a@nevitus.org>
parents:
34595
diff
changeset
|
504 | * @return A GList of PurpleConversationMessage's. The must not modify the list or the data within. |
|
19590
cf4e3e71bbc0
Store message history in a conversation, and provide API to access the history.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
19120
diff
changeset
|
505 | * The list contains the newest message at the beginning, and the oldest message at |
|
cf4e3e71bbc0
Store message history in a conversation, and provide API to access the history.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
19120
diff
changeset
|
506 | * the end. |
|
cf4e3e71bbc0
Store message history in a conversation, and provide API to access the history.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
19120
diff
changeset
|
507 | */ |
|
cf4e3e71bbc0
Store message history in a conversation, and provide API to access the history.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
19120
diff
changeset
|
508 | GList *purple_conversation_get_message_history(PurpleConversation *conv); |
|
cf4e3e71bbc0
Store message history in a conversation, and provide API to access the history.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
19120
diff
changeset
|
509 | |
|
cf4e3e71bbc0
Store message history in a conversation, and provide API to access the history.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
19120
diff
changeset
|
510 | /** |
|
cf4e3e71bbc0
Store message history in a conversation, and provide API to access the history.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
19120
diff
changeset
|
511 | * Clear the message history of a conversation. |
|
cf4e3e71bbc0
Store message history in a conversation, and provide API to access the history.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
19120
diff
changeset
|
512 | * |
|
cf4e3e71bbc0
Store message history in a conversation, and provide API to access the history.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
19120
diff
changeset
|
513 | * @param conv The conversation |
|
cf4e3e71bbc0
Store message history in a conversation, and provide API to access the history.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
19120
diff
changeset
|
514 | */ |
|
cf4e3e71bbc0
Store message history in a conversation, and provide API to access the history.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
19120
diff
changeset
|
515 | void purple_conversation_clear_message_history(PurpleConversation *conv); |
|
cf4e3e71bbc0
Store message history in a conversation, and provide API to access the history.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
19120
diff
changeset
|
516 | |
|
cf4e3e71bbc0
Store message history in a conversation, and provide API to access the history.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
19120
diff
changeset
|
517 | /** |
|
32253
99ecf637808b
Add accessor functions purple_conversation_get_ui_data() and purple_conversation_set_ui_data().
Andrew Victor <andrew.victor@mxit.com>
parents:
31903
diff
changeset
|
518 | * Set the UI data associated with this conversation. |
|
99ecf637808b
Add accessor functions purple_conversation_get_ui_data() and purple_conversation_set_ui_data().
Andrew Victor <andrew.victor@mxit.com>
parents:
31903
diff
changeset
|
519 | * |
|
99ecf637808b
Add accessor functions purple_conversation_get_ui_data() and purple_conversation_set_ui_data().
Andrew Victor <andrew.victor@mxit.com>
parents:
31903
diff
changeset
|
520 | * @param conv The conversation. |
|
99ecf637808b
Add accessor functions purple_conversation_get_ui_data() and purple_conversation_set_ui_data().
Andrew Victor <andrew.victor@mxit.com>
parents:
31903
diff
changeset
|
521 | * @param ui_data A pointer to associate with this conversation. |
|
99ecf637808b
Add accessor functions purple_conversation_get_ui_data() and purple_conversation_set_ui_data().
Andrew Victor <andrew.victor@mxit.com>
parents:
31903
diff
changeset
|
522 | */ |
|
99ecf637808b
Add accessor functions purple_conversation_get_ui_data() and purple_conversation_set_ui_data().
Andrew Victor <andrew.victor@mxit.com>
parents:
31903
diff
changeset
|
523 | void purple_conversation_set_ui_data(PurpleConversation *conv, gpointer ui_data); |
|
99ecf637808b
Add accessor functions purple_conversation_get_ui_data() and purple_conversation_set_ui_data().
Andrew Victor <andrew.victor@mxit.com>
parents:
31903
diff
changeset
|
524 | |
|
99ecf637808b
Add accessor functions purple_conversation_get_ui_data() and purple_conversation_set_ui_data().
Andrew Victor <andrew.victor@mxit.com>
parents:
31903
diff
changeset
|
525 | /** |
|
99ecf637808b
Add accessor functions purple_conversation_get_ui_data() and purple_conversation_set_ui_data().
Andrew Victor <andrew.victor@mxit.com>
parents:
31903
diff
changeset
|
526 | * Get the UI data associated with this conversation. |
|
99ecf637808b
Add accessor functions purple_conversation_get_ui_data() and purple_conversation_set_ui_data().
Andrew Victor <andrew.victor@mxit.com>
parents:
31903
diff
changeset
|
527 | * |
|
99ecf637808b
Add accessor functions purple_conversation_get_ui_data() and purple_conversation_set_ui_data().
Andrew Victor <andrew.victor@mxit.com>
parents:
31903
diff
changeset
|
528 | * @param conv The conversation. |
|
99ecf637808b
Add accessor functions purple_conversation_get_ui_data() and purple_conversation_set_ui_data().
Andrew Victor <andrew.victor@mxit.com>
parents:
31903
diff
changeset
|
529 | * |
|
99ecf637808b
Add accessor functions purple_conversation_get_ui_data() and purple_conversation_set_ui_data().
Andrew Victor <andrew.victor@mxit.com>
parents:
31903
diff
changeset
|
530 | * @return The UI data associated with this conversation. This is a |
|
99ecf637808b
Add accessor functions purple_conversation_get_ui_data() and purple_conversation_set_ui_data().
Andrew Victor <andrew.victor@mxit.com>
parents:
31903
diff
changeset
|
531 | * convenience field provided to the UIs--it is not |
|
99ecf637808b
Add accessor functions purple_conversation_get_ui_data() and purple_conversation_set_ui_data().
Andrew Victor <andrew.victor@mxit.com>
parents:
31903
diff
changeset
|
532 | * used by the libpurple core. |
|
99ecf637808b
Add accessor functions purple_conversation_get_ui_data() and purple_conversation_set_ui_data().
Andrew Victor <andrew.victor@mxit.com>
parents:
31903
diff
changeset
|
533 | */ |
|
32256
620e4580252a
These pointers should rather be marked const.
Andrew Victor <andrew.victor@mxit.com>
parents:
32253
diff
changeset
|
534 | gpointer purple_conversation_get_ui_data(const PurpleConversation *conv); |
|
32253
99ecf637808b
Add accessor functions purple_conversation_get_ui_data() and purple_conversation_set_ui_data().
Andrew Victor <andrew.victor@mxit.com>
parents:
31903
diff
changeset
|
535 | |
| 10526 | 536 | /** |
| 14582 | 537 | * Sends a message to a conversation after confirming with |
| 538 | * the user. | |
| 539 | * | |
| 540 | * This function is intended for use in cases where the user | |
| 541 | * hasn't explicitly and knowingly caused a message to be sent. | |
| 542 | * The confirmation ensures that the user isn't sending a | |
| 543 | * message by mistake. | |
| 544 | * | |
| 545 | * @param conv The conversation. | |
| 546 | * @param message The message to send. | |
| 547 | */ | |
|
34600
3180ebbd06be
Added GObject structures, moved things around, renamed functions as GObject methods.
Ankit Vani <a@nevitus.org>
parents:
34599
diff
changeset
|
548 | void purple_conversation_send_confirm(PurpleConversation *conv, const char *message); |
|
11921
fe74264ce36c
[gaim-migrate @ 14212]
Evan Schoenberg <evands@pidgin.im>
parents:
11869
diff
changeset
|
549 | |
|
fe74264ce36c
[gaim-migrate @ 14212]
Evan Schoenberg <evands@pidgin.im>
parents:
11869
diff
changeset
|
550 | /** |
| 10528 | 551 | * Adds a smiley to the conversation's smiley tree. If this returns |
|
34600
3180ebbd06be
Added GObject structures, moved things around, renamed functions as GObject methods.
Ankit Vani <a@nevitus.org>
parents:
34599
diff
changeset
|
552 | * @c TRUE you should call purple_conversation_custom_smiley_write() one or more |
|
3180ebbd06be
Added GObject structures, moved things around, renamed functions as GObject methods.
Ankit Vani <a@nevitus.org>
parents:
34599
diff
changeset
|
553 | * times, and then purple_conversation_custom_smiley_close(). If this returns |
| 10528 | 554 | * @c FALSE, either the conv or smile were invalid, or the icon was |
| 555 | * found in the cache. In either case, calling write or close would | |
| 556 | * be an error. | |
| 10526 | 557 | * |
| 558 | * @param conv The conversation to associate the smiley with. | |
| 559 | * @param smile The text associated with the smiley | |
| 560 | * @param cksum_type The type of checksum. | |
| 561 | * @param chksum The checksum, as a NUL terminated base64 string. | |
|
12618
b83b6bab0703
[gaim-migrate @ 14954]
Richard Laager <rlaager@pidgin.im>
parents:
12463
diff
changeset
|
562 | * @param remote @c TRUE if the custom smiley is set by the remote user (buddy). |
| 10528 | 563 | * @return @c TRUE if an icon is expected, else FALSE. Note that |
|
34600
3180ebbd06be
Added GObject structures, moved things around, renamed functions as GObject methods.
Ankit Vani <a@nevitus.org>
parents:
34599
diff
changeset
|
564 | * it is an error to never call purple_conversation_custom_smiley_close if |
| 10526 | 565 | * this function returns @c TRUE, but an error to call it if |
| 566 | * @c FALSE is returned. | |
| 567 | */ | |
| 568 | ||
|
34600
3180ebbd06be
Added GObject structures, moved things around, renamed functions as GObject methods.
Ankit Vani <a@nevitus.org>
parents:
34599
diff
changeset
|
569 | gboolean purple_conversation_custom_smiley_add(PurpleConversation *conv, const char *smile, |
|
12618
b83b6bab0703
[gaim-migrate @ 14954]
Richard Laager <rlaager@pidgin.im>
parents:
12463
diff
changeset
|
570 | const char *cksum_type, const char *chksum, |
|
b83b6bab0703
[gaim-migrate @ 14954]
Richard Laager <rlaager@pidgin.im>
parents:
12463
diff
changeset
|
571 | gboolean remote); |
| 10526 | 572 | |
| 573 | /** | |
| 574 | * Updates the image associated with the current smiley. | |
| 575 | * | |
| 576 | * @param conv The conversation associated with the smiley. | |
| 577 | * @param smile The text associated with the smiley. | |
| 578 | * @param data The actual image data. | |
| 579 | * @param size The length of the data. | |
| 580 | */ | |
| 581 | ||
|
34600
3180ebbd06be
Added GObject structures, moved things around, renamed functions as GObject methods.
Ankit Vani <a@nevitus.org>
parents:
34599
diff
changeset
|
582 | void purple_conversation_custom_smiley_write(PurpleConversation *conv, |
|
11137
cf40226ddff7
[gaim-migrate @ 13201]
Mark Doliner <markdoliner@pidgin.im>
parents:
11035
diff
changeset
|
583 | const char *smile, |
|
cf40226ddff7
[gaim-migrate @ 13201]
Mark Doliner <markdoliner@pidgin.im>
parents:
11035
diff
changeset
|
584 | const guchar *data, |
|
cf40226ddff7
[gaim-migrate @ 13201]
Mark Doliner <markdoliner@pidgin.im>
parents:
11035
diff
changeset
|
585 | gsize size); |
| 10526 | 586 | |
| 587 | /** | |
| 588 | * Close the custom smiley, all data has been written with | |
|
34600
3180ebbd06be
Added GObject structures, moved things around, renamed functions as GObject methods.
Ankit Vani <a@nevitus.org>
parents:
34599
diff
changeset
|
589 | * purple_conversation_custom_smiley_write, and it is no longer valid |
| 10526 | 590 | * to call that function on that smiley. |
| 591 | * | |
| 15884 | 592 | * @param conv The purple conversation associated with the smiley. |
| 10526 | 593 | * @param smile The text associated with the smiley |
| 594 | */ | |
| 595 | ||
|
34600
3180ebbd06be
Added GObject structures, moved things around, renamed functions as GObject methods.
Ankit Vani <a@nevitus.org>
parents:
34599
diff
changeset
|
596 | void purple_conversation_custom_smiley_close(PurpleConversation *conv, const char *smile); |
|
9554
1609ba3612c3
[gaim-migrate @ 10387]
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
9260
diff
changeset
|
597 | |
|
17265
fd5b0ca330a3
New api function purple_conversation_get_extended_menu.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
16743
diff
changeset
|
598 | /** |
|
fd5b0ca330a3
New api function purple_conversation_get_extended_menu.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
16743
diff
changeset
|
599 | * Retrieves the extended menu items for the conversation. |
|
fd5b0ca330a3
New api function purple_conversation_get_extended_menu.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
16743
diff
changeset
|
600 | * |
|
fd5b0ca330a3
New api function purple_conversation_get_extended_menu.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
16743
diff
changeset
|
601 | * @param conv The conversation. |
|
25888
d0fdd378a635
Remove trailing whitespace
Mark Doliner <markdoliner@pidgin.im>
parents:
25105
diff
changeset
|
602 | * |
|
17265
fd5b0ca330a3
New api function purple_conversation_get_extended_menu.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
16743
diff
changeset
|
603 | * @return A list of PurpleMenuAction items, harvested by the |
|
fd5b0ca330a3
New api function purple_conversation_get_extended_menu.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
16743
diff
changeset
|
604 | * chat-extended-menu signal. The list and the menuaction |
|
fd5b0ca330a3
New api function purple_conversation_get_extended_menu.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
16743
diff
changeset
|
605 | * items should be freed by the caller. |
|
fd5b0ca330a3
New api function purple_conversation_get_extended_menu.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
16743
diff
changeset
|
606 | */ |
|
fd5b0ca330a3
New api function purple_conversation_get_extended_menu.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
16743
diff
changeset
|
607 | GList * purple_conversation_get_extended_menu(PurpleConversation *conv); |
|
fd5b0ca330a3
New api function purple_conversation_get_extended_menu.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
16743
diff
changeset
|
608 | |
|
33578
d6d18b8e3c46
Revert my revision 485b1a932990
Mark Doliner <mark@kingant.net>
parents:
33567
diff
changeset
|
609 | /** |
|
d6d18b8e3c46
Revert my revision 485b1a932990
Mark Doliner <mark@kingant.net>
parents:
33567
diff
changeset
|
610 | * Perform a command in a conversation. Similar to @see purple_cmd_do_command |
|
d6d18b8e3c46
Revert my revision 485b1a932990
Mark Doliner <mark@kingant.net>
parents:
33567
diff
changeset
|
611 | * |
|
d6d18b8e3c46
Revert my revision 485b1a932990
Mark Doliner <mark@kingant.net>
parents:
33567
diff
changeset
|
612 | * @param conv The conversation. |
|
d6d18b8e3c46
Revert my revision 485b1a932990
Mark Doliner <mark@kingant.net>
parents:
33567
diff
changeset
|
613 | * @param cmdline The entire command including the arguments. |
|
d6d18b8e3c46
Revert my revision 485b1a932990
Mark Doliner <mark@kingant.net>
parents:
33567
diff
changeset
|
614 | * @param markup @c NULL, or the formatted command line. |
|
d6d18b8e3c46
Revert my revision 485b1a932990
Mark Doliner <mark@kingant.net>
parents:
33567
diff
changeset
|
615 | * @param error If the command failed errormsg is filled in with the appropriate error |
|
d6d18b8e3c46
Revert my revision 485b1a932990
Mark Doliner <mark@kingant.net>
parents:
33567
diff
changeset
|
616 | * message, if not @c NULL. It must be freed by the caller with g_free(). |
|
d6d18b8e3c46
Revert my revision 485b1a932990
Mark Doliner <mark@kingant.net>
parents:
33567
diff
changeset
|
617 | * |
|
d6d18b8e3c46
Revert my revision 485b1a932990
Mark Doliner <mark@kingant.net>
parents:
33567
diff
changeset
|
618 | * @return @c TRUE if the command was executed successfully, @c FALSE otherwise. |
|
d6d18b8e3c46
Revert my revision 485b1a932990
Mark Doliner <mark@kingant.net>
parents:
33567
diff
changeset
|
619 | */ |
|
34600
3180ebbd06be
Added GObject structures, moved things around, renamed functions as GObject methods.
Ankit Vani <a@nevitus.org>
parents:
34599
diff
changeset
|
620 | gboolean purple_conversation_do_command(PurpleConversation *conv, |
|
3180ebbd06be
Added GObject structures, moved things around, renamed functions as GObject methods.
Ankit Vani <a@nevitus.org>
parents:
34599
diff
changeset
|
621 | const gchar *cmdline, const gchar *markup, gchar **error); |
|
33578
d6d18b8e3c46
Revert my revision 485b1a932990
Mark Doliner <mark@kingant.net>
parents:
33567
diff
changeset
|
622 | |
|
34321
f60fcab02bd4
Reconsidered characters count callback for prpl API: make it per-conversation and distinguish infinite from undefined
Tomasz Wasilczyk <twasilczyk@pidgin.im>
parents:
33578
diff
changeset
|
623 | /** |
|
f60fcab02bd4
Reconsidered characters count callback for prpl API: make it per-conversation and distinguish infinite from undefined
Tomasz Wasilczyk <twasilczyk@pidgin.im>
parents:
33578
diff
changeset
|
624 | * Gets the maximum message size in bytes for the conversation. |
|
f60fcab02bd4
Reconsidered characters count callback for prpl API: make it per-conversation and distinguish infinite from undefined
Tomasz Wasilczyk <twasilczyk@pidgin.im>
parents:
33578
diff
changeset
|
625 | * |
|
f60fcab02bd4
Reconsidered characters count callback for prpl API: make it per-conversation and distinguish infinite from undefined
Tomasz Wasilczyk <twasilczyk@pidgin.im>
parents:
33578
diff
changeset
|
626 | * @see PurplePluginProtocolInfo#get_max_message_size |
|
f60fcab02bd4
Reconsidered characters count callback for prpl API: make it per-conversation and distinguish infinite from undefined
Tomasz Wasilczyk <twasilczyk@pidgin.im>
parents:
33578
diff
changeset
|
627 | * |
|
f60fcab02bd4
Reconsidered characters count callback for prpl API: make it per-conversation and distinguish infinite from undefined
Tomasz Wasilczyk <twasilczyk@pidgin.im>
parents:
33578
diff
changeset
|
628 | * @param conv The conversation to query. |
|
f60fcab02bd4
Reconsidered characters count callback for prpl API: make it per-conversation and distinguish infinite from undefined
Tomasz Wasilczyk <twasilczyk@pidgin.im>
parents:
33578
diff
changeset
|
629 | * |
|
f60fcab02bd4
Reconsidered characters count callback for prpl API: make it per-conversation and distinguish infinite from undefined
Tomasz Wasilczyk <twasilczyk@pidgin.im>
parents:
33578
diff
changeset
|
630 | * @return Maximum message size, 0 if unspecified, -1 for infinite. |
|
f60fcab02bd4
Reconsidered characters count callback for prpl API: make it per-conversation and distinguish infinite from undefined
Tomasz Wasilczyk <twasilczyk@pidgin.im>
parents:
33578
diff
changeset
|
631 | */ |
|
f60fcab02bd4
Reconsidered characters count callback for prpl API: make it per-conversation and distinguish infinite from undefined
Tomasz Wasilczyk <twasilczyk@pidgin.im>
parents:
33578
diff
changeset
|
632 | gssize |
|
f60fcab02bd4
Reconsidered characters count callback for prpl API: make it per-conversation and distinguish infinite from undefined
Tomasz Wasilczyk <twasilczyk@pidgin.im>
parents:
33578
diff
changeset
|
633 | purple_conversation_get_max_message_size(PurpleConversation *conv); |
|
f60fcab02bd4
Reconsidered characters count callback for prpl API: make it per-conversation and distinguish infinite from undefined
Tomasz Wasilczyk <twasilczyk@pidgin.im>
parents:
33578
diff
changeset
|
634 | |
| 4359 | 635 | /*@}*/ |
| 636 | ||
|
4469
ef60c820b884
[gaim-migrate @ 4744]
Christian Hammond <chipx86@chipx86.com>
parents:
4465
diff
changeset
|
637 | /**************************************************************************/ |
|
34600
3180ebbd06be
Added GObject structures, moved things around, renamed functions as GObject methods.
Ankit Vani <a@nevitus.org>
parents:
34599
diff
changeset
|
638 | /** @name Conversation Helper API */ |
|
3180ebbd06be
Added GObject structures, moved things around, renamed functions as GObject methods.
Ankit Vani <a@nevitus.org>
parents:
34599
diff
changeset
|
639 | /**************************************************************************/ |
|
3180ebbd06be
Added GObject structures, moved things around, renamed functions as GObject methods.
Ankit Vani <a@nevitus.org>
parents:
34599
diff
changeset
|
640 | /*@{*/ |
|
3180ebbd06be
Added GObject structures, moved things around, renamed functions as GObject methods.
Ankit Vani <a@nevitus.org>
parents:
34599
diff
changeset
|
641 | |
|
3180ebbd06be
Added GObject structures, moved things around, renamed functions as GObject methods.
Ankit Vani <a@nevitus.org>
parents:
34599
diff
changeset
|
642 | /** |
|
3180ebbd06be
Added GObject structures, moved things around, renamed functions as GObject methods.
Ankit Vani <a@nevitus.org>
parents:
34599
diff
changeset
|
643 | * Presents an IM-error to the user |
|
3180ebbd06be
Added GObject structures, moved things around, renamed functions as GObject methods.
Ankit Vani <a@nevitus.org>
parents:
34599
diff
changeset
|
644 | * |
|
3180ebbd06be
Added GObject structures, moved things around, renamed functions as GObject methods.
Ankit Vani <a@nevitus.org>
parents:
34599
diff
changeset
|
645 | * This is a helper function to find a conversation, write an error to it, and |
|
3180ebbd06be
Added GObject structures, moved things around, renamed functions as GObject methods.
Ankit Vani <a@nevitus.org>
parents:
34599
diff
changeset
|
646 | * raise the window. If a conversation with this user doesn't already exist, |
|
3180ebbd06be
Added GObject structures, moved things around, renamed functions as GObject methods.
Ankit Vani <a@nevitus.org>
parents:
34599
diff
changeset
|
647 | * the function will return FALSE and the calling function can attempt to present |
|
3180ebbd06be
Added GObject structures, moved things around, renamed functions as GObject methods.
Ankit Vani <a@nevitus.org>
parents:
34599
diff
changeset
|
648 | * the error another way (purple_notify_error, most likely) |
|
3180ebbd06be
Added GObject structures, moved things around, renamed functions as GObject methods.
Ankit Vani <a@nevitus.org>
parents:
34599
diff
changeset
|
649 | * |
|
3180ebbd06be
Added GObject structures, moved things around, renamed functions as GObject methods.
Ankit Vani <a@nevitus.org>
parents:
34599
diff
changeset
|
650 | * @param who The user this error is about |
|
3180ebbd06be
Added GObject structures, moved things around, renamed functions as GObject methods.
Ankit Vani <a@nevitus.org>
parents:
34599
diff
changeset
|
651 | * @param account The account this error is on |
|
3180ebbd06be
Added GObject structures, moved things around, renamed functions as GObject methods.
Ankit Vani <a@nevitus.org>
parents:
34599
diff
changeset
|
652 | * @param what The error |
|
3180ebbd06be
Added GObject structures, moved things around, renamed functions as GObject methods.
Ankit Vani <a@nevitus.org>
parents:
34599
diff
changeset
|
653 | * @return TRUE if the error was presented, else FALSE |
|
3180ebbd06be
Added GObject structures, moved things around, renamed functions as GObject methods.
Ankit Vani <a@nevitus.org>
parents:
34599
diff
changeset
|
654 | */ |
|
34868
faa5b053f310
Replaced purple_conversation_helper_present_error() with simpler purple_conversation_present_error()
Ankit Vani <a@nevitus.org>
parents:
34835
diff
changeset
|
655 | gboolean purple_conversation_present_error(const char *who, PurpleAccount *account, const char *what); |
|
34600
3180ebbd06be
Added GObject structures, moved things around, renamed functions as GObject methods.
Ankit Vani <a@nevitus.org>
parents:
34599
diff
changeset
|
656 | |
|
3180ebbd06be
Added GObject structures, moved things around, renamed functions as GObject methods.
Ankit Vani <a@nevitus.org>
parents:
34599
diff
changeset
|
657 | /*@}*/ |
|
3180ebbd06be
Added GObject structures, moved things around, renamed functions as GObject methods.
Ankit Vani <a@nevitus.org>
parents:
34599
diff
changeset
|
658 | |
|
3180ebbd06be
Added GObject structures, moved things around, renamed functions as GObject methods.
Ankit Vani <a@nevitus.org>
parents:
34599
diff
changeset
|
659 | /**************************************************************************/ |
|
3180ebbd06be
Added GObject structures, moved things around, renamed functions as GObject methods.
Ankit Vani <a@nevitus.org>
parents:
34599
diff
changeset
|
660 | /** @name Conversation Message API */ |
|
6485
3c7ba18e32f1
[gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
6414
diff
changeset
|
661 | /**************************************************************************/ |
|
3c7ba18e32f1
[gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
6414
diff
changeset
|
662 | /*@{*/ |
|
3c7ba18e32f1
[gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
6414
diff
changeset
|
663 | |
|
3c7ba18e32f1
[gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
6414
diff
changeset
|
664 | /** |
|
34667
56e06ab47188
Made PurpleConversationMessage a GBoxed
Ankit Vani <a@nevitus.org>
parents:
34666
diff
changeset
|
665 | * Returns the GType for the PurpleConversationMessage boxed structure. |
|
56e06ab47188
Made PurpleConversationMessage a GBoxed
Ankit Vani <a@nevitus.org>
parents:
34666
diff
changeset
|
666 | */ |
|
56e06ab47188
Made PurpleConversationMessage a GBoxed
Ankit Vani <a@nevitus.org>
parents:
34666
diff
changeset
|
667 | GType purple_conversation_message_get_type(void); |
|
56e06ab47188
Made PurpleConversationMessage a GBoxed
Ankit Vani <a@nevitus.org>
parents:
34666
diff
changeset
|
668 | |
|
56e06ab47188
Made PurpleConversationMessage a GBoxed
Ankit Vani <a@nevitus.org>
parents:
34666
diff
changeset
|
669 | /** |
|
34599
0b1b22f5e2ec
Begun GObjectification of PurpleConversation.
Ankit Vani <a@nevitus.org>
parents:
34595
diff
changeset
|
670 | * Get the sender from a PurpleConversationMessage |
|
19590
cf4e3e71bbc0
Store message history in a conversation, and provide API to access the history.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
19120
diff
changeset
|
671 | * |
|
34599
0b1b22f5e2ec
Begun GObjectification of PurpleConversation.
Ankit Vani <a@nevitus.org>
parents:
34595
diff
changeset
|
672 | * @param msg A PurpleConversationMessage |
|
6485
3c7ba18e32f1
[gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
6414
diff
changeset
|
673 | * |
|
19590
cf4e3e71bbc0
Store message history in a conversation, and provide API to access the history.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
19120
diff
changeset
|
674 | * @return The name of the sender of the message |
|
6485
3c7ba18e32f1
[gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
6414
diff
changeset
|
675 | */ |
|
34599
0b1b22f5e2ec
Begun GObjectification of PurpleConversation.
Ankit Vani <a@nevitus.org>
parents:
34595
diff
changeset
|
676 | const char *purple_conversation_message_get_sender(const PurpleConversationMessage *msg); |
|
19590
cf4e3e71bbc0
Store message history in a conversation, and provide API to access the history.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
19120
diff
changeset
|
677 | |
|
cf4e3e71bbc0
Store message history in a conversation, and provide API to access the history.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
19120
diff
changeset
|
678 | /** |
|
34599
0b1b22f5e2ec
Begun GObjectification of PurpleConversation.
Ankit Vani <a@nevitus.org>
parents:
34595
diff
changeset
|
679 | * Get the message from a PurpleConversationMessage |
|
19590
cf4e3e71bbc0
Store message history in a conversation, and provide API to access the history.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
19120
diff
changeset
|
680 | * |
|
34599
0b1b22f5e2ec
Begun GObjectification of PurpleConversation.
Ankit Vani <a@nevitus.org>
parents:
34595
diff
changeset
|
681 | * @param msg A PurpleConversationMessage |
|
19590
cf4e3e71bbc0
Store message history in a conversation, and provide API to access the history.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
19120
diff
changeset
|
682 | * |
|
cf4e3e71bbc0
Store message history in a conversation, and provide API to access the history.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
19120
diff
changeset
|
683 | * @return The name of the sender of the message |
|
cf4e3e71bbc0
Store message history in a conversation, and provide API to access the history.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
19120
diff
changeset
|
684 | */ |
|
34599
0b1b22f5e2ec
Begun GObjectification of PurpleConversation.
Ankit Vani <a@nevitus.org>
parents:
34595
diff
changeset
|
685 | const char *purple_conversation_message_get_message(const PurpleConversationMessage *msg); |
|
6485
3c7ba18e32f1
[gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
6414
diff
changeset
|
686 | |
|
5872
754c63f29b77
[gaim-migrate @ 6304]
Christian Hammond <chipx86@chipx86.com>
parents:
5858
diff
changeset
|
687 | /** |
|
34599
0b1b22f5e2ec
Begun GObjectification of PurpleConversation.
Ankit Vani <a@nevitus.org>
parents:
34595
diff
changeset
|
688 | * Get the message-flags of a PurpleConversationMessage |
|
19590
cf4e3e71bbc0
Store message history in a conversation, and provide API to access the history.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
19120
diff
changeset
|
689 | * |
|
34599
0b1b22f5e2ec
Begun GObjectification of PurpleConversation.
Ankit Vani <a@nevitus.org>
parents:
34595
diff
changeset
|
690 | * @param msg A PurpleConversationMessage |
|
19590
cf4e3e71bbc0
Store message history in a conversation, and provide API to access the history.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
19120
diff
changeset
|
691 | * |
|
22082
617ac5b2b597
Docu patch from Simon Wenner. Closes #4497.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
21453
diff
changeset
|
692 | * @return The message flags |
|
5872
754c63f29b77
[gaim-migrate @ 6304]
Christian Hammond <chipx86@chipx86.com>
parents:
5858
diff
changeset
|
693 | */ |
|
34620
e49aa67344e1
Renamed PurpleConversationMessageFlags back to PurpleMessageFlags.
Ankit Vani <a@nevitus.org>
parents:
34616
diff
changeset
|
694 | PurpleMessageFlags purple_conversation_message_get_flags(const PurpleConversationMessage *msg); |
|
6485
3c7ba18e32f1
[gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
6414
diff
changeset
|
695 | |
|
3c7ba18e32f1
[gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
6414
diff
changeset
|
696 | /** |
|
34599
0b1b22f5e2ec
Begun GObjectification of PurpleConversation.
Ankit Vani <a@nevitus.org>
parents:
34595
diff
changeset
|
697 | * Get the timestamp of a PurpleConversationMessage |
|
19590
cf4e3e71bbc0
Store message history in a conversation, and provide API to access the history.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
19120
diff
changeset
|
698 | * |
|
34599
0b1b22f5e2ec
Begun GObjectification of PurpleConversation.
Ankit Vani <a@nevitus.org>
parents:
34595
diff
changeset
|
699 | * @param msg A PurpleConversationMessage |
|
19590
cf4e3e71bbc0
Store message history in a conversation, and provide API to access the history.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
19120
diff
changeset
|
700 | * |
|
22082
617ac5b2b597
Docu patch from Simon Wenner. Closes #4497.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
21453
diff
changeset
|
701 | * @return The timestamp of the message |
|
6485
3c7ba18e32f1
[gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
6414
diff
changeset
|
702 | */ |
|
34599
0b1b22f5e2ec
Begun GObjectification of PurpleConversation.
Ankit Vani <a@nevitus.org>
parents:
34595
diff
changeset
|
703 | time_t purple_conversation_message_get_timestamp(const PurpleConversationMessage *msg); |
|
32690
ec1fca0a6b5d
Hide struct _PurpleConvMessage.
Andrew Victor <andrew.victor@mxit.com>
parents:
32632
diff
changeset
|
704 | |
|
ec1fca0a6b5d
Hide struct _PurpleConvMessage.
Andrew Victor <andrew.victor@mxit.com>
parents:
32632
diff
changeset
|
705 | /** |
|
34599
0b1b22f5e2ec
Begun GObjectification of PurpleConversation.
Ankit Vani <a@nevitus.org>
parents:
34595
diff
changeset
|
706 | * Get the alias from a PurpleConversationMessage |
|
32690
ec1fca0a6b5d
Hide struct _PurpleConvMessage.
Andrew Victor <andrew.victor@mxit.com>
parents:
32632
diff
changeset
|
707 | * |
|
34599
0b1b22f5e2ec
Begun GObjectification of PurpleConversation.
Ankit Vani <a@nevitus.org>
parents:
34595
diff
changeset
|
708 | * @param msg A PurpleConversationMessage |
|
32690
ec1fca0a6b5d
Hide struct _PurpleConvMessage.
Andrew Victor <andrew.victor@mxit.com>
parents:
32632
diff
changeset
|
709 | * |
|
ec1fca0a6b5d
Hide struct _PurpleConvMessage.
Andrew Victor <andrew.victor@mxit.com>
parents:
32632
diff
changeset
|
710 | * @return The alias of the sender of the message |
|
ec1fca0a6b5d
Hide struct _PurpleConvMessage.
Andrew Victor <andrew.victor@mxit.com>
parents:
32632
diff
changeset
|
711 | */ |
|
34599
0b1b22f5e2ec
Begun GObjectification of PurpleConversation.
Ankit Vani <a@nevitus.org>
parents:
34595
diff
changeset
|
712 | const char *purple_conversation_message_get_alias(const PurpleConversationMessage *msg); |
|
32690
ec1fca0a6b5d
Hide struct _PurpleConvMessage.
Andrew Victor <andrew.victor@mxit.com>
parents:
32632
diff
changeset
|
713 | |
|
ec1fca0a6b5d
Hide struct _PurpleConvMessage.
Andrew Victor <andrew.victor@mxit.com>
parents:
32632
diff
changeset
|
714 | /** |
|
34599
0b1b22f5e2ec
Begun GObjectification of PurpleConversation.
Ankit Vani <a@nevitus.org>
parents:
34595
diff
changeset
|
715 | * Get the conversation associated with the PurpleConversationMessage |
|
32690
ec1fca0a6b5d
Hide struct _PurpleConvMessage.
Andrew Victor <andrew.victor@mxit.com>
parents:
32632
diff
changeset
|
716 | * |
|
34599
0b1b22f5e2ec
Begun GObjectification of PurpleConversation.
Ankit Vani <a@nevitus.org>
parents:
34595
diff
changeset
|
717 | * @param msg A PurpleConversationMessage |
|
32690
ec1fca0a6b5d
Hide struct _PurpleConvMessage.
Andrew Victor <andrew.victor@mxit.com>
parents:
32632
diff
changeset
|
718 | * |
|
ec1fca0a6b5d
Hide struct _PurpleConvMessage.
Andrew Victor <andrew.victor@mxit.com>
parents:
32632
diff
changeset
|
719 | * @return The conversation |
|
ec1fca0a6b5d
Hide struct _PurpleConvMessage.
Andrew Victor <andrew.victor@mxit.com>
parents:
32632
diff
changeset
|
720 | */ |
|
34622
753f46dd000f
Global replace - renamed functions and types according to GObject-based PurpleConversation API
Ankit Vani <a@nevitus.org>
parents:
34621
diff
changeset
|
721 | PurpleConversation *purple_conversation_message_get_conversation(const PurpleConversationMessage *msg); |
|
5872
754c63f29b77
[gaim-migrate @ 6304]
Christian Hammond <chipx86@chipx86.com>
parents:
5858
diff
changeset
|
722 | |
|
4481
1a02f276e41e
[gaim-migrate @ 4756]
Christian Hammond <chipx86@chipx86.com>
parents:
4476
diff
changeset
|
723 | /*@}*/ |
|
1a02f276e41e
[gaim-migrate @ 4756]
Christian Hammond <chipx86@chipx86.com>
parents:
4476
diff
changeset
|
724 | |
|
32787
7072f190d6ad
Use G_BEGIN/END_DECLS in public libpurple files. This was
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
32698
diff
changeset
|
725 | G_END_DECLS |
|
5944
f19df037ac58
[gaim-migrate @ 6385]
Christian Hammond <chipx86@chipx86.com>
parents:
5872
diff
changeset
|
726 | |
| 15884 | 727 | #endif /* _PURPLE_CONVERSATION_H_ */ |