changeset 25083:c1cabd5eb625

Added skeleton (non-working) sound loader class
author Justin Rodriguez <ffdragon@soc.pidgin.im>
date Thu, 12 Jun 2008 22:13:54 +0000
parents 1cf10adc9b32
children 623f0b40f6f6
files libpurple/Makefile.am libpurple/sound-loader.c libpurple/sound-loader.h libpurple/theme-loader.c libpurple/theme-loader.h
diffstat 5 files changed, 148 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/libpurple/Makefile.am	Thu Jun 12 07:34:43 2008 +0000
+++ b/libpurple/Makefile.am	Thu Jun 12 22:13:54 2008 +0000
@@ -75,6 +75,7 @@
 	stringref.c \
 	stun.c \
 	sound.c \
+	sound-loader.c \
 	sound-theme.c \
 	sslconn.c \
 	upnp.c \
@@ -132,6 +133,7 @@
 	stringref.h \
 	stun.h \
 	sound.h \
+	sound-loader.h \
 	sound-theme.h \
 	sslconn.h \
 	upnp.h \
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/libpurple/sound-loader.c	Thu Jun 12 22:13:54 2008 +0000
@@ -0,0 +1,72 @@
+/*
+ * SoundThemeLoader for LibPurple
+ *
+ * Pidgin is the legal property of its developers, whose names are too numerous
+ * to list here.  Please refer to the COPYRIGHT file distributed with this
+ * source distribution.
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02111-1301  USA
+ *
+ */
+
+#include "sound-loader.h"
+/*****************************************************************************
+ * Sound Theme Builder                                                      
+ *****************************************************************************/
+
+static PurpleSoundTheme *
+purple_sound_loader_build(const gchar *dir)
+{
+	return NULL; /*TODO: unimplemented*/
+}
+
+/******************************************************************************
+ * GObject Stuff                                                              
+ *****************************************************************************/
+
+static void
+purple_sound_theme_loader_class_init (PurpleThemeLoaderClass *klass)
+{
+	PurpleThemeLoaderClass *loader_class = PURPLE_THEME_LOADER_CLASS(klass);
+	
+	loader_class->_purple_theme_loader_build = purple_sound_loader_build;
+}
+
+
+GType 
+purple_sound_theme_loader_get_type (void)
+{
+  static GType type = 0;
+  if (type == 0) {
+    static const GTypeInfo info = {
+      sizeof (PurpleSoundThemeLoaderClass),
+      NULL,   /* base_init */
+      NULL,   /* base_finalize */
+      (GClassInitFunc)purple_sound_theme_loader_class_init,   /* class_init */
+      NULL,   /* class_finalize */
+      NULL,   /* class_data */
+      sizeof (PurpleSoundThemeLoader),
+      0,      /* n_preallocs */
+      NULL,    /* instance_init */
+      NULL,   /* value table */
+    };
+    type = g_type_register_static (G_TYPE_OBJECT,
+                                   "PurpleSoundThemeLoaderType",
+                                   &info, 0);
+  }
+  return type;
+}
+
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/libpurple/sound-loader.h	Thu Jun 12 22:13:54 2008 +0000
@@ -0,0 +1,72 @@
+/**
+ * @file sound-loader.h  Purple Sound Theme Loader Class API
+ */
+
+/* purple
+ *
+ * Purple is the legal property of its developers, whose names are too numerous
+ * to list here.  Please refer to the COPYRIGHT file distributed with this
+ * source distribution.
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02111-1301  USA
+ */
+
+#ifndef _PURPLE_SOUND_THEME_LOADER_H_
+#define _PURPLE_SOUND_THEME_LOADER_H_
+
+#include <glib.h>
+#include <glib-object.h>
+#include "theme-loader.h"
+#include "sound-theme.h"
+
+/**
+ * A purple sound theme loader. extends PurpleThemeLoader (theme-loader.h)
+ * This is a class designed to build sound themes
+ *
+ * PurpleSoundThemeLoader is a GObject.
+ */
+typedef struct _PurpleSoundThemeLoader        PurpleSoundThemeLoader;
+typedef struct _PurpleSoundThemeLoaderClass   PurpleSoundThemeLoaderClass;
+
+#define PURPLE_TYPE_SOUND_THEME_LOADER		  	  (purple_sound_theme_loader_get_type ())
+#define PURPLE_SOUND_THEME_LOADER(obj)	 		  (G_TYPE_CHECK_INSTANCE_CAST ((obj), PURPLE_TYPE_SOUND_THEME_LOADER, PurpleSoundThemeLoader))
+#define PURPLE_SOUND_THEME_LOADER_CLASS(klass)	  	  (G_TYPE_CHECK_CLASS_CAST ((klass), PURPLE_TYPE_SOUND_THEME_LOADER, PurpleSoundThemeLoaderClass))
+#define PURPLE_IS_SOUND_THEME_LOADER(obj)	  	  (G_TYPE_CHECK_INSTANCE_TYPE ((obj), PURPLE_TYPE_SOUND_THEME_LOADER))
+#define PURPLE_IS_SOUND_THEME_LOADER_CLASS(klass) 	  (G_TYPE_CHECK_CLASS_TYPE ((klass), PURPLE_TYPE_SOUND_THEME_LOADER))
+#define PURPLE_SOUND_THEME_LOADER_GET_CLASS(obj)  	  (G_TYPE_INSTANCE_GET_CLASS ((obj), PURPLE_TYPE_SOUND_THEME_LOADER, PurpleSoundThemeLoaderClass))
+
+struct _PurpleSoundThemeLoader
+{
+	PurpleThemeLoader parent;
+};
+
+struct _PurpleSoundThemeLoaderClass
+{
+	PurpleThemeLoaderClass parent_class;
+};
+
+/**************************************************************************/
+/** @name Purple Theme-Loader API                                         */
+/**************************************************************************/
+G_BEGIN_DECLS
+
+/**
+ * GObject foo.
+ * @internal.
+ */
+GType purple_sound_theme_loader_get_type(void);
+
+G_END_DECLS
+#endif /* _PURPLE_SOUND_THEME_LOADER_H_ */
--- a/libpurple/theme-loader.c	Thu Jun 12 07:34:43 2008 +0000
+++ b/libpurple/theme-loader.c	Thu Jun 12 22:13:54 2008 +0000
@@ -114,7 +114,7 @@
 
 
 /*****************************************************************************
- * Public API functions                                                      *
+ * Public API functions                                                      
  *****************************************************************************/
 
 
--- a/libpurple/theme-loader.h	Thu Jun 12 07:34:43 2008 +0000
+++ b/libpurple/theme-loader.h	Thu Jun 12 22:13:54 2008 +0000
@@ -1,5 +1,5 @@
 /**
- * @file purpletheme.h  Purple Theme Loader Abstact Class API
+ * @file theme-loader.h  Purple Theme Loader Abstact Class API
  */
 
 /* purple