summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorW. Michael Petullo <mike@flyn.org>2015-09-05 09:01:56 -0400
committerJuan A. Suarez Romero <jasuarez@igalia.com>2015-09-06 16:13:54 +0200
commitcf67ef3de46c0f6769f48619957a42f4c066cd6e (patch)
tree6f03fd7f801dda83d8714da5ab864314e5043f6a
parent19ff439107a1a338bcb52113bb1bd2612d2936d2 (diff)
downloadgrilo-plugins-cf67ef3de46c0f6769f48619957a42f4c066cd6e.tar.gz
dmap: Rename plugin to daap
https://bugzilla.gnome.org/show_bug.cgi?id=746722
-rw-r--r--configure.ac6
-rw-r--r--src/dmap/Makefile.am32
-rw-r--r--src/dmap/grl-daap-db.c (renamed from src/dmap/simple-dmap-db.c)104
-rw-r--r--src/dmap/grl-daap-db.h92
-rw-r--r--src/dmap/grl-daap-record-factory.c (renamed from src/dmap/simple-daap-record-factory.c)24
-rw-r--r--src/dmap/grl-daap-record-factory.h (renamed from src/dmap/simple-daap-record-factory.h)22
-rw-r--r--src/dmap/grl-daap-record.c (renamed from src/dmap/simple-daap-record.c)50
-rw-r--r--src/dmap/grl-daap-record.h (renamed from src/dmap/simple-daap-record.h)26
-rw-r--r--src/dmap/grl-daap.c (renamed from src/dmap/grl-dmap.c)128
-rw-r--r--src/dmap/grl-daap.h (renamed from src/dmap/grl-dmap.h)50
-rw-r--r--src/dmap/grl-daap.xml (renamed from src/dmap/grl-dmap.xml)4
-rw-r--r--src/dmap/simple-dmap-db.h92
12 files changed, 315 insertions, 315 deletions
diff --git a/configure.ac b/configure.ac
index 7112cf1..0d1bfaa 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1075,9 +1075,9 @@ then
GRL_PLUGINS_ENABLED="$GRL_PLUGINS_ENABLED dmap"
fi
-DMAP_PLUGIN_ID="grl-dmap"
-AC_SUBST(DMAP_PLUGIN_ID)
-AC_DEFINE_UNQUOTED([DMAP_PLUGIN_ID], ["$DMAP_PLUGIN_ID"], [DMAP plugin ID])
+DAAP_PLUGIN_ID="grl-daap"
+AC_SUBST(DAAP_PLUGIN_ID)
+AC_DEFINE_UNQUOTED([DAAP_PLUGIN_ID], ["$DAAP_PLUGIN_ID"], [DAAP plugin ID])
DEPS_DMAP_CFLAGS="$DEPS_CFLAGS $DMAP_CFLAGS $XML_CFLAGS"
AC_SUBST(DEPS_DMAP_CFLAGS)
diff --git a/src/dmap/Makefile.am b/src/dmap/Makefile.am
index 44261a4..6a00155 100644
--- a/src/dmap/Makefile.am
+++ b/src/dmap/Makefile.am
@@ -7,35 +7,35 @@
include $(top_srcdir)/gtester.mk
-ext_LTLIBRARIES = libgrldmap.la
+ext_LTLIBRARIES = libgrldaap.la
-libgrldmap_la_CFLAGS = \
+libgrldaap_la_CFLAGS = \
$(DEPS_DMAP_CFLAGS) \
-DG_LOG_DOMAIN=\"GrlDmap\" \
-DLOCALEDIR=\"$(localedir)\"
-libgrldmap_la_LIBADD = \
+libgrldaap_la_LIBADD = \
$(DEPS_DMAP_LIBS)
-libgrldmap_la_LDFLAGS = \
+libgrldaap_la_LDFLAGS = \
-no-undefined \
-module \
-avoid-version
-libgrldmap_la_SOURCES = \
- grl-dmap.c \
- grl-dmap.h \
- simple-daap-record.c \
- simple-daap-record.h \
- simple-daap-record-factory.c \
- simple-daap-record-factory.h \
- simple-dmap-db.c \
- simple-dmap-db.h
+libgrldaap_la_SOURCES = \
+ grl-daap.c \
+ grl-daap.h \
+ grl-daap-record.c \
+ grl-daap-record.h \
+ grl-daap-record-factory.c \
+ grl-daap-record-factory.h \
+ grl-daap-db.c \
+ grl-daap-db.h
extdir = $(GRL_PLUGINS_DIR)
-dmapxmldir = $(GRL_PLUGINS_DIR)
-dmapxml_DATA = $(DMAP_PLUGIN_ID).xml
+daapxmldir = $(GRL_PLUGINS_DIR)
+daapxml_DATA = $(DAAP_PLUGIN_ID).xml
-EXTRA_DIST += $(dmapxml_DATA)
+EXTRA_DIST += $(daapxml_DATA)
-include $(top_srcdir)/git.mk
diff --git a/src/dmap/simple-dmap-db.c b/src/dmap/grl-daap-db.c
index 2ec8c22..5ddd40c 100644
--- a/src/dmap/simple-dmap-db.c
+++ b/src/dmap/grl-daap-db.c
@@ -18,18 +18,18 @@
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
*/
-/* This DMAP database implementation maintains a series of hash tables that
+/* This DAAP database implementation maintains a series of hash tables that
* represent sets of media. The tables include: root, albums, and artists.
* Root contains albums and artists, and albums and artists each contain
* the set of albums and artists in the database, respectively. Thus this
- * database implementation imposes a hierarchical structure, whereas DMAP
+ * database implementation imposes a hierarchical structure, whereas DAAP
* normally provides a flat structure.
*
* Each hash table/set is a mapping between a GrlMediaBox and a series of
* GrlMedia objects (either more GrlMediaBox objects, or, in the case of a
* leaf, GrlMediaAudio objects). The constant GrlMediaBox objects (e.g.,
* albums_box and artists_box) facilitate this, along with additional
- * GrlMediaAudio objects that the simple_dmap_db_add function creates.
+ * GrlMediaAudio objects that the grl_daap_db_add function creates.
*
* An application will normally first browse using the NULL container,
* and thus will first receive albums_box and artists_box. Browsing
@@ -56,7 +56,7 @@
#include <glib.h>
#include <string.h>
-#include "simple-dmap-db.h"
+#include "grl-daap-db.h"
#define ALBUMS_ID "albums"
#define ALBUMS_NAME _("Albums")
@@ -66,7 +66,7 @@
/* Media ID's start at max and go down. Container ID's start at 1 and go up. */
static guint nextid = G_MAXINT; /* NOTE: this should be G_MAXUINT, but iPhoto can't handle it. */
-struct SimpleDMAPDbPrivate {
+struct GrlDAAPDbPrivate {
/* Contains each album box (tracked with albums hash table) */
GrlMediaBox *albums_box;
@@ -95,23 +95,23 @@ box_equal (gconstpointer a, gconstpointer b)
return g_str_equal (grl_media_get_id (GRL_MEDIA (a)), grl_media_get_id (GRL_MEDIA (b)));
}
-SimpleDMAPDb *
-simple_dmap_db_new (void)
+GrlDAAPDb *
+grl_daap_db_new (void)
{
- SimpleDMAPDb *db = g_object_new (TYPE_SIMPLE_DMAP_DB, NULL);
+ GrlDAAPDb *db = g_object_new (TYPE_GRL_DAAP_DB, NULL);
return db;
}
static DMAPRecord *
-simple_dmap_db_lookup_by_id (const DMAPDb *db, guint id)
+grl_daap_db_lookup_by_id (const DMAPDb *db, guint id)
{
g_error ("Not implemented");
return NULL;
}
static void
-simple_dmap_db_foreach (const DMAPDb *db,
+grl_daap_db_foreach (const DMAPDb *db,
GHFunc func,
gpointer data)
{
@@ -119,7 +119,7 @@ simple_dmap_db_foreach (const DMAPDb *db,
}
static gint64
-simple_dmap_db_count (const DMAPDb *db)
+grl_daap_db_count (const DMAPDb *db)
{
g_error ("Not implemented");
return 0;
@@ -151,9 +151,9 @@ set_insert (GHashTable *category, const char *category_name, char *set_name, Grl
}
static guint
-simple_dmap_db_add (DMAPDb *_db, DMAPRecord *record)
+grl_daap_db_add (DMAPDb *_db, DMAPRecord *record)
{
- SimpleDMAPDb *db = SIMPLE_DMAP_DB (_db);
+ GrlDAAPDb *db = GRL_DAAP_DB (_db);
gint duration = 0;
gint32 bitrate = 0,
track = 0;
@@ -237,16 +237,16 @@ simple_dmap_db_add (DMAPDb *_db, DMAPRecord *record)
}
static void
-simple_dmap_db_interface_init (gpointer iface, gpointer data)
+grl_daap_db_interface_init (gpointer iface, gpointer data)
{
- DMAPDbIface *dmap_db = iface;
+ DMAPDbIface *daap_db = iface;
- g_assert (G_TYPE_FROM_INTERFACE (dmap_db) == DMAP_TYPE_DB);
+ g_assert (G_TYPE_FROM_INTERFACE (daap_db) == DMAP_TYPE_DB);
- dmap_db->add = simple_dmap_db_add;
- dmap_db->lookup_by_id = simple_dmap_db_lookup_by_id;
- dmap_db->foreach = simple_dmap_db_foreach;
- dmap_db->count = simple_dmap_db_count;
+ daap_db->add = grl_daap_db_add;
+ daap_db->lookup_by_id = grl_daap_db_lookup_by_id;
+ daap_db->foreach = grl_daap_db_foreach;
+ daap_db->count = grl_daap_db_count;
}
static gboolean
@@ -256,14 +256,14 @@ same_media (GrlMedia *a, GrlMedia *b)
}
void
-simple_dmap_db_browse (SimpleDMAPDb *db,
- GrlMedia *container,
- GrlSource *source,
- guint op_id,
- guint skip,
- guint count,
- GrlSourceResultCb func,
- gpointer user_data)
+grl_daap_db_browse (GrlDAAPDb *db,
+ GrlMedia *container,
+ GrlSource *source,
+ guint op_id,
+ guint skip,
+ guint count,
+ GrlSourceResultCb func,
+ gpointer user_data)
{
int i;
guint remaining;
@@ -313,13 +313,13 @@ done:
}
void
-simple_dmap_db_search (SimpleDMAPDb *db,
- GrlSource *source,
- guint op_id,
- GHRFunc predicate,
- gpointer pred_user_data,
- GrlSourceResultCb func,
- gpointer user_data)
+grl_daap_db_search (GrlDAAPDb *db,
+ GrlSource *source,
+ guint op_id,
+ GHRFunc predicate,
+ gpointer pred_user_data,
+ GrlSourceResultCb func,
+ gpointer user_data)
{
gint i, j, k;
guint remaining = 0;
@@ -360,23 +360,23 @@ simple_dmap_db_search (SimpleDMAPDb *db,
}
}
-G_DEFINE_TYPE_WITH_CODE (SimpleDMAPDb, simple_dmap_db, G_TYPE_OBJECT,
- G_IMPLEMENT_INTERFACE (DMAP_TYPE_DB, simple_dmap_db_interface_init))
+G_DEFINE_TYPE_WITH_CODE (GrlDAAPDb, grl_daap_db, G_TYPE_OBJECT,
+ G_IMPLEMENT_INTERFACE (DMAP_TYPE_DB, grl_daap_db_interface_init))
static GObject*
-simple_dmap_db_constructor (GType type, guint n_construct_params, GObjectConstructParam *construct_params)
+grl_daap_db_constructor (GType type, guint n_construct_params, GObjectConstructParam *construct_params)
{
GObject *object;
- object = G_OBJECT_CLASS (simple_dmap_db_parent_class)->constructor (type, n_construct_params, construct_params);
+ object = G_OBJECT_CLASS (grl_daap_db_parent_class)->constructor (type, n_construct_params, construct_params);
return object;
}
static void
-simple_dmap_db_init (SimpleDMAPDb *db)
+grl_daap_db_init (GrlDAAPDb *db)
{
- db->priv = SIMPLE_DMAP_DB_GET_PRIVATE (db);
+ db->priv = GRL_DAAP_DB_GET_PRIVATE (db);
db->priv->albums_box = g_object_new (GRL_TYPE_MEDIA_BOX, NULL);
db->priv->artists_box = g_object_new (GRL_TYPE_MEDIA_BOX, NULL);
@@ -396,11 +396,11 @@ simple_dmap_db_init (SimpleDMAPDb *db)
}
static void
-simple_dmap_db_finalize (GObject *object)
+grl_daap_db_finalize (GObject *object)
{
- SimpleDMAPDb *db = SIMPLE_DMAP_DB (object);
+ GrlDAAPDb *db = GRL_DAAP_DB (object);
- GRL_DEBUG ("Finalizing SimpleDMAPDb");
+ GRL_DEBUG ("Finalizing GrlDAAPDb");
g_object_unref (db->priv->albums_box);
g_object_unref (db->priv->artists_box);
@@ -410,7 +410,7 @@ simple_dmap_db_finalize (GObject *object)
}
static void
-simple_dmap_db_set_property (GObject *object,
+grl_daap_db_set_property (GObject *object,
guint prop_id,
const GValue *value,
GParamSpec *pspec)
@@ -423,7 +423,7 @@ simple_dmap_db_set_property (GObject *object,
}
static void
-simple_dmap_db_get_property (GObject *object,
+grl_daap_db_get_property (GObject *object,
guint prop_id,
GValue *value,
GParamSpec *pspec)
@@ -437,14 +437,14 @@ simple_dmap_db_get_property (GObject *object,
static void
-simple_dmap_db_class_init (SimpleDMAPDbClass *klass)
+grl_daap_db_class_init (GrlDAAPDbClass *klass)
{
GObjectClass *object_class = G_OBJECT_CLASS (klass);
- g_type_class_add_private (klass, sizeof (SimpleDMAPDbPrivate));
+ g_type_class_add_private (klass, sizeof (GrlDAAPDbPrivate));
- object_class->finalize = simple_dmap_db_finalize;
- object_class->constructor = simple_dmap_db_constructor;
- object_class->set_property = simple_dmap_db_set_property;
- object_class->get_property = simple_dmap_db_get_property;
+ object_class->finalize = grl_daap_db_finalize;
+ object_class->constructor = grl_daap_db_constructor;
+ object_class->set_property = grl_daap_db_set_property;
+ object_class->get_property = grl_daap_db_get_property;
}
diff --git a/src/dmap/grl-daap-db.h b/src/dmap/grl-daap-db.h
new file mode 100644
index 0000000..f52a9b5
--- /dev/null
+++ b/src/dmap/grl-daap-db.h
@@ -0,0 +1,92 @@
+/*
+ * Database class for DAAP sharing
+ *
+ * Copyright (C) 2008 W. Michael Petullo <mike@flyn.org>
+ *
+ * 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; either
+ * 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 __GRL_DAAP_DB
+#define __GRL_DAAP_DB
+
+#include <libdmapsharing/dmap.h>
+#include <grilo.h>
+
+G_BEGIN_DECLS
+
+#define TYPE_GRL_DAAP_DB \
+ (grl_daap_db_get_type ())
+
+#define GRL_DAAP_DB(o) \
+ (G_TYPE_CHECK_INSTANCE_CAST ((o), \
+ TYPE_GRL_DAAP_DB, \
+ GrlDAAPDb))
+
+#define GRL_DAAP_DB_CLASS(k) \
+ (G_TYPE_CHECK_CLASS_CAST((k), \
+ TYPE_GRL_DAAP_DB, \
+ GrlDAAPDbClass))
+#define IS_GRL_DAAP_DB(o) \
+ (G_TYPE_CHECK_INSTANCE_TYPE((o), \
+ TYPE_GRL_DAAP_DB))
+#define IS_GRL_DAAP_DB_CLASS(k) \
+ (G_TYPE_CHECK_CLASS_TYPE((k), \
+ TYPE_GRL_DAAP_DB_CLASS))
+
+#define GRL_DAAP_DB_GET_CLASS(o) \
+ (G_TYPE_INSTANCE_GET_CLASS((o), \
+ TYPE_GRL_DAAP_DB, \
+ GrlDAAPDbClass))
+
+#define GRL_DAAP_DB_GET_PRIVATE(o) \
+ (G_TYPE_INSTANCE_GET_PRIVATE((o), \
+ TYPE_GRL_DAAP_DB, \
+ GrlDAAPDbPrivate))
+
+typedef struct GrlDAAPDbPrivate GrlDAAPDbPrivate;
+
+typedef struct {
+ GObject parent;
+ GrlDAAPDbPrivate *priv;
+} GrlDAAPDb;
+
+typedef struct {
+ GObjectClass parent;
+} GrlDAAPDbClass;
+
+void grl_daap_db_browse (GrlDAAPDb *db,
+ GrlMedia *container,
+ GrlSource *source,
+ guint op_id,
+ guint skip,
+ guint count,
+ GrlSourceResultCb func,
+ gpointer user_data);
+
+void grl_daap_db_search (GrlDAAPDb *db,
+ GrlSource *source,
+ guint op_id,
+ GHRFunc predicate,
+ gpointer pred_user_data,
+ GrlSourceResultCb func,
+ gpointer user_data);
+
+GrlDAAPDb *grl_daap_db_new (void);
+
+GType grl_daap_db_get_type (void);
+
+#endif /* __GRL_DAAP_DB */
+
+G_END_DECLS
diff --git a/src/dmap/simple-daap-record-factory.c b/src/dmap/grl-daap-record-factory.c
index 7f4ac6d..e986394 100644
--- a/src/dmap/simple-daap-record-factory.c
+++ b/src/dmap/grl-daap-record-factory.c
@@ -18,41 +18,41 @@
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
*/
-#include "simple-daap-record-factory.h"
-#include "simple-daap-record.h"
+#include "grl-daap-record-factory.h"
+#include "grl-daap-record.h"
DMAPRecord *
-simple_daap_record_factory_create (DMAPRecordFactory *factory, gpointer user_data)
+grl_daap_record_factory_create (DMAPRecordFactory *factory, gpointer user_data)
{
- return DMAP_RECORD (simple_daap_record_new ());
+ return DMAP_RECORD (grl_daap_record_new ());
}
static void
-simple_daap_record_factory_init (SimpleDAAPRecordFactory *factory)
+grl_daap_record_factory_init (GrlDAAPRecordFactory *factory)
{
}
static void
-simple_daap_record_factory_class_init (SimpleDAAPRecordFactoryClass *klass)
+grl_daap_record_factory_class_init (GrlDAAPRecordFactoryClass *klass)
{
}
static void
-simple_daap_record_factory_interface_init (gpointer iface, gpointer data)
+grl_daap_record_factory_interface_init (gpointer iface, gpointer data)
{
DMAPRecordFactoryIface *factory = iface;
g_assert (G_TYPE_FROM_INTERFACE (factory) == DMAP_TYPE_RECORD_FACTORY);
- factory->create = simple_daap_record_factory_create;
+ factory->create = grl_daap_record_factory_create;
}
-G_DEFINE_TYPE_WITH_CODE (SimpleDAAPRecordFactory, simple_daap_record_factory, G_TYPE_OBJECT,
+G_DEFINE_TYPE_WITH_CODE (GrlDAAPRecordFactory, grl_daap_record_factory, G_TYPE_OBJECT,
G_IMPLEMENT_INTERFACE (DMAP_TYPE_RECORD_FACTORY,
- simple_daap_record_factory_interface_init))
+ grl_daap_record_factory_interface_init))
-SimpleDAAPRecordFactory *
-simple_daap_record_factory_new (void)
+GrlDAAPRecordFactory *
+grl_daap_record_factory_new (void)
{
return SIMPLE_DAAP_RECORD_FACTORY (g_object_new (TYPE_SIMPLE_DAAP_RECORD_FACTORY, NULL));
}
diff --git a/src/dmap/simple-daap-record-factory.h b/src/dmap/grl-daap-record-factory.h
index c94e1b5..514713a 100644
--- a/src/dmap/simple-daap-record-factory.h
+++ b/src/dmap/grl-daap-record-factory.h
@@ -1,5 +1,5 @@
/*
- * SimpleDAAPRecord factory class
+ * GrlDAAPRecord factory class
*
* Copyright (C) 2008 W. Michael Petullo <mike@flyn.org>
*
@@ -26,17 +26,17 @@
G_BEGIN_DECLS
#define TYPE_SIMPLE_DAAP_RECORD_FACTORY \
- (simple_daap_record_factory_get_type ())
+ (grl_daap_record_factory_get_type ())
#define SIMPLE_DAAP_RECORD_FACTORY(o) \
(G_TYPE_CHECK_INSTANCE_CAST((o), \
TYPE_SIMPLE_DAAP_RECORD_FACTORY, \
- SimpleDAAPRecordFactory))
+ GrlDAAPRecordFactory))
#define SIMPLE_DAAP_RECORD_FACTORY_CLASS(k) \
(G_TYPE_CHECK_CLASS_CAST((k), \
TYPE_SIMPLE_DAAP_RECORD_FACTORY, \
- SimpleDAAPRecordFactoryClass))
+ GrlDAAPRecordFactoryClass))
#define IS_SIMPLE_DAAP_RECORD_FACTORY(o) \
(G_TYPE_CHECK_INSTANCE_TYPE((o), \
@@ -49,23 +49,23 @@ G_BEGIN_DECLS
#define SIMPLE_DAAP_RECORD_FACTORY_GET_CLASS(o) \
(G_TYPE_INSTANCE_GET_CLASS((o), \
TYPE_SIMPLE_DAAP_RECORD_FACTORY, \
- SimpleDAAPRecordFactoryClass))
+ GrlDAAPRecordFactoryClass))
-typedef struct SimpleDAAPRecordFactoryPrivate SimpleDAAPRecordFactoryPrivate;
+typedef struct GrlDAAPRecordFactoryPrivate GrlDAAPRecordFactoryPrivate;
typedef struct {
GObject parent;
-} SimpleDAAPRecordFactory;
+} GrlDAAPRecordFactory;
typedef struct {
GObjectClass parent;
-} SimpleDAAPRecordFactoryClass;
+} GrlDAAPRecordFactoryClass;
-GType simple_daap_record_factory_get_type (void);
+GType grl_daap_record_factory_get_type (void);
-SimpleDAAPRecordFactory *simple_daap_record_factory_new (void);
+GrlDAAPRecordFactory *grl_daap_record_factory_new (void);
-DMAPRecord *simple_daap_record_factory_create (DMAPRecordFactory *factory, gpointer user_data);
+DMAPRecord *grl_daap_record_factory_create (DMAPRecordFactory *factory, gpointer user_data);
#endif /* __SIMPLE_DAAP_RECORD_FACTORY */
diff --git a/src/dmap/simple-daap-record.c b/src/dmap/grl-daap-record.c
index 1630fc1..bbc7243 100644
--- a/src/dmap/simple-daap-record.c
+++ b/src/dmap/grl-daap-record.c
@@ -20,9 +20,9 @@
*
*/
-#include "simple-daap-record.h"
+#include "grl-daap-record.h"
-struct SimpleDAAPRecordPrivate {
+struct GrlDAAPRecordPrivate {
guint64 filesize;
char *location;
char *format;
@@ -68,12 +68,12 @@ enum {
};
static void
-simple_daap_record_set_property (GObject *object,
+grl_daap_record_set_property (GObject *object,
guint prop_id,
const GValue *value,
GParamSpec *pspec)
{
- SimpleDAAPRecord *record = SIMPLE_DAAP_RECORD (object);
+ GrlDAAPRecord *record = SIMPLE_DAAP_RECORD (object);
switch (prop_id) {
case PROP_LOCATION:
@@ -150,12 +150,12 @@ simple_daap_record_set_property (GObject *object,
}
static void
-simple_daap_record_get_property (GObject *object,
+grl_daap_record_get_property (GObject *object,
guint prop_id,
GValue *value,
GParamSpec *pspec)
{
- SimpleDAAPRecord *record = SIMPLE_DAAP_RECORD (object);
+ GrlDAAPRecord *record = SIMPLE_DAAP_RECORD (object);
switch (prop_id) {
case PROP_LOCATION:
@@ -223,14 +223,14 @@ simple_daap_record_get_property (GObject *object,
}
}
-SimpleDAAPRecord *
-simple_daap_record_new (void)
+GrlDAAPRecord *
+grl_daap_record_new (void)
{
return SIMPLE_DAAP_RECORD (g_object_new (TYPE_SIMPLE_DAAP_RECORD, NULL));
}
GInputStream *
-simple_daap_record_read (DAAPRecord *record, GError **error)
+grl_daap_record_read (DAAPRecord *record, GError **error)
{
GFile *file;
GInputStream *stream;
@@ -244,23 +244,23 @@ simple_daap_record_read (DAAPRecord *record, GError **error)
}
static void
-simple_daap_record_init (SimpleDAAPRecord *record)
+grl_daap_record_init (GrlDAAPRecord *record)
{
record->priv = SIMPLE_DAAP_RECORD_GET_PRIVATE (record);
}
-static void simple_daap_record_finalize (GObject *object);
+static void grl_daap_record_finalize (GObject *object);
static void
-simple_daap_record_class_init (SimpleDAAPRecordClass *klass)
+grl_daap_record_class_init (GrlDAAPRecordClass *klass)
{
GObjectClass *gobject_class = G_OBJECT_CLASS (klass);
- g_type_class_add_private (klass, sizeof (SimpleDAAPRecordPrivate));
+ g_type_class_add_private (klass, sizeof (GrlDAAPRecordPrivate));
- gobject_class->set_property = simple_daap_record_set_property;
- gobject_class->get_property = simple_daap_record_get_property;
- gobject_class->finalize = simple_daap_record_finalize;
+ gobject_class->set_property = grl_daap_record_set_property;
+ gobject_class->get_property = grl_daap_record_get_property;
+ gobject_class->finalize = grl_daap_record_finalize;
g_object_class_override_property (gobject_class, PROP_LOCATION, "location");
g_object_class_override_property (gobject_class, PROP_TITLE, "title");
@@ -284,17 +284,17 @@ simple_daap_record_class_init (SimpleDAAPRecordClass *klass)
}
static void
-simple_daap_record_daap_iface_init (gpointer iface, gpointer data)
+grl_daap_record_daap_iface_init (gpointer iface, gpointer data)
{
DAAPRecordIface *daap_record = iface;
g_assert (G_TYPE_FROM_INTERFACE (daap_record) == DAAP_TYPE_RECORD);
- daap_record->read = simple_daap_record_read;
+ daap_record->read = grl_daap_record_read;
}
static void
-simple_daap_record_dmap_iface_init (gpointer iface, gpointer data)
+grl_daap_record_dmap_iface_init (gpointer iface, gpointer data)
{
DMAPRecordIface *dmap_record = iface;
@@ -302,14 +302,14 @@ simple_daap_record_dmap_iface_init (gpointer iface, gpointer data)
}
-G_DEFINE_TYPE_WITH_CODE (SimpleDAAPRecord, simple_daap_record, G_TYPE_OBJECT,
- G_IMPLEMENT_INTERFACE (DAAP_TYPE_RECORD, simple_daap_record_daap_iface_init)
- G_IMPLEMENT_INTERFACE (DMAP_TYPE_RECORD, simple_daap_record_dmap_iface_init))
+G_DEFINE_TYPE_WITH_CODE (GrlDAAPRecord, grl_daap_record, G_TYPE_OBJECT,
+ G_IMPLEMENT_INTERFACE (DAAP_TYPE_RECORD, grl_daap_record_daap_iface_init)
+ G_IMPLEMENT_INTERFACE (DMAP_TYPE_RECORD, grl_daap_record_dmap_iface_init))
static void
-simple_daap_record_finalize (GObject *object)
+grl_daap_record_finalize (GObject *object)
{
- SimpleDAAPRecord *record = SIMPLE_DAAP_RECORD (object);
+ GrlDAAPRecord *record = SIMPLE_DAAP_RECORD (object);
g_free (record->priv->location);
g_free (record->priv->title);
@@ -320,5 +320,5 @@ simple_daap_record_finalize (GObject *object)
g_free (record->priv->genre);
g_free (record->priv->format);
- G_OBJECT_CLASS (simple_daap_record_parent_class)->finalize (object);
+ G_OBJECT_CLASS (grl_daap_record_parent_class)->finalize (object);
}
diff --git a/src/dmap/simple-daap-record.h b/src/dmap/grl-daap-record.h
index fb4735b..59558c4 100644
--- a/src/dmap/simple-daap-record.h
+++ b/src/dmap/grl-daap-record.h
@@ -26,17 +26,17 @@
G_BEGIN_DECLS
#define TYPE_SIMPLE_DAAP_RECORD \
- (simple_daap_record_get_type ())
+ (grl_daap_record_get_type ())
#define SIMPLE_DAAP_RECORD(o) \
(G_TYPE_CHECK_INSTANCE_CAST((o), \
TYPE_SIMPLE_DAAP_RECORD, \
- SimpleDAAPRecord))
+ GrlDAAPRecord))
#define SIMPLE_DAAP_RECORD_CLASS(k) \
(G_TYPE_CHECK_CLASS_CAST((k), \
TYPE_SIMPLE_DAAP_RECORD, \
- SimpleDAAPRecordClass))
+ GrlDAAPRecordClass))
#define IS_SIMPLE_DAAP_RECORD(o) \
(G_TYPE_CHECK_INSTANCE_TYPE((o), \
@@ -49,29 +49,29 @@ G_BEGIN_DECLS
#define SIMPLE_DAAP_RECORD_GET_CLASS(o) \
(G_TYPE_INSTANCE_GET_CLASS((o), \
TYPE_SIMPLE_DAAP_RECORD, \
- SimpleDAAPRecordClass))
+ GrlDAAPRecordClass))
#define SIMPLE_DAAP_RECORD_GET_PRIVATE(o) \
(G_TYPE_INSTANCE_GET_PRIVATE((o), \
TYPE_SIMPLE_DAAP_RECORD, \
- SimpleDAAPRecordPrivate))
+ GrlDAAPRecordPrivate))
-typedef struct SimpleDAAPRecordPrivate SimpleDAAPRecordPrivate;
+typedef struct GrlDAAPRecordPrivate GrlDAAPRecordPrivate;
typedef struct {
GObject parent;
- SimpleDAAPRecordPrivate *priv;
-} SimpleDAAPRecord;
+ GrlDAAPRecordPrivate *priv;
+} GrlDAAPRecord;
typedef struct {
GObjectClass parent;
-} SimpleDAAPRecordClass;
+} GrlDAAPRecordClass;
-GType simple_daap_record_get_type (void);
+GType grl_daap_record_get_type (void);
-SimpleDAAPRecord *simple_daap_record_new (void);
-GInputStream *simple_daap_record_read (DAAPRecord *record, GError **error);
-gint simple_daap_record_get_id (DAAPRecord *record);
+GrlDAAPRecord *grl_daap_record_new (void);
+GInputStream *grl_daap_record_read (DAAPRecord *record, GError **error);
+gint grl_daap_record_get_id (DAAPRecord *record);
#endif /* __SIMPLE_DAAP_RECORD */
diff --git a/src/dmap/grl-dmap.c b/src/dmap/grl-daap.c
index 0cb17c5..0142bf7 100644
--- a/src/dmap/grl-dmap.c
+++ b/src/dmap/grl-daap.c
@@ -33,31 +33,31 @@
#include <stdlib.h>
#include <libdmapsharing/dmap.h>
-#include "grl-dmap.h"
-#include "simple-dmap-db.h"
-#include "simple-daap-record.h"
-#include "simple-daap-record-factory.h"
+#include "grl-daap.h"
+#include "grl-daap-db.h"
+#include "grl-daap-record.h"
+#include "grl-daap-record-factory.h"
/* --------- Logging -------- */
-#define GRL_LOG_DOMAIN_DEFAULT dmap_log_domain
-GRL_LOG_DOMAIN_STATIC(dmap_log_domain);
+#define GRL_LOG_DOMAIN_DEFAULT daap_log_domain
+GRL_LOG_DOMAIN_STATIC(daap_log_domain);
/* --- Plugin information --- */
-#define PLUGIN_ID DMAP_PLUGIN_ID
+#define PLUGIN_ID DAAP_PLUGIN_ID
-#define SOURCE_ID_TEMPLATE "grl-dmap-%s"
-#define SOURCE_DESC_TEMPLATE _("A source for browsing the DMAP server '%s'")
+#define SOURCE_ID_TEMPLATE "grl-daap-%s"
+#define SOURCE_DESC_TEMPLATE _("A source for browsing the DAAP server '%s'")
-/* --- Grilo DMAP Private --- */
+/* --- Grilo DAAP Private --- */
-#define GRL_DMAP_SOURCE_GET_PRIVATE(object) \
+#define GRL_DAAP_SOURCE_GET_PRIVATE(object) \
(G_TYPE_INSTANCE_GET_PRIVATE((object), \
- GRL_DMAP_SOURCE_TYPE, \
- GrlDmapSourcePrivate))
+ GRL_DAAP_SOURCE_TYPE, \
+ GrlDaapSourcePrivate))
-struct _GrlDmapSourcePrivate {
+struct _GrlDaapSourcePrivate {
DMAPMdnsBrowserService *service;
};
@@ -77,23 +77,23 @@ typedef struct _ResultCbAndArgs {
typedef struct _ResultCbAndArgsAndDb {
ResultCbAndArgs cb;
- SimpleDMAPDb *db;
+ GrlDAAPDb *db;
} ResultCbAndArgsAndDb;
-static GrlDmapSource *grl_dmap_source_new (DMAPMdnsBrowserService *service);
+static GrlDaapSource *grl_daap_source_new (DMAPMdnsBrowserService *service);
-static void grl_dmap_source_finalize (GObject *object);
+static void grl_daap_source_finalize (GObject *object);
-gboolean grl_dmap_plugin_init (GrlRegistry *registry,
+gboolean grl_daap_plugin_init (GrlRegistry *registry,
GrlPlugin *plugin,
GList *configs);
-static const GList *grl_dmap_source_supported_keys (GrlSource *source);
+static const GList *grl_daap_source_supported_keys (GrlSource *source);
-static void grl_dmap_source_browse (GrlSource *source,
+static void grl_daap_source_browse (GrlSource *source,
GrlSourceBrowseSpec *bs);
-static void grl_dmap_source_search (GrlSource *source,
+static void grl_daap_source_search (GrlSource *source,
GrlSourceSearchSpec *ss);
@@ -109,21 +109,21 @@ static void service_removed_cb (DMAPMdnsBrowser *browser,
static DMAPMdnsBrowser *browser;
/* Maps URIs to DBs */
static GHashTable *connections;
-/* Map DMAP services to Grilo media sources */
+/* Map DAAP services to Grilo media sources */
static GHashTable *sources;
-/* =================== DMAP Plugin ====================== */
+/* =================== DAAP Plugin ====================== */
gboolean
-grl_dmap_plugin_init (GrlRegistry *registry,
+grl_daap_plugin_init (GrlRegistry *registry,
GrlPlugin *plugin,
GList *configs)
{
GError *error = NULL;
- GRL_LOG_DOMAIN_INIT (dmap_log_domain, "dmap");
+ GRL_LOG_DOMAIN_INIT (daap_log_domain, "daap");
- GRL_DEBUG ("dmap_plugin_init");
+ GRL_DEBUG ("daap_plugin_init");
/* Initialize i18n */
bindtextdomain (GETTEXT_PACKAGE, LOCALEDIR);
@@ -158,30 +158,30 @@ grl_dmap_plugin_init (GrlRegistry *registry,
return TRUE;
}
-GRL_PLUGIN_REGISTER (grl_dmap_plugin_init,
+GRL_PLUGIN_REGISTER (grl_daap_plugin_init,
NULL,
PLUGIN_ID);
-/* ================== DMAP GObject ====================== */
+/* ================== DAAP GObject ====================== */
-G_DEFINE_TYPE (GrlDmapSource,
- grl_dmap_source,
+G_DEFINE_TYPE (GrlDaapSource,
+ grl_daap_source,
GRL_TYPE_SOURCE);
-static GrlDmapSource *
-grl_dmap_source_new (DMAPMdnsBrowserService *service)
+static GrlDaapSource *
+grl_daap_source_new (DMAPMdnsBrowserService *service)
{
gchar *source_desc;
gchar *source_id;
- GrlDmapSource *source;
+ GrlDaapSource *source;
- GRL_DEBUG ("grl_dmap_source_new");
+ GRL_DEBUG ("grl_daap_source_new");
source_desc = g_strdup_printf (SOURCE_DESC_TEMPLATE, service->name);
source_id = g_strdup_printf (SOURCE_ID_TEMPLATE, service->name);
- source = g_object_new (GRL_DMAP_SOURCE_TYPE,
+ source = g_object_new (GRL_DAAP_SOURCE_TYPE,
"source-id", source_id,
"source-name", service->name,
"source-desc", source_desc,
@@ -196,29 +196,29 @@ grl_dmap_source_new (DMAPMdnsBrowserService *service)
}
static void
-grl_dmap_source_class_init (GrlDmapSourceClass * klass)
+grl_daap_source_class_init (GrlDaapSourceClass * klass)
{
GrlSourceClass *source_class = GRL_SOURCE_CLASS (klass);
- source_class->browse = grl_dmap_source_browse;
- source_class->search = grl_dmap_source_search;
- source_class->supported_keys = grl_dmap_source_supported_keys;
+ source_class->browse = grl_daap_source_browse;
+ source_class->search = grl_daap_source_search;
+ source_class->supported_keys = grl_daap_source_supported_keys;
- G_OBJECT_CLASS (source_class)->finalize = grl_dmap_source_finalize;
+ G_OBJECT_CLASS (source_class)->finalize = grl_daap_source_finalize;
- g_type_class_add_private (klass, sizeof (GrlDmapSourcePrivate));
+ g_type_class_add_private (klass, sizeof (GrlDaapSourcePrivate));
}
static void
-grl_dmap_source_init (GrlDmapSource *source)
+grl_daap_source_init (GrlDaapSource *source)
{
- source->priv = GRL_DMAP_SOURCE_GET_PRIVATE (source);
+ source->priv = GRL_DAAP_SOURCE_GET_PRIVATE (source);
}
static void
-grl_dmap_source_finalize (GObject *object)
+grl_daap_source_finalize (GObject *object)
{
- G_OBJECT_CLASS (grl_dmap_source_parent_class)->finalize (object);
+ G_OBJECT_CLASS (grl_daap_source_parent_class)->finalize (object);
}
/* ======================= Utilities ==================== */
@@ -235,7 +235,7 @@ build_url (DMAPMdnsBrowserService *service)
static void
do_browse (ResultCbAndArgsAndDb *cb_and_db)
{
- simple_dmap_db_browse (cb_and_db->db,
+ grl_daap_db_browse (cb_and_db->db,
cb_and_db->cb.container,
cb_and_db->cb.source,
cb_and_db->cb.op_id,
@@ -250,7 +250,7 @@ do_browse (ResultCbAndArgsAndDb *cb_and_db)
static void
do_search (ResultCbAndArgsAndDb *cb_and_db)
{
- simple_dmap_db_search (cb_and_db->db,
+ grl_daap_db_search (cb_and_db->db,
cb_and_db->cb.source,
cb_and_db->cb.op_id,
(GHRFunc) cb_and_db->cb.predicate,
@@ -317,7 +317,7 @@ service_added_cb (DMAPMdnsBrowser *browser,
GrlPlugin *plugin)
{
GrlRegistry *registry = grl_registry_get_default ();
- GrlDmapSource *source = grl_dmap_source_new (service);
+ GrlDaapSource *source = grl_daap_source_new (service);
GRL_DEBUG (__FUNCTION__);
@@ -338,7 +338,7 @@ service_removed_cb (DMAPMdnsBrowser *browser,
GrlPlugin *plugin)
{
GrlRegistry *registry = grl_registry_get_default ();
- GrlDmapSource *source = g_hash_table_lookup (sources, service_name);
+ GrlDaapSource *source = g_hash_table_lookup (sources, service_name);
GRL_DEBUG (__FUNCTION__);
@@ -349,12 +349,12 @@ service_removed_cb (DMAPMdnsBrowser *browser,
}
static void
-grl_dmap_connect (gchar *name, gchar *host, guint port, ResultCbAndArgsAndDb *cb_and_db, DMAPConnectionCallback callback)
+grl_daap_connect (gchar *name, gchar *host, guint port, ResultCbAndArgsAndDb *cb_and_db, DMAPConnectionCallback callback)
{
DMAPRecordFactory *factory;
DMAPConnection *connection;
- factory = DMAP_RECORD_FACTORY (simple_daap_record_factory_new ());
+ factory = DMAP_RECORD_FACTORY (grl_daap_record_factory_new ());
connection = DMAP_CONNECTION (daap_connection_new (name, host, port, DMAP_DB (cb_and_db->db), factory));
dmap_connection_connect (connection, (DMAPConnectionCallback) callback, cb_and_db);
}
@@ -375,7 +375,7 @@ match (GrlMedia *media, gpointer val, gpointer user_data)
/* ================== API Implementation ================ */
static const GList *
-grl_dmap_source_supported_keys (GrlSource *source)
+grl_daap_source_supported_keys (GrlSource *source)
{
static GList *keys = NULL;
@@ -397,11 +397,11 @@ grl_dmap_source_supported_keys (GrlSource *source)
}
static void
-grl_dmap_source_browse (GrlSource *source,
+grl_daap_source_browse (GrlSource *source,
GrlSourceBrowseSpec *bs)
{
- GrlDmapSource *dmap_source = GRL_DMAP_SOURCE (source);
- gchar *url = build_url (dmap_source->priv->service);
+ GrlDaapSource *daap_source = GRL_DAAP_SOURCE (source);
+ gchar *url = build_url (daap_source->priv->service);
GRL_DEBUG (__func__);
@@ -422,11 +422,11 @@ grl_dmap_source_browse (GrlSource *source,
browse_connected_cb (NULL, TRUE, NULL, cb_and_db);
} else {
/* Connect */
- cb_and_db->db = simple_dmap_db_new ();
+ cb_and_db->db = grl_daap_db_new ();
- grl_dmap_connect (dmap_source->priv->service->name,
- dmap_source->priv->service->host,
- dmap_source->priv->service->port,
+ grl_daap_connect (daap_source->priv->service->name,
+ daap_source->priv->service->host,
+ daap_source->priv->service->port,
cb_and_db,
(DMAPConnectionCallback) browse_connected_cb);
@@ -436,13 +436,13 @@ grl_dmap_source_browse (GrlSource *source,
g_free (url);
}
-static void grl_dmap_source_search (GrlSource *source,
+static void grl_daap_source_search (GrlSource *source,
GrlSourceSearchSpec *ss)
{
- GrlDmapSource *dmap_source = GRL_DMAP_SOURCE (source);
+ GrlDaapSource *daap_source = GRL_DAAP_SOURCE (source);
ResultCbAndArgsAndDb *cb_and_db;
- DMAPMdnsBrowserService *service = dmap_source->priv->service;
+ DMAPMdnsBrowserService *service = daap_source->priv->service;
gchar *url = build_url (service);
cb_and_db = g_new (ResultCbAndArgsAndDb, 1);
@@ -460,8 +460,8 @@ static void grl_dmap_source_search (GrlSource *source,
search_connected_cb (NULL, TRUE, NULL, cb_and_db);
} else {
/* Connect */
- cb_and_db->db = simple_dmap_db_new ();
- grl_dmap_connect (service->name, service->host, service->port, cb_and_db, (DMAPConnectionCallback) search_connected_cb);
+ cb_and_db->db = grl_daap_db_new ();
+ grl_daap_connect (service->name, service->host, service->port, cb_and_db, (DMAPConnectionCallback) search_connected_cb);
g_hash_table_insert (connections, g_strdup (url), cb_and_db->db);
}
diff --git a/src/dmap/grl-dmap.h b/src/dmap/grl-daap.h
index e5905b8..4912b05 100644
--- a/src/dmap/grl-dmap.h
+++ b/src/dmap/grl-daap.h
@@ -21,56 +21,56 @@
*
*/
-#ifndef _GRL_DMAP_SOURCE_H_
-#define _GRL_DMAP_SOURCE_H_
+#ifndef _GRL_DAAP_SOURCE_H_
+#define _GRL_DAAP_SOURCE_H_
#include <grilo.h>
-#define GRL_DMAP_SOURCE_TYPE \
- (grl_dmap_source_get_type ())
+#define GRL_DAAP_SOURCE_TYPE \
+ (grl_daap_source_get_type ())
-#define GRL_DMAP_SOURCE(obj) \
+#define GRL_DAAP_SOURCE(obj) \
(G_TYPE_CHECK_INSTANCE_CAST ((obj), \
- GRL_DMAP_SOURCE_TYPE, \
- GrlDmapSource))
+ GRL_DAAP_SOURCE_TYPE, \
+ GrlDaapSource))
-#define GRL_IS_DMAP_SOURCE(obj) \
+#define GRL_IS_DAAP_SOURCE(obj) \
(G_TYPE_CHECK_INSTANCE_TYPE ((obj), \
- GRL_DMAP_SOURCE_TYPE))
+ GRL_DAAP_SOURCE_TYPE))
-#define GRL_DMAP_SOURCE_CLASS(klass) \
+#define GRL_DAAP_SOURCE_CLASS(klass) \
(G_TYPE_CHECK_CLASS_CAST((klass), \
- GRL_DMAP_SOURCE_TYPE, \
- GrlDmapSourceClass))
+ GRL_DAAP_SOURCE_TYPE, \
+ GrlDaapSourceClass))
-#define GRL_IS_DMAP_SOURCE_CLASS(klass) \
+#define GRL_IS_DAAP_SOURCE_CLASS(klass) \
(G_TYPE_CHECK_CLASS_TYPE((klass), \
- GRL_DMAP_SOURCE_TYPE))
+ GRL_DAAP_SOURCE_TYPE))
-#define GRL_DMAP_SOURCE_GET_CLASS(obj) \
+#define GRL_DAAP_SOURCE_GET_CLASS(obj) \
(G_TYPE_INSTANCE_GET_CLASS ((obj), \
- GRL_DMAP_SOURCE_TYPE, \
- GrlDmapSourceClass))
+ GRL_DAAP_SOURCE_TYPE, \
+ GrlDaapSourceClass))
-typedef struct _GrlDmapSourcePrivate GrlDmapSourcePrivate;
-typedef struct _GrlDmapSource GrlDmapSource;
+typedef struct _GrlDaapSourcePrivate GrlDaapSourcePrivate;
+typedef struct _GrlDaapSource GrlDaapSource;
-struct _GrlDmapSource {
+struct _GrlDaapSource {
GrlSource parent;
/*< private >*/
- GrlDmapSourcePrivate *priv;
+ GrlDaapSourcePrivate *priv;
};
-typedef struct _GrlDmapSourceClass GrlDmapSourceClass;
+typedef struct _GrlDaapSourceClass GrlDaapSourceClass;
-struct _GrlDmapSourceClass {
+struct _GrlDaapSourceClass {
GrlSourceClass parent_class;
};
-GType grl_dmap_source_get_type (void);
+GType grl_daap_source_get_type (void);
-#endif /* _GRL_DMAP_SOURCE_H_ */
+#endif /* _GRL_DAAP_SOURCE_H_ */
diff --git a/src/dmap/grl-dmap.xml b/src/dmap/grl-daap.xml
index 61bebb1..74da82d 100644
--- a/src/dmap/grl-dmap.xml
+++ b/src/dmap/grl-daap.xml
@@ -1,8 +1,8 @@
<plugin>
<info>
<name>DMAP</name>
- <module>libgrldmap</module>
- <description>A plugin for browsing DMAP servers</description>
+ <module>libgrldaap</module>
+ <description>A plugin for browsing DAAP servers</description>
<author>W. Michael Petullo</author>
<license>LGPL</license>
<site>http://www.flyn.org</site>
diff --git a/src/dmap/simple-dmap-db.h b/src/dmap/simple-dmap-db.h
deleted file mode 100644
index fd890ae..0000000
--- a/src/dmap/simple-dmap-db.h
+++ /dev/null
@@ -1,92 +0,0 @@
-/*
- * Database class for DMAP sharing
- *
- * Copyright (C) 2008 W. Michael Petullo <mike@flyn.org>
- *
- * 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; either
- * 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 __SIMPLE_DMAP_DB
-#define __SIMPLE_DMAP_DB
-
-#include <libdmapsharing/dmap.h>
-#include <grilo.h>
-
-G_BEGIN_DECLS
-
-#define TYPE_SIMPLE_DMAP_DB \
- (simple_dmap_db_get_type ())
-
-#define SIMPLE_DMAP_DB(o) \
- (G_TYPE_CHECK_INSTANCE_CAST ((o), \
- TYPE_SIMPLE_DMAP_DB, \
- SimpleDMAPDb))
-
-#define SIMPLE_DMAP_DB_CLASS(k) \
- (G_TYPE_CHECK_CLASS_CAST((k), \
- TYPE_SIMPLE_DMAP_DB, \
- SimpleDMAPDbClass))
-#define IS_SIMPLE_DMAP_DB(o) \
- (G_TYPE_CHECK_INSTANCE_TYPE((o), \
- TYPE_SIMPLE_DMAP_DB))
-#define IS_SIMPLE_DMAP_DB_CLASS(k) \
- (G_TYPE_CHECK_CLASS_TYPE((k), \
- TYPE_SIMPLE_DMAP_DB_CLASS))
-
-#define SIMPLE_DMAP_DB_GET_CLASS(o) \
- (G_TYPE_INSTANCE_GET_CLASS((o), \
- TYPE_SIMPLE_DMAP_DB, \
- SimpleDMAPDbClass))
-
-#define SIMPLE_DMAP_DB_GET_PRIVATE(o) \
- (G_TYPE_INSTANCE_GET_PRIVATE((o), \
- TYPE_SIMPLE_DMAP_DB, \
- SimpleDMAPDbPrivate))
-
-typedef struct SimpleDMAPDbPrivate SimpleDMAPDbPrivate;
-
-typedef struct {
- GObject parent;
- SimpleDMAPDbPrivate *priv;
-} SimpleDMAPDb;
-
-typedef struct {
- GObjectClass parent;
-} SimpleDMAPDbClass;
-
-void simple_dmap_db_browse (SimpleDMAPDb *db,
- GrlMedia *container,
- GrlSource *source,
- guint op_id,
- guint skip,
- guint count,
- GrlSourceResultCb func,
- gpointer user_data);
-
-void simple_dmap_db_search (SimpleDMAPDb *db,
- GrlSource *source,
- guint op_id,
- GHRFunc predicate,
- gpointer pred_user_data,
- GrlSourceResultCb func,
- gpointer user_data);
-
-SimpleDMAPDb *simple_dmap_db_new (void);
-
-GType simple_dmap_db_get_type (void);
-
-#endif /* __SIMPLE_DMAP_DB */
-
-G_END_DECLS