finch/gntsound.h

Wed, 19 Sep 2007 08:26:30 +0000

author
Sadrul Habib Chowdhury <sadrul@pidgin.im>
date
Wed, 19 Sep 2007 08:26:30 +0000
changeset 20423
6fe2af91fac4
parent 20330
650a7af9c238
child 20939
13dd02add7c1
permissions
-rw-r--r--

Add a 'purple.h' that includes the defines and other header files required
to compile against libpurple. Thanks to John 'rekkanoryo' Bailey for the
nice description. This should get rid of all the G_GNUC_NULL_TERMINATED
compile errors many people keep getting.
Closes #2524.

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
20330
650a7af9c238 remove gpl boilerplate from doxygen docs
Sean Egan <seanegan@pidgin.im>
parents: 19859
diff changeset
4 */
650a7af9c238 remove gpl boilerplate from doxygen docs
Sean Egan <seanegan@pidgin.im>
parents: 19859
diff changeset
5
650a7af9c238 remove gpl boilerplate from doxygen docs
Sean Egan <seanegan@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
18683
3bc4a997ad14 Added sound profiles
Eric Polino <aluink@pidgin.im>
parents: 18294
diff changeset
40 */
3bc4a997ad14 Added sound profiles
Eric Polino <aluink@pidgin.im>
parents: 18294
diff changeset
41 const char *finch_sound_get_active_profile(void);
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 /**
3bc4a997ad14 Added sound profiles
Eric Polino <aluink@pidgin.im>
parents: 18294
diff changeset
44 * 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
45 *
19315
0bc6119bbf7b Fix a memory leak.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents: 18697
diff changeset
46 * @param name The name of the profile
18683
3bc4a997ad14 Added sound profiles
Eric Polino <aluink@pidgin.im>
parents: 18294
diff changeset
47 */
3bc4a997ad14 Added sound profiles
Eric Polino <aluink@pidgin.im>
parents: 18294
diff changeset
48 void finch_sound_set_active_profile(const char *name);
3bc4a997ad14 Added sound profiles
Eric Polino <aluink@pidgin.im>
parents: 18294
diff changeset
49
3bc4a997ad14 Added sound profiles
Eric Polino <aluink@pidgin.im>
parents: 18294
diff changeset
50 /**
3bc4a997ad14 Added sound profiles
Eric Polino <aluink@pidgin.im>
parents: 18294
diff changeset
51 * Get a list of available sound profiles.
3bc4a997ad14 Added sound profiles
Eric Polino <aluink@pidgin.im>
parents: 18294
diff changeset
52 *
19315
0bc6119bbf7b Fix a memory leak.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents: 18697
diff changeset
53 * @return A list of strings denoting sound profile names.
0bc6119bbf7b Fix a memory leak.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents: 18697
diff changeset
54 * Caller must free the list (but not the data).
18683
3bc4a997ad14 Added sound profiles
Eric Polino <aluink@pidgin.im>
parents: 18294
diff changeset
55 */
3bc4a997ad14 Added sound profiles
Eric Polino <aluink@pidgin.im>
parents: 18294
diff changeset
56 GList *finch_sound_get_profiles(void);
3bc4a997ad14 Added sound profiles
Eric Polino <aluink@pidgin.im>
parents: 18294
diff changeset
57
18155
3bb5605ea11e Added sound to Finch.
Eric Polino <aluink@pidgin.im>
parents:
diff changeset
58 /**
19612
043dcbf3a36e Fix #2767 (per-conversation/chat mute option).
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents: 19316
diff changeset
59 * 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
60 *
043dcbf3a36e Fix #2767 (per-conversation/chat mute option).
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents: 19316
diff changeset
61 * @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
62 * set to zero.
043dcbf3a36e Fix #2767 (per-conversation/chat mute option).
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents: 19316
diff changeset
63 */
043dcbf3a36e Fix #2767 (per-conversation/chat mute option).
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents: 19316
diff changeset
64 gboolean finch_sound_is_enabled(void);
043dcbf3a36e Fix #2767 (per-conversation/chat mute option).
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents: 19316
diff changeset
65
043dcbf3a36e Fix #2767 (per-conversation/chat mute option).
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents: 19316
diff changeset
66 /**
19315
0bc6119bbf7b Fix a memory leak.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents: 18697
diff changeset
67 * Gets GNT sound UI ops.
0bc6119bbf7b Fix a memory leak.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents: 18697
diff changeset
68 *
0bc6119bbf7b Fix a memory leak.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents: 18697
diff changeset
69 * @return The UI operations structure.
0bc6119bbf7b Fix a memory leak.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents: 18697
diff changeset
70 */
18155
3bb5605ea11e Added sound to Finch.
Eric Polino <aluink@pidgin.im>
parents:
diff changeset
71 PurpleSoundUiOps *finch_sound_get_ui_ops(void);
3bb5605ea11e Added sound to Finch.
Eric Polino <aluink@pidgin.im>
parents:
diff changeset
72
3bb5605ea11e Added sound to Finch.
Eric Polino <aluink@pidgin.im>
parents:
diff changeset
73 /**
18294
8186bc6ffbb4 Added Sounds to the actions list
Eric Polino <aluink@pidgin.im>
parents: 18155
diff changeset
74 * Show the sound settings dialog.
8186bc6ffbb4 Added Sounds to the actions list
Eric Polino <aluink@pidgin.im>
parents: 18155
diff changeset
75 */
8186bc6ffbb4 Added Sounds to the actions list
Eric Polino <aluink@pidgin.im>
parents: 18155
diff changeset
76 void finch_sounds_show_all(void);
8186bc6ffbb4 Added Sounds to the actions list
Eric Polino <aluink@pidgin.im>
parents: 18155
diff changeset
77
18155
3bb5605ea11e Added sound to Finch.
Eric Polino <aluink@pidgin.im>
parents:
diff changeset
78 /*@}*/
3bb5605ea11e Added sound to Finch.
Eric Polino <aluink@pidgin.im>
parents:
diff changeset
79
3bb5605ea11e Added sound to Finch.
Eric Polino <aluink@pidgin.im>
parents:
diff changeset
80 #endif

mercurial