annotate plugins/perl/common/module.h @ 9584:fe35f55ee984

[gaim-migrate @ 10427] " When joining a jabber conference many jabber servers send a recap of the last 20 or so messages. If you have sounds enabled, this will result in either 20 sounds in row, or worse if mixing is available, a horrible mix of 20 overlapping sounds. These recap messages can be identifed be the presence of the "jabber:x:delay". This patch identifies delayed messages, passes that information through flags from the prpl to the core, and then on to the gui. Detailed changes: Add GAIM_MESSAGE_DELAYED to GaimMessageFlags to indicate a delayed message. Change gtkconv.c to not play sounds when either GAIM_MESSAGE_DELAYED or GAIM_MESSAGE_SYSTEM are set. Add GaimConvChatFlags, parallel to GaimConvImFlags, to pass flags from protocols to core. Currently contains two flags: GAIM_CONV_CHAT_WHISPER GAIM_CONV_CHAT_DELAYED Change fourth arg of serv_got_chat_in() from "int whisper" to "GaimConvChatFlags chatflags". Change jabber prpl to set delayed flag when the "jabber:x:delay" element is present. Change toc protocol since it uses the whisper flag." --Nathan Fredrickson Date: 2004-07-24 00:49 Sender: marv_sfAccepting Donations Logged In: YES user_id=790708 I'm not sure I like naming the flags "DELAYED". I mean that's okay inside jabber since that's what the jabber protocol refers to it as, but for the the GAIM_*_DELAYED flags, I think they should be named something else. I thought about NOSOUND, but I decided that was wrong, because the flag should say what kind of message it is, not what to do with it, that's up to the UI to decide. What's up with not playing sounds on GAIM_MESSAGE_SYSTEM? This sounds unrelated to this. Are there times when we want to play sounds on system messages? Date: 2004-07-24 09:13 Sender: noif Logged In: YES user_id=365548 I purposely did not use a name that implied what the UI should do with the flag. The only characteristic that makes these messages unique is that they've been stored in the server for some period of time and are not current. I'm open to a better flag name than "DELAYED"... I thought about "RECAP", but that seemed less generalized than "DELAYED". As for not playing sounds on GAIM_MESSAGE_SYSTEM, that can be removed if it's controversial. I think I slipped that in since the setting of the topic was still playing a sound every time you joined a jabber conference. I think we can change the flag name ourselves if something else is better. committer: Tailor Script <tailor@pidgin.im>
author Luke Schierer <lschiere@pidgin.im>
date Sat, 24 Jul 2004 15:18:32 +0000
parents bf630f7dfdcd
children 134d0001983d
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
6508
cbd24b37350d [gaim-migrate @ 7025]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
1 typedef struct group *Gaim__Group;
cbd24b37350d [gaim-migrate @ 7025]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
2
cbd24b37350d [gaim-migrate @ 7025]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
3 #define group perl_group
cbd24b37350d [gaim-migrate @ 7025]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
4
6816
5aeba37b303c [gaim-migrate @ 7356]
Herman Bloggs <hermanator12002@yahoo.com>
parents: 6699
diff changeset
5 #include <glib.h>
5aeba37b303c [gaim-migrate @ 7356]
Herman Bloggs <hermanator12002@yahoo.com>
parents: 6699
diff changeset
6 #ifdef _WIN32
5aeba37b303c [gaim-migrate @ 7356]
Herman Bloggs <hermanator12002@yahoo.com>
parents: 6699
diff changeset
7 #undef pipe
5aeba37b303c [gaim-migrate @ 7356]
Herman Bloggs <hermanator12002@yahoo.com>
parents: 6699
diff changeset
8 #endif
6508
cbd24b37350d [gaim-migrate @ 7025]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
9 #include <EXTERN.h>
cbd24b37350d [gaim-migrate @ 7025]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
10 #include <perl.h>
cbd24b37350d [gaim-migrate @ 7025]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
11 #include <XSUB.h>
cbd24b37350d [gaim-migrate @ 7025]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
12
cbd24b37350d [gaim-migrate @ 7025]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
13 #undef group
cbd24b37350d [gaim-migrate @ 7025]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
14
cbd24b37350d [gaim-migrate @ 7025]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
15 #include "../perl-common.h"
cbd24b37350d [gaim-migrate @ 7025]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
16
cbd24b37350d [gaim-migrate @ 7025]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
17 #include "account.h"
cbd24b37350d [gaim-migrate @ 7025]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
18 #include "connection.h"
6591
d25ae4b5a204 [gaim-migrate @ 7115]
Christian Hammond <chipx86@chipx86.com>
parents: 6588
diff changeset
19 #include "conversation.h"
6508
cbd24b37350d [gaim-migrate @ 7025]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
20 #include "debug.h"
6523
d7e04709be96 [gaim-migrate @ 7040]
Christian Hammond <chipx86@chipx86.com>
parents: 6520
diff changeset
21 #include "server.h"
6508
cbd24b37350d [gaim-migrate @ 7025]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
22
6531
7c42b8ca3222 [gaim-migrate @ 7048]
Christian Hammond <chipx86@chipx86.com>
parents: 6523
diff changeset
23 typedef GaimAccount * Gaim__Account;
6699
12169973c663 [gaim-migrate @ 7225]
Christian Hammond <chipx86@chipx86.com>
parents: 6591
diff changeset
24 typedef GaimBuddy * Gaim__BuddyList__Buddy;
7118
bf630f7dfdcd [gaim-migrate @ 7685]
Christian Hammond <chipx86@chipx86.com>
parents: 6816
diff changeset
25 typedef GaimChat * Gaim__BuddyList__Chat;
6699
12169973c663 [gaim-migrate @ 7225]
Christian Hammond <chipx86@chipx86.com>
parents: 6591
diff changeset
26 typedef GaimGroup * Gaim__BuddyList__Group;
12169973c663 [gaim-migrate @ 7225]
Christian Hammond <chipx86@chipx86.com>
parents: 6591
diff changeset
27 typedef GaimContact * Gaim__BuddyList__Contact;
6591
d25ae4b5a204 [gaim-migrate @ 7115]
Christian Hammond <chipx86@chipx86.com>
parents: 6588
diff changeset
28 typedef GaimConnection * Gaim__Connection;
d25ae4b5a204 [gaim-migrate @ 7115]
Christian Hammond <chipx86@chipx86.com>
parents: 6588
diff changeset
29 typedef GaimConversation *Gaim__Conversation;
7118
bf630f7dfdcd [gaim-migrate @ 7685]
Christian Hammond <chipx86@chipx86.com>
parents: 6816
diff changeset
30 typedef GaimConvChat * Gaim__Conversation__Chat;
bf630f7dfdcd [gaim-migrate @ 7685]
Christian Hammond <chipx86@chipx86.com>
parents: 6816
diff changeset
31 typedef GaimConvIm * Gaim__Conversation__IM;
bf630f7dfdcd [gaim-migrate @ 7685]
Christian Hammond <chipx86@chipx86.com>
parents: 6816
diff changeset
32 typedef GaimConvWindow * Gaim__ConvWindow;
6591
d25ae4b5a204 [gaim-migrate @ 7115]
Christian Hammond <chipx86@chipx86.com>
parents: 6588
diff changeset
33 typedef GaimPlugin * Gaim__Plugin;
6588
7f5f57dd5cac [gaim-migrate @ 7110]
Christian Hammond <chipx86@chipx86.com>
parents: 6531
diff changeset
34
7f5f57dd5cac [gaim-migrate @ 7110]
Christian Hammond <chipx86@chipx86.com>
parents: 6531
diff changeset
35 typedef GaimDebugLevel Gaim__DebugLevel;