[totem-pl-parser] Move TotemDiscMediaType get_type() and quark() functions from Totem
- From: Philip Withnall <pwithnall src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [totem-pl-parser] Move TotemDiscMediaType get_type() and quark() functions from Totem
- Date: Sun, 27 Jun 2010 22:31:30 +0000 (UTC)
commit 14b9b021554e054a748d2a9ffc9b9e243e2c6202
Author: Philip Withnall <philip tecnocode co uk>
Date: Sat Jun 26 22:03:32 2010 +0100
Move TotemDiscMediaType get_type() and quark() functions from Totem
plparse/Makefile.am | 10 +++++-----
plparse/plparser.symbols | 2 ++
plparse/totem-disc.c | 10 ++++++++++
plparse/totem-disc.h | 6 +++++-
plparse/totem-pl-parser-builtins.h | 7 +++++--
5 files changed, 27 insertions(+), 8 deletions(-)
---
diff --git a/plparse/Makefile.am b/plparse/Makefile.am
index 829e71a..db77098 100644
--- a/plparse/Makefile.am
+++ b/plparse/Makefile.am
@@ -142,24 +142,24 @@ libtotem_plparser_mini_la_LDFLAGS = \
totem-pl-parser-builtins.h: stamp-totem-pl-parser-builtins.h
@true
-stamp-totem-pl-parser-builtins.h: totem-pl-parser.h Makefile
+stamp-totem-pl-parser-builtins.h: totem-pl-parser.h totem-disc.h Makefile
$(AM_V_GEN) (cd $(srcdir) && $(GLIB_MKENUMS) \
--fhead "#ifndef __TOTEM_PL_PARSER_BUILTINS_H__\n#define __TOTEM_PL_PARSER_BUILTINS_H__\n\n#include <glib-object.h>\n\nG_BEGIN_DECLS\n" \
--fprod "/* enumerations from \"@filename \" */\n" \
--vhead "GType @enum_name _get_type (void) G_GNUC_CONST;\n#define TOTEM_TYPE_ ENUMSHORT@ (@enum_name _get_type())\n" \
- --ftail "G_END_DECLS\n\n#endif /* __TOTEM_PL_PARSER_BUILTINS_H__ */" totem-pl-parser.h) >> xgen-gtbh \
+ --ftail "G_END_DECLS\n\n#endif /* __TOTEM_PL_PARSER_BUILTINS_H__ */" totem-pl-parser.h totem-disc.h) >> xgen-gtbh \
&& (cmp -s xgen-gtbh totem-pl-parser-builtins.h || cp xgen-gtbh totem-pl-parser-builtins.h ) \
&& rm -f xgen-gtbh \
&& echo timestamp > $(@F)
-totem-pl-parser-builtins.c: totem-pl-parser.h Makefile totem-pl-parser-builtins.h
+totem-pl-parser-builtins.c: totem-pl-parser.h totem-disc.h Makefile totem-pl-parser-builtins.h
$(AM_V_GEN) (cd $(srcdir) && $(GLIB_MKENUMS) \
- --fhead "#include \"totem-pl-parser.h\"\n#include \"totem-pl-parser-builtins.h\"" \
+ --fhead "#include \"totem-pl-parser.h\"\n#include \"totem-disc.h\"\n#include \"totem-pl-parser-builtins.h\"" \
--fprod "\n/* enumerations from \"@filename \" */" \
--vhead "GType\n enum_name@_get_type (void)\n{\n static GType etype = 0;\n if (etype == 0) {\n static const G Type@Value values[] = {" \
--vprod " { @VALUENAME@, \"@VALUENAME \", \"@valuenick \" }," \
--vtail " { 0, NULL, NULL }\n };\n etype = g_ type@_register_static (\"@EnumName \", values);\n }\n return etype;\n}\n" \
- totem-pl-parser.h ) > xgen-gtbc \
+ totem-pl-parser.h totem-disc.h) > xgen-gtbc \
&& cp xgen-gtbc totem-pl-parser-builtins.c \
&& rm -f xgen-gtbc
diff --git a/plparse/plparser.symbols b/plparse/plparser.symbols
index 5552e19..ec58c94 100644
--- a/plparse/plparser.symbols
+++ b/plparse/plparser.symbols
@@ -4,6 +4,8 @@ totem_cd_detect_type_with_url
totem_cd_get_human_readable_name
totem_cd_has_medium
totem_cd_mrl_from_type
+totem_disc_media_type_get_type
+totem_disc_media_type_quark
totem_pl_parser_add_ignored_mimetype
totem_pl_parser_add_ignored_scheme
totem_pl_parser_can_parse_from_data
diff --git a/plparse/totem-disc.c b/plparse/totem-disc.c
index 5b71923..3dbad31 100644
--- a/plparse/totem-disc.c
+++ b/plparse/totem-disc.c
@@ -900,6 +900,16 @@ totem_cd_get_human_readable_name (TotemDiscMediaType type)
return NULL;
}
+GQuark
+totem_disc_media_type_quark (void)
+{
+ static GQuark quark = 0;
+ if (!quark)
+ quark = g_quark_from_static_string ("totem_disc_media_type");
+
+ return quark;
+}
+
/*
* vim: sw=2 ts=8 cindent noai bs=2
*/
diff --git a/plparse/totem-disc.h b/plparse/totem-disc.h
index 988547c..e2bb541 100644
--- a/plparse/totem-disc.h
+++ b/plparse/totem-disc.h
@@ -23,6 +23,7 @@
#define TOTEM_DISC_H
#include <glib.h>
+#include <glib-object.h>
G_BEGIN_DECLS
@@ -46,11 +47,14 @@ typedef enum {
MEDIA_TYPE_VCD,
MEDIA_TYPE_DVD,
MEDIA_TYPE_DVB,
- MEDIA_TYPE_NUM_TYPES
+ MEDIA_TYPE_NUM_TYPES /*< skip >*/
} TotemDiscMediaType;
#define MediaType TotemDiscMediaType
+GQuark totem_disc_media_type_quark (void) G_GNUC_CONST;
+#define TOTEM_DISC_MEDIA_TYPE totem_disc_media_type_quark ()
+
TotemDiscMediaType totem_cd_detect_type (const char *device,
GError **error);
TotemDiscMediaType totem_cd_detect_type_with_url (const char *device,
diff --git a/plparse/totem-pl-parser-builtins.h b/plparse/totem-pl-parser-builtins.h
index dd3872b..ccb4667 100644
--- a/plparse/totem-pl-parser-builtins.h
+++ b/plparse/totem-pl-parser-builtins.h
@@ -1,5 +1,5 @@
-/* Generated data (by glib-mkenums) */
+
#ifndef __TOTEM_PL_PARSER_BUILTINS_H__
#define __TOTEM_PL_PARSER_BUILTINS_H__
@@ -14,9 +14,12 @@ GType totem_pl_parser_type_get_type (void) G_GNUC_CONST;
#define TOTEM_TYPE_PL_PARSER_TYPE (totem_pl_parser_type_get_type())
GType totem_pl_parser_error_get_type (void) G_GNUC_CONST;
#define TOTEM_TYPE_PL_PARSER_ERROR (totem_pl_parser_error_get_type())
+/* enumerations from "totem-disc.h" */
+GType totem_disc_media_type_get_type (void) G_GNUC_CONST;
+#define TOTEM_TYPE_DISC_MEDIA_TYPE (totem_disc_media_type_get_type())
G_END_DECLS
#endif /* __TOTEM_PL_PARSER_BUILTINS_H__ */
-/* Generated data ends here */
+
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]