[grilo-mediaserver2/mediaserver1spec] Finish rename project
- From: Juan A. Suarez Romero <jasuarez src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [grilo-mediaserver2/mediaserver1spec] Finish rename project
- Date: Fri, 15 Apr 2011 15:30:11 +0000 (UTC)
commit e4a3982220b929db6030783b65dda377fcb11092
Author: Juan A. Suarez Romero <jasuarez igalia com>
Date: Fri Apr 15 17:29:45 2011 +0200
Finish rename project
Rename everything from rygel-grilo to grilo-mediaserver
autogen.sh | 2 +-
configure.ac | 4 +-
data/Makefile.am | 4 +-
src/Makefile.am | 38 +++---
...edia-container.c => grilo-ms-media-container.c} | 166 ++++++++++----------
src/grilo-ms-media-container.h | 92 +++++++++++
...el-grilo-media-item.c => grilo-ms-media-item.c} | 56 ++++----
src/grilo-ms-media-item.h | 78 +++++++++
...rilo-media-object.c => grilo-ms-media-object.c} | 90 ++++++------
src/grilo-ms-media-object.h | 84 ++++++++++
src/{rygel-grilo.c => grilo-ms.c} | 14 +-
src/rygel-grilo-media-container-glue.h | 72 ---------
src/rygel-grilo-media-container.h | 92 -----------
src/rygel-grilo-media-item-glue.h | 72 ---------
src/rygel-grilo-media-item.h | 78 ---------
src/rygel-grilo-media-object-glue.h | 72 ---------
src/rygel-grilo-media-object.h | 84 ----------
17 files changed, 441 insertions(+), 657 deletions(-)
---
diff --git a/autogen.sh b/autogen.sh
index f10abd9..6262d61 100755
--- a/autogen.sh
+++ b/autogen.sh
@@ -5,7 +5,7 @@ srcdir=`dirname $0`
test -z "$srcdir" && srcdir=.
REQUIRED_AUTOMAKE_VERSION=1.8
-PKG_NAME="rygel-grilo"
+PKG_NAME="grilo-mediaserver"
(test -f $srcdir/configure.ac) || {
echo -n "**Error**: Directory "\`$srcdir\'" does not look like the"
diff --git a/configure.ac b/configure.ac
index f3e3db9..af82019 100644
--- a/configure.ac
+++ b/configure.ac
@@ -3,9 +3,9 @@
#
# Author: Juan A. Suarez Romero <jasuarez igalia com>
#
-# Copyright (C) 2010 Igalia S.L.. All rights reserved.
+# Copyright (C) 2010, 2011 Igalia S.L.. All rights reserved.
-m4_define([prj_name], [rygel-grilo])
+m4_define([prj_name], [grilo-mediaserver])
m4_define([prj_version], [0.1])
AC_INIT([prj_name], [prj_version])
diff --git a/data/Makefile.am b/data/Makefile.am
index ecb219e..7e6486e 100644
--- a/data/Makefile.am
+++ b/data/Makefile.am
@@ -3,9 +3,9 @@
#
# Author: Juan A. Suarez Romero <jasuarez igalia com>
#
-# Copyright (C) 2010 Igalia S.L. All rights reserved.
+# Copyright (C) 2010, 2011 Igalia S.L. All rights reserved.
-configdir = $(datadir)/rygel-grilo
+configdir = $(datadir)/grilo-mediaserver
config_DATA = \
media-container1.xml \
diff --git a/src/Makefile.am b/src/Makefile.am
index 4f10f30..9ffe0a6 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -3,35 +3,35 @@
#
# Author: Juan A. Suarez Romero <jasuarez igalia com>
#
-# Copyright (C) 2010 Igalia S.L.
+# Copyright (C) 2010, 2011 Igalia S.L.
INCLUDES = @DEPS_CFLAGS@
-rygel-grilo-%-glue.h: $(top_srcdir)/data/%1.xml
+grilo-ms-%-glue.h: $(top_srcdir)/data/%1.xml
$(DBUSBINDINGTOOL) \
--mode=glib-server \
--output=$@ \
- --prefix=rygel_grilo_$(subst -,_,$*) \
+ --prefix=grilo_ms_$(subst -,_,$*) \
$^
-bin_PROGRAMS = rygel-grilo
-
-rygel_grilo_SOURCES = \
- rygel-grilo.c \
- rygel-grilo-media-object-glue.h \
- rygel-grilo-media-object.h \
- rygel-grilo-media-object.c \
- rygel-grilo-media-container-glue.h \
- rygel-grilo-media-container.h \
- rygel-grilo-media-container.c \
- rygel-grilo-media-item-glue.h \
- rygel-grilo-media-item.h \
- rygel-grilo-media-item.c
-
-rygel_grilo_CFLAGS = \
+bin_PROGRAMS = grilo-ms
+
+grilo_ms_SOURCES = \
+ grilo-ms.c \
+ grilo-ms-media-object-glue.h \
+ grilo-ms-media-object.h \
+ grilo-ms-media-object.c \
+ grilo-ms-media-container-glue.h \
+ grilo-ms-media-container.h \
+ grilo-ms-media-container.c \
+ grilo-ms-media-item-glue.h \
+ grilo-ms-media-item.h \
+ grilo-ms-media-item.c
+
+grilo_ms_CFLAGS = \
-DPREFIX=$(prefix)
-rygel_grilo_LDADD = \
+grilo_ms_LDADD = \
-ldl -lpthread \
@DEPS_LIBS@
diff --git a/src/rygel-grilo-media-container.c b/src/grilo-ms-media-container.c
similarity index 67%
rename from src/rygel-grilo-media-container.c
rename to src/grilo-ms-media-container.c
index 90c3ca6..00ea463 100644
--- a/src/rygel-grilo-media-container.c
+++ b/src/grilo-ms-media-container.c
@@ -1,4 +1,4 @@
-/* (C) 2010 Igalia S.L.
+/* (C) 2010, 2011 Igalia S.L.
*
* Authors: Juan A. Suarez Romero <jasuarez igalia com>
*
@@ -21,19 +21,19 @@
#include <dbus/dbus-glib.h>
#include <string.h>
-#include "rygel-grilo-media-container.h"
-#include "rygel-grilo-media-container-glue.h"
-#include "rygel-grilo-media-item.h"
+#include "grilo-ms-media-container.h"
+#include "grilo-ms-media-container-glue.h"
+#include "grilo-ms-media-item.h"
#define DEFAULT_LIMIT 50
#define DBUS_TYPE_G_ARRAY_OF_OBJECT_PATH \
(dbus_g_type_get_collection ("GPtrArray", DBUS_TYPE_G_OBJECT_PATH))
-#define RYGEL_GRILO_MEDIA_CONTAINER_GET_PRIVATE(o) \
- G_TYPE_INSTANCE_GET_PRIVATE((o), RYGEL_GRILO_MEDIA_CONTAINER_TYPE, RygelGriloMediaContainerPrivate)
+#define GRILO_MS_MEDIA_CONTAINER_GET_PRIVATE(o) \
+ G_TYPE_INSTANCE_GET_PRIVATE((o), GRILO_MS_MEDIA_CONTAINER_TYPE, GriloMsMediaContainerPrivate)
-typedef void (*RetryCb) (RygelGriloMediaContainer *obj,
+typedef void (*RetryCb) (GriloMsMediaContainer *obj,
gchar *property,
DBusGMethodInvocation *context);
@@ -53,14 +53,14 @@ typedef enum {
} BrowseStatus;
/*
- * Private RygelGriloMediaCointainer structure
+ * Private GriloMsMediaCointainer structure
* item_count: number of children items of this container
* container_count: number of children containers of this container
- * items: list of RygelGriloMediaItem children
- * containers: list of RygelGriloMediaContainer children
+ * items: list of GriloMsMediaItem children
+ * containers: list of GriloMsMediaContainer children
* browse_status: status of browse operation
*/
-struct _RygelGriloMediaContainerPrivate {
+struct _GriloMsMediaContainerPrivate {
guint item_count;
guint container_count;
GList *items;
@@ -68,9 +68,9 @@ struct _RygelGriloMediaContainerPrivate {
BrowseStatus browse_status;
};
-G_DEFINE_TYPE (RygelGriloMediaContainer, rygel_grilo_media_container, RYGEL_GRILO_MEDIA_OBJECT_TYPE);
+G_DEFINE_TYPE (GriloMsMediaContainer, grilo_ms_media_container, GRILO_MS_MEDIA_OBJECT_TYPE);
-/* Frees a RygelGrilo object registered in dbus_path */
+/* Frees a GriloMs object registered in dbus_path */
static void
free_child (gchar *dbus_path)
{
@@ -102,30 +102,30 @@ browse_result_cb (GrlMediaSource *source,
gpointer user_data,
const GError *error)
{
- RygelGriloMediaContainer *container =
- (RygelGriloMediaContainer *) user_data;
- RygelGriloMediaContainer *child_container;
- RygelGriloMediaItem *child_item;
+ GriloMsMediaContainer *container =
+ (GriloMsMediaContainer *) user_data;
+ GriloMsMediaContainer *child_container;
+ GriloMsMediaItem *child_item;
if (media) {
if (GRL_IS_MEDIA_BOX (media)) {
child_container =
- rygel_grilo_media_container_new_with_parent (RYGEL_GRILO_MEDIA_OBJECT (container),
- media);
+ grilo_ms_media_container_new_with_parent (GRILO_MS_MEDIA_OBJECT (container),
+ media);
if (child_container) {
container->priv->containers =
g_list_prepend (container->priv->containers,
- g_strdup (rygel_grilo_media_object_get_dbus_path (RYGEL_GRILO_MEDIA_OBJECT (child_container))));
+ g_strdup (grilo_ms_media_object_get_dbus_path (GRILO_MS_MEDIA_OBJECT (child_container))));
container->priv->container_count++;
}
} else {
child_item =
- rygel_grilo_media_item_new (RYGEL_GRILO_MEDIA_OBJECT (container),
- media);
+ grilo_ms_media_item_new (GRILO_MS_MEDIA_OBJECT (container),
+ media);
if (child_item) {
container->priv->items =
g_list_prepend (container->priv->items,
- g_strdup (rygel_grilo_media_object_get_dbus_path (RYGEL_GRILO_MEDIA_OBJECT (child_item))));
+ g_strdup (grilo_ms_media_object_get_dbus_path (GRILO_MS_MEDIA_OBJECT (child_item))));
container->priv->item_count++;
}
}
@@ -142,7 +142,7 @@ browse_result_cb (GrlMediaSource *source,
/* Synchronous function that wrappes a grilo browse; when browse finish, it
sets the right properties and returns */
static void
-browse_grilo_media (RygelGriloMediaContainer *container)
+browse_grilo_media (GriloMsMediaContainer *container)
{
GMainContext *mainloop_context;
GMainLoop *mainloop;
@@ -188,7 +188,7 @@ browse_grilo_media (RygelGriloMediaContainer *container)
media,
keys,
0,
- RYGEL_GRILO_MEDIA_CONTAINER_GET_CLASS (container)->limit,
+ GRILO_MS_MEDIA_CONTAINER_GET_CLASS (container)->limit,
GRL_RESOLVE_FULL | GRL_RESOLVE_IDLE_RELAY,
browse_result_cb,
container);
@@ -206,7 +206,7 @@ browse_grilo_media (RygelGriloMediaContainer *container)
/* Convert a GList in a GPtrArray */
static GPtrArray *
-rygel_grilo_media_container_get_elements (GList *elements)
+grilo_ms_media_container_get_elements (GList *elements)
{
GList *p;
GPtrArray *pelements = NULL;
@@ -221,29 +221,29 @@ rygel_grilo_media_container_get_elements (GList *elements)
return pelements;
}
-/* Returns an array with the RygelGriloMediaItem children */
+/* Returns an array with the GriloMsMediaItem children */
static GPtrArray *
-rygel_grilo_media_container_get_items (RygelGriloMediaContainer *obj)
+grilo_ms_media_container_get_items (GriloMsMediaContainer *obj)
{
- return rygel_grilo_media_container_get_elements (RYGEL_GRILO_MEDIA_CONTAINER_GET_PRIVATE (obj)->items);
+ return grilo_ms_media_container_get_elements (GRILO_MS_MEDIA_CONTAINER_GET_PRIVATE (obj)->items);
}
-/* Returns an array with the RygelGriloMediaContainer children */
+/* Returns an array with the GriloMsMediaContainer children */
static GPtrArray *
-rygel_grilo_media_container_get_containers (RygelGriloMediaContainer *obj)
+grilo_ms_media_container_get_containers (GriloMsMediaContainer *obj)
{
- return rygel_grilo_media_container_get_elements (RYGEL_GRILO_MEDIA_CONTAINER_GET_PRIVATE (obj)->containers);
+ return grilo_ms_media_container_get_elements (GRILO_MS_MEDIA_CONTAINER_GET_PRIVATE (obj)->containers);
}
/* Gets a property value */
static void
-rygel_grilo_media_container_get_property (GObject *object,
- guint prop_id,
- GValue *value,
- GParamSpec *pspec)
+grilo_ms_media_container_get_property (GObject *object,
+ guint prop_id,
+ GValue *value,
+ GParamSpec *pspec)
{
- RygelGriloMediaContainer *self =
- RYGEL_GRILO_MEDIA_CONTAINER (object);
+ GriloMsMediaContainer *self =
+ GRILO_MS_MEDIA_CONTAINER (object);
browse_grilo_media (self);
switch (prop_id) {
@@ -255,11 +255,11 @@ rygel_grilo_media_container_get_property (GObject *object,
break;
case PROP_ITEMS:
g_value_take_boxed (value,
- rygel_grilo_media_container_get_items (self));
+ grilo_ms_media_container_get_items (self));
break;
case PROP_CONTAINERS:
g_value_take_boxed (value,
- rygel_grilo_media_container_get_containers (self));
+ grilo_ms_media_container_get_containers (self));
break;
default:
G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
@@ -269,13 +269,13 @@ rygel_grilo_media_container_get_property (GObject *object,
/* Sets a property */
static void
-rygel_grilo_media_container_set_property (GObject *object,
- guint prop_id,
- const GValue *value,
- GParamSpec *pspec)
+grilo_ms_media_container_set_property (GObject *object,
+ guint prop_id,
+ const GValue *value,
+ GParamSpec *pspec)
{
- RygelGriloMediaContainer *self =
- RYGEL_GRILO_MEDIA_CONTAINER (object);
+ GriloMsMediaContainer *self =
+ GRILO_MS_MEDIA_CONTAINER (object);
switch (prop_id) {
case PROP_ITEM_COUNT:
@@ -290,12 +290,12 @@ rygel_grilo_media_container_set_property (GObject *object,
}
}
-/* Dispose a RygelGriloMediaContainer, freeing also the children */
+/* Dispose a GriloMsMediaContainer, freeing also the children */
static void
-rygel_grilo_media_container_dispose (GObject *object)
+grilo_ms_media_container_dispose (GObject *object)
{
- RygelGriloMediaContainer *self =
- RYGEL_GRILO_MEDIA_CONTAINER (object);
+ GriloMsMediaContainer *self =
+ GRILO_MS_MEDIA_CONTAINER (object);
/* Free children */
g_list_foreach (self->priv->containers, (GFunc) free_child, NULL);
@@ -304,20 +304,20 @@ rygel_grilo_media_container_dispose (GObject *object)
g_list_foreach (self->priv->items, (GFunc) free_child, NULL);
g_list_free (self->priv->items);
- G_OBJECT_CLASS (rygel_grilo_media_container_parent_class)->dispose (object);
+ G_OBJECT_CLASS (grilo_ms_media_container_parent_class)->dispose (object);
}
/* Class init function */
static void
-rygel_grilo_media_container_class_init (RygelGriloMediaContainerClass *klass)
+grilo_ms_media_container_class_init (GriloMsMediaContainerClass *klass)
{
GObjectClass *object_class = G_OBJECT_CLASS (klass);
- g_type_class_add_private (klass, sizeof (RygelGriloMediaContainerPrivate));
+ g_type_class_add_private (klass, sizeof (GriloMsMediaContainerPrivate));
- object_class->get_property = rygel_grilo_media_container_get_property;
- object_class->set_property = rygel_grilo_media_container_set_property;
- object_class->dispose = rygel_grilo_media_container_dispose;
+ object_class->get_property = grilo_ms_media_container_get_property;
+ object_class->set_property = grilo_ms_media_container_set_property;
+ object_class->dispose = grilo_ms_media_container_dispose;
g_object_class_install_property (object_class,
PROP_ITEMS,
@@ -356,19 +356,19 @@ rygel_grilo_media_container_class_init (RygelGriloMediaContainerClass *klass)
klass->limit = DEFAULT_LIMIT;
/* Register introspection */
- dbus_g_object_type_install_info (RYGEL_GRILO_MEDIA_CONTAINER_TYPE,
- &dbus_glib_rygel_grilo_media_container_object_info);
+ dbus_g_object_type_install_info (GRILO_MS_MEDIA_CONTAINER_TYPE,
+ &dbus_glib_grilo_ms_media_container_object_info);
}
/* Object init function */
static void
-rygel_grilo_media_container_init (RygelGriloMediaContainer *server)
+grilo_ms_media_container_init (GriloMsMediaContainer *server)
{
- server->priv = RYGEL_GRILO_MEDIA_CONTAINER_GET_PRIVATE (server);
+ server->priv = GRILO_MS_MEDIA_CONTAINER_GET_PRIVATE (server);
}
/**
- * rygel_grilo_media_container_new_root:
+ * grilo_ms_media_container_new_root:
* @dbus_path: dbus path where object is registered
* @media: grilo media object being wrapped
* @limit: up to how many children each container will have
@@ -376,28 +376,28 @@ rygel_grilo_media_container_init (RygelGriloMediaContainer *server)
* Creates a new container that will be the root of all containers. Usually it
* wraps the root of a grilo source.
*
- * Returns: a new RygelGriloMediaContainer
+ * Returns: a new GriloMsMediaContainer
**/
-RygelGriloMediaContainer *
-rygel_grilo_media_container_new_root (const gchar *dbus_path,
- GrlMedia *media,
- gint limit)
+GriloMsMediaContainer *
+grilo_ms_media_container_new_root (const gchar *dbus_path,
+ GrlMedia *media,
+ gint limit)
{
- RygelGriloMediaContainer *obj;
- RygelGriloMediaContainerClass *klass;
+ GriloMsMediaContainer *obj;
+ GriloMsMediaContainerClass *klass;
g_return_val_if_fail (dbus_path, NULL);
g_return_val_if_fail (media, NULL);
- obj = g_object_new (RYGEL_GRILO_MEDIA_CONTAINER_TYPE,
+ obj = g_object_new (GRILO_MS_MEDIA_CONTAINER_TYPE,
"parent", dbus_path,
"dbus-path", dbus_path,
"grl-media", media,
NULL);
- klass = RYGEL_GRILO_MEDIA_CONTAINER_GET_CLASS (obj);
+ klass = GRILO_MS_MEDIA_CONTAINER_GET_CLASS (obj);
klass->limit = limit;
- if (rygel_grilo_media_object_dbus_register (RYGEL_GRILO_MEDIA_OBJECT (obj))) {
+ if (grilo_ms_media_object_dbus_register (GRILO_MS_MEDIA_OBJECT (obj))) {
return obj;
} else {
g_object_unref (obj);
@@ -407,41 +407,41 @@ rygel_grilo_media_container_new_root (const gchar *dbus_path,
/**
- * rygel_grilo_media_container_new_with_parent:
+ * grilo_ms_media_container_new_with_parent:
* @parent: parent object
* @media: grilo media object to be wrapped
*
* Creates a new container that is child of another container.
*
- * Returns: a new RygelGriloMediaContainer registered on dbus, or @NULL
+ * Returns: a new GriloMsMediaContainer registered on dbus, or @NULL
* otherwise
**/
-RygelGriloMediaContainer *
-rygel_grilo_media_container_new_with_parent (RygelGriloMediaObject *parent,
- GrlMedia *media)
+GriloMsMediaContainer *
+grilo_ms_media_container_new_with_parent (GriloMsMediaObject *parent,
+ GrlMedia *media)
{
- RygelGriloMediaContainer *obj;
- RygelGriloMediaObjectClass *klass;
+ GriloMsMediaContainer *obj;
+ GriloMsMediaObjectClass *klass;
gchar *dbus_path;
g_return_val_if_fail (parent, NULL);
g_return_val_if_fail (media, NULL);
- klass = RYGEL_GRILO_MEDIA_OBJECT_GET_CLASS (parent);
+ klass = GRILO_MS_MEDIA_OBJECT_GET_CLASS (parent);
dbus_path = g_strdup_printf ("%s/%u",
- rygel_grilo_media_object_get_dbus_path (parent),
+ grilo_ms_media_object_get_dbus_path (parent),
klass->index);
obj =
- g_object_new (RYGEL_GRILO_MEDIA_CONTAINER_TYPE,
- "parent", rygel_grilo_media_object_get_dbus_path (parent),
+ g_object_new (GRILO_MS_MEDIA_CONTAINER_TYPE,
+ "parent", grilo_ms_media_object_get_dbus_path (parent),
"dbus-path", dbus_path,
"grl-media", media,
"parent-media", parent,
NULL);
g_free (dbus_path);
- if (rygel_grilo_media_object_dbus_register (RYGEL_GRILO_MEDIA_OBJECT (obj))) {
+ if (grilo_ms_media_object_dbus_register (GRILO_MS_MEDIA_OBJECT (obj))) {
klass->index++;
return obj;
} else {
diff --git a/src/grilo-ms-media-container.h b/src/grilo-ms-media-container.h
new file mode 100644
index 0000000..f8b545b
--- /dev/null
+++ b/src/grilo-ms-media-container.h
@@ -0,0 +1,92 @@
+/*
+ * Copyright (C) 2010, 2011 Igalia S.L.
+ *
+ * Authors: Juan A. Suarez Romero <jasuarez igalia com>
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public License
+ * as published by the Free Software Foundation; version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This library 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
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA
+ *
+ */
+
+#ifndef _GRILO_MS_MEDIA_CONTAINER_H_
+#define _GRILO_MS_MEDIA_CONTAINER_H_
+
+#include <glib.h>
+#include <glib-object.h>
+
+#include "grilo-ms-media-object.h"
+
+#define GRILO_MS_MEDIA_CONTAINER_TYPE \
+ (grilo_ms_media_container_get_type ())
+
+#define GRILO_MS_MEDIA_CONTAINER(obj) \
+ (G_TYPE_CHECK_INSTANCE_CAST ((obj), \
+ GRILO_MS_MEDIA_CONTAINER_TYPE, \
+ GriloMsMediaContainer))
+
+#define GRILO_MS_IS_MEDIA_CONTAINER(obj) \
+ (G_TYPE_CHECK_INSTANCE_TYPE ((obj), \
+ GRILO_MS_MEDIA_CONTAINER_TYPE))
+
+#define GRILO_MS_MEDIA_CONTAINER_CLASS(klass) \
+ (G_TYPE_CHECK_CLASS_CAST((klass), \
+ GRILO_MS_MEDIA_CONTAINER_TYPE, \
+ GriloMsMediaContainerClass))
+
+#define GRILO_MS_IS_MEDIA_CONTAINER_CLASS(klass) \
+ (G_TYPE_CHECK_CLASS_TYPE((klass), \
+ GRILO_MS_MEDIA_CONTAINER_TYPE))
+
+#define GRILO_MS_MEDIA_CONTAINER_GET_CLASS(obj) \
+ (G_TYPE_INSTANCE_GET_CLASS ((obj), \
+ GRILO_MS_MEDIA_CONTAINER_TYPE, \
+ GriloMsMediaContainerClass))
+
+typedef struct _GriloMsMediaContainer GriloMsMediaContainer;
+typedef struct _GriloMsMediaContainerPrivate GriloMsMediaContainerPrivate;
+
+struct _GriloMsMediaContainer {
+
+ GriloMsMediaObject parent;
+
+ /*< private >*/
+ GriloMsMediaContainerPrivate *priv;
+};
+
+typedef struct _GriloMsMediaContainerClass GriloMsMediaContainerClass;
+
+struct _GriloMsMediaContainerClass {
+
+ GriloMsMediaObjectClass parent_class;
+
+ /*< private >*/
+ /* How many elements will be requested per category */
+ gint limit;
+};
+
+GType grilo_ms_media_container_get_type (void);
+
+GriloMsMediaContainer *grilo_ms_media_container_new (const gchar *parent,
+ const gchar *display_name);
+
+GriloMsMediaContainer *grilo_ms_media_container_new_root (const gchar *dbus_path,
+ GrlMedia *media,
+ gint limit);
+
+GriloMsMediaContainer *grilo_ms_media_container_new_with_parent (GriloMsMediaObject *parent,
+ GrlMedia *media);
+
+
+#endif /* _GRILO_MS_MEDIA_CONTAINER_H_ */
diff --git a/src/rygel-grilo-media-item.c b/src/grilo-ms-media-item.c
similarity index 84%
rename from src/rygel-grilo-media-item.c
rename to src/grilo-ms-media-item.c
index c1b0802..f63beeb 100644
--- a/src/rygel-grilo-media-item.c
+++ b/src/grilo-ms-media-item.c
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2010 Igalia S.L.
+ * Copyright (C) 2010, 2011 Igalia S.L.
*
* Authors: Juan A. Suarez Romero <jasuarez igalia com>
*
@@ -42,14 +42,14 @@ enum {
LAST_PROP
};
-G_DEFINE_TYPE (RygelGriloMediaItem, rygel_grilo_media_item, RYGEL_GRILO_MEDIA_OBJECT_TYPE);
+G_DEFINE_TYPE (GriloMsMediaItem, grilo_ms_media_item, GRILO_MS_MEDIA_OBJECT_TYPE);
/* Gets the a property */
static void
-rygel_grilo_media_item_get_property (GObject *object,
- guint prop_id,
- GValue *value,
- GParamSpec *pspec)
+grilo_ms_media_item_get_property (GObject *object,
+ guint prop_id,
+ GValue *value,
+ GParamSpec *pspec)
{
GPtrArray *pa;
GrlMedia *media;
@@ -125,21 +125,21 @@ rygel_grilo_media_item_get_property (GObject *object,
}
}
-/* Dispose a RygelGriloMediaItem object */
+/* Dispose a GriloMsMediaItem object */
static void
-rygel_grilo_media_item_dispose (GObject *object)
+grilo_ms_media_item_dispose (GObject *object)
{
- G_OBJECT_CLASS (rygel_grilo_media_item_parent_class)->dispose (object);
+ G_OBJECT_CLASS (grilo_ms_media_item_parent_class)->dispose (object);
}
/* Class init function */
static void
-rygel_grilo_media_item_class_init (RygelGriloMediaItemClass *klass)
+grilo_ms_media_item_class_init (GriloMsMediaItemClass *klass)
{
GObjectClass *object_class = G_OBJECT_CLASS (klass);
- object_class->get_property = rygel_grilo_media_item_get_property;
- object_class->dispose = rygel_grilo_media_item_dispose;
+ object_class->get_property = grilo_ms_media_item_get_property;
+ object_class->dispose = grilo_ms_media_item_dispose;
g_object_class_install_property (object_class,
PROP_URLS,
@@ -223,52 +223,52 @@ rygel_grilo_media_item_class_init (RygelGriloMediaItemClass *klass)
/* Register introspection */
- dbus_g_object_type_install_info (RYGEL_GRILO_MEDIA_ITEM_TYPE,
- &dbus_glib_rygel_grilo_media_item_object_info);
+ dbus_g_object_type_install_info (GRILO_MS_MEDIA_ITEM_TYPE,
+ &dbus_glib_grilo_ms_media_item_object_info);
}
/* Object init function */
static void
-rygel_grilo_media_item_init (RygelGriloMediaItem *obj)
+grilo_ms_media_item_init (GriloMsMediaItem *obj)
{
}
/**
- * rygel_grilo_media_item_new:
+ * grilo_ms_media_item_new:
* @parent: the parent
* @media: the grilo media element that is being wrapped
*
- * Creates a new RygelGriloMediaItem that wraps the grilo media, and register it
+ * Creates a new GriloMsMediaItem that wraps the grilo media, and register it
* in dbus.
*
- * Returns: a new RygelGriloMediaItem registered on dbus, or @NULL otherwise
+ * Returns: a new GriloMsMediaItem registered on dbus, or @NULL otherwise
**/
-RygelGriloMediaItem *
-rygel_grilo_media_item_new (RygelGriloMediaObject *parent,
- GrlMedia *media)
+GriloMsMediaItem *
+grilo_ms_media_item_new (GriloMsMediaObject *parent,
+ GrlMedia *media)
{
- RygelGriloMediaItem *obj;
- RygelGriloMediaObjectClass *klass;
+ GriloMsMediaItem *obj;
+ GriloMsMediaObjectClass *klass;
gchar *dbus_path;
g_return_val_if_fail (parent, NULL);
g_return_val_if_fail (media, NULL);
- klass = RYGEL_GRILO_MEDIA_OBJECT_GET_CLASS (parent);
+ klass = GRILO_MS_MEDIA_OBJECT_GET_CLASS (parent);
dbus_path = g_strdup_printf ("%s/%u",
- rygel_grilo_media_object_get_dbus_path (parent),
+ grilo_ms_media_object_get_dbus_path (parent),
klass->index);
obj =
- g_object_new (RYGEL_GRILO_MEDIA_ITEM_TYPE,
- "parent", rygel_grilo_media_object_get_dbus_path (parent),
+ g_object_new (GRILO_MS_MEDIA_ITEM_TYPE,
+ "parent", grilo_ms_media_object_get_dbus_path (parent),
"dbus-path", dbus_path,
"grl-media", media,
"parent-media", parent,
NULL);
g_free (dbus_path);
- if (rygel_grilo_media_object_dbus_register (RYGEL_GRILO_MEDIA_OBJECT (obj))) {
+ if (grilo_ms_media_object_dbus_register (GRILO_MS_MEDIA_OBJECT (obj))) {
klass->index++;
return obj;
} else {
diff --git a/src/grilo-ms-media-item.h b/src/grilo-ms-media-item.h
new file mode 100644
index 0000000..08c0861
--- /dev/null
+++ b/src/grilo-ms-media-item.h
@@ -0,0 +1,78 @@
+/*
+ * Copyright (C) 2010, 2011 Igalia S.L.
+ *
+ * Authors: Juan A. Suarez Romero <jasuarez igalia com>
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public License
+ * as published by the Free Software Foundation; version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This library 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
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA
+ *
+ */
+
+#ifndef _GRILO_MS_MEDIA_ITEM_H_
+#define _GRILO_MS_MEDIA_ITEM_H_
+
+#include <glib.h>
+#include <glib-object.h>
+#include <grilo.h>
+
+#include "rygel-grilo-media-object.h"
+
+#define GRILO_MS_MEDIA_ITEM_TYPE \
+ (grilo_ms_media_item_get_type ())
+
+#define GRILO_MS_MEDIA_ITEM(obj) \
+ (G_TYPE_CHECK_INSTANCE_CAST ((obj), \
+ GRILO_MS_MEDIA_ITEM_TYPE, \
+ GriloMsMediaItem))
+
+#define GRILO_MS_IS_MEDIA_ITEM(obj) \
+ (G_TYPE_CHECK_INSTANCE_TYPE ((obj), \
+ GRILO_MS_MEDIA_ITEM_TYPE))
+
+#define GRILO_MS_MEDIA_ITEM_CLASS(klass) \
+ (G_TYPE_CHECK_CLASS_CAST((klass), \
+ GRILO_MS_MEDIA_ITEM_TYPE, \
+ GriloMsMediaItemClass))
+
+#define GRILO_MS_IS_MEDIA_ITEM_CLASS(klass) \
+ (G_TYPE_CHECK_CLASS_TYPE((klass), \
+ GRILO_MS_MEDIA_ITEM_TYPE))
+
+#define GRILO_MS_MEDIA_ITEM_GET_CLASS(obj) \
+ (G_TYPE_INSTANCE_GET_CLASS ((obj), \
+ GRILO_MS_MEDIA_ITEM_TYPE, \
+ GriloMsMediaItemClass))
+
+typedef struct _GriloMsMediaItem GriloMsMediaItem;
+
+struct _GriloMsMediaItem {
+
+ GriloMsMediaObject parent;
+
+};
+
+typedef struct _GriloMsMediaItemClass GriloMsMediaItemClass;
+
+struct _GriloMsMediaItemClass {
+
+ GriloMsMediaObjectClass parent_class;
+};
+
+GType grilo_ms_media_item_get_type (void);
+
+GriloMsMediaItem *grilo_ms_media_item_new (GriloMsMediaObject *parent,
+ GrlMedia *media);
+
+#endif /* _GRILO_MS_MEDIA_ITEM_H_ */
diff --git a/src/rygel-grilo-media-object.c b/src/grilo-ms-media-object.c
similarity index 73%
rename from src/rygel-grilo-media-object.c
rename to src/grilo-ms-media-object.c
index 5426469..3fbedf6 100644
--- a/src/rygel-grilo-media-object.c
+++ b/src/grilo-ms-media-object.c
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2010 Igalia S.L.
+ * Copyright (C) 2010, 2011 Igalia S.L.
*
* Authors: Juan A. Suarez Romero <jasuarez igalia com>
*
@@ -22,11 +22,11 @@
#include <dbus/dbus-glib.h>
#include <string.h>
-#include "rygel-grilo-media-object.h"
-#include "rygel-grilo-media-object-glue.h"
+#include "grilo-ms-media-object.h"
+#include "grilo-ms-media-object-glue.h"
-#define RYGEL_GRILO_MEDIA_OBJECT_GET_PRIVATE(o) \
- G_TYPE_INSTANCE_GET_PRIVATE((o), RYGEL_GRILO_MEDIA_OBJECT_TYPE, RygelGriloMediaObjectPrivate)
+#define GRILO_MS_MEDIA_OBJECT_GET_PRIVATE(o) \
+ G_TYPE_INSTANCE_GET_PRIVATE((o), GRILO_MS_MEDIA_OBJECT_TYPE, GriloMsMediaObjectPrivate)
enum {
PROP_0,
@@ -39,32 +39,32 @@ enum {
};
/*
- * Private RygelGriloMediaObject
+ * Private GriloMsMediaObject
* dbus_path...: dbus path name where object is registered
* parent_path.: dbus path name where parent object is registered
* parent_media: parent object
* grl_media...: grilo media object being wrapped
*/
-struct _RygelGriloMediaObjectPrivate {
+struct _GriloMsMediaObjectPrivate {
gchar *dbus_path;
gchar *parent_path;
- RygelGriloMediaObject *parent_media;
+ GriloMsMediaObject *parent_media;
GrlMedia *grl_media;
};
-G_DEFINE_TYPE (RygelGriloMediaObject, rygel_grilo_media_object, G_TYPE_OBJECT);
+G_DEFINE_TYPE (GriloMsMediaObject, grilo_ms_media_object, G_TYPE_OBJECT);
-/* Function to get a property from a RygelGriloMediaObject object */
+/* Function to get a property from a GriloMsMediaObject object */
static void
-rygel_grilo_media_object_get_property (GObject *object,
- guint prop_id,
- GValue *value,
- GParamSpec *pspec)
+grilo_ms_media_object_get_property (GObject *object,
+ guint prop_id,
+ GValue *value,
+ GParamSpec *pspec)
{
GrlMediaPlugin *source;
GrlPluginRegistry *registry;
- RygelGriloMediaObject *self =
- RYGEL_GRILO_MEDIA_OBJECT (object);
+ GriloMsMediaObject *self =
+ GRILO_MS_MEDIA_OBJECT (object);
const gchar *name;
const gchar *source_id;
@@ -105,15 +105,15 @@ rygel_grilo_media_object_get_property (GObject *object,
}
}
-/* Function to set a property from a RygelGriloMediaObject object */
+/* Function to set a property from a GriloMsMediaObject object */
static void
-rygel_grilo_media_object_set_property (GObject *object,
- guint prop_id,
- const GValue *value,
- GParamSpec *pspec)
+grilo_ms_media_object_set_property (GObject *object,
+ guint prop_id,
+ const GValue *value,
+ GParamSpec *pspec)
{
- RygelGriloMediaObject *self =
- RYGEL_GRILO_MEDIA_OBJECT (object);
+ GriloMsMediaObject *self =
+ GRILO_MS_MEDIA_OBJECT (object);
switch (prop_id) {
case PROP_PARENT:
@@ -134,33 +134,33 @@ rygel_grilo_media_object_set_property (GObject *object,
}
}
-/* Dispose a RygelGriloMediaObject and its resources */
+/* Dispose a GriloMsMediaObject and its resources */
static void
-rygel_grilo_media_object_dispose (GObject *object)
+grilo_ms_media_object_dispose (GObject *object)
{
- RygelGriloMediaObject *self =
- RYGEL_GRILO_MEDIA_OBJECT (object);
+ GriloMsMediaObject *self =
+ GRILO_MS_MEDIA_OBJECT (object);
g_free (self->priv->parent_path);
g_free (self->priv->dbus_path);
g_object_unref (self->priv->grl_media);
- G_OBJECT_CLASS (rygel_grilo_media_object_parent_class)->dispose (object);
+ G_OBJECT_CLASS (grilo_ms_media_object_parent_class)->dispose (object);
}
/* Class init function */
static void
-rygel_grilo_media_object_class_init (RygelGriloMediaObjectClass *klass)
+grilo_ms_media_object_class_init (GriloMsMediaObjectClass *klass)
{
GObjectClass *object_class = G_OBJECT_CLASS (klass);
- g_type_class_add_private (klass, sizeof (RygelGriloMediaObjectPrivate));
+ g_type_class_add_private (klass, sizeof (GriloMsMediaObjectPrivate));
klass->index = 1;
- object_class->get_property = rygel_grilo_media_object_get_property;
- object_class->set_property = rygel_grilo_media_object_set_property;
- object_class->dispose = rygel_grilo_media_object_dispose;
+ object_class->get_property = grilo_ms_media_object_get_property;
+ object_class->set_property = grilo_ms_media_object_set_property;
+ object_class->dispose = grilo_ms_media_object_dispose;
g_object_class_install_property (object_class,
PROP_PARENT,
@@ -205,47 +205,47 @@ rygel_grilo_media_object_class_init (RygelGriloMediaObjectClass *klass)
g_param_spec_object ("parent-media",
"ParentMedia",
"MediaObject parent",
- RYGEL_GRILO_MEDIA_OBJECT_TYPE,
+ GRILO_MS_MEDIA_OBJECT_TYPE,
G_PARAM_READABLE |
G_PARAM_WRITABLE |
G_PARAM_CONSTRUCT_ONLY));
/* Register introspection */
- dbus_g_object_type_install_info (RYGEL_GRILO_MEDIA_OBJECT_TYPE,
- &dbus_glib_rygel_grilo_media_object_object_info);
+ dbus_g_object_type_install_info (GRILO_MS_MEDIA_OBJECT_TYPE,
+ &dbus_glib_grilo_ms_media_object_object_info);
}
/* Object init function */
static void
-rygel_grilo_media_object_init (RygelGriloMediaObject *obj)
+grilo_ms_media_object_init (GriloMsMediaObject *obj)
{
- obj->priv = RYGEL_GRILO_MEDIA_OBJECT_GET_PRIVATE (obj);
+ obj->priv = GRILO_MS_MEDIA_OBJECT_GET_PRIVATE (obj);
}
/**
- * rygel_grilo_media_object_get_dbus_path:
- * @obj: a RygelGrilo object
+ * grilo_ms_media_object_get_dbus_path:
+ * @obj: a GriloMs object
*
* Returns the path where the object is registered in dbus. Value shouldn't be modified.
*
* Returns: a dbus_path
**/
const gchar *
-rygel_grilo_media_object_get_dbus_path (RygelGriloMediaObject *obj)
+grilo_ms_media_object_get_dbus_path (GriloMsMediaObject *obj)
{
- return RYGEL_GRILO_MEDIA_OBJECT_GET_PRIVATE (obj)->dbus_path;
+ return GRILO_MS_MEDIA_OBJECT_GET_PRIVATE (obj)->dbus_path;
}
/**
- * rygel_grilo_media_object_dbus_register:
- * @obj: a RygelGrilo object
+ * grilo_ms_media_object_dbus_register:
+ * @obj: a GriloMs object
*
* Registers the object in dbus.
*
* Returns: @TRUE if object was registered
**/
gboolean
-rygel_grilo_media_object_dbus_register (RygelGriloMediaObject *obj)
+grilo_ms_media_object_dbus_register (GriloMsMediaObject *obj)
{
DBusGConnection *connection;
GError *error = NULL;
diff --git a/src/grilo-ms-media-object.h b/src/grilo-ms-media-object.h
new file mode 100644
index 0000000..a74eb99
--- /dev/null
+++ b/src/grilo-ms-media-object.h
@@ -0,0 +1,84 @@
+/*
+ * Copyright (C) 2010, 2011 Igalia S.L.
+ *
+ * Authors: Juan A. Suarez Romero <jasuarez igalia com>
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public License
+ * as published by the Free Software Foundation; version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This library 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
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA
+ *
+ */
+
+#ifndef _GRILO_MS_MEDIA_OBJECT_H_
+#define _GRILO_MS_MEDIA_OBJECT_H_
+
+#include <glib.h>
+#include <glib-object.h>
+#include <grilo.h>
+
+#define GRILO_MS_MEDIA_OBJECT_TYPE \
+ (grilo_ms_media_object_get_type ())
+
+#define GRILO_MS_MEDIA_OBJECT(obj) \
+ (G_TYPE_CHECK_INSTANCE_CAST ((obj), \
+ GRILO_MS_MEDIA_OBJECT_TYPE, \
+ GriloMsMediaObject))
+
+#define GRILO_MS_IS_MEDIA_OBJECT(obj) \
+ (G_TYPE_CHECK_INSTANCE_TYPE ((obj), \
+ GRILO_MS_MEDIA_OBJECT_TYPE))
+
+#define GRILO_MS_MEDIA_OBJECT_CLASS(klass) \
+ (G_TYPE_CHECK_CLASS_CAST((klass), \
+ GRILO_MS_MEDIA_OBJECT_TYPE, \
+ GriloMsMediaObjectClass))
+
+#define GRILO_MS_IS_MEDIA_OBJECT_CLASS(klass) \
+ (G_TYPE_CHECK_CLASS_TYPE((klass), \
+ GRILO_MS_MEDIA_OBJECT_TYPE))
+
+#define GRILO_MS_MEDIA_OBJECT_GET_CLASS(obj) \
+ (G_TYPE_INSTANCE_GET_CLASS ((obj), \
+ GRILO_MS_MEDIA_OBJECT_TYPE, \
+ GriloMsMediaObjectClass))
+
+typedef struct _GriloMsMediaObject GriloMsMediaObject;
+typedef struct _GriloMsMediaObjectPrivate GriloMsMediaObjectPrivate;
+struct _GriloMsMediaObject {
+
+ GObject parent;
+
+ /*< private >*/
+ GriloMsMediaObjectPrivate *priv;
+};
+
+typedef struct _GriloMsMediaObjectClass GriloMsMediaObjectClass;
+
+struct _GriloMsMediaObjectClass {
+
+ GObjectClass parent_class;
+
+ /*< private >*/
+ /* A unique number used to form the dbus path name where object is
+ registered */
+ guint index;
+};
+
+GType grilo_ms_media_object_get_type (void);
+
+gboolean grilo_ms_media_object_dbus_register (GriloMsMediaObject *obj);
+
+const gchar *grilo_ms_media_object_get_dbus_path (GriloMsMediaObject *obj);
+
+#endif /* _GRILO_MS_MEDIA_OBJECT_H_ */
diff --git a/src/rygel-grilo.c b/src/grilo-ms.c
similarity index 96%
rename from src/rygel-grilo.c
rename to src/grilo-ms.c
index c5cefc0..3155a67 100644
--- a/src/rygel-grilo.c
+++ b/src/grilo-ms.c
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2010 Igalia S.L.
+ * Copyright (C) 2010, 2011 Igalia S.L.
*
* Authors: Juan A. Suarez Romero <jasuarez igalia com>
*
@@ -24,10 +24,10 @@
#include <dbus/dbus-glib.h>
#include <dbus/dbus-glib-bindings.h>
-#include "rygel-grilo-media-container.h"
+#include "grilo-ms-media-container.h"
#undef G_LOG_DOMAIN
-#define G_LOG_DOMAIN "rygel-grilo"
+#define G_LOG_DOMAIN "grilo-ms"
#define ENTRY_POINT_SERVICE "org.gnome.UPnP.MediaServer1"
#define ENTRY_POINT_PATH "/org/gnome/UPnP/MediaServer1"
@@ -119,7 +119,7 @@ get_root_cb (GrlMediaSource *source,
gpointer user_data,
const GError *error)
{
- RygelGriloMediaContainer *rg;
+ GriloMsMediaContainer *gmc;
const gchar *name;
gchar *dbus_path = (gchar *) user_data;
@@ -129,9 +129,9 @@ get_root_cb (GrlMediaSource *source,
return;
}
- rg = rygel_grilo_media_container_new_root (dbus_path, media, limit);
- if (rg) {
- g_hash_table_insert (registered_sources, dbus_path, rg);
+ gmc = grilo_ms_media_container_new_root (dbus_path, media, limit);
+ if (gmc) {
+ g_hash_table_insert (registered_sources, dbus_path, gmc);
contents_provided =
g_list_prepend (contents_provided,
g_strdup (grl_metadata_source_get_name (GRL_METADATA_SOURCE (source))));
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]