soc.2008.themes: b6c5caa5: Added skeleton (non-working) sound load...

ffdragon at soc.pidgin.im ffdragon at soc.pidgin.im
Thu Jun 12 18:15:54 EDT 2008


-----------------------------------------------------------------
Revision: b6c5caa5dd6d371b6fb19ed7ee13e7825e8244e6
Ancestor: 0e1dfbd70f42904772a99e6cff60be46e3008119
Author: ffdragon at soc.pidgin.im
Date: 2008-06-12T22:13:54
Branch: im.pidgin.soc.2008.themes
URL: http://d.pidgin.im/viewmtn/revision/info/b6c5caa5dd6d371b6fb19ed7ee13e7825e8244e6

Added files:
        libpurple/sound-loader.c libpurple/sound-loader.h
Modified files:
        libpurple/Makefile.am libpurple/theme-loader.c
        libpurple/theme-loader.h

ChangeLog: 

Added skeleton (non-working)  sound loader class

-------------- next part --------------
============================================================
--- libpurple/sound-loader.c	2b8893e83b77418c380dfcec99f9a972656dd3f8
+++ libpurple/sound-loader.c	2b8893e83b77418c380dfcec99f9a972656dd3f8
@@ -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;
+}
+
+
============================================================
--- libpurple/sound-loader.h	907d14695cf14fc3c060e9ecb8b82c04c9c843ae
+++ libpurple/sound-loader.h	907d14695cf14fc3c060e9ecb8b82c04c9c843ae
@@ -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_ */
============================================================
--- libpurple/Makefile.am	47443b26892340e758d797066be8a7735a1950b1
+++ libpurple/Makefile.am	31e80ef33d5c42794f34667b6785d8356c01d8c4
@@ -75,6 +75,7 @@ purple_coresources = \
 	stringref.c \
 	stun.c \
 	sound.c \
+	sound-loader.c \
 	sound-theme.c \
 	sslconn.c \
 	upnp.c \
@@ -132,6 +133,7 @@ purple_coreheaders = \
 	stringref.h \
 	stun.h \
 	sound.h \
+	sound-loader.h \
 	sound-theme.h \
 	sslconn.h \
 	upnp.h \
============================================================
--- libpurple/theme-loader.c	5541acf5cb4e37ea4d02082297e1316b9e2c9b46
+++ libpurple/theme-loader.c	70d56aa850953d60464d2bf616da9d6bf2ed7586
@@ -114,7 +114,7 @@ purple_theme_loader_get_type (void)
 
 
 /*****************************************************************************
- * Public API functions                                                      *
+ * Public API functions                                                      
  *****************************************************************************/
 
 
============================================================
--- libpurple/theme-loader.h	656bad028c3bbec25fe84d61aea935998743d2e5
+++ libpurple/theme-loader.h	256c2766b8404dd8fb6fb7e8156d45fbeb33ff1c
@@ -1,5 +1,5 @@
 /**
- * @file purpletheme.h  Purple Theme Loader Abstact Class API
+ * @file theme-loader.h  Purple Theme Loader Abstact Class API
  */
 
 /* purple


More information about the Commits mailing list