Sat, 22 Jun 2013 22:41:25 +0530
Added some PurpleConversation virtual class methods.
* purple_conversation_write()
* purple_conversation_send()
* purple_conversation_send_with_flags()
| 4359 | 1 | /** |
| 2 | * @file conversation.h Conversation 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 | |
| 4359 | 36 | /**************************************************************************/ |
| 37 | /** Data Structures */ | |
| 38 | /**************************************************************************/ | |
| 39 | ||
|
34599
0b1b22f5e2ec
Begun GObjectification of PurpleConversation.
Ankit Vani <a@nevitus.org>
parents:
34595
diff
changeset
|
40 | /** @copydoc _PurpleConversation */ |
|
0b1b22f5e2ec
Begun GObjectification of PurpleConversation.
Ankit Vani <a@nevitus.org>
parents:
34595
diff
changeset
|
41 | typedef struct _PurpleConversation PurpleConversation; |
|
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 _PurpleConversationClass PurpleConversationClass; |
|
34600
3180ebbd06be
Added GObject structures, moved things around, renamed functions as GObject methods.
Ankit Vani <a@nevitus.org>
parents:
34599
diff
changeset
|
44 | |
|
23514
f5c4c1cb7b6f
Sprinkle @copydoc around to squash "ref could not be resolved" Doxygen warnings,
Will Thompson <resiak@pidgin.im>
parents:
23063
diff
changeset
|
45 | /** @copydoc _PurpleConversationUiOps */ |
|
34599
0b1b22f5e2ec
Begun GObjectification of PurpleConversation.
Ankit Vani <a@nevitus.org>
parents:
34595
diff
changeset
|
46 | typedef struct _PurpleConversationUiOps PurpleConversationUiOps; |
|
0b1b22f5e2ec
Begun GObjectification of PurpleConversation.
Ankit Vani <a@nevitus.org>
parents:
34595
diff
changeset
|
47 | /** @copydoc _PurpleConversationMessage */ |
|
0b1b22f5e2ec
Begun GObjectification of PurpleConversation.
Ankit Vani <a@nevitus.org>
parents:
34595
diff
changeset
|
48 | typedef struct _PurpleConversationMessage PurpleConversationMessage; |
| 4359 | 49 | |
| 50 | /** | |
| 51 | * Conversation update type. | |
| 52 | */ | |
|
5944
f19df037ac58
[gaim-migrate @ 6385]
Christian Hammond <chipx86@chipx86.com>
parents:
5872
diff
changeset
|
53 | typedef enum |
| 4359 | 54 | { |
|
34599
0b1b22f5e2ec
Begun GObjectification of PurpleConversation.
Ankit Vani <a@nevitus.org>
parents:
34595
diff
changeset
|
55 | 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
|
56 | was added. */ |
|
0b1b22f5e2ec
Begun GObjectification of PurpleConversation.
Ankit Vani <a@nevitus.org>
parents:
34595
diff
changeset
|
57 | PURPLE_CONVERSATION_UPDATE_REMOVE, /**< The buddy associated with the conversation |
|
0b1b22f5e2ec
Begun GObjectification of PurpleConversation.
Ankit Vani <a@nevitus.org>
parents:
34595
diff
changeset
|
58 | was removed. */ |
|
0b1b22f5e2ec
Begun GObjectification of PurpleConversation.
Ankit Vani <a@nevitus.org>
parents:
34595
diff
changeset
|
59 | PURPLE_CONVERSATION_UPDATE_ACCOUNT, /**< The purple_account was changed. */ |
|
0b1b22f5e2ec
Begun GObjectification of PurpleConversation.
Ankit Vani <a@nevitus.org>
parents:
34595
diff
changeset
|
60 | PURPLE_CONVERSATION_UPDATE_TYPING, /**< The typing state was updated. */ |
|
0b1b22f5e2ec
Begun GObjectification of PurpleConversation.
Ankit Vani <a@nevitus.org>
parents:
34595
diff
changeset
|
61 | PURPLE_CONVERSATION_UPDATE_UNSEEN, /**< The unseen state was updated. */ |
|
0b1b22f5e2ec
Begun GObjectification of PurpleConversation.
Ankit Vani <a@nevitus.org>
parents:
34595
diff
changeset
|
62 | PURPLE_CONVERSATION_UPDATE_LOGGING, /**< Logging for this conversation was |
|
0b1b22f5e2ec
Begun GObjectification of PurpleConversation.
Ankit Vani <a@nevitus.org>
parents:
34595
diff
changeset
|
63 | enabled or disabled. */ |
|
0b1b22f5e2ec
Begun GObjectification of PurpleConversation.
Ankit Vani <a@nevitus.org>
parents:
34595
diff
changeset
|
64 | PURPLE_CONVERSATION_UPDATE_TOPIC, /**< The topic for a chat was updated. */ |
| 4359 | 65 | /* |
| 66 | * XXX These need to go when we implement a more generic core/UI event | |
| 67 | * system. | |
| 68 | */ | |
|
34599
0b1b22f5e2ec
Begun GObjectification of PurpleConversation.
Ankit Vani <a@nevitus.org>
parents:
34595
diff
changeset
|
69 | 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
|
70 | 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
|
71 | PURPLE_CONVERSATION_UPDATE_AWAY, /**< The other user went away. */ |
|
0b1b22f5e2ec
Begun GObjectification of PurpleConversation.
Ankit Vani <a@nevitus.org>
parents:
34595
diff
changeset
|
72 | PURPLE_CONVERSATION_UPDATE_ICON, /**< The other user's buddy icon changed. */ |
|
0b1b22f5e2ec
Begun GObjectification of PurpleConversation.
Ankit Vani <a@nevitus.org>
parents:
34595
diff
changeset
|
73 | PURPLE_CONVERSATION_UPDATE_TITLE, |
|
0b1b22f5e2ec
Begun GObjectification of PurpleConversation.
Ankit Vani <a@nevitus.org>
parents:
34595
diff
changeset
|
74 | PURPLE_CONVERSATION_UPDATE_CHATLEFT, |
| 10665 | 75 | |
|
34599
0b1b22f5e2ec
Begun GObjectification of PurpleConversation.
Ankit Vani <a@nevitus.org>
parents:
34595
diff
changeset
|
76 | PURPLE_CONVERSATION_UPDATE_FEATURES /**< The features for a chat have changed */ |
|
5944
f19df037ac58
[gaim-migrate @ 6385]
Christian Hammond <chipx86@chipx86.com>
parents:
5872
diff
changeset
|
77 | |
|
34599
0b1b22f5e2ec
Begun GObjectification of PurpleConversation.
Ankit Vani <a@nevitus.org>
parents:
34595
diff
changeset
|
78 | } PurpleConversationUpdateType; |
| 4359 | 79 | |
| 80 | /** | |
|
6621
2a18ef3e5224
[gaim-migrate @ 7145]
Robert McQueen <robot101@debian.org>
parents:
6605
diff
changeset
|
81 | * 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
|
82 | */ |
|
34599
0b1b22f5e2ec
Begun GObjectification of PurpleConversation.
Ankit Vani <a@nevitus.org>
parents:
34595
diff
changeset
|
83 | typedef enum /*< flags >*/ |
|
6621
2a18ef3e5224
[gaim-migrate @ 7145]
Robert McQueen <robot101@debian.org>
parents:
6605
diff
changeset
|
84 | { |
|
34599
0b1b22f5e2ec
Begun GObjectification of PurpleConversation.
Ankit Vani <a@nevitus.org>
parents:
34595
diff
changeset
|
85 | PURPLE_CONVERSATION_MESSAGE_SEND = 0x0001, /**< Outgoing message. */ |
|
0b1b22f5e2ec
Begun GObjectification of PurpleConversation.
Ankit Vani <a@nevitus.org>
parents:
34595
diff
changeset
|
86 | PURPLE_CONVERSATION_MESSAGE_RECV = 0x0002, /**< Incoming message. */ |
|
0b1b22f5e2ec
Begun GObjectification of PurpleConversation.
Ankit Vani <a@nevitus.org>
parents:
34595
diff
changeset
|
87 | PURPLE_CONVERSATION_MESSAGE_SYSTEM = 0x0004, /**< System message. */ |
|
0b1b22f5e2ec
Begun GObjectification of PurpleConversation.
Ankit Vani <a@nevitus.org>
parents:
34595
diff
changeset
|
88 | PURPLE_CONVERSATION_MESSAGE_AUTO_RESP = 0x0008, /**< Auto response. */ |
|
0b1b22f5e2ec
Begun GObjectification of PurpleConversation.
Ankit Vani <a@nevitus.org>
parents:
34595
diff
changeset
|
89 | PURPLE_CONVERSATION_MESSAGE_ACTIVE_ONLY = 0x0010, /**< Hint to the UI that this |
|
0b1b22f5e2ec
Begun GObjectification of PurpleConversation.
Ankit Vani <a@nevitus.org>
parents:
34595
diff
changeset
|
90 | message should not be |
|
0b1b22f5e2ec
Begun GObjectification of PurpleConversation.
Ankit Vani <a@nevitus.org>
parents:
34595
diff
changeset
|
91 | shown in conversations |
|
0b1b22f5e2ec
Begun GObjectification of PurpleConversation.
Ankit Vani <a@nevitus.org>
parents:
34595
diff
changeset
|
92 | which are only open for |
|
0b1b22f5e2ec
Begun GObjectification of PurpleConversation.
Ankit Vani <a@nevitus.org>
parents:
34595
diff
changeset
|
93 | internal UI purposes |
|
0b1b22f5e2ec
Begun GObjectification of PurpleConversation.
Ankit Vani <a@nevitus.org>
parents:
34595
diff
changeset
|
94 | (e.g. for contact-aware |
|
0b1b22f5e2ec
Begun GObjectification of PurpleConversation.
Ankit Vani <a@nevitus.org>
parents:
34595
diff
changeset
|
95 | conversations). */ |
|
0b1b22f5e2ec
Begun GObjectification of PurpleConversation.
Ankit Vani <a@nevitus.org>
parents:
34595
diff
changeset
|
96 | PURPLE_CONVERSATION_MESSAGE_NICK = 0x0020, /**< Contains your nick. */ |
|
0b1b22f5e2ec
Begun GObjectification of PurpleConversation.
Ankit Vani <a@nevitus.org>
parents:
34595
diff
changeset
|
97 | PURPLE_CONVERSATION_MESSAGE_NO_LOG = 0x0040, /**< Do not log. */ |
|
0b1b22f5e2ec
Begun GObjectification of PurpleConversation.
Ankit Vani <a@nevitus.org>
parents:
34595
diff
changeset
|
98 | PURPLE_CONVERSATION_MESSAGE_WHISPER = 0x0080, /**< Whispered message. */ |
|
0b1b22f5e2ec
Begun GObjectification of PurpleConversation.
Ankit Vani <a@nevitus.org>
parents:
34595
diff
changeset
|
99 | PURPLE_CONVERSATION_MESSAGE_ERROR = 0x0200, /**< Error message. */ |
|
0b1b22f5e2ec
Begun GObjectification of PurpleConversation.
Ankit Vani <a@nevitus.org>
parents:
34595
diff
changeset
|
100 | PURPLE_CONVERSATION_MESSAGE_DELAYED = 0x0400, /**< Delayed message. */ |
|
0b1b22f5e2ec
Begun GObjectification of PurpleConversation.
Ankit Vani <a@nevitus.org>
parents:
34595
diff
changeset
|
101 | PURPLE_CONVERSATION_MESSAGE_RAW = 0x0800, /**< "Raw" message - don't |
|
0b1b22f5e2ec
Begun GObjectification of PurpleConversation.
Ankit Vani <a@nevitus.org>
parents:
34595
diff
changeset
|
102 | apply formatting */ |
|
0b1b22f5e2ec
Begun GObjectification of PurpleConversation.
Ankit Vani <a@nevitus.org>
parents:
34595
diff
changeset
|
103 | PURPLE_CONVERSATION_MESSAGE_IMAGES = 0x1000, /**< Message contains images */ |
|
0b1b22f5e2ec
Begun GObjectification of PurpleConversation.
Ankit Vani <a@nevitus.org>
parents:
34595
diff
changeset
|
104 | PURPLE_CONVERSATION_MESSAGE_NOTIFY = 0x2000, /**< Message is a notification */ |
|
0b1b22f5e2ec
Begun GObjectification of PurpleConversation.
Ankit Vani <a@nevitus.org>
parents:
34595
diff
changeset
|
105 | PURPLE_CONVERSATION_MESSAGE_NO_LINKIFY = 0x4000, /**< Message should not be auto- |
|
0b1b22f5e2ec
Begun GObjectification of PurpleConversation.
Ankit Vani <a@nevitus.org>
parents:
34595
diff
changeset
|
106 | linkified */ |
|
0b1b22f5e2ec
Begun GObjectification of PurpleConversation.
Ankit Vani <a@nevitus.org>
parents:
34595
diff
changeset
|
107 | PURPLE_CONVERSATION_MESSAGE_INVISIBLE = 0x8000 /**< Message should not be displayed */ |
|
0b1b22f5e2ec
Begun GObjectification of PurpleConversation.
Ankit Vani <a@nevitus.org>
parents:
34595
diff
changeset
|
108 | } PurpleConversationMessageFlags; |
|
6621
2a18ef3e5224
[gaim-migrate @ 7145]
Robert McQueen <robot101@debian.org>
parents:
6605
diff
changeset
|
109 | |
|
5872
754c63f29b77
[gaim-migrate @ 6304]
Christian Hammond <chipx86@chipx86.com>
parents:
5858
diff
changeset
|
110 | #include "account.h" |
|
9718
aeee69c6c784
[gaim-migrate @ 10579]
Mark Doliner <markdoliner@pidgin.im>
parents:
9627
diff
changeset
|
111 | #include "buddyicon.h" |
| 7431 | 112 | #include "log.h" |
|
5872
754c63f29b77
[gaim-migrate @ 6304]
Christian Hammond <chipx86@chipx86.com>
parents:
5858
diff
changeset
|
113 | |
|
34601
bccb29d7be14
Removed GObject for PurpleConversationMessage, this will be a GBoxed
Ankit Vani <a@nevitus.org>
parents:
34600
diff
changeset
|
114 | /**************************************************************************/ |
|
bccb29d7be14
Removed GObject for PurpleConversationMessage, this will be a GBoxed
Ankit Vani <a@nevitus.org>
parents:
34600
diff
changeset
|
115 | /** PurpleConversation */ |
|
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 | /** Structure representing a conversation instance. */ |
|
34599
0b1b22f5e2ec
Begun GObjectification of PurpleConversation.
Ankit Vani <a@nevitus.org>
parents:
34595
diff
changeset
|
118 | struct _PurpleConversation |
|
0b1b22f5e2ec
Begun GObjectification of PurpleConversation.
Ankit Vani <a@nevitus.org>
parents:
34595
diff
changeset
|
119 | { |
|
0b1b22f5e2ec
Begun GObjectification of PurpleConversation.
Ankit Vani <a@nevitus.org>
parents:
34595
diff
changeset
|
120 | /*< private >*/ |
|
0b1b22f5e2ec
Begun GObjectification of PurpleConversation.
Ankit Vani <a@nevitus.org>
parents:
34595
diff
changeset
|
121 | GObject gparent; |
|
0b1b22f5e2ec
Begun GObjectification of PurpleConversation.
Ankit Vani <a@nevitus.org>
parents:
34595
diff
changeset
|
122 | |
|
0b1b22f5e2ec
Begun GObjectification of PurpleConversation.
Ankit Vani <a@nevitus.org>
parents:
34595
diff
changeset
|
123 | void (*_purple_reserved1)(void); |
|
0b1b22f5e2ec
Begun GObjectification of PurpleConversation.
Ankit Vani <a@nevitus.org>
parents:
34595
diff
changeset
|
124 | void (*_purple_reserved2)(void); |
|
0b1b22f5e2ec
Begun GObjectification of PurpleConversation.
Ankit Vani <a@nevitus.org>
parents:
34595
diff
changeset
|
125 | void (*_purple_reserved3)(void); |
|
0b1b22f5e2ec
Begun GObjectification of PurpleConversation.
Ankit Vani <a@nevitus.org>
parents:
34595
diff
changeset
|
126 | void (*_purple_reserved4)(void); |
|
0b1b22f5e2ec
Begun GObjectification of PurpleConversation.
Ankit Vani <a@nevitus.org>
parents:
34595
diff
changeset
|
127 | }; |
|
0b1b22f5e2ec
Begun GObjectification of PurpleConversation.
Ankit Vani <a@nevitus.org>
parents:
34595
diff
changeset
|
128 | |
|
34601
bccb29d7be14
Removed GObject for PurpleConversationMessage, this will be a GBoxed
Ankit Vani <a@nevitus.org>
parents:
34600
diff
changeset
|
129 | /** Base class for all #PurpleConversation's */ |
|
34599
0b1b22f5e2ec
Begun GObjectification of PurpleConversation.
Ankit Vani <a@nevitus.org>
parents:
34595
diff
changeset
|
130 | struct _PurpleConversationClass { |
|
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 | GObjectClass parent_class; |
|
0b1b22f5e2ec
Begun GObjectification of PurpleConversation.
Ankit Vani <a@nevitus.org>
parents:
34595
diff
changeset
|
133 | |
|
34611
255148c286ab
Added some PurpleConversation virtual class methods.
Ankit Vani <a@nevitus.org>
parents:
34609
diff
changeset
|
134 | /** @copydoc purple_conversation_write() TODO */ |
|
255148c286ab
Added some PurpleConversation virtual class methods.
Ankit Vani <a@nevitus.org>
parents:
34609
diff
changeset
|
135 | void (*write)(PurpleConversation *conv, const char *who, |
|
255148c286ab
Added some PurpleConversation virtual class methods.
Ankit Vani <a@nevitus.org>
parents:
34609
diff
changeset
|
136 | const char *message, PurpleConversationMessageFlags flags, |
|
255148c286ab
Added some PurpleConversation virtual class methods.
Ankit Vani <a@nevitus.org>
parents:
34609
diff
changeset
|
137 | time_t mtime); |
|
255148c286ab
Added some PurpleConversation virtual class methods.
Ankit Vani <a@nevitus.org>
parents:
34609
diff
changeset
|
138 | |
|
255148c286ab
Added some PurpleConversation virtual class methods.
Ankit Vani <a@nevitus.org>
parents:
34609
diff
changeset
|
139 | /** TODO pure virtual |
|
255148c286ab
Added some PurpleConversation virtual class methods.
Ankit Vani <a@nevitus.org>
parents:
34609
diff
changeset
|
140 | * Sends a message to this conversation. |
|
255148c286ab
Added some PurpleConversation virtual class methods.
Ankit Vani <a@nevitus.org>
parents:
34609
diff
changeset
|
141 | * |
|
255148c286ab
Added some PurpleConversation virtual class methods.
Ankit Vani <a@nevitus.org>
parents:
34609
diff
changeset
|
142 | * @param conv The conversation. |
|
255148c286ab
Added some PurpleConversation virtual class methods.
Ankit Vani <a@nevitus.org>
parents:
34609
diff
changeset
|
143 | * @param message The message to send. |
|
255148c286ab
Added some PurpleConversation virtual class methods.
Ankit Vani <a@nevitus.org>
parents:
34609
diff
changeset
|
144 | */ |
|
255148c286ab
Added some PurpleConversation virtual class methods.
Ankit Vani <a@nevitus.org>
parents:
34609
diff
changeset
|
145 | void (*send)(PurpleConversation *conv, const char *message); |
|
255148c286ab
Added some PurpleConversation virtual class methods.
Ankit Vani <a@nevitus.org>
parents:
34609
diff
changeset
|
146 | |
|
255148c286ab
Added some PurpleConversation virtual class methods.
Ankit Vani <a@nevitus.org>
parents:
34609
diff
changeset
|
147 | /** TODO pure virtual |
|
255148c286ab
Added some PurpleConversation virtual class methods.
Ankit Vani <a@nevitus.org>
parents:
34609
diff
changeset
|
148 | * Sends a message to this conversation with specified flags. |
|
255148c286ab
Added some PurpleConversation virtual class methods.
Ankit Vani <a@nevitus.org>
parents:
34609
diff
changeset
|
149 | * |
|
255148c286ab
Added some PurpleConversation virtual class methods.
Ankit Vani <a@nevitus.org>
parents:
34609
diff
changeset
|
150 | * @param conv The conversation. |
|
255148c286ab
Added some PurpleConversation virtual class methods.
Ankit Vani <a@nevitus.org>
parents:
34609
diff
changeset
|
151 | * @param message The message to send. |
|
255148c286ab
Added some PurpleConversation virtual class methods.
Ankit Vani <a@nevitus.org>
parents:
34609
diff
changeset
|
152 | * @param flags The PurpleConversationMessageFlags flags to use in addition to |
|
255148c286ab
Added some PurpleConversation virtual class methods.
Ankit Vani <a@nevitus.org>
parents:
34609
diff
changeset
|
153 | * PURPLE_CONVERSATION_MESSAGE_SEND. |
|
255148c286ab
Added some PurpleConversation virtual class methods.
Ankit Vani <a@nevitus.org>
parents:
34609
diff
changeset
|
154 | */ |
|
255148c286ab
Added some PurpleConversation virtual class methods.
Ankit Vani <a@nevitus.org>
parents:
34609
diff
changeset
|
155 | void (*send_with_flags)(PurpleConversation *conv, |
|
255148c286ab
Added some PurpleConversation virtual class methods.
Ankit Vani <a@nevitus.org>
parents:
34609
diff
changeset
|
156 | const char *message, PurpleConversationMessageFlags flags); |
|
255148c286ab
Added some PurpleConversation virtual class methods.
Ankit Vani <a@nevitus.org>
parents:
34609
diff
changeset
|
157 | |
|
34599
0b1b22f5e2ec
Begun GObjectification of PurpleConversation.
Ankit Vani <a@nevitus.org>
parents:
34595
diff
changeset
|
158 | void (*_purple_reserved1)(void); |
|
0b1b22f5e2ec
Begun GObjectification of PurpleConversation.
Ankit Vani <a@nevitus.org>
parents:
34595
diff
changeset
|
159 | void (*_purple_reserved2)(void); |
|
0b1b22f5e2ec
Begun GObjectification of PurpleConversation.
Ankit Vani <a@nevitus.org>
parents:
34595
diff
changeset
|
160 | void (*_purple_reserved3)(void); |
|
0b1b22f5e2ec
Begun GObjectification of PurpleConversation.
Ankit Vani <a@nevitus.org>
parents:
34595
diff
changeset
|
161 | void (*_purple_reserved4)(void); |
|
0b1b22f5e2ec
Begun GObjectification of PurpleConversation.
Ankit Vani <a@nevitus.org>
parents:
34595
diff
changeset
|
162 | }; |
|
0b1b22f5e2ec
Begun GObjectification of PurpleConversation.
Ankit Vani <a@nevitus.org>
parents:
34595
diff
changeset
|
163 | |
|
34601
bccb29d7be14
Removed GObject for PurpleConversationMessage, this will be a GBoxed
Ankit Vani <a@nevitus.org>
parents:
34600
diff
changeset
|
164 | /**************************************************************************/ |
|
bccb29d7be14
Removed GObject for PurpleConversationMessage, this will be a GBoxed
Ankit Vani <a@nevitus.org>
parents:
34600
diff
changeset
|
165 | /** PurpleConversationUiOps */ |
|
bccb29d7be14
Removed GObject for PurpleConversationMessage, this will be a GBoxed
Ankit Vani <a@nevitus.org>
parents:
34600
diff
changeset
|
166 | /**************************************************************************/ |
|
5872
754c63f29b77
[gaim-migrate @ 6304]
Christian Hammond <chipx86@chipx86.com>
parents:
5858
diff
changeset
|
167 | /** |
| 4359 | 168 | * Conversation operations and events. |
| 169 | * | |
| 170 | * Any UI representing a conversation must assign a filled-out | |
| 15884 | 171 | * PurpleConversationUiOps structure to the PurpleConversation. |
| 4359 | 172 | */ |
| 15884 | 173 | struct _PurpleConversationUiOps |
| 4359 | 174 | { |
|
19120
18082e7316a9
Document most of PurpleConversationUiOps.
Will Thompson <resiak@pidgin.im>
parents:
18190
diff
changeset
|
175 | /** Called when @a conv is created (but before the @ref |
|
18082e7316a9
Document most of PurpleConversationUiOps.
Will Thompson <resiak@pidgin.im>
parents:
18190
diff
changeset
|
176 | * conversation-created signal is emitted). |
|
18082e7316a9
Document most of PurpleConversationUiOps.
Will Thompson <resiak@pidgin.im>
parents:
18190
diff
changeset
|
177 | */ |
| 15884 | 178 | void (*create_conversation)(PurpleConversation *conv); |
|
19120
18082e7316a9
Document most of PurpleConversationUiOps.
Will Thompson <resiak@pidgin.im>
parents:
18190
diff
changeset
|
179 | |
|
18082e7316a9
Document most of PurpleConversationUiOps.
Will Thompson <resiak@pidgin.im>
parents:
18190
diff
changeset
|
180 | /** Called just before @a conv is freed. */ |
| 15884 | 181 | void (*destroy_conversation)(PurpleConversation *conv); |
|
19120
18082e7316a9
Document most of PurpleConversationUiOps.
Will Thompson <resiak@pidgin.im>
parents:
18190
diff
changeset
|
182 | /** 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
|
183 | * fall back to using #write_conv. |
|
34599
0b1b22f5e2ec
Begun GObjectification of PurpleConversation.
Ankit Vani <a@nevitus.org>
parents:
34595
diff
changeset
|
184 | * @see purple_chat_conversation_write() |
|
19120
18082e7316a9
Document most of PurpleConversationUiOps.
Will Thompson <resiak@pidgin.im>
parents:
18190
diff
changeset
|
185 | */ |
| 15884 | 186 | void (*write_chat)(PurpleConversation *conv, const char *who, |
|
34599
0b1b22f5e2ec
Begun GObjectification of PurpleConversation.
Ankit Vani <a@nevitus.org>
parents:
34595
diff
changeset
|
187 | const char *message, PurpleConversationMessageFlags flags, |
|
0b1b22f5e2ec
Begun GObjectification of PurpleConversation.
Ankit Vani <a@nevitus.org>
parents:
34595
diff
changeset
|
188 | time_t mtime); |
|
19120
18082e7316a9
Document most of PurpleConversationUiOps.
Will Thompson <resiak@pidgin.im>
parents:
18190
diff
changeset
|
189 | /** 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
|
190 | * libpurple will fall back to using #write_conv. |
|
34599
0b1b22f5e2ec
Begun GObjectification of PurpleConversation.
Ankit Vani <a@nevitus.org>
parents:
34595
diff
changeset
|
191 | * @see purple_im_conversation_write() |
|
19120
18082e7316a9
Document most of PurpleConversationUiOps.
Will Thompson <resiak@pidgin.im>
parents:
18190
diff
changeset
|
192 | */ |
| 15884 | 193 | void (*write_im)(PurpleConversation *conv, const char *who, |
|
34599
0b1b22f5e2ec
Begun GObjectification of PurpleConversation.
Ankit Vani <a@nevitus.org>
parents:
34595
diff
changeset
|
194 | const char *message, PurpleConversationMessageFlags flags, |
| 8155 | 195 | 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
|
196 | /** 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
|
197 | * 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
|
198 | * 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
|
199 | * 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
|
200 | * 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
|
201 | * |
|
19120
18082e7316a9
Document most of PurpleConversationUiOps.
Will Thompson <resiak@pidgin.im>
parents:
18190
diff
changeset
|
202 | * @see purple_conversation_write() |
|
18082e7316a9
Document most of PurpleConversationUiOps.
Will Thompson <resiak@pidgin.im>
parents:
18190
diff
changeset
|
203 | */ |
|
18082e7316a9
Document most of PurpleConversationUiOps.
Will Thompson <resiak@pidgin.im>
parents:
18190
diff
changeset
|
204 | void (*write_conv)(PurpleConversation *conv, |
|
18082e7316a9
Document most of PurpleConversationUiOps.
Will Thompson <resiak@pidgin.im>
parents:
18190
diff
changeset
|
205 | const char *name, |
|
18082e7316a9
Document most of PurpleConversationUiOps.
Will Thompson <resiak@pidgin.im>
parents:
18190
diff
changeset
|
206 | const char *alias, |
|
18082e7316a9
Document most of PurpleConversationUiOps.
Will Thompson <resiak@pidgin.im>
parents:
18190
diff
changeset
|
207 | const char *message, |
|
34599
0b1b22f5e2ec
Begun GObjectification of PurpleConversation.
Ankit Vani <a@nevitus.org>
parents:
34595
diff
changeset
|
208 | PurpleConversationMessageFlags flags, |
| 8155 | 209 | time_t mtime); |
| 4359 | 210 | |
|
19120
18082e7316a9
Document most of PurpleConversationUiOps.
Will Thompson <resiak@pidgin.im>
parents:
18190
diff
changeset
|
211 | /** Add @a cbuddies to a chat. |
|
34599
0b1b22f5e2ec
Begun GObjectification of PurpleConversation.
Ankit Vani <a@nevitus.org>
parents:
34595
diff
changeset
|
212 | * @param cbuddies A @c GList of #PurpleChatConversationBuddy structs. |
|
19120
18082e7316a9
Document most of PurpleConversationUiOps.
Will Thompson <resiak@pidgin.im>
parents:
18190
diff
changeset
|
213 | * @param new_arrivals Whether join notices should be shown. |
|
18082e7316a9
Document most of PurpleConversationUiOps.
Will Thompson <resiak@pidgin.im>
parents:
18190
diff
changeset
|
214 | * (Join notices are actually written to the |
|
34599
0b1b22f5e2ec
Begun GObjectification of PurpleConversation.
Ankit Vani <a@nevitus.org>
parents:
34595
diff
changeset
|
215 | * conversation by |
|
0b1b22f5e2ec
Begun GObjectification of PurpleConversation.
Ankit Vani <a@nevitus.org>
parents:
34595
diff
changeset
|
216 | * #purple_chat_conversation_add_users().) |
|
19120
18082e7316a9
Document most of PurpleConversationUiOps.
Will Thompson <resiak@pidgin.im>
parents:
18190
diff
changeset
|
217 | */ |
|
18082e7316a9
Document most of PurpleConversationUiOps.
Will Thompson <resiak@pidgin.im>
parents:
18190
diff
changeset
|
218 | void (*chat_add_users)(PurpleConversation *conv, |
|
18082e7316a9
Document most of PurpleConversationUiOps.
Will Thompson <resiak@pidgin.im>
parents:
18190
diff
changeset
|
219 | GList *cbuddies, |
|
18082e7316a9
Document most of PurpleConversationUiOps.
Will Thompson <resiak@pidgin.im>
parents:
18190
diff
changeset
|
220 | gboolean new_arrivals); |
|
18082e7316a9
Document most of PurpleConversationUiOps.
Will Thompson <resiak@pidgin.im>
parents:
18190
diff
changeset
|
221 | /** 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
|
222 | * rename message is written to the conversation by libpurple.) |
|
18082e7316a9
Document most of PurpleConversationUiOps.
Will Thompson <resiak@pidgin.im>
parents:
18190
diff
changeset
|
223 | * @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
|
224 | * @see purple_chat_conversation_add_users() |
|
19120
18082e7316a9
Document most of PurpleConversationUiOps.
Will Thompson <resiak@pidgin.im>
parents:
18190
diff
changeset
|
225 | */ |
| 15884 | 226 | void (*chat_rename_user)(PurpleConversation *conv, const char *old_name, |
|
11485
fe334b13d1d0
[gaim-migrate @ 13727]
Peter Lawler <pidgin@bleeter.id.au>
parents:
11454
diff
changeset
|
227 | const char *new_name, const char *new_alias); |
|
19120
18082e7316a9
Document most of PurpleConversationUiOps.
Will Thompson <resiak@pidgin.im>
parents:
18190
diff
changeset
|
228 | /** 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
|
229 | * @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
|
230 | * @see purple_chat_conversation_rename_user() |
|
19120
18082e7316a9
Document most of PurpleConversationUiOps.
Will Thompson <resiak@pidgin.im>
parents:
18190
diff
changeset
|
231 | */ |
| 15884 | 232 | void (*chat_remove_users)(PurpleConversation *conv, GList *users); |
|
19120
18082e7316a9
Document most of PurpleConversationUiOps.
Will Thompson <resiak@pidgin.im>
parents:
18190
diff
changeset
|
233 | /** Called when a user's flags are changed. |
|
34599
0b1b22f5e2ec
Begun GObjectification of PurpleConversation.
Ankit Vani <a@nevitus.org>
parents:
34595
diff
changeset
|
234 | * @see purple_chat_conversation_user_set_flags() |
|
19120
18082e7316a9
Document most of PurpleConversationUiOps.
Will Thompson <resiak@pidgin.im>
parents:
18190
diff
changeset
|
235 | */ |
| 15884 | 236 | void (*chat_update_user)(PurpleConversation *conv, const char *user); |
| 4359 | 237 | |
|
19120
18082e7316a9
Document most of PurpleConversationUiOps.
Will Thompson <resiak@pidgin.im>
parents:
18190
diff
changeset
|
238 | /** Present this conversation to the user; for example, by displaying |
|
18082e7316a9
Document most of PurpleConversationUiOps.
Will Thompson <resiak@pidgin.im>
parents:
18190
diff
changeset
|
239 | * the IM dialog. |
|
18082e7316a9
Document most of PurpleConversationUiOps.
Will Thompson <resiak@pidgin.im>
parents:
18190
diff
changeset
|
240 | */ |
| 15884 | 241 | void (*present)(PurpleConversation *conv); |
| 4359 | 242 | |
|
19120
18082e7316a9
Document most of PurpleConversationUiOps.
Will Thompson <resiak@pidgin.im>
parents:
18190
diff
changeset
|
243 | /** 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
|
244 | * this conversation has the focus, return @c TRUE; otherwise, return |
|
18082e7316a9
Document most of PurpleConversationUiOps.
Will Thompson <resiak@pidgin.im>
parents:
18190
diff
changeset
|
245 | * @c FALSE. |
|
18082e7316a9
Document most of PurpleConversationUiOps.
Will Thompson <resiak@pidgin.im>
parents:
18190
diff
changeset
|
246 | */ |
| 15884 | 247 | gboolean (*has_focus)(PurpleConversation *conv); |
|
9260
82d7b380220a
[gaim-migrate @ 10059]
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
9166
diff
changeset
|
248 | |
| 10526 | 249 | /* Custom Smileys */ |
|
34599
0b1b22f5e2ec
Begun GObjectification of PurpleConversation.
Ankit Vani <a@nevitus.org>
parents:
34595
diff
changeset
|
250 | gboolean (*custom_smiley_add)(PurpleConversation *conv, const char *smile, |
|
34605
89e6c5346d63
Begun refactoring for PurpleConversation
Ankit Vani <a@nevitus.org>
parents:
34602
diff
changeset
|
251 | gboolean remote); |
| 15884 | 252 | void (*custom_smiley_write)(PurpleConversation *conv, const char *smile, |
|
11137
cf40226ddff7
[gaim-migrate @ 13201]
Mark Doliner <markdoliner@pidgin.im>
parents:
11035
diff
changeset
|
253 | const guchar *data, gsize size); |
| 15884 | 254 | void (*custom_smiley_close)(PurpleConversation *conv, const char *smile); |
| 14582 | 255 | |
|
19120
18082e7316a9
Document most of PurpleConversationUiOps.
Will Thompson <resiak@pidgin.im>
parents:
18190
diff
changeset
|
256 | /** 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
|
257 | * 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
|
258 | * 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
|
259 | * #purple_request_action(). |
|
18082e7316a9
Document most of PurpleConversationUiOps.
Will Thompson <resiak@pidgin.im>
parents:
18190
diff
changeset
|
260 | */ |
| 15884 | 261 | 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
|
262 | |
|
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_reserved1)(void); |
|
1ce5ffe12e2a
Initial addition of padding for ui_ops and other class-like structs
Gary Kramlich <grim@reaperworld.com>
parents:
16007
diff
changeset
|
264 | 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
|
265 | 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
|
266 | void (*_purple_reserved4)(void); |
| 4359 | 267 | }; |
| 268 | ||
|
32787
7072f190d6ad
Use G_BEGIN/END_DECLS in public libpurple files. This was
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
32698
diff
changeset
|
269 | G_BEGIN_DECLS |
|
5944
f19df037ac58
[gaim-migrate @ 6385]
Christian Hammond <chipx86@chipx86.com>
parents:
5872
diff
changeset
|
270 | |
| 4359 | 271 | /**************************************************************************/ |
| 272 | /** @name Conversation API */ | |
| 273 | /**************************************************************************/ | |
| 274 | /*@{*/ | |
| 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 | /** TODO |
|
28b0f26f011f
Added GObject boilerplate code for headers, also _new() and _get_type() functions.
Ankit Vani <a@nevitus.org>
parents:
34608
diff
changeset
|
277 | * Returns the GType for the Conversation object. |
| 4359 | 278 | */ |
|
34609
28b0f26f011f
Added GObject boilerplate code for headers, also _new() and _get_type() functions.
Ankit Vani <a@nevitus.org>
parents:
34608
diff
changeset
|
279 | GType purple_conversation_get_type(void); |
| 4359 | 280 | |
|
34600
3180ebbd06be
Added GObject structures, moved things around, renamed functions as GObject methods.
Ankit Vani <a@nevitus.org>
parents:
34599
diff
changeset
|
281 | /** TODO dispose/fnalize |
| 4359 | 282 | * Destroys the specified conversation and removes it from the parent |
| 283 | * window. | |
| 284 | * | |
| 285 | * If this conversation is the only one contained in the parent window, | |
| 286 | * that window is also destroyed. | |
| 287 | * | |
| 288 | * @param conv The conversation to destroy. | |
| 289 | */ | |
| 15884 | 290 | void purple_conversation_destroy(PurpleConversation *conv); |
| 4359 | 291 | |
|
12624
c1c92f08976b
[gaim-migrate @ 14960]
Christopher O'Brien <siege@pidgin.im>
parents:
12618
diff
changeset
|
292 | /** |
|
c1c92f08976b
[gaim-migrate @ 14960]
Christopher O'Brien <siege@pidgin.im>
parents:
12618
diff
changeset
|
293 | * 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
|
294 | * conversation by displaying the IM dialog. |
|
c1c92f08976b
[gaim-migrate @ 14960]
Christopher O'Brien <siege@pidgin.im>
parents:
12618
diff
changeset
|
295 | * @param conv The conversation to present |
|
c1c92f08976b
[gaim-migrate @ 14960]
Christopher O'Brien <siege@pidgin.im>
parents:
12618
diff
changeset
|
296 | */ |
| 15884 | 297 | void purple_conversation_present(PurpleConversation *conv); |
|
12624
c1c92f08976b
[gaim-migrate @ 14960]
Christopher O'Brien <siege@pidgin.im>
parents:
12618
diff
changeset
|
298 | |
| 4359 | 299 | /** |
| 300 | * Sets the specified conversation's UI operations structure. | |
| 301 | * | |
| 302 | * @param conv The conversation. | |
| 303 | * @param ops The UI conversation operations structure. | |
| 304 | */ | |
| 15884 | 305 | void purple_conversation_set_ui_ops(PurpleConversation *conv, |
| 306 | PurpleConversationUiOps *ops); | |
| 4359 | 307 | |
| 308 | /** | |
| 309 | * Returns the specified conversation's UI operations structure. | |
|
6585
8fcd3639e544
[gaim-migrate @ 7107]
Christian Hammond <chipx86@chipx86.com>
parents:
6488
diff
changeset
|
310 | * |
| 4359 | 311 | * @param conv The conversation. |
| 312 | * | |
| 313 | * @return The operations structure. | |
| 314 | */ | |
|
34600
3180ebbd06be
Added GObject structures, moved things around, renamed functions as GObject methods.
Ankit Vani <a@nevitus.org>
parents:
34599
diff
changeset
|
315 | PurpleConversationUiOps *purple_conversation_get_ui_ops(const PurpleConversation *conv); |
| 4359 | 316 | |
| 317 | /** | |
| 15884 | 318 | * Sets the specified conversation's purple_account. |
| 4359 | 319 | * |
| 15884 | 320 | * This purple_account represents the user using purple, not the person the user |
| 4359 | 321 | * is having a conversation/chat/flame with. |
| 322 | * | |
| 323 | * @param conv The conversation. | |
| 15884 | 324 | * @param account The purple_account. |
| 4359 | 325 | */ |
| 15884 | 326 | void purple_conversation_set_account(PurpleConversation *conv, |
| 327 | PurpleAccount *account); | |
| 4359 | 328 | |
| 329 | /** | |
| 15884 | 330 | * Returns the specified conversation's purple_account. |
| 4359 | 331 | * |
| 15884 | 332 | * This purple_account represents the user using purple, not the person the user |
| 4359 | 333 | * is having a conversation/chat/flame with. |
| 334 | * | |
| 335 | * @param conv The conversation. | |
| 336 | * | |
| 15884 | 337 | * @return The conversation's purple_account. |
| 4359 | 338 | */ |
| 15884 | 339 | PurpleAccount *purple_conversation_get_account(const PurpleConversation *conv); |
| 4359 | 340 | |
| 341 | /** | |
| 15884 | 342 | * Returns the specified conversation's purple_connection. |
| 4359 | 343 | * |
| 344 | * @param conv The conversation. | |
| 345 | * | |
| 15884 | 346 | * @return The conversation's purple_connection. |
| 4359 | 347 | */ |
|
32698
154e4a2a6287
Our API really shouldn't have a 'gc' in it anymore.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
32690
diff
changeset
|
348 | PurpleConnection *purple_conversation_get_connection(const PurpleConversation *conv); |
| 4359 | 349 | |
| 350 | /** | |
| 351 | * Sets the specified conversation's title. | |
| 352 | * | |
| 353 | * @param conv The conversation. | |
| 354 | * @param title The title. | |
| 355 | */ | |
| 15884 | 356 | void purple_conversation_set_title(PurpleConversation *conv, const char *title); |
| 4359 | 357 | |
| 358 | /** | |
| 359 | * Returns the specified conversation's title. | |
| 360 | * | |
|
6720
cdc5348dd848
[gaim-migrate @ 7247]
Christian Hammond <chipx86@chipx86.com>
parents:
6622
diff
changeset
|
361 | * @param conv The conversation. |
| 4359 | 362 | * |
| 363 | * @return The title. | |
| 364 | */ | |
| 15884 | 365 | const char *purple_conversation_get_title(const PurpleConversation *conv); |
| 4359 | 366 | |
| 367 | /** | |
| 368 | * Automatically sets the specified conversation's title. | |
| 369 | * | |
| 370 | * This function takes OPT_IM_ALIAS_TAB into account, as well as the | |
| 371 | * user's alias. | |
| 372 | * | |
| 373 | * @param conv The conversation. | |
| 374 | */ | |
| 15884 | 375 | void purple_conversation_autoset_title(PurpleConversation *conv); |
| 4359 | 376 | |
| 377 | /** | |
|
7256
311c8febfc92
[gaim-migrate @ 7833]
Christian Hammond <chipx86@chipx86.com>
parents:
7122
diff
changeset
|
378 | * Sets the specified conversation's name. |
|
311c8febfc92
[gaim-migrate @ 7833]
Christian Hammond <chipx86@chipx86.com>
parents:
7122
diff
changeset
|
379 | * |
|
311c8febfc92
[gaim-migrate @ 7833]
Christian Hammond <chipx86@chipx86.com>
parents:
7122
diff
changeset
|
380 | * @param conv The conversation. |
|
311c8febfc92
[gaim-migrate @ 7833]
Christian Hammond <chipx86@chipx86.com>
parents:
7122
diff
changeset
|
381 | * @param name The conversation's name. |
|
311c8febfc92
[gaim-migrate @ 7833]
Christian Hammond <chipx86@chipx86.com>
parents:
7122
diff
changeset
|
382 | */ |
| 15884 | 383 | void purple_conversation_set_name(PurpleConversation *conv, const char *name); |
|
7256
311c8febfc92
[gaim-migrate @ 7833]
Christian Hammond <chipx86@chipx86.com>
parents:
7122
diff
changeset
|
384 | |
|
311c8febfc92
[gaim-migrate @ 7833]
Christian Hammond <chipx86@chipx86.com>
parents:
7122
diff
changeset
|
385 | /** |
| 4359 | 386 | * Returns the specified conversation's name. |
| 387 | * | |
| 388 | * @param conv The conversation. | |
| 389 | * | |
|
22082
617ac5b2b597
Docu patch from Simon Wenner. Closes #4497.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
21453
diff
changeset
|
390 | * @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
|
391 | * then it's the name of the PurpleBuddy. |
| 4359 | 392 | */ |
| 15884 | 393 | const char *purple_conversation_get_name(const PurpleConversation *conv); |
| 4359 | 394 | |
| 395 | /** | |
| 396 | * Enables or disables logging for this conversation. | |
| 397 | * | |
|
6720
cdc5348dd848
[gaim-migrate @ 7247]
Christian Hammond <chipx86@chipx86.com>
parents:
6622
diff
changeset
|
398 | * @param conv The conversation. |
|
cdc5348dd848
[gaim-migrate @ 7247]
Christian Hammond <chipx86@chipx86.com>
parents:
6622
diff
changeset
|
399 | * @param log @c TRUE if logging should be enabled, or @c FALSE otherwise. |
| 4359 | 400 | */ |
| 15884 | 401 | void purple_conversation_set_logging(PurpleConversation *conv, gboolean log); |
| 4359 | 402 | |
| 403 | /** | |
| 404 | * Returns whether or not logging is enabled for this conversation. | |
| 405 | * | |
|
6720
cdc5348dd848
[gaim-migrate @ 7247]
Christian Hammond <chipx86@chipx86.com>
parents:
6622
diff
changeset
|
406 | * @param conv The conversation. |
|
cdc5348dd848
[gaim-migrate @ 7247]
Christian Hammond <chipx86@chipx86.com>
parents:
6622
diff
changeset
|
407 | * |
| 4359 | 408 | * @return @c TRUE if logging is enabled, or @c FALSE otherwise. |
| 409 | */ | |
| 15884 | 410 | gboolean purple_conversation_is_logging(const PurpleConversation *conv); |
| 4359 | 411 | |
| 412 | /** | |
|
11672
018c70c8134c
[gaim-migrate @ 13958]
Richard Laager <rlaager@pidgin.im>
parents:
11664
diff
changeset
|
413 | * Closes any open logs for this conversation. |
|
018c70c8134c
[gaim-migrate @ 13958]
Richard Laager <rlaager@pidgin.im>
parents:
11664
diff
changeset
|
414 | * |
|
018c70c8134c
[gaim-migrate @ 13958]
Richard Laager <rlaager@pidgin.im>
parents:
11664
diff
changeset
|
415 | * 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
|
416 | * message, if the conversation has logging enabled. To disable logging for |
| 15884 | 417 | * the remainder of the conversation, use purple_conversation_set_logging(). |
|
11672
018c70c8134c
[gaim-migrate @ 13958]
Richard Laager <rlaager@pidgin.im>
parents:
11664
diff
changeset
|
418 | * |
|
018c70c8134c
[gaim-migrate @ 13958]
Richard Laager <rlaager@pidgin.im>
parents:
11664
diff
changeset
|
419 | * @param conv The conversation. |
|
018c70c8134c
[gaim-migrate @ 13958]
Richard Laager <rlaager@pidgin.im>
parents:
11664
diff
changeset
|
420 | */ |
| 15884 | 421 | void purple_conversation_close_logs(PurpleConversation *conv); |
|
11672
018c70c8134c
[gaim-migrate @ 13958]
Richard Laager <rlaager@pidgin.im>
parents:
11664
diff
changeset
|
422 | |
|
018c70c8134c
[gaim-migrate @ 13958]
Richard Laager <rlaager@pidgin.im>
parents:
11664
diff
changeset
|
423 | /** |
|
4877
7d1f4381fed0
[gaim-migrate @ 5207]
Christian Hammond <chipx86@chipx86.com>
parents:
4876
diff
changeset
|
424 | * Sets extra data for a conversation. |
|
6585
8fcd3639e544
[gaim-migrate @ 7107]
Christian Hammond <chipx86@chipx86.com>
parents:
6488
diff
changeset
|
425 | * |
|
4876
b6ec886c8c77
[gaim-migrate @ 5206]
Christian Hammond <chipx86@chipx86.com>
parents:
4491
diff
changeset
|
426 | * @param conv The conversation. |
|
b6ec886c8c77
[gaim-migrate @ 5206]
Christian Hammond <chipx86@chipx86.com>
parents:
4491
diff
changeset
|
427 | * @param key The unique key. |
|
b6ec886c8c77
[gaim-migrate @ 5206]
Christian Hammond <chipx86@chipx86.com>
parents:
4491
diff
changeset
|
428 | * @param data The data to assign. |
|
b6ec886c8c77
[gaim-migrate @ 5206]
Christian Hammond <chipx86@chipx86.com>
parents:
4491
diff
changeset
|
429 | */ |
| 15884 | 430 | void purple_conversation_set_data(PurpleConversation *conv, const char *key, |
|
5676
d3c2fdaf4821
[gaim-migrate @ 6094]
Christian Hammond <chipx86@chipx86.com>
parents:
5563
diff
changeset
|
431 | gpointer data); |
|
4876
b6ec886c8c77
[gaim-migrate @ 5206]
Christian Hammond <chipx86@chipx86.com>
parents:
4491
diff
changeset
|
432 | |
|
b6ec886c8c77
[gaim-migrate @ 5206]
Christian Hammond <chipx86@chipx86.com>
parents:
4491
diff
changeset
|
433 | /** |
|
4877
7d1f4381fed0
[gaim-migrate @ 5207]
Christian Hammond <chipx86@chipx86.com>
parents:
4876
diff
changeset
|
434 | * Returns extra data in a conversation. |
|
4876
b6ec886c8c77
[gaim-migrate @ 5206]
Christian Hammond <chipx86@chipx86.com>
parents:
4491
diff
changeset
|
435 | * |
|
b6ec886c8c77
[gaim-migrate @ 5206]
Christian Hammond <chipx86@chipx86.com>
parents:
4491
diff
changeset
|
436 | * @param conv The conversation. |
|
b6ec886c8c77
[gaim-migrate @ 5206]
Christian Hammond <chipx86@chipx86.com>
parents:
4491
diff
changeset
|
437 | * @param key The unqiue key. |
|
b6ec886c8c77
[gaim-migrate @ 5206]
Christian Hammond <chipx86@chipx86.com>
parents:
4491
diff
changeset
|
438 | * |
|
b6ec886c8c77
[gaim-migrate @ 5206]
Christian Hammond <chipx86@chipx86.com>
parents:
4491
diff
changeset
|
439 | * @return The data associated with the key. |
|
b6ec886c8c77
[gaim-migrate @ 5206]
Christian Hammond <chipx86@chipx86.com>
parents:
4491
diff
changeset
|
440 | */ |
| 15884 | 441 | gpointer purple_conversation_get_data(PurpleConversation *conv, const char *key); |
|
4876
b6ec886c8c77
[gaim-migrate @ 5206]
Christian Hammond <chipx86@chipx86.com>
parents:
4491
diff
changeset
|
442 | |
|
34611
255148c286ab
Added some PurpleConversation virtual class methods.
Ankit Vani <a@nevitus.org>
parents:
34609
diff
changeset
|
443 | /** TODO virtual and chainback |
| 4359 | 444 | * Writes to a conversation window. |
| 445 | * | |
| 446 | * This function should not be used to write IM or chat messages. Use | |
|
34599
0b1b22f5e2ec
Begun GObjectification of PurpleConversation.
Ankit Vani <a@nevitus.org>
parents:
34595
diff
changeset
|
447 | * purple_im_conversation_write() and purple_chat_conversation_write() instead. Those functions will |
| 4359 | 448 | * most likely call this anyway, but they may do their own formatting, |
| 449 | * sound playback, etc. | |
| 450 | * | |
| 451 | * This can be used to write generic messages, such as "so and so closed | |
| 452 | * the conversation window." | |
| 453 | * | |
| 454 | * @param conv The conversation. | |
| 455 | * @param who The user who sent the message. | |
| 456 | * @param message The message. | |
|
6621
2a18ef3e5224
[gaim-migrate @ 7145]
Robert McQueen <robot101@debian.org>
parents:
6605
diff
changeset
|
457 | * @param flags The message flags. |
| 4359 | 458 | * @param mtime The time the message was sent. |
| 459 | * | |
|
34611
255148c286ab
Added some PurpleConversation virtual class methods.
Ankit Vani <a@nevitus.org>
parents:
34609
diff
changeset
|
460 | * @see purple_im_conversation_write() TODO rectify this |
|
34599
0b1b22f5e2ec
Begun GObjectification of PurpleConversation.
Ankit Vani <a@nevitus.org>
parents:
34595
diff
changeset
|
461 | * @see purple_chat_conversation_write() |
| 4359 | 462 | */ |
| 15884 | 463 | void purple_conversation_write(PurpleConversation *conv, const char *who, |
|
34599
0b1b22f5e2ec
Begun GObjectification of PurpleConversation.
Ankit Vani <a@nevitus.org>
parents:
34595
diff
changeset
|
464 | const char *message, PurpleConversationMessageFlags flags, |
| 10665 | 465 | time_t mtime); |
| 466 | ||
| 467 | /** | |
| 468 | Set the features as supported for the given conversation. | |
| 469 | @param conv The conversation | |
| 470 | @param features Bitset defining supported features | |
| 471 | */ | |
| 15884 | 472 | void purple_conversation_set_features(PurpleConversation *conv, |
| 473 | PurpleConnectionFlags features); | |
| 10665 | 474 | |
| 475 | ||
| 476 | /** | |
| 477 | Get the features supported by the given conversation. | |
| 478 | @param conv The conversation | |
| 479 | */ | |
| 15884 | 480 | PurpleConnectionFlags purple_conversation_get_features(PurpleConversation *conv); |
| 4359 | 481 | |
| 482 | /** | |
|
9260
82d7b380220a
[gaim-migrate @ 10059]
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
9166
diff
changeset
|
483 | * Determines if a conversation has focus |
|
82d7b380220a
[gaim-migrate @ 10059]
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
9166
diff
changeset
|
484 | * |
|
82d7b380220a
[gaim-migrate @ 10059]
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
9166
diff
changeset
|
485 | * @param conv The conversation. |
|
82d7b380220a
[gaim-migrate @ 10059]
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
9166
diff
changeset
|
486 | * |
|
82d7b380220a
[gaim-migrate @ 10059]
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
9166
diff
changeset
|
487 | * @return @c TRUE if the conversation has focus, @c FALSE if |
|
82d7b380220a
[gaim-migrate @ 10059]
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
9166
diff
changeset
|
488 | * 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
|
489 | */ |
| 15884 | 490 | gboolean purple_conversation_has_focus(PurpleConversation *conv); |
|
9260
82d7b380220a
[gaim-migrate @ 10059]
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
9166
diff
changeset
|
491 | |
|
82d7b380220a
[gaim-migrate @ 10059]
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
9166
diff
changeset
|
492 | /** |
| 4359 | 493 | * Updates the visual status and UI of a conversation. |
| 494 | * | |
| 495 | * @param conv The conversation. | |
| 496 | * @param type The update type. | |
| 497 | */ | |
|
34599
0b1b22f5e2ec
Begun GObjectification of PurpleConversation.
Ankit Vani <a@nevitus.org>
parents:
34595
diff
changeset
|
498 | void purple_conversation_update(PurpleConversation *conv, PurpleConversationUpdateType type); |
| 4359 | 499 | |
| 500 | /** | |
|
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
|
501 | * 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
|
502 | * |
|
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 | * @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
|
504 | * |
|
34599
0b1b22f5e2ec
Begun GObjectification of PurpleConversation.
Ankit Vani <a@nevitus.org>
parents:
34595
diff
changeset
|
505 | * @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
|
506 | * 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
|
507 | * 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
|
508 | */ |
|
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 | 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
|
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 | /** |
|
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 | * 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
|
513 | * |
|
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 | * @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
|
515 | */ |
|
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 | 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
|
517 | |
|
cf4e3e71bbc0
Store message history in a conversation, and provide API to access the history.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
19120
diff
changeset
|
518 | /** |
|
34600
3180ebbd06be
Added GObject structures, moved things around, renamed functions as GObject methods.
Ankit Vani <a@nevitus.org>
parents:
34599
diff
changeset
|
519 | * Set the UI data associated with this conversation. |
|
3180ebbd06be
Added GObject structures, moved things around, renamed functions as GObject methods.
Ankit Vani <a@nevitus.org>
parents:
34599
diff
changeset
|
520 | * |
|
3180ebbd06be
Added GObject structures, moved things around, renamed functions as GObject methods.
Ankit Vani <a@nevitus.org>
parents:
34599
diff
changeset
|
521 | * @param conv The conversation. |
|
3180ebbd06be
Added GObject structures, moved things around, renamed functions as GObject methods.
Ankit Vani <a@nevitus.org>
parents:
34599
diff
changeset
|
522 | * @param ui_data A pointer to associate with this conversation. |
|
3180ebbd06be
Added GObject structures, moved things around, renamed functions as GObject methods.
Ankit Vani <a@nevitus.org>
parents:
34599
diff
changeset
|
523 | */ |
|
3180ebbd06be
Added GObject structures, moved things around, renamed functions as GObject methods.
Ankit Vani <a@nevitus.org>
parents:
34599
diff
changeset
|
524 | void purple_conversation_set_ui_data(PurpleConversation *conv, gpointer ui_data); |
|
3180ebbd06be
Added GObject structures, moved things around, renamed functions as GObject methods.
Ankit Vani <a@nevitus.org>
parents:
34599
diff
changeset
|
525 | |
|
3180ebbd06be
Added GObject structures, moved things around, renamed functions as GObject methods.
Ankit Vani <a@nevitus.org>
parents:
34599
diff
changeset
|
526 | /** |
|
3180ebbd06be
Added GObject structures, moved things around, renamed functions as GObject methods.
Ankit Vani <a@nevitus.org>
parents:
34599
diff
changeset
|
527 | * Get the UI data associated with this conversation. |
|
3180ebbd06be
Added GObject structures, moved things around, renamed functions as GObject methods.
Ankit Vani <a@nevitus.org>
parents:
34599
diff
changeset
|
528 | * |
|
3180ebbd06be
Added GObject structures, moved things around, renamed functions as GObject methods.
Ankit Vani <a@nevitus.org>
parents:
34599
diff
changeset
|
529 | * @param conv The conversation. |
|
3180ebbd06be
Added GObject structures, moved things around, renamed functions as GObject methods.
Ankit Vani <a@nevitus.org>
parents:
34599
diff
changeset
|
530 | * |
|
3180ebbd06be
Added GObject structures, moved things around, renamed functions as GObject methods.
Ankit Vani <a@nevitus.org>
parents:
34599
diff
changeset
|
531 | * @return The UI data associated with this conversation. This is a |
|
3180ebbd06be
Added GObject structures, moved things around, renamed functions as GObject methods.
Ankit Vani <a@nevitus.org>
parents:
34599
diff
changeset
|
532 | * convenience field provided to the UIs--it is not |
|
3180ebbd06be
Added GObject structures, moved things around, renamed functions as GObject methods.
Ankit Vani <a@nevitus.org>
parents:
34599
diff
changeset
|
533 | * used by the libpurple core. |
|
3180ebbd06be
Added GObject structures, moved things around, renamed functions as GObject methods.
Ankit Vani <a@nevitus.org>
parents:
34599
diff
changeset
|
534 | */ |
|
3180ebbd06be
Added GObject structures, moved things around, renamed functions as GObject methods.
Ankit Vani <a@nevitus.org>
parents:
34599
diff
changeset
|
535 | gpointer purple_conversation_get_ui_data(const PurpleConversation *conv); |
|
3180ebbd06be
Added GObject structures, moved things around, renamed functions as GObject methods.
Ankit Vani <a@nevitus.org>
parents:
34599
diff
changeset
|
536 | |
|
3180ebbd06be
Added GObject structures, moved things around, renamed functions as GObject methods.
Ankit Vani <a@nevitus.org>
parents:
34599
diff
changeset
|
537 | /** |
|
3180ebbd06be
Added GObject structures, moved things around, renamed functions as GObject methods.
Ankit Vani <a@nevitus.org>
parents:
34599
diff
changeset
|
538 | * Sends a message to a conversation after confirming with |
|
3180ebbd06be
Added GObject structures, moved things around, renamed functions as GObject methods.
Ankit Vani <a@nevitus.org>
parents:
34599
diff
changeset
|
539 | * the user. |
|
3180ebbd06be
Added GObject structures, moved things around, renamed functions as GObject methods.
Ankit Vani <a@nevitus.org>
parents:
34599
diff
changeset
|
540 | * |
|
3180ebbd06be
Added GObject structures, moved things around, renamed functions as GObject methods.
Ankit Vani <a@nevitus.org>
parents:
34599
diff
changeset
|
541 | * This function is intended for use in cases where the user |
|
3180ebbd06be
Added GObject structures, moved things around, renamed functions as GObject methods.
Ankit Vani <a@nevitus.org>
parents:
34599
diff
changeset
|
542 | * hasn't explicitly and knowingly caused a message to be sent. |
|
3180ebbd06be
Added GObject structures, moved things around, renamed functions as GObject methods.
Ankit Vani <a@nevitus.org>
parents:
34599
diff
changeset
|
543 | * The confirmation ensures that the user isn't sending a |
|
3180ebbd06be
Added GObject structures, moved things around, renamed functions as GObject methods.
Ankit Vani <a@nevitus.org>
parents:
34599
diff
changeset
|
544 | * message by mistake. |
|
3180ebbd06be
Added GObject structures, moved things around, renamed functions as GObject methods.
Ankit Vani <a@nevitus.org>
parents:
34599
diff
changeset
|
545 | * |
|
3180ebbd06be
Added GObject structures, moved things around, renamed functions as GObject methods.
Ankit Vani <a@nevitus.org>
parents:
34599
diff
changeset
|
546 | * @param conv The conversation. |
|
3180ebbd06be
Added GObject structures, moved things around, renamed functions as GObject methods.
Ankit Vani <a@nevitus.org>
parents:
34599
diff
changeset
|
547 | * @param message The message to send. |
|
3180ebbd06be
Added GObject structures, moved things around, renamed functions as GObject methods.
Ankit Vani <a@nevitus.org>
parents:
34599
diff
changeset
|
548 | */ |
|
3180ebbd06be
Added GObject structures, moved things around, renamed functions as GObject methods.
Ankit Vani <a@nevitus.org>
parents:
34599
diff
changeset
|
549 | void purple_conversation_send_confirm(PurpleConversation *conv, const char *message); |
|
3180ebbd06be
Added GObject structures, moved things around, renamed functions as GObject methods.
Ankit Vani <a@nevitus.org>
parents:
34599
diff
changeset
|
550 | |
|
3180ebbd06be
Added GObject structures, moved things around, renamed functions as GObject methods.
Ankit Vani <a@nevitus.org>
parents:
34599
diff
changeset
|
551 | /** |
|
3180ebbd06be
Added GObject structures, moved things around, renamed functions as GObject methods.
Ankit Vani <a@nevitus.org>
parents:
34599
diff
changeset
|
552 | * Adds a smiley to the conversation's smiley tree. If this returns |
|
3180ebbd06be
Added GObject structures, moved things around, renamed functions as GObject methods.
Ankit Vani <a@nevitus.org>
parents:
34599
diff
changeset
|
553 | * @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
|
554 | * times, and then purple_conversation_custom_smiley_close(). If this returns |
|
3180ebbd06be
Added GObject structures, moved things around, renamed functions as GObject methods.
Ankit Vani <a@nevitus.org>
parents:
34599
diff
changeset
|
555 | * @c FALSE, either the conv or smile were invalid, or the icon was |
|
3180ebbd06be
Added GObject structures, moved things around, renamed functions as GObject methods.
Ankit Vani <a@nevitus.org>
parents:
34599
diff
changeset
|
556 | * found in the cache. In either case, calling write or close would |
|
3180ebbd06be
Added GObject structures, moved things around, renamed functions as GObject methods.
Ankit Vani <a@nevitus.org>
parents:
34599
diff
changeset
|
557 | * be an error. |
|
3180ebbd06be
Added GObject structures, moved things around, renamed functions as GObject methods.
Ankit Vani <a@nevitus.org>
parents:
34599
diff
changeset
|
558 | * |
|
3180ebbd06be
Added GObject structures, moved things around, renamed functions as GObject methods.
Ankit Vani <a@nevitus.org>
parents:
34599
diff
changeset
|
559 | * @param conv The conversation to associate the smiley with. |
|
3180ebbd06be
Added GObject structures, moved things around, renamed functions as GObject methods.
Ankit Vani <a@nevitus.org>
parents:
34599
diff
changeset
|
560 | * @param smile The text associated with the smiley |
|
3180ebbd06be
Added GObject structures, moved things around, renamed functions as GObject methods.
Ankit Vani <a@nevitus.org>
parents:
34599
diff
changeset
|
561 | * @param cksum_type The type of checksum. |
|
3180ebbd06be
Added GObject structures, moved things around, renamed functions as GObject methods.
Ankit Vani <a@nevitus.org>
parents:
34599
diff
changeset
|
562 | * @param chksum The checksum, as a NUL terminated base64 string. |
|
3180ebbd06be
Added GObject structures, moved things around, renamed functions as GObject methods.
Ankit Vani <a@nevitus.org>
parents:
34599
diff
changeset
|
563 | * @param remote @c TRUE if the custom smiley is set by the remote user (buddy). |
|
3180ebbd06be
Added GObject structures, moved things around, renamed functions as GObject methods.
Ankit Vani <a@nevitus.org>
parents:
34599
diff
changeset
|
564 | * @return @c TRUE if an icon is expected, else FALSE. Note that |
|
3180ebbd06be
Added GObject structures, moved things around, renamed functions as GObject methods.
Ankit Vani <a@nevitus.org>
parents:
34599
diff
changeset
|
565 | * it is an error to never call purple_conversation_custom_smiley_close if |
|
3180ebbd06be
Added GObject structures, moved things around, renamed functions as GObject methods.
Ankit Vani <a@nevitus.org>
parents:
34599
diff
changeset
|
566 | * this function returns @c TRUE, but an error to call it if |
|
3180ebbd06be
Added GObject structures, moved things around, renamed functions as GObject methods.
Ankit Vani <a@nevitus.org>
parents:
34599
diff
changeset
|
567 | * @c FALSE is returned. |
|
3180ebbd06be
Added GObject structures, moved things around, renamed functions as GObject methods.
Ankit Vani <a@nevitus.org>
parents:
34599
diff
changeset
|
568 | */ |
|
3180ebbd06be
Added GObject structures, moved things around, renamed functions as GObject methods.
Ankit Vani <a@nevitus.org>
parents:
34599
diff
changeset
|
569 | |
|
3180ebbd06be
Added GObject structures, moved things around, renamed functions as GObject methods.
Ankit Vani <a@nevitus.org>
parents:
34599
diff
changeset
|
570 | gboolean purple_conversation_custom_smiley_add(PurpleConversation *conv, const char *smile, |
|
3180ebbd06be
Added GObject structures, moved things around, renamed functions as GObject methods.
Ankit Vani <a@nevitus.org>
parents:
34599
diff
changeset
|
571 | const char *cksum_type, const char *chksum, |
|
3180ebbd06be
Added GObject structures, moved things around, renamed functions as GObject methods.
Ankit Vani <a@nevitus.org>
parents:
34599
diff
changeset
|
572 | gboolean remote); |
|
3180ebbd06be
Added GObject structures, moved things around, renamed functions as GObject methods.
Ankit Vani <a@nevitus.org>
parents:
34599
diff
changeset
|
573 | |
|
3180ebbd06be
Added GObject structures, moved things around, renamed functions as GObject methods.
Ankit Vani <a@nevitus.org>
parents:
34599
diff
changeset
|
574 | /** |
|
3180ebbd06be
Added GObject structures, moved things around, renamed functions as GObject methods.
Ankit Vani <a@nevitus.org>
parents:
34599
diff
changeset
|
575 | * Updates the image associated with the current smiley. |
|
3180ebbd06be
Added GObject structures, moved things around, renamed functions as GObject methods.
Ankit Vani <a@nevitus.org>
parents:
34599
diff
changeset
|
576 | * |
|
3180ebbd06be
Added GObject structures, moved things around, renamed functions as GObject methods.
Ankit Vani <a@nevitus.org>
parents:
34599
diff
changeset
|
577 | * @param conv The conversation associated with the smiley. |
|
3180ebbd06be
Added GObject structures, moved things around, renamed functions as GObject methods.
Ankit Vani <a@nevitus.org>
parents:
34599
diff
changeset
|
578 | * @param smile The text associated with the smiley. |
|
3180ebbd06be
Added GObject structures, moved things around, renamed functions as GObject methods.
Ankit Vani <a@nevitus.org>
parents:
34599
diff
changeset
|
579 | * @param data The actual image data. |
|
3180ebbd06be
Added GObject structures, moved things around, renamed functions as GObject methods.
Ankit Vani <a@nevitus.org>
parents:
34599
diff
changeset
|
580 | * @param size The length of the data. |
|
3180ebbd06be
Added GObject structures, moved things around, renamed functions as GObject methods.
Ankit Vani <a@nevitus.org>
parents:
34599
diff
changeset
|
581 | */ |
|
3180ebbd06be
Added GObject structures, moved things around, renamed functions as GObject methods.
Ankit Vani <a@nevitus.org>
parents:
34599
diff
changeset
|
582 | |
|
3180ebbd06be
Added GObject structures, moved things around, renamed functions as GObject methods.
Ankit Vani <a@nevitus.org>
parents:
34599
diff
changeset
|
583 | void purple_conversation_custom_smiley_write(PurpleConversation *conv, |
|
3180ebbd06be
Added GObject structures, moved things around, renamed functions as GObject methods.
Ankit Vani <a@nevitus.org>
parents:
34599
diff
changeset
|
584 | const char *smile, |
|
3180ebbd06be
Added GObject structures, moved things around, renamed functions as GObject methods.
Ankit Vani <a@nevitus.org>
parents:
34599
diff
changeset
|
585 | const guchar *data, |
|
3180ebbd06be
Added GObject structures, moved things around, renamed functions as GObject methods.
Ankit Vani <a@nevitus.org>
parents:
34599
diff
changeset
|
586 | gsize size); |
|
3180ebbd06be
Added GObject structures, moved things around, renamed functions as GObject methods.
Ankit Vani <a@nevitus.org>
parents:
34599
diff
changeset
|
587 | |
|
3180ebbd06be
Added GObject structures, moved things around, renamed functions as GObject methods.
Ankit Vani <a@nevitus.org>
parents:
34599
diff
changeset
|
588 | /** |
|
3180ebbd06be
Added GObject structures, moved things around, renamed functions as GObject methods.
Ankit Vani <a@nevitus.org>
parents:
34599
diff
changeset
|
589 | * Close the custom smiley, all data has been written with |
|
3180ebbd06be
Added GObject structures, moved things around, renamed functions as GObject methods.
Ankit Vani <a@nevitus.org>
parents:
34599
diff
changeset
|
590 | * purple_conversation_custom_smiley_write, and it is no longer valid |
|
3180ebbd06be
Added GObject structures, moved things around, renamed functions as GObject methods.
Ankit Vani <a@nevitus.org>
parents:
34599
diff
changeset
|
591 | * to call that function on that smiley. |
|
3180ebbd06be
Added GObject structures, moved things around, renamed functions as GObject methods.
Ankit Vani <a@nevitus.org>
parents:
34599
diff
changeset
|
592 | * |
|
3180ebbd06be
Added GObject structures, moved things around, renamed functions as GObject methods.
Ankit Vani <a@nevitus.org>
parents:
34599
diff
changeset
|
593 | * @param conv The purple conversation associated with the smiley. |
|
3180ebbd06be
Added GObject structures, moved things around, renamed functions as GObject methods.
Ankit Vani <a@nevitus.org>
parents:
34599
diff
changeset
|
594 | * @param smile The text associated with the smiley |
|
3180ebbd06be
Added GObject structures, moved things around, renamed functions as GObject methods.
Ankit Vani <a@nevitus.org>
parents:
34599
diff
changeset
|
595 | */ |
|
3180ebbd06be
Added GObject structures, moved things around, renamed functions as GObject methods.
Ankit Vani <a@nevitus.org>
parents:
34599
diff
changeset
|
596 | |
|
3180ebbd06be
Added GObject structures, moved things around, renamed functions as GObject methods.
Ankit Vani <a@nevitus.org>
parents:
34599
diff
changeset
|
597 | void purple_conversation_custom_smiley_close(PurpleConversation *conv, const char *smile); |
|
3180ebbd06be
Added GObject structures, moved things around, renamed functions as GObject methods.
Ankit Vani <a@nevitus.org>
parents:
34599
diff
changeset
|
598 | |
|
3180ebbd06be
Added GObject structures, moved things around, renamed functions as GObject methods.
Ankit Vani <a@nevitus.org>
parents:
34599
diff
changeset
|
599 | /** |
|
3180ebbd06be
Added GObject structures, moved things around, renamed functions as GObject methods.
Ankit Vani <a@nevitus.org>
parents:
34599
diff
changeset
|
600 | * Retrieves the extended menu items for the conversation. |
|
3180ebbd06be
Added GObject structures, moved things around, renamed functions as GObject methods.
Ankit Vani <a@nevitus.org>
parents:
34599
diff
changeset
|
601 | * |
|
3180ebbd06be
Added GObject structures, moved things around, renamed functions as GObject methods.
Ankit Vani <a@nevitus.org>
parents:
34599
diff
changeset
|
602 | * @param conv The conversation. |
|
3180ebbd06be
Added GObject structures, moved things around, renamed functions as GObject methods.
Ankit Vani <a@nevitus.org>
parents:
34599
diff
changeset
|
603 | * |
|
3180ebbd06be
Added GObject structures, moved things around, renamed functions as GObject methods.
Ankit Vani <a@nevitus.org>
parents:
34599
diff
changeset
|
604 | * @return A list of PurpleMenuAction items, harvested by the |
|
3180ebbd06be
Added GObject structures, moved things around, renamed functions as GObject methods.
Ankit Vani <a@nevitus.org>
parents:
34599
diff
changeset
|
605 | * chat-extended-menu signal. The list and the menuaction |
|
3180ebbd06be
Added GObject structures, moved things around, renamed functions as GObject methods.
Ankit Vani <a@nevitus.org>
parents:
34599
diff
changeset
|
606 | * items should be freed by the caller. |
|
3180ebbd06be
Added GObject structures, moved things around, renamed functions as GObject methods.
Ankit Vani <a@nevitus.org>
parents:
34599
diff
changeset
|
607 | */ |
|
3180ebbd06be
Added GObject structures, moved things around, renamed functions as GObject methods.
Ankit Vani <a@nevitus.org>
parents:
34599
diff
changeset
|
608 | GList * purple_conversation_get_extended_menu(PurpleConversation *conv); |
|
3180ebbd06be
Added GObject structures, moved things around, renamed functions as GObject methods.
Ankit Vani <a@nevitus.org>
parents:
34599
diff
changeset
|
609 | |
|
3180ebbd06be
Added GObject structures, moved things around, renamed functions as GObject methods.
Ankit Vani <a@nevitus.org>
parents:
34599
diff
changeset
|
610 | /** |
|
3180ebbd06be
Added GObject structures, moved things around, renamed functions as GObject methods.
Ankit Vani <a@nevitus.org>
parents:
34599
diff
changeset
|
611 | * Perform a command in a conversation. Similar to @see purple_cmd_do_command |
|
3180ebbd06be
Added GObject structures, moved things around, renamed functions as GObject methods.
Ankit Vani <a@nevitus.org>
parents:
34599
diff
changeset
|
612 | * |
|
3180ebbd06be
Added GObject structures, moved things around, renamed functions as GObject methods.
Ankit Vani <a@nevitus.org>
parents:
34599
diff
changeset
|
613 | * @param conv The conversation. |
|
3180ebbd06be
Added GObject structures, moved things around, renamed functions as GObject methods.
Ankit Vani <a@nevitus.org>
parents:
34599
diff
changeset
|
614 | * @param cmdline The entire command including the arguments. |
|
3180ebbd06be
Added GObject structures, moved things around, renamed functions as GObject methods.
Ankit Vani <a@nevitus.org>
parents:
34599
diff
changeset
|
615 | * @param markup @c NULL, or the formatted command line. |
|
3180ebbd06be
Added GObject structures, moved things around, renamed functions as GObject methods.
Ankit Vani <a@nevitus.org>
parents:
34599
diff
changeset
|
616 | * @param error If the command failed errormsg is filled in with the appropriate error |
|
3180ebbd06be
Added GObject structures, moved things around, renamed functions as GObject methods.
Ankit Vani <a@nevitus.org>
parents:
34599
diff
changeset
|
617 | * message, if not @c NULL. It must be freed by the caller with g_free(). |
|
3180ebbd06be
Added GObject structures, moved things around, renamed functions as GObject methods.
Ankit Vani <a@nevitus.org>
parents:
34599
diff
changeset
|
618 | * |
|
3180ebbd06be
Added GObject structures, moved things around, renamed functions as GObject methods.
Ankit Vani <a@nevitus.org>
parents:
34599
diff
changeset
|
619 | * @return @c TRUE if the command was executed successfully, @c FALSE otherwise. |
|
3180ebbd06be
Added GObject structures, moved things around, renamed functions as GObject methods.
Ankit Vani <a@nevitus.org>
parents:
34599
diff
changeset
|
620 | */ |
|
3180ebbd06be
Added GObject structures, moved things around, renamed functions as GObject methods.
Ankit Vani <a@nevitus.org>
parents:
34599
diff
changeset
|
621 | 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
|
622 | const gchar *cmdline, const gchar *markup, gchar **error); |
|
3180ebbd06be
Added GObject structures, moved things around, renamed functions as GObject methods.
Ankit Vani <a@nevitus.org>
parents:
34599
diff
changeset
|
623 | |
|
3180ebbd06be
Added GObject structures, moved things around, renamed functions as GObject methods.
Ankit Vani <a@nevitus.org>
parents:
34599
diff
changeset
|
624 | /*@}*/ |
|
3180ebbd06be
Added GObject structures, moved things around, renamed functions as GObject methods.
Ankit Vani <a@nevitus.org>
parents:
34599
diff
changeset
|
625 | |
|
3180ebbd06be
Added GObject structures, moved things around, renamed functions as GObject methods.
Ankit Vani <a@nevitus.org>
parents:
34599
diff
changeset
|
626 | /**************************************************************************/ |
|
3180ebbd06be
Added GObject structures, moved things around, renamed functions as GObject methods.
Ankit Vani <a@nevitus.org>
parents:
34599
diff
changeset
|
627 | /** @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
|
628 | /**************************************************************************/ |
|
3180ebbd06be
Added GObject structures, moved things around, renamed functions as GObject methods.
Ankit Vani <a@nevitus.org>
parents:
34599
diff
changeset
|
629 | /*@{*/ |
|
3180ebbd06be
Added GObject structures, moved things around, renamed functions as GObject methods.
Ankit Vani <a@nevitus.org>
parents:
34599
diff
changeset
|
630 | |
|
3180ebbd06be
Added GObject structures, moved things around, renamed functions as GObject methods.
Ankit Vani <a@nevitus.org>
parents:
34599
diff
changeset
|
631 | /** |
|
3180ebbd06be
Added GObject structures, moved things around, renamed functions as GObject methods.
Ankit Vani <a@nevitus.org>
parents:
34599
diff
changeset
|
632 | * 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
|
633 | * |
|
3180ebbd06be
Added GObject structures, moved things around, renamed functions as GObject methods.
Ankit Vani <a@nevitus.org>
parents:
34599
diff
changeset
|
634 | * 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
|
635 | * 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
|
636 | * 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
|
637 | * 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
|
638 | * |
|
3180ebbd06be
Added GObject structures, moved things around, renamed functions as GObject methods.
Ankit Vani <a@nevitus.org>
parents:
34599
diff
changeset
|
639 | * @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
|
640 | * @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
|
641 | * @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
|
642 | * @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
|
643 | */ |
|
3180ebbd06be
Added GObject structures, moved things around, renamed functions as GObject methods.
Ankit Vani <a@nevitus.org>
parents:
34599
diff
changeset
|
644 | gboolean purple_conversation_helper_present_error(const char *who, PurpleAccount *account, const char *what); |
|
3180ebbd06be
Added GObject structures, moved things around, renamed functions as GObject methods.
Ankit Vani <a@nevitus.org>
parents:
34599
diff
changeset
|
645 | |
|
3180ebbd06be
Added GObject structures, moved things around, renamed functions as GObject methods.
Ankit Vani <a@nevitus.org>
parents:
34599
diff
changeset
|
646 | /*@}*/ |
|
3180ebbd06be
Added GObject structures, moved things around, renamed functions as GObject methods.
Ankit Vani <a@nevitus.org>
parents:
34599
diff
changeset
|
647 | |
|
3180ebbd06be
Added GObject structures, moved things around, renamed functions as GObject methods.
Ankit Vani <a@nevitus.org>
parents:
34599
diff
changeset
|
648 | /**************************************************************************/ |
|
3180ebbd06be
Added GObject structures, moved things around, renamed functions as GObject methods.
Ankit Vani <a@nevitus.org>
parents:
34599
diff
changeset
|
649 | /** @name Conversation Message API */ |
|
3180ebbd06be
Added GObject structures, moved things around, renamed functions as GObject methods.
Ankit Vani <a@nevitus.org>
parents:
34599
diff
changeset
|
650 | /**************************************************************************/ |
|
3180ebbd06be
Added GObject structures, moved things around, renamed functions as GObject methods.
Ankit Vani <a@nevitus.org>
parents:
34599
diff
changeset
|
651 | /*@{*/ |
|
3180ebbd06be
Added GObject structures, moved things around, renamed functions as GObject methods.
Ankit Vani <a@nevitus.org>
parents:
34599
diff
changeset
|
652 | |
|
3180ebbd06be
Added GObject structures, moved things around, renamed functions as GObject methods.
Ankit Vani <a@nevitus.org>
parents:
34599
diff
changeset
|
653 | /** |
|
34599
0b1b22f5e2ec
Begun GObjectification of PurpleConversation.
Ankit Vani <a@nevitus.org>
parents:
34595
diff
changeset
|
654 | * 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
|
655 | * |
|
34599
0b1b22f5e2ec
Begun GObjectification of PurpleConversation.
Ankit Vani <a@nevitus.org>
parents:
34595
diff
changeset
|
656 | * @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
|
657 | * |
|
cf4e3e71bbc0
Store message history in a conversation, and provide API to access the history.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
19120
diff
changeset
|
658 | * @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
|
659 | */ |
|
34599
0b1b22f5e2ec
Begun GObjectification of PurpleConversation.
Ankit Vani <a@nevitus.org>
parents:
34595
diff
changeset
|
660 | 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
|
661 | |
|
cf4e3e71bbc0
Store message history in a conversation, and provide API to access the history.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
19120
diff
changeset
|
662 | /** |
|
34599
0b1b22f5e2ec
Begun GObjectification of PurpleConversation.
Ankit Vani <a@nevitus.org>
parents:
34595
diff
changeset
|
663 | * 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
|
664 | * |
|
34599
0b1b22f5e2ec
Begun GObjectification of PurpleConversation.
Ankit Vani <a@nevitus.org>
parents:
34595
diff
changeset
|
665 | * @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
|
666 | * |
|
cf4e3e71bbc0
Store message history in a conversation, and provide API to access the history.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
19120
diff
changeset
|
667 | * @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
|
668 | */ |
|
34599
0b1b22f5e2ec
Begun GObjectification of PurpleConversation.
Ankit Vani <a@nevitus.org>
parents:
34595
diff
changeset
|
669 | const char *purple_conversation_message_get_message(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
|
670 | |
|
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 | * 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
|
673 | * |
|
34599
0b1b22f5e2ec
Begun GObjectification of PurpleConversation.
Ankit Vani <a@nevitus.org>
parents:
34595
diff
changeset
|
674 | * @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
|
675 | * |
|
22082
617ac5b2b597
Docu patch from Simon Wenner. Closes #4497.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
21453
diff
changeset
|
676 | * @return The message flags |
|
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 | */ |
|
34599
0b1b22f5e2ec
Begun GObjectification of PurpleConversation.
Ankit Vani <a@nevitus.org>
parents:
34595
diff
changeset
|
678 | PurpleConversationMessageFlags purple_conversation_message_get_flags(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
|
679 | |
|
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 | * 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
|
682 | * |
|
34599
0b1b22f5e2ec
Begun GObjectification of PurpleConversation.
Ankit Vani <a@nevitus.org>
parents:
34595
diff
changeset
|
683 | * @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
|
684 | * |
|
22082
617ac5b2b597
Docu patch from Simon Wenner. Closes #4497.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
21453
diff
changeset
|
685 | * @return The timestamp of the message |
|
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
|
686 | */ |
|
34599
0b1b22f5e2ec
Begun GObjectification of PurpleConversation.
Ankit Vani <a@nevitus.org>
parents:
34595
diff
changeset
|
687 | 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
|
688 | |
|
ec1fca0a6b5d
Hide struct _PurpleConvMessage.
Andrew Victor <andrew.victor@mxit.com>
parents:
32632
diff
changeset
|
689 | /** |
|
34599
0b1b22f5e2ec
Begun GObjectification of PurpleConversation.
Ankit Vani <a@nevitus.org>
parents:
34595
diff
changeset
|
690 | * Get the alias from a PurpleConversationMessage |
|
32690
ec1fca0a6b5d
Hide struct _PurpleConvMessage.
Andrew Victor <andrew.victor@mxit.com>
parents:
32632
diff
changeset
|
691 | * |
|
34599
0b1b22f5e2ec
Begun GObjectification of PurpleConversation.
Ankit Vani <a@nevitus.org>
parents:
34595
diff
changeset
|
692 | * @param msg A PurpleConversationMessage |
|
32690
ec1fca0a6b5d
Hide struct _PurpleConvMessage.
Andrew Victor <andrew.victor@mxit.com>
parents:
32632
diff
changeset
|
693 | * |
|
ec1fca0a6b5d
Hide struct _PurpleConvMessage.
Andrew Victor <andrew.victor@mxit.com>
parents:
32632
diff
changeset
|
694 | * @return The alias of the sender of the message |
|
ec1fca0a6b5d
Hide struct _PurpleConvMessage.
Andrew Victor <andrew.victor@mxit.com>
parents:
32632
diff
changeset
|
695 | */ |
|
34599
0b1b22f5e2ec
Begun GObjectification of PurpleConversation.
Ankit Vani <a@nevitus.org>
parents:
34595
diff
changeset
|
696 | 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
|
697 | |
|
ec1fca0a6b5d
Hide struct _PurpleConvMessage.
Andrew Victor <andrew.victor@mxit.com>
parents:
32632
diff
changeset
|
698 | /** |
|
34599
0b1b22f5e2ec
Begun GObjectification of PurpleConversation.
Ankit Vani <a@nevitus.org>
parents:
34595
diff
changeset
|
699 | * Get the conversation associated with the PurpleConversationMessage |
|
32690
ec1fca0a6b5d
Hide struct _PurpleConvMessage.
Andrew Victor <andrew.victor@mxit.com>
parents:
32632
diff
changeset
|
700 | * |
|
34599
0b1b22f5e2ec
Begun GObjectification of PurpleConversation.
Ankit Vani <a@nevitus.org>
parents:
34595
diff
changeset
|
701 | * @param msg A PurpleConversationMessage |
|
32690
ec1fca0a6b5d
Hide struct _PurpleConvMessage.
Andrew Victor <andrew.victor@mxit.com>
parents:
32632
diff
changeset
|
702 | * |
|
ec1fca0a6b5d
Hide struct _PurpleConvMessage.
Andrew Victor <andrew.victor@mxit.com>
parents:
32632
diff
changeset
|
703 | * @return The conversation |
|
ec1fca0a6b5d
Hide struct _PurpleConvMessage.
Andrew Victor <andrew.victor@mxit.com>
parents:
32632
diff
changeset
|
704 | */ |
|
34599
0b1b22f5e2ec
Begun GObjectification of PurpleConversation.
Ankit Vani <a@nevitus.org>
parents:
34595
diff
changeset
|
705 | PurpleConversation *purple_conversation_message_get_conv(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
|
706 | |
| 4359 | 707 | /*@}*/ |
| 708 | ||
|
32787
7072f190d6ad
Use G_BEGIN/END_DECLS in public libpurple files. This was
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
32698
diff
changeset
|
709 | G_END_DECLS |
|
5944
f19df037ac58
[gaim-migrate @ 6385]
Christian Hammond <chipx86@chipx86.com>
parents:
5872
diff
changeset
|
710 | |
| 15884 | 711 | #endif /* _PURPLE_CONVERSATION_H_ */ |