Tue, 13 Jan 2009 19:23:07 +0000
Change error message shown when trying to buzz a buddy who doesn't announce
support to reflect the fact that disabling "attention" also implies the client
should not advertize support, or as we do in libpurple, don't announce support
when the status is set to "Busy".
| 7014 | 1 | /** |
| 2 | * @file message.h Message handlers | |
| 3 | * | |
| 15884 | 4 | * purple |
| 7014 | 5 | * |
| 6 | * Copyright (C) 2003 Nathan Walp <faceprint@faceprint.com> | |
| 7 | * | |
| 8 | * This program is free software; you can redistribute it and/or modify | |
| 9 | * it under the terms of the GNU General Public License as published by | |
| 10 | * the Free Software Foundation; either version 2 of the License, or | |
| 11 | * (at your option) any later version. | |
| 12 | * | |
| 13 | * This program is distributed in the hope that it will be useful, | |
| 14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | |
| 15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
| 16 | * GNU General Public License for more details. | |
| 17 | * | |
| 18 | * You should have received a copy of the GNU General Public License | |
| 19 | * 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:
15884
diff
changeset
|
20 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1301 USA |
| 7014 | 21 | */ |
| 15884 | 22 | #ifndef _PURPLE_JABBER_MESSAGE_H_ |
| 23 | #define _PURPLE_JABBER_MESSAGE_H_ | |
| 7014 | 24 | |
|
15709
b58646e3ce63
Sending XEP 85 'gone' messages
Sean Egan <seanegan@pidgin.im>
parents:
15435
diff
changeset
|
25 | #include "buddy.h" |
| 7014 | 26 | #include "jabber.h" |
| 27 | #include "xmlnode.h" | |
| 28 | ||
|
24397
fc00edecac72
Updated to new namespace for XEP-0224.
Marcus Lundblad <malu@pidgin.im>
parents:
23626
diff
changeset
|
29 | #define XEP_0224_NAMESPACE "urn:xmpp:attention:0" |
|
fc00edecac72
Updated to new namespace for XEP-0224.
Marcus Lundblad <malu@pidgin.im>
parents:
23626
diff
changeset
|
30 | |
| 7014 | 31 | typedef struct _JabberMessage { |
| 32 | JabberStream *js; | |
| 33 | enum { | |
| 34 | JABBER_MESSAGE_NORMAL, | |
| 35 | JABBER_MESSAGE_CHAT, | |
| 36 | JABBER_MESSAGE_GROUPCHAT, | |
| 37 | JABBER_MESSAGE_HEADLINE, | |
| 38 | JABBER_MESSAGE_ERROR, | |
| 39 | JABBER_MESSAGE_GROUPCHAT_INVITE, | |
|
17779
773326802e26
Fixed whitespace to match the coding convention used in libpurple
Andreas Monitzer <am@adiumx.com>
parents:
17768
diff
changeset
|
40 | JABBER_MESSAGE_EVENT, |
| 7014 | 41 | JABBER_MESSAGE_OTHER |
| 42 | } type; | |
| 43 | time_t sent; | |
|
9584
1a6198375303
[gaim-migrate @ 10427]
Nathan Fredrickson <nathan@silverorange.com>
parents:
8400
diff
changeset
|
44 | gboolean delayed; |
|
17822
1a183f3fa9d7
disapproval of revision 'd52c12703a8e67c41c7f95a2cae7f16ab426ad76'
Andreas Monitzer <am@adiumx.com>
parents:
17821
diff
changeset
|
45 | gboolean hasBuzz; |
| 13484 | 46 | char *id; |
| 7014 | 47 | char *from; |
| 48 | char *to; | |
| 49 | char *subject; | |
| 50 | char *body; | |
| 51 | char *xhtml; | |
| 52 | char *password; | |
| 53 | char *error; | |
| 8400 | 54 | char *thread_id; |
| 7014 | 55 | enum { |
| 13708 | 56 | JM_TS_NONE = 0, |
| 57 | JM_TS_JEP_0022 = 0x1, | |
| 58 | JM_TS_JEP_0085 = 0x2 | |
| 59 | } typing_style; | |
| 60 | enum { | |
| 61 | JM_STATE_ACTIVE, | |
| 62 | JM_STATE_COMPOSING, | |
| 63 | JM_STATE_PAUSED, | |
| 64 | JM_STATE_INACTIVE, | |
| 65 | JM_STATE_GONE | |
| 66 | } chat_state; | |
| 7145 | 67 | GList *etc; |
|
17779
773326802e26
Fixed whitespace to match the coding convention used in libpurple
Andreas Monitzer <am@adiumx.com>
parents:
17768
diff
changeset
|
68 | GList *eventitems; |
| 7014 | 69 | } JabberMessage; |
| 70 | ||
| 7971 | 71 | void jabber_message_free(JabberMessage *jm); |
| 72 | ||
| 73 | void jabber_message_send(JabberMessage *jm); | |
| 7014 | 74 | |
| 75 | void jabber_message_parse(JabberStream *js, xmlnode *packet); | |
| 15884 | 76 | int jabber_message_send_im(PurpleConnection *gc, const char *who, const char *msg, |
| 77 | PurpleMessageFlags flags); | |
| 78 | int jabber_message_send_chat(PurpleConnection *gc, int id, const char *message, PurpleMessageFlags flags); | |
| 7014 | 79 | |
| 15884 | 80 | unsigned int jabber_send_typing(PurpleConnection *gc, const char *who, PurpleTypingState state); |
|
15709
b58646e3ce63
Sending XEP 85 'gone' messages
Sean Egan <seanegan@pidgin.im>
parents:
15435
diff
changeset
|
81 | void jabber_message_conv_closed(JabberStream *js, const char *who); |
| 7971 | 82 | |
|
17824
52683dfc1f7d
Added the option to enable/disable buzz via a status setting. It's default off for the pidgin folks.
Andreas Monitzer <am@adiumx.com>
parents:
17822
diff
changeset
|
83 | gboolean jabber_buzz_isenabled(JabberStream *js, const gchar *shortname, const gchar *namespace); |
|
52683dfc1f7d
Added the option to enable/disable buzz via a status setting. It's default off for the pidgin folks.
Andreas Monitzer <am@adiumx.com>
parents:
17822
diff
changeset
|
84 | |
|
23626
e21afec2f485
Custom smileys for XMPP according to XEP 0231. Refs #5627.
Marcus Lundblad <malu@pidgin.im>
parents:
19897
diff
changeset
|
85 | gboolean jabber_custom_smileys_isenabled(JabberStream *js, const gchar *shortname, |
|
e21afec2f485
Custom smileys for XMPP according to XEP 0231. Refs #5627.
Marcus Lundblad <malu@pidgin.im>
parents:
19897
diff
changeset
|
86 | const gchar *namespace); |
|
e21afec2f485
Custom smileys for XMPP according to XEP 0231. Refs #5627.
Marcus Lundblad <malu@pidgin.im>
parents:
19897
diff
changeset
|
87 | |
| 15884 | 88 | #endif /* _PURPLE_JABBER_MESSAGE_H_ */ |