totem-pl-parser r171 - in trunk: . plparse



Author: hadess
Date: Fri Aug 22 14:02:30 2008
New Revision: 171
URL: http://svn.gnome.org/viewvc/totem-pl-parser?rev=171&view=rev

Log:
2008-06-29  Gustavo J. A. M. Carneiro  <gjc gnome org>

	* plparse/totem-pl-parser.c (totem_pl_parser_metadata_get_type),
	* plparse/totem-pl-parser.h: Define a new
	TOTEM_TYPE_PL_PARSER_METADATA, identical to G_TYPE_HASH_TABLE; Use
	it instead of G_TYPE_HASH_TABLE so that Python bindings can safely
	convert metadata signal parameters.  Closes #536060.



Modified:
   trunk/ChangeLog
   trunk/plparse/totem-pl-parser.c
   trunk/plparse/totem-pl-parser.h

Modified: trunk/plparse/totem-pl-parser.c
==============================================================================
--- trunk/plparse/totem-pl-parser.c	(original)
+++ trunk/plparse/totem-pl-parser.c	Fri Aug 22 14:02:30 2008
@@ -355,7 +355,7 @@
 			      G_STRUCT_OFFSET (TotemPlParserClass, entry_parsed),
 			      NULL, NULL,
 			      totemplparser_marshal_VOID__STRING_BOXED,
-			      G_TYPE_NONE, 2, G_TYPE_STRING, G_TYPE_HASH_TABLE);
+			      G_TYPE_NONE, 2, G_TYPE_STRING, TOTEM_TYPE_PL_PARSER_METADATA);
 	/**
 	 * TotemPlParser::playlist-started:
 	 * @parser: the object which received the signal
@@ -375,7 +375,7 @@
 			      G_STRUCT_OFFSET (TotemPlParserClass, playlist_started),
 			      NULL, NULL,
 			      totemplparser_marshal_VOID__STRING_BOXED,
-			      G_TYPE_NONE, 2, G_TYPE_STRING, G_TYPE_HASH_TABLE);
+			      G_TYPE_NONE, 2, G_TYPE_STRING, TOTEM_TYPE_PL_PARSER_METADATA);
 	/**
 	 * TotemPlParser::playlist-ended:
 	 * @parser: the object which received the signal
@@ -1907,3 +1907,19 @@
 	return retval;
 }
 
+
+GType
+totem_pl_parser_metadata_get_type (void)
+{
+	static volatile gsize g_define_type_id__volatile = 0;
+	if (g_once_init_enter (&g_define_type_id__volatile))
+	{ 
+		GType g_define_type_id = g_boxed_type_register_static (
+		    g_intern_static_string ("TotemPlParserMetadata"),
+		    (GBoxedCopyFunc) g_hash_table_ref,
+		    (GBoxedFreeFunc) g_hash_table_unref);
+		g_once_init_leave (&g_define_type_id__volatile, g_define_type_id);
+	}
+	return g_define_type_id__volatile;
+}
+

Modified: trunk/plparse/totem-pl-parser.h
==============================================================================
--- trunk/plparse/totem-pl-parser.h	(original)
+++ trunk/plparse/totem-pl-parser.h	Fri Aug 22 14:02:30 2008
@@ -356,6 +356,9 @@
 
 TotemPlParser *totem_pl_parser_new (void);
 
+GType totem_pl_parser_metadata_get_type (void) G_GNUC_CONST;
+#define TOTEM_TYPE_PL_PARSER_METADATA (totem_pl_parser_metadata_get_type())
+
 G_END_DECLS
 
 #endif /* TOTEM_PL_PARSER_H */



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]