finch/gntsound.h

Wed, 13 May 2009 20:29:03 +0000

author
Marcus Lundblad <malu@pidgin.im>
date
Wed, 13 May 2009 20:29:03 +0000
changeset 27110
05ca719b901b
parent 20939
13dd02add7c1
child 31293
169eeb43b52c
permissions
-rw-r--r--

Support custom smileys in MUCs (when all participants support BoB and a maximum
of 10 participants are in the chat).
Always announce support for BoB, since disable custom smileys will still turn
off fetching them, and BoB can be used for other purposes further on.

18155
3bb5605ea11e Added sound to Finch.
Eric Polino <aluink@pidgin.im>
parents:
diff changeset
1 /**
3bb5605ea11e Added sound to Finch.
Eric Polino <aluink@pidgin.im>
parents:
diff changeset
2 * @file gntsound.h GNT Sound API
3bb5605ea11e Added sound to Finch.
Eric Polino <aluink@pidgin.im>
parents:
diff changeset
3 * @ingroup finch
20147
66f05a854eee applied changes from 8a731bbd0197fbcc91a705c2d8f528154216defa
Richard Laager <rlaager@pidgin.im>
parents: 19859
diff changeset
4 */
66f05a854eee applied changes from 8a731bbd0197fbcc91a705c2d8f528154216defa
Richard Laager <rlaager@pidgin.im>
parents: 19859
diff changeset
5
66f05a854eee applied changes from 8a731bbd0197fbcc91a705c2d8f528154216defa
Richard Laager <rlaager@pidgin.im>
parents: 19859
diff changeset
6 /* finch
18155
3bb5605ea11e Added sound to Finch.
Eric Polino <aluink@pidgin.im>
parents:
diff changeset
7 *
3bb5605ea11e Added sound to Finch.
Eric Polino <aluink@pidgin.im>
parents:
diff changeset
8 * Finch is the legal property of its developers, whose names are too numerous
3bb5605ea11e Added sound to Finch.
Eric Polino <aluink@pidgin.im>
parents:
diff changeset
9 * to list here. Please refer to the COPYRIGHT file distributed with this
3bb5605ea11e Added sound to Finch.
Eric Polino <aluink@pidgin.im>
parents:
diff changeset
10 * source distribution.
3bb5605ea11e Added sound to Finch.
Eric Polino <aluink@pidgin.im>
parents:
diff changeset
11 *
3bb5605ea11e Added sound to Finch.
Eric Polino <aluink@pidgin.im>
parents:
diff changeset
12 * This program is free software; you can redistribute it and/or modify
3bb5605ea11e Added sound to Finch.
Eric Polino <aluink@pidgin.im>
parents:
diff changeset
13 * it under the terms of the GNU General Public License as published by
3bb5605ea11e Added sound to Finch.
Eric Polino <aluink@pidgin.im>
parents:
diff changeset
14 * the Free Software Foundation; either version 2 of the License, or
3bb5605ea11e Added sound to Finch.
Eric Polino <aluink@pidgin.im>
parents:
diff changeset
15 * (at your option) any later version.
3bb5605ea11e Added sound to Finch.
Eric Polino <aluink@pidgin.im>
parents:
diff changeset
16 *
3bb5605ea11e Added sound to Finch.
Eric Polino <aluink@pidgin.im>
parents:
diff changeset
17 * This program is distributed in the hope that it will be useful,
3bb5605ea11e Added sound to Finch.
Eric Polino <aluink@pidgin.im>
parents:
diff changeset
18 * but WITHOUT ANY WARRANTY; without even the implied warranty of
3bb5605ea11e Added sound to Finch.
Eric Polino <aluink@pidgin.im>
parents:
diff changeset
19 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
3bb5605ea11e Added sound to Finch.
Eric Polino <aluink@pidgin.im>
parents:
diff changeset
20 * GNU General Public License for more details.
3bb5605ea11e Added sound to Finch.
Eric Polino <aluink@pidgin.im>
parents:
diff changeset
21 *
3bb5605ea11e Added sound to Finch.
Eric Polino <aluink@pidgin.im>
parents:
diff changeset
22 * You should have received a copy of the GNU General Public License
3bb5605ea11e Added sound to Finch.
Eric Polino <aluink@pidgin.im>
parents:
diff changeset
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: 19612
diff changeset
24 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1301 USA
18155
3bb5605ea11e Added sound to Finch.
Eric Polino <aluink@pidgin.im>
parents:
diff changeset
25 */
3bb5605ea11e Added sound to Finch.
Eric Polino <aluink@pidgin.im>
parents:
diff changeset
26 #ifndef _GNT_SOUND_H
3bb5605ea11e Added sound to Finch.
Eric Polino <aluink@pidgin.im>
parents:
diff changeset
27 #define _GNT_SOUND_H
3bb5605ea11e Added sound to Finch.
Eric Polino <aluink@pidgin.im>
parents:
diff changeset
28
3bb5605ea11e Added sound to Finch.
Eric Polino <aluink@pidgin.im>
parents:
diff changeset
29 #include "sound.h"
3bb5605ea11e Added sound to Finch.
Eric Polino <aluink@pidgin.im>
parents:
diff changeset
30
3bb5605ea11e Added sound to Finch.
Eric Polino <aluink@pidgin.im>
parents:
diff changeset
31 /**********************************************************************/
19315
0bc6119bbf7b Fix a memory leak.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents: 18697
diff changeset
32 /** @name GNT Sound API */
18155
3bb5605ea11e Added sound to Finch.
Eric Polino <aluink@pidgin.im>
parents:
diff changeset
33 /**********************************************************************/
3bb5605ea11e Added sound to Finch.
Eric Polino <aluink@pidgin.im>
parents:
diff changeset
34 /*@{*/
3bb5605ea11e Added sound to Finch.
Eric Polino <aluink@pidgin.im>
parents:
diff changeset
35
3bb5605ea11e Added sound to Finch.
Eric Polino <aluink@pidgin.im>
parents:
diff changeset
36 /**
18683
3bc4a997ad14 Added sound profiles
Eric Polino <aluink@pidgin.im>
parents: 18294
diff changeset
37 * Get the name of the active sound profile.
3bc4a997ad14 Added sound profiles
Eric Polino <aluink@pidgin.im>
parents: 18294
diff changeset
38 *
19315
0bc6119bbf7b Fix a memory leak.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents: 18697
diff changeset
39 * @return The name of the profile
20939
13dd02add7c1 Add @since doxygen tags for finch/libgnt.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents: 20147
diff changeset
40 *
13dd02add7c1 Add @since doxygen tags for finch/libgnt.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents: 20147
diff changeset
41 * @since 2.1.0
18683
3bc4a997ad14 Added sound profiles
Eric Polino <aluink@pidgin.im>
parents: 18294
diff changeset
42 */
3bc4a997ad14 Added sound profiles
Eric Polino <aluink@pidgin.im>
parents: 18294
diff changeset
43 const char *finch_sound_get_active_profile(void);
3bc4a997ad14 Added sound profiles
Eric Polino <aluink@pidgin.im>
parents: 18294
diff changeset
44
3bc4a997ad14 Added sound profiles
Eric Polino <aluink@pidgin.im>
parents: 18294
diff changeset
45 /**
3bc4a997ad14 Added sound profiles
Eric Polino <aluink@pidgin.im>
parents: 18294
diff changeset
46 * Set the active profile. If the profile doesn't exist, nothing is changed.
3bc4a997ad14 Added sound profiles
Eric Polino <aluink@pidgin.im>
parents: 18294
diff changeset
47 *
19315
0bc6119bbf7b Fix a memory leak.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents: 18697
diff changeset
48 * @param name The name of the profile
20939
13dd02add7c1 Add @since doxygen tags for finch/libgnt.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents: 20147
diff changeset
49 *
13dd02add7c1 Add @since doxygen tags for finch/libgnt.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents: 20147
diff changeset
50 * @since 2.1.0
18683
3bc4a997ad14 Added sound profiles
Eric Polino <aluink@pidgin.im>
parents: 18294
diff changeset
51 */
3bc4a997ad14 Added sound profiles
Eric Polino <aluink@pidgin.im>
parents: 18294
diff changeset
52 void finch_sound_set_active_profile(const char *name);
3bc4a997ad14 Added sound profiles
Eric Polino <aluink@pidgin.im>
parents: 18294
diff changeset
53
3bc4a997ad14 Added sound profiles
Eric Polino <aluink@pidgin.im>
parents: 18294
diff changeset
54 /**
3bc4a997ad14 Added sound profiles
Eric Polino <aluink@pidgin.im>
parents: 18294
diff changeset
55 * Get a list of available sound profiles.
3bc4a997ad14 Added sound profiles
Eric Polino <aluink@pidgin.im>
parents: 18294
diff changeset
56 *
19315
0bc6119bbf7b Fix a memory leak.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents: 18697
diff changeset
57 * @return A list of strings denoting sound profile names.
0bc6119bbf7b Fix a memory leak.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents: 18697
diff changeset
58 * Caller must free the list (but not the data).
20939
13dd02add7c1 Add @since doxygen tags for finch/libgnt.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents: 20147
diff changeset
59 *
13dd02add7c1 Add @since doxygen tags for finch/libgnt.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents: 20147
diff changeset
60 * @since 2.1.0
18683
3bc4a997ad14 Added sound profiles
Eric Polino <aluink@pidgin.im>
parents: 18294
diff changeset
61 */
3bc4a997ad14 Added sound profiles
Eric Polino <aluink@pidgin.im>
parents: 18294
diff changeset
62 GList *finch_sound_get_profiles(void);
3bc4a997ad14 Added sound profiles
Eric Polino <aluink@pidgin.im>
parents: 18294
diff changeset
63
18155
3bb5605ea11e Added sound to Finch.
Eric Polino <aluink@pidgin.im>
parents:
diff changeset
64 /**
19612
043dcbf3a36e Fix #2767 (per-conversation/chat mute option).
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents: 19316
diff changeset
65 * Determine whether any sound will be played or not.
043dcbf3a36e Fix #2767 (per-conversation/chat mute option).
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents: 19316
diff changeset
66 *
043dcbf3a36e Fix #2767 (per-conversation/chat mute option).
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents: 19316
diff changeset
67 * @return Returns FALSE if preference is set to 'No sound', or if volume is
043dcbf3a36e Fix #2767 (per-conversation/chat mute option).
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents: 19316
diff changeset
68 * set to zero.
20939
13dd02add7c1 Add @since doxygen tags for finch/libgnt.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents: 20147
diff changeset
69 *
13dd02add7c1 Add @since doxygen tags for finch/libgnt.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents: 20147
diff changeset
70 * @since 2.2.0
19612
043dcbf3a36e Fix #2767 (per-conversation/chat mute option).
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents: 19316
diff changeset
71 */
043dcbf3a36e Fix #2767 (per-conversation/chat mute option).
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents: 19316
diff changeset
72 gboolean finch_sound_is_enabled(void);
043dcbf3a36e Fix #2767 (per-conversation/chat mute option).
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents: 19316
diff changeset
73
043dcbf3a36e Fix #2767 (per-conversation/chat mute option).
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents: 19316
diff changeset
74 /**
19315
0bc6119bbf7b Fix a memory leak.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents: 18697
diff changeset
75 * Gets GNT sound UI ops.
0bc6119bbf7b Fix a memory leak.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents: 18697
diff changeset
76 *
0bc6119bbf7b Fix a memory leak.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents: 18697
diff changeset
77 * @return The UI operations structure.
20939
13dd02add7c1 Add @since doxygen tags for finch/libgnt.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents: 20147
diff changeset
78 *
13dd02add7c1 Add @since doxygen tags for finch/libgnt.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents: 20147
diff changeset
79 * @since 2.1.0
19315
0bc6119bbf7b Fix a memory leak.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents: 18697
diff changeset
80 */
18155
3bb5605ea11e Added sound to Finch.
Eric Polino <aluink@pidgin.im>
parents:
diff changeset
81 PurpleSoundUiOps *finch_sound_get_ui_ops(void);
3bb5605ea11e Added sound to Finch.
Eric Polino <aluink@pidgin.im>
parents:
diff changeset
82
3bb5605ea11e Added sound to Finch.
Eric Polino <aluink@pidgin.im>
parents:
diff changeset
83 /**
18294
8186bc6ffbb4 Added Sounds to the actions list
Eric Polino <aluink@pidgin.im>
parents: 18155
diff changeset
84 * Show the sound settings dialog.
20939
13dd02add7c1 Add @since doxygen tags for finch/libgnt.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents: 20147
diff changeset
85 *
13dd02add7c1 Add @since doxygen tags for finch/libgnt.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents: 20147
diff changeset
86 * @since 2.1.0
18294
8186bc6ffbb4 Added Sounds to the actions list
Eric Polino <aluink@pidgin.im>
parents: 18155
diff changeset
87 */
8186bc6ffbb4 Added Sounds to the actions list
Eric Polino <aluink@pidgin.im>
parents: 18155
diff changeset
88 void finch_sounds_show_all(void);
8186bc6ffbb4 Added Sounds to the actions list
Eric Polino <aluink@pidgin.im>
parents: 18155
diff changeset
89
18155
3bb5605ea11e Added sound to Finch.
Eric Polino <aluink@pidgin.im>
parents:
diff changeset
90 /*@}*/
3bb5605ea11e Added sound to Finch.
Eric Polino <aluink@pidgin.im>
parents:
diff changeset
91
3bb5605ea11e Added sound to Finch.
Eric Polino <aluink@pidgin.im>
parents:
diff changeset
92 #endif

mercurial