annotate finch/gntsound.h @ 20564:f34ffa69fdce

Reset file descriptors to -1 instead of 0. This should fix some weird unexpected crashes in finch.
author Sadrul Habib Chowdhury <imadil@gmail.com>
date Thu, 20 Sep 2007 02:38:49 +0000
parents 6bf32c9e15a7
children acf284962b40
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
18473
38ff7582c569 Silent sound for finch. The audible stuff will get in in a later release.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff changeset
1 /**
38ff7582c569 Silent sound for finch. The audible stuff will get in in a later release.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff changeset
2 * @file gntsound.h GNT Sound API
38ff7582c569 Silent sound for finch. The audible stuff will get in in a later release.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff changeset
3 * @ingroup finch
20074
6bf32c9e15a7 remove gpl boilerplate from doxygen docs
Sean Egan <seanegan@gmail.com>
parents: 19681
diff changeset
4 */
6bf32c9e15a7 remove gpl boilerplate from doxygen docs
Sean Egan <seanegan@gmail.com>
parents: 19681
diff changeset
5
6bf32c9e15a7 remove gpl boilerplate from doxygen docs
Sean Egan <seanegan@gmail.com>
parents: 19681
diff changeset
6 /* finch
18473
38ff7582c569 Silent sound for finch. The audible stuff will get in in a later release.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff changeset
7 *
38ff7582c569 Silent sound for finch. The audible stuff will get in in a later release.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff changeset
8 * Finch is the legal property of its developers, whose names are too numerous
38ff7582c569 Silent sound for finch. The audible stuff will get in in a later release.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff changeset
9 * to list here. Please refer to the COPYRIGHT file distributed with this
38ff7582c569 Silent sound for finch. The audible stuff will get in in a later release.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff changeset
10 * source distribution.
38ff7582c569 Silent sound for finch. The audible stuff will get in in a later release.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff changeset
11 *
38ff7582c569 Silent sound for finch. The audible stuff will get in in a later release.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff changeset
12 * This program is free software; you can redistribute it and/or modify
38ff7582c569 Silent sound for finch. The audible stuff will get in in a later release.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff changeset
13 * it under the terms of the GNU General Public License as published by
38ff7582c569 Silent sound for finch. The audible stuff will get in in a later release.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff changeset
14 * the Free Software Foundation; either version 2 of the License, or
38ff7582c569 Silent sound for finch. The audible stuff will get in in a later release.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff changeset
15 * (at your option) any later version.
38ff7582c569 Silent sound for finch. The audible stuff will get in in a later release.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff changeset
16 *
38ff7582c569 Silent sound for finch. The audible stuff will get in in a later release.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff changeset
17 * This program is distributed in the hope that it will be useful,
38ff7582c569 Silent sound for finch. The audible stuff will get in in a later release.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff changeset
18 * but WITHOUT ANY WARRANTY; without even the implied warranty of
38ff7582c569 Silent sound for finch. The audible stuff will get in in a later release.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff changeset
19 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
38ff7582c569 Silent sound for finch. The audible stuff will get in in a later release.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff changeset
20 * GNU General Public License for more details.
38ff7582c569 Silent sound for finch. The audible stuff will get in in a later release.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff changeset
21 *
38ff7582c569 Silent sound for finch. The audible stuff will get in in a later release.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff changeset
22 * You should have received a copy of the GNU General Public License
38ff7582c569 Silent sound for finch. The audible stuff will get in in a later release.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff changeset
23 * along with this program; if not, write to the Free Software
19681
44b4e8bd759b The FSF changed its address a while ago; our files were out of date.
John Bailey <rekkanoryo@rekkanoryo.org>
parents: 19447
diff changeset
24 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1301 USA
18473
38ff7582c569 Silent sound for finch. The audible stuff will get in in a later release.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff changeset
25 */
38ff7582c569 Silent sound for finch. The audible stuff will get in in a later release.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff changeset
26 #ifndef _GNT_SOUND_H
38ff7582c569 Silent sound for finch. The audible stuff will get in in a later release.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff changeset
27 #define _GNT_SOUND_H
38ff7582c569 Silent sound for finch. The audible stuff will get in in a later release.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff changeset
28
38ff7582c569 Silent sound for finch. The audible stuff will get in in a later release.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff changeset
29 #include "sound.h"
38ff7582c569 Silent sound for finch. The audible stuff will get in in a later release.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff changeset
30
38ff7582c569 Silent sound for finch. The audible stuff will get in in a later release.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff changeset
31 /**********************************************************************/
38ff7582c569 Silent sound for finch. The audible stuff will get in in a later release.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff changeset
32 /** @name GNT Sound API */
38ff7582c569 Silent sound for finch. The audible stuff will get in in a later release.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff changeset
33 /**********************************************************************/
38ff7582c569 Silent sound for finch. The audible stuff will get in in a later release.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff changeset
34 /*@{*/
38ff7582c569 Silent sound for finch. The audible stuff will get in in a later release.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff changeset
35
38ff7582c569 Silent sound for finch. The audible stuff will get in in a later release.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff changeset
36 /**
38ff7582c569 Silent sound for finch. The audible stuff will get in in a later release.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff changeset
37 * Get the name of the active sound profile.
38ff7582c569 Silent sound for finch. The audible stuff will get in in a later release.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff changeset
38 *
38ff7582c569 Silent sound for finch. The audible stuff will get in in a later release.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff changeset
39 * @return The name of the profile
38ff7582c569 Silent sound for finch. The audible stuff will get in in a later release.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff changeset
40 */
38ff7582c569 Silent sound for finch. The audible stuff will get in in a later release.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff changeset
41 const char *finch_sound_get_active_profile(void);
38ff7582c569 Silent sound for finch. The audible stuff will get in in a later release.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff changeset
42
38ff7582c569 Silent sound for finch. The audible stuff will get in in a later release.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff changeset
43 /**
38ff7582c569 Silent sound for finch. The audible stuff will get in in a later release.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff changeset
44 * Set the active profile. If the profile doesn't exist, nothing is changed.
38ff7582c569 Silent sound for finch. The audible stuff will get in in a later release.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff changeset
45 *
38ff7582c569 Silent sound for finch. The audible stuff will get in in a later release.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff changeset
46 * @param name The name of the profile
38ff7582c569 Silent sound for finch. The audible stuff will get in in a later release.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff changeset
47 */
38ff7582c569 Silent sound for finch. The audible stuff will get in in a later release.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff changeset
48 void finch_sound_set_active_profile(const char *name);
38ff7582c569 Silent sound for finch. The audible stuff will get in in a later release.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff changeset
49
38ff7582c569 Silent sound for finch. The audible stuff will get in in a later release.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff changeset
50 /**
38ff7582c569 Silent sound for finch. The audible stuff will get in in a later release.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff changeset
51 * Get a list of available sound profiles.
38ff7582c569 Silent sound for finch. The audible stuff will get in in a later release.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff changeset
52 *
38ff7582c569 Silent sound for finch. The audible stuff will get in in a later release.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff changeset
53 * @return A list of strings denoting sound profile names.
38ff7582c569 Silent sound for finch. The audible stuff will get in in a later release.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff changeset
54 * Caller must free the list (but not the data).
38ff7582c569 Silent sound for finch. The audible stuff will get in in a later release.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff changeset
55 */
38ff7582c569 Silent sound for finch. The audible stuff will get in in a later release.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff changeset
56 GList *finch_sound_get_profiles(void);
38ff7582c569 Silent sound for finch. The audible stuff will get in in a later release.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff changeset
57
38ff7582c569 Silent sound for finch. The audible stuff will get in in a later release.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff changeset
58 /**
19447
1a9b30a95fa6 Fix #2767 (per-conversation/chat mute option).
Sadrul Habib Chowdhury <imadil@gmail.com>
parents: 18473
diff changeset
59 * Determine whether any sound will be played or not.
1a9b30a95fa6 Fix #2767 (per-conversation/chat mute option).
Sadrul Habib Chowdhury <imadil@gmail.com>
parents: 18473
diff changeset
60 *
1a9b30a95fa6 Fix #2767 (per-conversation/chat mute option).
Sadrul Habib Chowdhury <imadil@gmail.com>
parents: 18473
diff changeset
61 * @return Returns FALSE if preference is set to 'No sound', or if volume is
1a9b30a95fa6 Fix #2767 (per-conversation/chat mute option).
Sadrul Habib Chowdhury <imadil@gmail.com>
parents: 18473
diff changeset
62 * set to zero.
1a9b30a95fa6 Fix #2767 (per-conversation/chat mute option).
Sadrul Habib Chowdhury <imadil@gmail.com>
parents: 18473
diff changeset
63 */
1a9b30a95fa6 Fix #2767 (per-conversation/chat mute option).
Sadrul Habib Chowdhury <imadil@gmail.com>
parents: 18473
diff changeset
64 gboolean finch_sound_is_enabled(void);
1a9b30a95fa6 Fix #2767 (per-conversation/chat mute option).
Sadrul Habib Chowdhury <imadil@gmail.com>
parents: 18473
diff changeset
65
1a9b30a95fa6 Fix #2767 (per-conversation/chat mute option).
Sadrul Habib Chowdhury <imadil@gmail.com>
parents: 18473
diff changeset
66 /**
18473
38ff7582c569 Silent sound for finch. The audible stuff will get in in a later release.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff changeset
67 * Gets GNT sound UI ops.
38ff7582c569 Silent sound for finch. The audible stuff will get in in a later release.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff changeset
68 *
38ff7582c569 Silent sound for finch. The audible stuff will get in in a later release.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff changeset
69 * @return The UI operations structure.
38ff7582c569 Silent sound for finch. The audible stuff will get in in a later release.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff changeset
70 */
38ff7582c569 Silent sound for finch. The audible stuff will get in in a later release.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff changeset
71 PurpleSoundUiOps *finch_sound_get_ui_ops(void);
38ff7582c569 Silent sound for finch. The audible stuff will get in in a later release.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff changeset
72
38ff7582c569 Silent sound for finch. The audible stuff will get in in a later release.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff changeset
73 /**
38ff7582c569 Silent sound for finch. The audible stuff will get in in a later release.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff changeset
74 * Show the sound settings dialog.
38ff7582c569 Silent sound for finch. The audible stuff will get in in a later release.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff changeset
75 */
38ff7582c569 Silent sound for finch. The audible stuff will get in in a later release.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff changeset
76 void finch_sounds_show_all(void);
38ff7582c569 Silent sound for finch. The audible stuff will get in in a later release.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff changeset
77
38ff7582c569 Silent sound for finch. The audible stuff will get in in a later release.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff changeset
78 /*@}*/
38ff7582c569 Silent sound for finch. The audible stuff will get in in a later release.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff changeset
79
38ff7582c569 Silent sound for finch. The audible stuff will get in in a later release.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff changeset
80 #endif