plugins/perl/common/Sound.xs

Wed, 12 Oct 2005 02:27:32 +0000

author
Casey Harkins <charkins@pidgin.im>
date
Wed, 12 Oct 2005 02:27:32 +0000
changeset 11642
76b60f0bf467
parent 11290
136722ebf145
child 12773
1f635f83d71f
permissions
-rw-r--r--

[gaim-migrate @ 13919]
sf patch #1324285, from Casey Harkins

fix "sounds while away" in HEAD

This patch adds a GaimAccount as a parameter to the
sound playing functions, allowing the caller to specify
the account the sound is related to. If the account is
not NULL and the while_away preference is not set, then
the account is checked to see if it is away, if so, the
sound is not played.

committer: Mark Doliner <markdoliner@pidgin.im>

11118
36db35a9da56 [gaim-migrate @ 13174]
John H. Kelm <johnkelm@gmail.com>
parents:
diff changeset
1 #include "module.h"
36db35a9da56 [gaim-migrate @ 13174]
John H. Kelm <johnkelm@gmail.com>
parents:
diff changeset
2
36db35a9da56 [gaim-migrate @ 13174]
John H. Kelm <johnkelm@gmail.com>
parents:
diff changeset
3 MODULE = Gaim::Sound PACKAGE = Gaim::Sound PREFIX = gaim_sound_
36db35a9da56 [gaim-migrate @ 13174]
John H. Kelm <johnkelm@gmail.com>
parents:
diff changeset
4 PROTOTYPES: ENABLE
36db35a9da56 [gaim-migrate @ 13174]
John H. Kelm <johnkelm@gmail.com>
parents:
diff changeset
5
36db35a9da56 [gaim-migrate @ 13174]
John H. Kelm <johnkelm@gmail.com>
parents:
diff changeset
6 Gaim::Sound::UiOps
36db35a9da56 [gaim-migrate @ 13174]
John H. Kelm <johnkelm@gmail.com>
parents:
diff changeset
7 gaim_sound_get_ui_ops()
36db35a9da56 [gaim-migrate @ 13174]
John H. Kelm <johnkelm@gmail.com>
parents:
diff changeset
8
36db35a9da56 [gaim-migrate @ 13174]
John H. Kelm <johnkelm@gmail.com>
parents:
diff changeset
9
36db35a9da56 [gaim-migrate @ 13174]
John H. Kelm <johnkelm@gmail.com>
parents:
diff changeset
10 void
36db35a9da56 [gaim-migrate @ 13174]
John H. Kelm <johnkelm@gmail.com>
parents:
diff changeset
11 gaim_sound_init()
36db35a9da56 [gaim-migrate @ 13174]
John H. Kelm <johnkelm@gmail.com>
parents:
diff changeset
12
36db35a9da56 [gaim-migrate @ 13174]
John H. Kelm <johnkelm@gmail.com>
parents:
diff changeset
13
36db35a9da56 [gaim-migrate @ 13174]
John H. Kelm <johnkelm@gmail.com>
parents:
diff changeset
14 void
11642
76b60f0bf467 [gaim-migrate @ 13919]
Casey Harkins <charkins@pidgin.im>
parents: 11290
diff changeset
15 gaim_sound_play_event(event, account)
11118
36db35a9da56 [gaim-migrate @ 13174]
John H. Kelm <johnkelm@gmail.com>
parents:
diff changeset
16 Gaim::SoundEventID event
11642
76b60f0bf467 [gaim-migrate @ 13919]
Casey Harkins <charkins@pidgin.im>
parents: 11290
diff changeset
17 Gaim::Account account
11118
36db35a9da56 [gaim-migrate @ 13174]
John H. Kelm <johnkelm@gmail.com>
parents:
diff changeset
18
36db35a9da56 [gaim-migrate @ 13174]
John H. Kelm <johnkelm@gmail.com>
parents:
diff changeset
19 void
11642
76b60f0bf467 [gaim-migrate @ 13919]
Casey Harkins <charkins@pidgin.im>
parents: 11290
diff changeset
20 gaim_sound_play_file(filename, account)
11118
36db35a9da56 [gaim-migrate @ 13174]
John H. Kelm <johnkelm@gmail.com>
parents:
diff changeset
21 const char *filename
11642
76b60f0bf467 [gaim-migrate @ 13919]
Casey Harkins <charkins@pidgin.im>
parents: 11290
diff changeset
22 Gaim::Account account
11118
36db35a9da56 [gaim-migrate @ 13174]
John H. Kelm <johnkelm@gmail.com>
parents:
diff changeset
23
36db35a9da56 [gaim-migrate @ 13174]
John H. Kelm <johnkelm@gmail.com>
parents:
diff changeset
24 void
36db35a9da56 [gaim-migrate @ 13174]
John H. Kelm <johnkelm@gmail.com>
parents:
diff changeset
25 gaim_sound_set_ui_ops(ops)
36db35a9da56 [gaim-migrate @ 13174]
John H. Kelm <johnkelm@gmail.com>
parents:
diff changeset
26 Gaim::Sound::UiOps ops
36db35a9da56 [gaim-migrate @ 13174]
John H. Kelm <johnkelm@gmail.com>
parents:
diff changeset
27
36db35a9da56 [gaim-migrate @ 13174]
John H. Kelm <johnkelm@gmail.com>
parents:
diff changeset
28 void
36db35a9da56 [gaim-migrate @ 13174]
John H. Kelm <johnkelm@gmail.com>
parents:
diff changeset
29 gaim_sound_uninit()
36db35a9da56 [gaim-migrate @ 13174]
John H. Kelm <johnkelm@gmail.com>
parents:
diff changeset
30
36db35a9da56 [gaim-migrate @ 13174]
John H. Kelm <johnkelm@gmail.com>
parents:
diff changeset
31

mercurial