annotate libpurple/sound-theme.h @ 23472:fbf72bbd1084

Fixed up a few typos, readability, leaks, and bugs, all minor and mostly in theme and theme loader classes
author Justin Rodriguez <ffdragon@soc.pidgin.im>
date Mon, 30 Jun 2008 03:50:35 +0000
parents cf7625d4d7e0
children 0c7b74fc558e
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
23458
1cf10adc9b32 Added minimal sound theme class (only get/set api)
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents:
diff changeset
1 /**
1cf10adc9b32 Added minimal sound theme class (only get/set api)
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents:
diff changeset
2 * @file sound-theme.h Purple Sound Theme Abstact Class API
1cf10adc9b32 Added minimal sound theme class (only get/set api)
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents:
diff changeset
3 */
1cf10adc9b32 Added minimal sound theme class (only get/set api)
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents:
diff changeset
4
1cf10adc9b32 Added minimal sound theme class (only get/set api)
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents:
diff changeset
5 /* purple
1cf10adc9b32 Added minimal sound theme class (only get/set api)
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents:
diff changeset
6 *
1cf10adc9b32 Added minimal sound theme class (only get/set api)
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents:
diff changeset
7 * Purple is the legal property of its developers, whose names are too numerous
1cf10adc9b32 Added minimal sound theme class (only get/set api)
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents:
diff changeset
8 * to list here. Please refer to the COPYRIGHT file distributed with this
1cf10adc9b32 Added minimal sound theme class (only get/set api)
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents:
diff changeset
9 * source distribution.
1cf10adc9b32 Added minimal sound theme class (only get/set api)
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents:
diff changeset
10 *
1cf10adc9b32 Added minimal sound theme class (only get/set api)
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents:
diff changeset
11 * This program is free software; you can redistribute it and/or modify
1cf10adc9b32 Added minimal sound theme class (only get/set api)
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents:
diff changeset
12 * it under the terms of the GNU General Public License as published by
1cf10adc9b32 Added minimal sound theme class (only get/set api)
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents:
diff changeset
13 * the Free Software Foundation; either version 2 of the License, or
1cf10adc9b32 Added minimal sound theme class (only get/set api)
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents:
diff changeset
14 * (at your option) any later version.
1cf10adc9b32 Added minimal sound theme class (only get/set api)
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents:
diff changeset
15 *
1cf10adc9b32 Added minimal sound theme class (only get/set api)
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents:
diff changeset
16 * This program is distributed in the hope that it will be useful,
1cf10adc9b32 Added minimal sound theme class (only get/set api)
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents:
diff changeset
17 * but WITHOUT ANY WARRANTY; without even the implied warranty of
1cf10adc9b32 Added minimal sound theme class (only get/set api)
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents:
diff changeset
18 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
1cf10adc9b32 Added minimal sound theme class (only get/set api)
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents:
diff changeset
19 * GNU General Public License for more details.
1cf10adc9b32 Added minimal sound theme class (only get/set api)
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents:
diff changeset
20 *
1cf10adc9b32 Added minimal sound theme class (only get/set api)
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents:
diff changeset
21 * You should have received a copy of the GNU General Public License
1cf10adc9b32 Added minimal sound theme class (only get/set api)
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents:
diff changeset
22 * along with this program; if not, write to the Free Software
1cf10adc9b32 Added minimal sound theme class (only get/set api)
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents:
diff changeset
23 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1301 USA
1cf10adc9b32 Added minimal sound theme class (only get/set api)
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents:
diff changeset
24 */
1cf10adc9b32 Added minimal sound theme class (only get/set api)
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents:
diff changeset
25
1cf10adc9b32 Added minimal sound theme class (only get/set api)
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents:
diff changeset
26 #ifndef _PURPLE_SOUND_THEME_H_
1cf10adc9b32 Added minimal sound theme class (only get/set api)
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents:
diff changeset
27 #define _PURPLE_SOUND_THEME_H_
1cf10adc9b32 Added minimal sound theme class (only get/set api)
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents:
diff changeset
28
1cf10adc9b32 Added minimal sound theme class (only get/set api)
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents:
diff changeset
29 #include <glib.h>
1cf10adc9b32 Added minimal sound theme class (only get/set api)
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents:
diff changeset
30 #include <glib-object.h>
1cf10adc9b32 Added minimal sound theme class (only get/set api)
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents:
diff changeset
31 #include "theme.h"
1cf10adc9b32 Added minimal sound theme class (only get/set api)
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents:
diff changeset
32 #include "sound.h"
1cf10adc9b32 Added minimal sound theme class (only get/set api)
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents:
diff changeset
33
1cf10adc9b32 Added minimal sound theme class (only get/set api)
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents:
diff changeset
34 /**
1cf10adc9b32 Added minimal sound theme class (only get/set api)
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents:
diff changeset
35 * extends PurpleTheme (theme.h)
1cf10adc9b32 Added minimal sound theme class (only get/set api)
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents:
diff changeset
36 * A purple sound theme.
1cf10adc9b32 Added minimal sound theme class (only get/set api)
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents:
diff changeset
37 * This is an object for Purple to represent a sound theme.
1cf10adc9b32 Added minimal sound theme class (only get/set api)
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents:
diff changeset
38 *
1cf10adc9b32 Added minimal sound theme class (only get/set api)
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents:
diff changeset
39 * PurpleSoundTheme is a PurpleTheme Object.
1cf10adc9b32 Added minimal sound theme class (only get/set api)
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents:
diff changeset
40 */
1cf10adc9b32 Added minimal sound theme class (only get/set api)
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents:
diff changeset
41 typedef struct _PurpleSoundTheme PurpleSoundTheme;
1cf10adc9b32 Added minimal sound theme class (only get/set api)
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents:
diff changeset
42 typedef struct _PurpleSoundThemeClass PurpleSoundThemeClass;
1cf10adc9b32 Added minimal sound theme class (only get/set api)
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents:
diff changeset
43
1cf10adc9b32 Added minimal sound theme class (only get/set api)
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents:
diff changeset
44 #define PURPLE_TYPE_SOUND_THEME (purple_sound_theme_get_type ())
1cf10adc9b32 Added minimal sound theme class (only get/set api)
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents:
diff changeset
45 #define PURPLE_SOUND_THEME(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), PURPLE_TYPE_SOUND_THEME, PurpleSoundTheme))
1cf10adc9b32 Added minimal sound theme class (only get/set api)
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents:
diff changeset
46 #define PURPLE_SOUND_THEME_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), PURPLE_TYPE_SOUND_THEME, PurpleSoundThemeClass))
1cf10adc9b32 Added minimal sound theme class (only get/set api)
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents:
diff changeset
47 #define PURPLE_IS_SOUND_THEME(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), PURPLE_TYPE_SOUND_THEME))
1cf10adc9b32 Added minimal sound theme class (only get/set api)
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents:
diff changeset
48 #define PURPLE_IS_SOUND_THEME_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), PURPLE_TYPE_SOUND_THEME))
1cf10adc9b32 Added minimal sound theme class (only get/set api)
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents:
diff changeset
49 #define PURPLE_SOUND_THEME_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), PURPLE_TYPE_SOUND_THEME, PurpleSoundThemeClass))
1cf10adc9b32 Added minimal sound theme class (only get/set api)
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents:
diff changeset
50
1cf10adc9b32 Added minimal sound theme class (only get/set api)
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents:
diff changeset
51 struct _PurpleSoundTheme
1cf10adc9b32 Added minimal sound theme class (only get/set api)
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents:
diff changeset
52 {
23465
d60c3d1c6966 fixed some gobject stuff
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents: 23461
diff changeset
53 PurpleTheme parent;
23458
1cf10adc9b32 Added minimal sound theme class (only get/set api)
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents:
diff changeset
54 gpointer priv;
1cf10adc9b32 Added minimal sound theme class (only get/set api)
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents:
diff changeset
55 };
1cf10adc9b32 Added minimal sound theme class (only get/set api)
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents:
diff changeset
56
1cf10adc9b32 Added minimal sound theme class (only get/set api)
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents:
diff changeset
57 struct _PurpleSoundThemeClass
1cf10adc9b32 Added minimal sound theme class (only get/set api)
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents:
diff changeset
58 {
1cf10adc9b32 Added minimal sound theme class (only get/set api)
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents:
diff changeset
59 PurpleThemeClass parent_class;
1cf10adc9b32 Added minimal sound theme class (only get/set api)
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents:
diff changeset
60 };
1cf10adc9b32 Added minimal sound theme class (only get/set api)
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents:
diff changeset
61
1cf10adc9b32 Added minimal sound theme class (only get/set api)
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents:
diff changeset
62 /**************************************************************************/
1cf10adc9b32 Added minimal sound theme class (only get/set api)
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents:
diff changeset
63 /** @name Purple Sound Theme API */
1cf10adc9b32 Added minimal sound theme class (only get/set api)
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents:
diff changeset
64 /**************************************************************************/
1cf10adc9b32 Added minimal sound theme class (only get/set api)
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents:
diff changeset
65 G_BEGIN_DECLS
1cf10adc9b32 Added minimal sound theme class (only get/set api)
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents:
diff changeset
66
1cf10adc9b32 Added minimal sound theme class (only get/set api)
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents:
diff changeset
67 /**
1cf10adc9b32 Added minimal sound theme class (only get/set api)
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents:
diff changeset
68 * GObject foo.
1cf10adc9b32 Added minimal sound theme class (only get/set api)
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents:
diff changeset
69 * @internal.
1cf10adc9b32 Added minimal sound theme class (only get/set api)
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents:
diff changeset
70 */
1cf10adc9b32 Added minimal sound theme class (only get/set api)
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents:
diff changeset
71 GType purple_sound_theme_get_type(void);
1cf10adc9b32 Added minimal sound theme class (only get/set api)
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents:
diff changeset
72
1cf10adc9b32 Added minimal sound theme class (only get/set api)
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents:
diff changeset
73 /**
1cf10adc9b32 Added minimal sound theme class (only get/set api)
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents:
diff changeset
74 * Returns a copy of the filename for the sound event
1cf10adc9b32 Added minimal sound theme class (only get/set api)
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents:
diff changeset
75 *
1cf10adc9b32 Added minimal sound theme class (only get/set api)
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents:
diff changeset
76 * @param event the purple sound event to look up
1cf10adc9b32 Added minimal sound theme class (only get/set api)
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents:
diff changeset
77 *
1cf10adc9b32 Added minimal sound theme class (only get/set api)
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents:
diff changeset
78 * @returns the filename of the sound event
1cf10adc9b32 Added minimal sound theme class (only get/set api)
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents:
diff changeset
79 */
23472
fbf72bbd1084 Fixed up a few typos, readability, leaks, and bugs, all minor and mostly in theme and theme loader classes
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents: 23468
diff changeset
80 const gchar *purple_sound_theme_get_file(PurpleSoundTheme *theme,
23458
1cf10adc9b32 Added minimal sound theme class (only get/set api)
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents:
diff changeset
81 const gchar *event);
1cf10adc9b32 Added minimal sound theme class (only get/set api)
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents:
diff changeset
82 /**
1cf10adc9b32 Added minimal sound theme class (only get/set api)
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents:
diff changeset
83 * Returns a copy of the directory and filename for the sound event
1cf10adc9b32 Added minimal sound theme class (only get/set api)
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents:
diff changeset
84 *
1cf10adc9b32 Added minimal sound theme class (only get/set api)
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents:
diff changeset
85 * @param event the purple sound event to look up
1cf10adc9b32 Added minimal sound theme class (only get/set api)
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents:
diff changeset
86 *
1cf10adc9b32 Added minimal sound theme class (only get/set api)
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents:
diff changeset
87 * @returns the directory + '/' + filename of the sound event
1cf10adc9b32 Added minimal sound theme class (only get/set api)
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents:
diff changeset
88 */
1cf10adc9b32 Added minimal sound theme class (only get/set api)
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents:
diff changeset
89 gchar *purple_sound_theme_get_file_full(PurpleSoundTheme *theme,
1cf10adc9b32 Added minimal sound theme class (only get/set api)
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents:
diff changeset
90 const gchar *event);
1cf10adc9b32 Added minimal sound theme class (only get/set api)
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents:
diff changeset
91 /**
1cf10adc9b32 Added minimal sound theme class (only get/set api)
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents:
diff changeset
92 * Sets the filename for a given sound event
1cf10adc9b32 Added minimal sound theme class (only get/set api)
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents:
diff changeset
93 *
1cf10adc9b32 Added minimal sound theme class (only get/set api)
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents:
diff changeset
94 * @param event the purple sound event to look up
23468
cf7625d4d7e0 Working sound themes (option 1) theme is saved in prefs and there is no seperate custom theme, everything
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents: 23465
diff changeset
95 * @param filename the name of the file to be used for the event
23458
1cf10adc9b32 Added minimal sound theme class (only get/set api)
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents:
diff changeset
96 */
1cf10adc9b32 Added minimal sound theme class (only get/set api)
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents:
diff changeset
97 void purple_sound_theme_set_file(PurpleSoundTheme *theme,
1cf10adc9b32 Added minimal sound theme class (only get/set api)
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents:
diff changeset
98 const gchar *event,
23468
cf7625d4d7e0 Working sound themes (option 1) theme is saved in prefs and there is no seperate custom theme, everything
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents: 23465
diff changeset
99 const gchar *filename);
23458
1cf10adc9b32 Added minimal sound theme class (only get/set api)
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents:
diff changeset
100
1cf10adc9b32 Added minimal sound theme class (only get/set api)
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents:
diff changeset
101 G_END_DECLS
1cf10adc9b32 Added minimal sound theme class (only get/set api)
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents:
diff changeset
102 #endif /* _PURPLE_SOUND_THEME_H_ */