annotate libpurple/plugins/perl/common/Sound.xs @ 32827:4a34689eeb33 default tip

merged from im.pidgin.pidgin
author Yoshiki Yazawa <yaz@honeyplanet.jp>
date Sat, 19 Nov 2011 14:42:54 +0900
parents e3f30a73a793
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
15374
5fe8042783c1 Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
1 #include "module.h"
5fe8042783c1 Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
2
15834
2f8274ce570a Perl fixes for s/gaim/purple/. This hasn't really been tested yet.
Daniel Atallah <daniel.atallah@gmail.com>
parents: 15374
diff changeset
3 MODULE = Purple::Sound PACKAGE = Purple::Sound PREFIX = purple_sound_
15374
5fe8042783c1 Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
4 PROTOTYPES: ENABLE
5fe8042783c1 Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
5
16750
39c7bb133a9f Remove the const-c and const-xs stuff and replace it with real constants
Etan Reisner <pidgin@unreliablesource.net>
parents: 15834
diff changeset
6 BOOT:
39c7bb133a9f Remove the const-c and const-xs stuff and replace it with real constants
Etan Reisner <pidgin@unreliablesource.net>
parents: 15834
diff changeset
7 {
39c7bb133a9f Remove the const-c and const-xs stuff and replace it with real constants
Etan Reisner <pidgin@unreliablesource.net>
parents: 15834
diff changeset
8 HV *stash = gv_stashpv("Purple::SoundEventID", 1);
39c7bb133a9f Remove the const-c and const-xs stuff and replace it with real constants
Etan Reisner <pidgin@unreliablesource.net>
parents: 15834
diff changeset
9
39c7bb133a9f Remove the const-c and const-xs stuff and replace it with real constants
Etan Reisner <pidgin@unreliablesource.net>
parents: 15834
diff changeset
10 static const constiv *civ, const_iv[] = {
39c7bb133a9f Remove the const-c and const-xs stuff and replace it with real constants
Etan Reisner <pidgin@unreliablesource.net>
parents: 15834
diff changeset
11 #define const_iv(name) {#name, (IV)PURPLE_SOUND_##name}
39c7bb133a9f Remove the const-c and const-xs stuff and replace it with real constants
Etan Reisner <pidgin@unreliablesource.net>
parents: 15834
diff changeset
12 const_iv(BUDDY_ARRIVE),
39c7bb133a9f Remove the const-c and const-xs stuff and replace it with real constants
Etan Reisner <pidgin@unreliablesource.net>
parents: 15834
diff changeset
13 const_iv(BUDDY_LEAVE),
39c7bb133a9f Remove the const-c and const-xs stuff and replace it with real constants
Etan Reisner <pidgin@unreliablesource.net>
parents: 15834
diff changeset
14 const_iv(RECEIVE),
39c7bb133a9f Remove the const-c and const-xs stuff and replace it with real constants
Etan Reisner <pidgin@unreliablesource.net>
parents: 15834
diff changeset
15 const_iv(FIRST_RECEIVE),
39c7bb133a9f Remove the const-c and const-xs stuff and replace it with real constants
Etan Reisner <pidgin@unreliablesource.net>
parents: 15834
diff changeset
16 const_iv(SEND),
39c7bb133a9f Remove the const-c and const-xs stuff and replace it with real constants
Etan Reisner <pidgin@unreliablesource.net>
parents: 15834
diff changeset
17 const_iv(CHAT_JOIN),
39c7bb133a9f Remove the const-c and const-xs stuff and replace it with real constants
Etan Reisner <pidgin@unreliablesource.net>
parents: 15834
diff changeset
18 const_iv(CHAT_LEAVE),
39c7bb133a9f Remove the const-c and const-xs stuff and replace it with real constants
Etan Reisner <pidgin@unreliablesource.net>
parents: 15834
diff changeset
19 const_iv(CHAT_YOU_SAY),
39c7bb133a9f Remove the const-c and const-xs stuff and replace it with real constants
Etan Reisner <pidgin@unreliablesource.net>
parents: 15834
diff changeset
20 const_iv(CHAT_SAY),
39c7bb133a9f Remove the const-c and const-xs stuff and replace it with real constants
Etan Reisner <pidgin@unreliablesource.net>
parents: 15834
diff changeset
21 const_iv(POUNCE_DEFAULT),
39c7bb133a9f Remove the const-c and const-xs stuff and replace it with real constants
Etan Reisner <pidgin@unreliablesource.net>
parents: 15834
diff changeset
22 const_iv(CHAT_NICK),
39c7bb133a9f Remove the const-c and const-xs stuff and replace it with real constants
Etan Reisner <pidgin@unreliablesource.net>
parents: 15834
diff changeset
23 };
39c7bb133a9f Remove the const-c and const-xs stuff and replace it with real constants
Etan Reisner <pidgin@unreliablesource.net>
parents: 15834
diff changeset
24
39c7bb133a9f Remove the const-c and const-xs stuff and replace it with real constants
Etan Reisner <pidgin@unreliablesource.net>
parents: 15834
diff changeset
25 for (civ = const_iv + sizeof(const_iv) / sizeof(const_iv[0]); civ-- > const_iv; )
39c7bb133a9f Remove the const-c and const-xs stuff and replace it with real constants
Etan Reisner <pidgin@unreliablesource.net>
parents: 15834
diff changeset
26 newCONSTSUB(stash, (char *)civ->name, newSViv(civ->iv));
39c7bb133a9f Remove the const-c and const-xs stuff and replace it with real constants
Etan Reisner <pidgin@unreliablesource.net>
parents: 15834
diff changeset
27 }
39c7bb133a9f Remove the const-c and const-xs stuff and replace it with real constants
Etan Reisner <pidgin@unreliablesource.net>
parents: 15834
diff changeset
28
15374
5fe8042783c1 Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
29 void
15834
2f8274ce570a Perl fixes for s/gaim/purple/. This hasn't really been tested yet.
Daniel Atallah <daniel.atallah@gmail.com>
parents: 15374
diff changeset
30 purple_sound_play_event(event, account)
2f8274ce570a Perl fixes for s/gaim/purple/. This hasn't really been tested yet.
Daniel Atallah <daniel.atallah@gmail.com>
parents: 15374
diff changeset
31 Purple::SoundEventID event
2f8274ce570a Perl fixes for s/gaim/purple/. This hasn't really been tested yet.
Daniel Atallah <daniel.atallah@gmail.com>
parents: 15374
diff changeset
32 Purple::Account account
15374
5fe8042783c1 Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
33
5fe8042783c1 Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
34 void
15834
2f8274ce570a Perl fixes for s/gaim/purple/. This hasn't really been tested yet.
Daniel Atallah <daniel.atallah@gmail.com>
parents: 15374
diff changeset
35 purple_sound_play_file(filename, account)
15374
5fe8042783c1 Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
36 const char *filename
15834
2f8274ce570a Perl fixes for s/gaim/purple/. This hasn't really been tested yet.
Daniel Atallah <daniel.atallah@gmail.com>
parents: 15374
diff changeset
37 Purple::Account account