libpurple/sound-theme.h

Wed, 16 Apr 2014 12:04:51 +0530

author
Ankit Vani <a@nevitus.org>
date
Wed, 16 Apr 2014 12:04:51 +0530
branch
soc.2013.gobjectification.plugins
changeset 37136
cfa7c57f9ca5
parent 37094
84873ce721dc
child 39547
5c68828a566a
permissions
-rw-r--r--

Merge default branch

23639
c59dd2e328c3 Added minimal sound theme class (only get/set api)
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents:
diff changeset
1 /* purple
c59dd2e328c3 Added minimal sound theme class (only get/set api)
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents:
diff changeset
2 *
c59dd2e328c3 Added minimal sound theme class (only get/set api)
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents:
diff changeset
3 * Purple is the legal property of its developers, whose names are too numerous
c59dd2e328c3 Added minimal sound theme class (only get/set api)
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents:
diff changeset
4 * to list here. Please refer to the COPYRIGHT file distributed with this
c59dd2e328c3 Added minimal sound theme class (only get/set api)
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents:
diff changeset
5 * source distribution.
c59dd2e328c3 Added minimal sound theme class (only get/set api)
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents:
diff changeset
6 *
c59dd2e328c3 Added minimal sound theme class (only get/set api)
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents:
diff changeset
7 * This program is free software; you can redistribute it and/or modify
c59dd2e328c3 Added minimal sound theme class (only get/set api)
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents:
diff changeset
8 * it under the terms of the GNU General Public License as published by
c59dd2e328c3 Added minimal sound theme class (only get/set api)
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents:
diff changeset
9 * the Free Software Foundation; either version 2 of the License, or
c59dd2e328c3 Added minimal sound theme class (only get/set api)
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents:
diff changeset
10 * (at your option) any later version.
c59dd2e328c3 Added minimal sound theme class (only get/set api)
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents:
diff changeset
11 *
c59dd2e328c3 Added minimal sound theme class (only get/set api)
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents:
diff changeset
12 * This program is distributed in the hope that it will be useful,
c59dd2e328c3 Added minimal sound theme class (only get/set api)
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents:
diff changeset
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
c59dd2e328c3 Added minimal sound theme class (only get/set api)
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents:
diff changeset
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
c59dd2e328c3 Added minimal sound theme class (only get/set api)
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents:
diff changeset
15 * GNU General Public License for more details.
c59dd2e328c3 Added minimal sound theme class (only get/set api)
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents:
diff changeset
16 *
c59dd2e328c3 Added minimal sound theme class (only get/set api)
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents:
diff changeset
17 * You should have received a copy of the GNU General Public License
c59dd2e328c3 Added minimal sound theme class (only get/set api)
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents:
diff changeset
18 * along with this program; if not, write to the Free Software
c59dd2e328c3 Added minimal sound theme class (only get/set api)
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents:
diff changeset
19 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1301 USA
c59dd2e328c3 Added minimal sound theme class (only get/set api)
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents:
diff changeset
20 */
35487
494f09f7f331 Move section blocks inside inclusion guards -- otherwise g-ir-scanner yells
Ankit Vani <a@nevitus.org>
parents: 35474
diff changeset
21
494f09f7f331 Move section blocks inside inclusion guards -- otherwise g-ir-scanner yells
Ankit Vani <a@nevitus.org>
parents: 35474
diff changeset
22 #ifndef PURPLE_SOUND_THEME_H
494f09f7f331 Move section blocks inside inclusion guards -- otherwise g-ir-scanner yells
Ankit Vani <a@nevitus.org>
parents: 35474
diff changeset
23 #define PURPLE_SOUND_THEME_H
35442
84e906df98dd Add section blocks for purple-socket.h to xmlnode.h
Ankit Vani <a@nevitus.org>
parents: 35403
diff changeset
24 /**
84e906df98dd Add section blocks for purple-socket.h to xmlnode.h
Ankit Vani <a@nevitus.org>
parents: 35403
diff changeset
25 * SECTION:sound-theme
84e906df98dd Add section blocks for purple-socket.h to xmlnode.h
Ankit Vani <a@nevitus.org>
parents: 35403
diff changeset
26 * @section_id: libpurple-sound-theme
84e906df98dd Add section blocks for purple-socket.h to xmlnode.h
Ankit Vani <a@nevitus.org>
parents: 35403
diff changeset
27 * @short_description: <filename>sound-theme.h</filename>
35444
a4ece5a5565a Use upper-case first letters
Ankit Vani <a@nevitus.org>
parents: 35442
diff changeset
28 * @title: Sound Theme Abstact Class
35442
84e906df98dd Add section blocks for purple-socket.h to xmlnode.h
Ankit Vani <a@nevitus.org>
parents: 35403
diff changeset
29 */
23639
c59dd2e328c3 Added minimal sound theme class (only get/set api)
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents:
diff changeset
30
c59dd2e328c3 Added minimal sound theme class (only get/set api)
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents:
diff changeset
31 #include <glib.h>
c59dd2e328c3 Added minimal sound theme class (only get/set api)
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents:
diff changeset
32 #include <glib-object.h>
c59dd2e328c3 Added minimal sound theme class (only get/set api)
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents:
diff changeset
33 #include "theme.h"
c59dd2e328c3 Added minimal sound theme class (only get/set api)
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents:
diff changeset
34 #include "sound.h"
c59dd2e328c3 Added minimal sound theme class (only get/set api)
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents:
diff changeset
35
c59dd2e328c3 Added minimal sound theme class (only get/set api)
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents:
diff changeset
36 typedef struct _PurpleSoundTheme PurpleSoundTheme;
c59dd2e328c3 Added minimal sound theme class (only get/set api)
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents:
diff changeset
37 typedef struct _PurpleSoundThemeClass PurpleSoundThemeClass;
c59dd2e328c3 Added minimal sound theme class (only get/set api)
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents:
diff changeset
38
25875
a98b16817658 Lots of minor whitespace and comment changes:
Mark Doliner <markdoliner@pidgin.im>
parents: 23653
diff changeset
39 #define PURPLE_TYPE_SOUND_THEME (purple_sound_theme_get_type())
a98b16817658 Lots of minor whitespace and comment changes:
Mark Doliner <markdoliner@pidgin.im>
parents: 23653
diff changeset
40 #define PURPLE_SOUND_THEME(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj), PURPLE_TYPE_SOUND_THEME, PurpleSoundTheme))
a98b16817658 Lots of minor whitespace and comment changes:
Mark Doliner <markdoliner@pidgin.im>
parents: 23653
diff changeset
41 #define PURPLE_SOUND_THEME_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST((klass), PURPLE_TYPE_SOUND_THEME, PurpleSoundThemeClass))
a98b16817658 Lots of minor whitespace and comment changes:
Mark Doliner <markdoliner@pidgin.im>
parents: 23653
diff changeset
42 #define PURPLE_IS_SOUND_THEME(obj) (G_TYPE_CHECK_INSTANCE_TYPE((obj), PURPLE_TYPE_SOUND_THEME))
a98b16817658 Lots of minor whitespace and comment changes:
Mark Doliner <markdoliner@pidgin.im>
parents: 23653
diff changeset
43 #define PURPLE_IS_SOUND_THEME_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE((klass), PURPLE_TYPE_SOUND_THEME))
a98b16817658 Lots of minor whitespace and comment changes:
Mark Doliner <markdoliner@pidgin.im>
parents: 23653
diff changeset
44 #define PURPLE_SOUND_THEME_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS((obj), PURPLE_TYPE_SOUND_THEME, PurpleSoundThemeClass))
23639
c59dd2e328c3 Added minimal sound theme class (only get/set api)
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents:
diff changeset
45
34994
dfcc9f64f58c Move media/theme GObject docs to appropriate places
Ankit Vani <a@nevitus.org>
parents: 34691
diff changeset
46 /**
35403
9282701d7aa9 Convert docs from doxygen to gtk-doc format for sound-theme-loader to xmlnode
Ankit Vani <a@nevitus.org>
parents: 35395
diff changeset
47 * PurpleSoundTheme:
9282701d7aa9 Convert docs from doxygen to gtk-doc format for sound-theme-loader to xmlnode
Ankit Vani <a@nevitus.org>
parents: 35395
diff changeset
48 *
34994
dfcc9f64f58c Move media/theme GObject docs to appropriate places
Ankit Vani <a@nevitus.org>
parents: 34691
diff changeset
49 * A purple sound theme.
dfcc9f64f58c Move media/theme GObject docs to appropriate places
Ankit Vani <a@nevitus.org>
parents: 34691
diff changeset
50 * This is an object for Purple to represent a sound theme.
dfcc9f64f58c Move media/theme GObject docs to appropriate places
Ankit Vani <a@nevitus.org>
parents: 34691
diff changeset
51 */
23639
c59dd2e328c3 Added minimal sound theme class (only get/set api)
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents:
diff changeset
52 struct _PurpleSoundTheme
c59dd2e328c3 Added minimal sound theme class (only get/set api)
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents:
diff changeset
53 {
34691
3acdd397a9c1 Removed reserved fields from instance structs.
Ankit Vani <a@nevitus.org>
parents: 34530
diff changeset
54 /*< private >*/
23646
ec4f4e6508b1 fixed some gobject stuff
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents: 23642
diff changeset
55 PurpleTheme parent;
23639
c59dd2e328c3 Added minimal sound theme class (only get/set api)
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents:
diff changeset
56 };
c59dd2e328c3 Added minimal sound theme class (only get/set api)
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents:
diff changeset
57
c59dd2e328c3 Added minimal sound theme class (only get/set api)
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents:
diff changeset
58 struct _PurpleSoundThemeClass
c59dd2e328c3 Added minimal sound theme class (only get/set api)
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents:
diff changeset
59 {
34691
3acdd397a9c1 Removed reserved fields from instance structs.
Ankit Vani <a@nevitus.org>
parents: 34530
diff changeset
60 /*< private >*/
23639
c59dd2e328c3 Added minimal sound theme class (only get/set api)
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents:
diff changeset
61 PurpleThemeClass parent_class;
34530
a2471041078b Added missing padding members to theme components
Ankit Vani <a@nevitus.org>
parents: 32438
diff changeset
62
a2471041078b Added missing padding members to theme components
Ankit Vani <a@nevitus.org>
parents: 32438
diff changeset
63 void (*purple_reserved1)(void);
a2471041078b Added missing padding members to theme components
Ankit Vani <a@nevitus.org>
parents: 32438
diff changeset
64 void (*purple_reserved2)(void);
a2471041078b Added missing padding members to theme components
Ankit Vani <a@nevitus.org>
parents: 32438
diff changeset
65 void (*purple_reserved3)(void);
a2471041078b Added missing padding members to theme components
Ankit Vani <a@nevitus.org>
parents: 32438
diff changeset
66 void (*purple_reserved4)(void);
23639
c59dd2e328c3 Added minimal sound theme class (only get/set api)
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents:
diff changeset
67 };
c59dd2e328c3 Added minimal sound theme class (only get/set api)
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents:
diff changeset
68
c59dd2e328c3 Added minimal sound theme class (only get/set api)
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents:
diff changeset
69 /**************************************************************************/
35472
474e26199560 Removed @name
Ankit Vani <a@nevitus.org>
parents: 35444
diff changeset
70 /* Purple Sound Theme API */
23639
c59dd2e328c3 Added minimal sound theme class (only get/set api)
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents:
diff changeset
71 /**************************************************************************/
c59dd2e328c3 Added minimal sound theme class (only get/set api)
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents:
diff changeset
72 G_BEGIN_DECLS
c59dd2e328c3 Added minimal sound theme class (only get/set api)
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents:
diff changeset
73
c59dd2e328c3 Added minimal sound theme class (only get/set api)
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents:
diff changeset
74 /**
35403
9282701d7aa9 Convert docs from doxygen to gtk-doc format for sound-theme-loader to xmlnode
Ankit Vani <a@nevitus.org>
parents: 35395
diff changeset
75 * purple_sound_theme_get_type:
9282701d7aa9 Convert docs from doxygen to gtk-doc format for sound-theme-loader to xmlnode
Ankit Vani <a@nevitus.org>
parents: 35395
diff changeset
76 *
35474
ff5eccb9f797 Remove @internal
Ankit Vani <a@nevitus.org>
parents: 35472
diff changeset
77 * Returns: The #GType for a sound theme.
23639
c59dd2e328c3 Added minimal sound theme class (only get/set api)
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents:
diff changeset
78 */
c59dd2e328c3 Added minimal sound theme class (only get/set api)
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents:
diff changeset
79 GType purple_sound_theme_get_type(void);
c59dd2e328c3 Added minimal sound theme class (only get/set api)
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents:
diff changeset
80
c59dd2e328c3 Added minimal sound theme class (only get/set api)
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents:
diff changeset
81 /**
35403
9282701d7aa9 Convert docs from doxygen to gtk-doc format for sound-theme-loader to xmlnode
Ankit Vani <a@nevitus.org>
parents: 35395
diff changeset
82 * purple_sound_theme_get_file:
35393
00f876b129bc Initial replacements for gtk-doc style comments
Ankit Vani <a@nevitus.org>
parents: 34994
diff changeset
83 * @theme: The theme.
00f876b129bc Initial replacements for gtk-doc style comments
Ankit Vani <a@nevitus.org>
parents: 34994
diff changeset
84 * @event: The purple sound event to look up.
23639
c59dd2e328c3 Added minimal sound theme class (only get/set api)
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents:
diff changeset
85 *
35403
9282701d7aa9 Convert docs from doxygen to gtk-doc format for sound-theme-loader to xmlnode
Ankit Vani <a@nevitus.org>
parents: 35395
diff changeset
86 * Returns a copy of the filename for the sound event.
9282701d7aa9 Convert docs from doxygen to gtk-doc format for sound-theme-loader to xmlnode
Ankit Vani <a@nevitus.org>
parents: 35395
diff changeset
87 *
35395
bf3f004adbf1 Fix 'Returns:'
Ankit Vani <a@nevitus.org>
parents: 35393
diff changeset
88 * Returns: The filename of the sound event.
23639
c59dd2e328c3 Added minimal sound theme class (only get/set api)
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents:
diff changeset
89 */
23653
79934bf9a349 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: 23649
diff changeset
90 const gchar *purple_sound_theme_get_file(PurpleSoundTheme *theme,
25875
a98b16817658 Lots of minor whitespace and comment changes:
Mark Doliner <markdoliner@pidgin.im>
parents: 23653
diff changeset
91 const gchar *event);
a98b16817658 Lots of minor whitespace and comment changes:
Mark Doliner <markdoliner@pidgin.im>
parents: 23653
diff changeset
92
23639
c59dd2e328c3 Added minimal sound theme class (only get/set api)
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents:
diff changeset
93 /**
35403
9282701d7aa9 Convert docs from doxygen to gtk-doc format for sound-theme-loader to xmlnode
Ankit Vani <a@nevitus.org>
parents: 35395
diff changeset
94 * purple_sound_theme_get_file_full:
35393
00f876b129bc Initial replacements for gtk-doc style comments
Ankit Vani <a@nevitus.org>
parents: 34994
diff changeset
95 * @theme: The theme.
00f876b129bc Initial replacements for gtk-doc style comments
Ankit Vani <a@nevitus.org>
parents: 34994
diff changeset
96 * @event: The purple sound event to look up
23639
c59dd2e328c3 Added minimal sound theme class (only get/set api)
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents:
diff changeset
97 *
35403
9282701d7aa9 Convert docs from doxygen to gtk-doc format for sound-theme-loader to xmlnode
Ankit Vani <a@nevitus.org>
parents: 35395
diff changeset
98 * Returns a copy of the directory and filename for the sound event
9282701d7aa9 Convert docs from doxygen to gtk-doc format for sound-theme-loader to xmlnode
Ankit Vani <a@nevitus.org>
parents: 35395
diff changeset
99 *
35395
bf3f004adbf1 Fix 'Returns:'
Ankit Vani <a@nevitus.org>
parents: 35393
diff changeset
100 * Returns: The directory + '/' + filename of the sound event. This is
25875
a98b16817658 Lots of minor whitespace and comment changes:
Mark Doliner <markdoliner@pidgin.im>
parents: 23653
diff changeset
101 * a newly allocated string that should be freed with g_free.
23639
c59dd2e328c3 Added minimal sound theme class (only get/set api)
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents:
diff changeset
102 */
c59dd2e328c3 Added minimal sound theme class (only get/set api)
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents:
diff changeset
103 gchar *purple_sound_theme_get_file_full(PurpleSoundTheme *theme,
25875
a98b16817658 Lots of minor whitespace and comment changes:
Mark Doliner <markdoliner@pidgin.im>
parents: 23653
diff changeset
104 const gchar *event);
a98b16817658 Lots of minor whitespace and comment changes:
Mark Doliner <markdoliner@pidgin.im>
parents: 23653
diff changeset
105
23639
c59dd2e328c3 Added minimal sound theme class (only get/set api)
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents:
diff changeset
106 /**
35403
9282701d7aa9 Convert docs from doxygen to gtk-doc format for sound-theme-loader to xmlnode
Ankit Vani <a@nevitus.org>
parents: 35395
diff changeset
107 * purple_sound_theme_set_file:
35393
00f876b129bc Initial replacements for gtk-doc style comments
Ankit Vani <a@nevitus.org>
parents: 34994
diff changeset
108 * @theme: The theme.
00f876b129bc Initial replacements for gtk-doc style comments
Ankit Vani <a@nevitus.org>
parents: 34994
diff changeset
109 * @event: the purple sound event to look up
00f876b129bc Initial replacements for gtk-doc style comments
Ankit Vani <a@nevitus.org>
parents: 34994
diff changeset
110 * @filename: the name of the file to be used for the event
35403
9282701d7aa9 Convert docs from doxygen to gtk-doc format for sound-theme-loader to xmlnode
Ankit Vani <a@nevitus.org>
parents: 35395
diff changeset
111 *
9282701d7aa9 Convert docs from doxygen to gtk-doc format for sound-theme-loader to xmlnode
Ankit Vani <a@nevitus.org>
parents: 35395
diff changeset
112 * Sets the filename for a given sound event
23639
c59dd2e328c3 Added minimal sound theme class (only get/set api)
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents:
diff changeset
113 */
c59dd2e328c3 Added minimal sound theme class (only get/set api)
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents:
diff changeset
114 void purple_sound_theme_set_file(PurpleSoundTheme *theme,
25875
a98b16817658 Lots of minor whitespace and comment changes:
Mark Doliner <markdoliner@pidgin.im>
parents: 23653
diff changeset
115 const gchar *event,
a98b16817658 Lots of minor whitespace and comment changes:
Mark Doliner <markdoliner@pidgin.im>
parents: 23653
diff changeset
116 const gchar *filename);
23639
c59dd2e328c3 Added minimal sound theme class (only get/set api)
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents:
diff changeset
117
c59dd2e328c3 Added minimal sound theme class (only get/set api)
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents:
diff changeset
118 G_END_DECLS
35403
9282701d7aa9 Convert docs from doxygen to gtk-doc format for sound-theme-loader to xmlnode
Ankit Vani <a@nevitus.org>
parents: 35395
diff changeset
119
25875
a98b16817658 Lots of minor whitespace and comment changes:
Mark Doliner <markdoliner@pidgin.im>
parents: 23653
diff changeset
120 #endif /* PURPLE_SOUND_THEME_H */

mercurial