[libdmapsharing] Adopt single DMAP/Dmap/dmap namespace
- From: W. Michael Petullo <wmpetullo src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [libdmapsharing] Adopt single DMAP/Dmap/dmap namespace
- Date: Sat, 20 Jan 2018 20:31:36 +0000 (UTC)
commit 9ce2d41ef3cab7eb87410119314ee62646197cf1
Author: W. Michael Petullo <mike flyn org>
Date: Sat Jan 20 15:27:20 2018 -0500
Adopt single DMAP/Dmap/dmap namespace
Using DmapX rather than DMAPX is consistent with GTK (e.g.,
GtkButton). Getting rid of the DAAP, DACP, and DPAP namespaces eases
support for Vala and other languages which prefer one namespace per
library. Removed a buch of scripting just which was required to generate
introspection descriptions which previously combined several namespaces.
Signed-off-by: W. Michael Petullo <mike flyn org>
README-Porting | 32 +-
configure.ac | 5 +-
libdmapsharing/Makefile.am | 80 +-
libdmapsharing/daap-connection.h | 107 -
libdmapsharing/daap-share.h | 118 -
libdmapsharing/dacp-connection.h | 94 -
libdmapsharing/dacp-player.h | 147 --
libdmapsharing/dacp-share.h | 168 --
.../{daap-connection.c => dmap-av-connection.c} | 74 +-
libdmapsharing/dmap-av-connection.h | 107 +
libdmapsharing/{daap-record.c => dmap-av-record.c} | 84 +-
libdmapsharing/{daap-record.h => dmap-av-record.h} | 70 +-
libdmapsharing/{daap-share.c => dmap-av-share.c} | 170 +-
libdmapsharing/dmap-av-share.h | 118 +
libdmapsharing/dmap-connection.c | 198 +-
libdmapsharing/dmap-connection.h | 88 +-
libdmapsharing/dmap-container-db.c | 14 +-
libdmapsharing/dmap-container-db.h | 44 +-
libdmapsharing/dmap-container-record.c | 16 +-
libdmapsharing/dmap-container-record.h | 50 +-
...dacp-connection.c => dmap-control-connection.c} | 36 +-
libdmapsharing/dmap-control-connection.h | 94 +
.../{dacp-player.c => dmap-control-player.c} | 42 +-
libdmapsharing/dmap-control-player.h | 147 ++
.../{dacp-share.c => dmap-control-share.c} | 204 +-
libdmapsharing/dmap-control-share.h | 168 ++
libdmapsharing/dmap-db.c | 32 +-
libdmapsharing/dmap-db.h | 58 +-
libdmapsharing/dmap-gst-input-stream.c | 26 +-
libdmapsharing/dmap-gst-input-stream.h | 22 +-
libdmapsharing/dmap-gst-mp3-input-stream.c | 24 +-
libdmapsharing/dmap-gst-mp3-input-stream.h | 22 +-
libdmapsharing/dmap-gst-qt-input-stream.c | 24 +-
libdmapsharing/dmap-gst-qt-input-stream.h | 22 +-
libdmapsharing/dmap-gst-wav-input-stream.c | 24 +-
libdmapsharing/dmap-gst-wav-input-stream.h | 22 +-
.../{dpap-connection.c => dmap-image-connection.c} | 42 +-
libdmapsharing/dmap-image-connection.h | 94 +
.../{dpap-record.c => dmap-image-record.c} | 10 +-
libdmapsharing/dmap-image-record.h | 88 +
.../{dpap-share.c => dmap-image-share.c} | 100 +-
libdmapsharing/dmap-image-share.h | 115 +
libdmapsharing/dmap-md5.c | 22 +-
libdmapsharing/dmap-md5.h | 10 +-
libdmapsharing/dmap-mdns-browser-avahi.c | 74 +-
libdmapsharing/dmap-mdns-browser-dnssd.c | 56 +-
libdmapsharing/dmap-mdns-browser-howl.c | 68 +-
libdmapsharing/dmap-mdns-browser.h | 70 +-
libdmapsharing/dmap-mdns-publisher-avahi.c | 58 +-
libdmapsharing/dmap-mdns-publisher-dnssd.c | 26 +-
libdmapsharing/dmap-mdns-publisher.h | 28 +-
libdmapsharing/dmap-mdns-service.c | 24 +-
libdmapsharing/dmap-mdns-service.h | 42 +-
libdmapsharing/dmap-record-factory.c | 10 +-
libdmapsharing/dmap-record-factory.h | 28 +-
libdmapsharing/dmap-record.c | 8 +-
libdmapsharing/dmap-record.h | 30 +-
libdmapsharing/dmap-share.c | 160 +-
libdmapsharing/dmap-share.h | 116 +-
libdmapsharing/dmap-structure.c | 72 +-
libdmapsharing/dmap-structure.h | 36 +-
libdmapsharing/dmap.h | 18 +-
libdmapsharing/dpap-connection.h | 94 -
libdmapsharing/dpap-record.h | 88 -
libdmapsharing/dpap-share.h | 115 -
libdmapsharing/test-daap-record-factory.h | 58 -
libdmapsharing/test-daap-record.h | 64 -
...ord-factory.c => test-dmap-av-record-factory.c} | 34 +-
libdmapsharing/test-dmap-av-record-factory.h | 58 +
.../{test-daap-record.c => test-dmap-av-record.c} | 70 +-
libdmapsharing/test-dmap-av-record.h | 64 +
libdmapsharing/test-dmap-container-db.c | 28 +-
libdmapsharing/test-dmap-container-db.h | 14 +-
libdmapsharing/test-dmap-container-record.c | 26 +-
libdmapsharing/test-dmap-container-record.h | 16 +-
libdmapsharing/test-dmap-db.c | 30 +-
libdmapsharing/test-dmap-db.h | 18 +-
...-factory.c => test-dmap-image-record-factory.c} | 34 +-
libdmapsharing/test-dmap-image-record-factory.h | 58 +
...test-dpap-record.c => test-dmap-image-record.c} | 64 +-
libdmapsharing/test-dmap-image-record.h | 65 +
libdmapsharing/test-dpap-record-factory.h | 58 -
libdmapsharing/test-dpap-record.h | 65 -
tests/Makefile.am | 6 +-
tests/dacplisten.c | 274 ++--
tests/dacplisten.vala | 26 +-
tests/dmapcopy.c | 132 +-
tests/dmapcopy.vala | 20 +-
tests/dmapserve.c | 82 +-
tests/dmapserve.vala | 16 +-
tests/dpapview.vala | 30 +-
tests/test-dmap-client.c | 40 +-
tests/test-dmap-server.c | 44 +-
tests/vala-dmap-container-db.c | 100 +-
tests/vala-dmap-container-db.vala | 10 +-
tests/vala-dmap-db.vala | 14 +-
...ala-dpap-record.vala => vala-image-record.vala} | 12 +-
vala/Makefile.am | 87 +-
.../libdmapsharing-4.0-uninstalled.excludes | 3 -
.../libdmapsharing-4.0-uninstalled.namespace | 1 -
.../libdmapsharing-4.0.metadata | 5 -
.../libdmapsharing-4.0-uninstalled.excludes | 2 -
.../libdmapsharing-4.0-uninstalled.files.in | 2 -
.../libdmapsharing-4.0-uninstalled.namespace | 1 -
.../libdmapsharing-4.0.metadata | 4 -
.../libdmapsharing-4.0-uninstalled.excludes | 4 -
.../libdmapsharing-4.0-uninstalled.files.in | 2 -
.../libdmapsharing-4.0-uninstalled.namespace | 1 -
.../libdmapsharing-4.0-uninstalled.excludes | 3 -
.../libdmapsharing-4.0-uninstalled.files.in | 2 -
.../libdmapsharing-4.0-uninstalled.namespace | 1 -
.../libdmapsharing-4.0.metadata | 6 -
vala/libdmapsharing-4.0-uninstalled.excludes | 1 +
.../libdmapsharing-4.0-uninstalled.files.in | 0
vala/libdmapsharing-4.0-uninstalled.namespace | 1 +
.../libdmapsharing-4.0.metadata | 16 +-
vala/libdmapsharing-4.0.vapi | 2307 ++------------------
117 files changed, 3244 insertions(+), 5288 deletions(-)
---
diff --git a/README-Porting b/README-Porting
index 09955c7..2dc8f32 100644
--- a/README-Porting
+++ b/README-Porting
@@ -3,10 +3,24 @@ versions. The primary reason for these changes is to better support
GObject introspection and thus languages such as Python. The following
are the key differences between the new and old APIs:
-(1) The interface names exported by libdmapsharing now end in "Interface"
+(1) All symbols now exist in the DMAP/Dmap/dmap namespace.
+
+ (a) For example, DMAPDb is now DmapDb.
+
+ (b) DMAP_DB remains DMAP_DB.
+
+ (c) dmap_db... remains dmap_db...
+
+ (d) DAAPRecord is now DmapAvRecord.
+
+ (d) DPAPRecord is now DmapImageRecord.
+
+ (e) DACPPlayer is now DmapControlPlayer.
+
+(2) The interface names exported by libdmapsharing now end in "Interface"
instead of "Iface".
-(2) The new API renames the following symbols as indicated:
+(3) The new API renames the following symbols as indicated:
DMAP_TYPE_DMAP_MDNS_BROWSER_TRANSPORT_PROTOCOL became
DMAP_TYPE_DMAP_MDNS_SERVICE_TRANSPORT_PROTOCOL.
@@ -25,17 +39,17 @@ instead of "Iface".
dmap_connection_connect became dmap_connection_start.
-(3) The new API replaces the use of GHFunc with DMAPIdRecordFunc and
+(4) The new API replaces the use of GHFunc with DMAPIdRecordFunc and
DMAPContainerIdFunc.
-(4) Setting an object property using g_object_set causes the object to
+(5) Setting an object property using g_object_set causes the object to
duplicate the passed value. Thus the caller maintains control of the
original value.
-(5) Getting an object property using g_object_set returns a duplicate
+(6) Getting an object property using g_object_set returns a duplicate
of the value. Thus the caller should free or unref the obtained value.
-(6) The "hash" property in the DAAPRecord interface and the "hash"
+(7) The "hash" property in the DAAPRecord interface and the "hash"
and "thumbnail" properties in the DPAPRecord interface are now boxed
types. The true type of each of these properties is a GArray. Thus
implementations of these interfaces should now:
@@ -46,11 +60,11 @@ implementations of these interfaces should now:
(c) use GArray instead of GByteArray.
-(7) The "base-uri" property in the DMAPConnection class is now a boxed
+(8) The "base-uri" property in the DMAPConnection class is now a boxed
type. The real type is SoupURI.
-(8) The "db" and "container-db" properties in DMAPShare are now handled
+(9) The "db" and "container-db" properties in DMAPShare are now handled
as object types instead of pointer types.
-(9) The properties contained in a DMAPMdnsService must now be accessed
+(10) The properties contained in a DMAPMdnsService must now be accessed
using g_object_get.
diff --git a/configure.ac b/configure.ac
index e91a046..684cbbb 100644
--- a/configure.ac
+++ b/configure.ac
@@ -398,8 +398,5 @@ tests/Makefile
m4/Makefile
media/Makefile
vala/Makefile
-vala/libdmapsharing-${API_VERSION}-daap/libdmapsharing-${API_VERSION}-uninstalled.files
-vala/libdmapsharing-${API_VERSION}-dacp/libdmapsharing-${API_VERSION}-uninstalled.files
-vala/libdmapsharing-${API_VERSION}-dmap/libdmapsharing-${API_VERSION}-uninstalled.files
-vala/libdmapsharing-${API_VERSION}-dpap/libdmapsharing-${API_VERSION}-uninstalled.files
+vala/libdmapsharing-${API_VERSION}-uninstalled.files
])
diff --git a/libdmapsharing/Makefile.am b/libdmapsharing/Makefile.am
index d591462..efd6f90 100644
--- a/libdmapsharing/Makefile.am
+++ b/libdmapsharing/Makefile.am
@@ -1,12 +1,12 @@
lib_LTLIBRARIES = libdmapsharing-4.0.la
libdmapsharing_4_0_la_SOURCES = \
- daap-connection.c \
- daap-record.c \
- daap-share.c \
- dacp-connection.c \
- dacp-player.c \
- dacp-share.c \
+ dmap-av-connection.c \
+ dmap-av-record.c \
+ dmap-av-share.c \
+ dmap-control-connection.c \
+ dmap-control-player.c \
+ dmap-control-share.c \
dmap-connection.c \
dmap-container-db.c \
dmap-container-record.c \
@@ -21,19 +21,19 @@ libdmapsharing_4_0_la_SOURCES = \
dmap-share.c \
dmap-structure.c \
dmap-utils.c \
- dpap-connection.c \
- dpap-record.c \
- dpap-share.c
+ dmap-image-connection.c \
+ dmap-image-record.c \
+ dmap-image-share.c
if HAVE_CHECK
libdmapsharing_4_0_la_SOURCES += \
- test-daap-record.c \
- test-daap-record-factory.c \
+ test-dmap-av-record.c \
+ test-dmap-av-record-factory.c \
test-dmap-container-db.c \
test-dmap-container-record.c \
test-dmap-db.c \
- test-dpap-record.c \
- test-dpap-record-factory.c
+ test-dmap-image-record.c \
+ test-dmap-image-record-factory.c
endif
if USE_HOWL
@@ -85,12 +85,12 @@ libdmapsharingincludedir = \
$(includedir)/libdmapsharing-@API_VERSION@/libdmapsharing
libdmapsharinginclude_HEADERS = \
- daap-connection.h \
- daap-record.h \
- daap-share.h \
- dacp-connection.h \
- dacp-share.h \
- dacp-player.h \
+ dmap-av-connection.h \
+ dmap-av-record.h \
+ dmap-av-share.h \
+ dmap-control-connection.h \
+ dmap-control-share.h \
+ dmap-control-player.h \
dmap.h \
dmap-connection.h \
dmap-container-db.h \
@@ -107,9 +107,9 @@ libdmapsharinginclude_HEADERS = \
dmap-share.h \
dmap-structure.h \
dmap-utils.h \
- dpap-connection.h \
- dpap-record.h \
- dpap-share.h
+ dmap-image-connection.h \
+ dmap-image-record.h \
+ dmap-image-share.h
noinst_HEADERS = \
dmap-config.h \
@@ -120,13 +120,13 @@ noinst_HEADERS = \
dmap-mdns-avahi.h \
dmap-private-utils.h \
gst-util.h \
- test-daap-record-factory.h \
- test-daap-record.h \
+ test-dmap-av-record-factory.h \
+ test-dmap-av-record.h \
test-dmap-container-db.h \
test-dmap-container-record.h \
test-dmap-db.h \
- test-dpap-record-factory.h \
- test-dpap-record.h
+ test-dmap-image-record-factory.h \
+ test-dmap-image-record.h
BUILT_SOURCES = dmap-marshal.c dmap-marshal.h dmap-enums.c dmap-enums.h unit-test.stamp
@@ -140,7 +140,7 @@ dmap-marshal.h: dmap-marshal.list
dmap-enums.c: $(libdmapsharinginclude_headers) Makefile dmap-enums.h
@glib-mkenums \
- --fhead "/* Automatically generated by glib-mkenums */\n\n#include
\"dacp-share.h\"\n#include \"dacp-player.h\"\n#include \"dmap-mdns-publisher.h\"\n#include
\"dmap-mdns-browser.h\"\n#include \"dmap-connection.h\"\n#include \"dmap-enums.h\"" \
+ --fhead "/* Automatically generated by glib-mkenums */\n\n#include
\"dmap-control-share.h\"\n#include \"dmap-control-player.h\"\n#include \"dmap-mdns-publisher.h\"\n#include
\"dmap-mdns-browser.h\"\n#include \"dmap-connection.h\"\n#include \"dmap-enums.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@\" }," \
@@ -169,23 +169,15 @@ INTROSPECTION_SCANNER_ARGS = --add-include-path=$(srcdir) --warn-all
INTROSPECTION_COMPILER_ARGS = --includedir=$(srcdir)
introspection_sources = $(libdmapsharinginclude_HEADERS) $(libdmapsharinginclude_SOURCES)
-DMAP-4.0.gir: libdmapsharing-4.0.la
-DMAP_4_0_gir_NAMESPACE = DMAP
-DMAP_4_0_gir_SCANNERFLAGS = --symbol-prefix=dmap
-DMAP_4_0_gir_LIBS = libdmapsharing-4.0.la
-DMAP_4_0_gir_FILES = $(introspection_sources)
-DMAP_4_0_gir_INCLUDES = GObject-2.0 Soup-2.4
-DMAP_4_0_gir_CFLAGS = $(INCLUDES) $(libdmapsharing_4_0_la_CFLAGS)
-
-DAAP-4.0.gir: libdmapsharing-4.0.la DMAP-4.0.gir
-DAAP_4_0_gir_NAMESPACE = DAAP
-DAAP_4_0_gir_SCANNERFLAGS = --symbol-prefix=daap
-DAAP_4_0_gir_LIBS = libdmapsharing-4.0.la
-DAAP_4_0_gir_FILES = $(introspection_sources)
-DAAP_4_0_gir_INCLUDES = GObject-2.0 Soup-2.4 DMAP-4.0
-DAAP_4_0_gir_CFLAGS = $(INCLUDES) $(libdmapsharing_4_0_la_CFLAGS)
-
-INTROSPECTION_GIRS = DMAP-4.0.gir DAAP-4.0.gir
+Dmap-4.0.gir: libdmapsharing-4.0.la
+Dmap_4_0_gir_NAMESPACE = Dmap
+Dmap_4_0_gir_SCANNERFLAGS = --symbol-prefix=dmap
+Dmap_4_0_gir_LIBS = libdmapsharing-4.0.la
+Dmap_4_0_gir_FILES = $(introspection_sources)
+Dmap_4_0_gir_INCLUDES = GObject-2.0 Soup-2.4
+Dmap_4_0_gir_CFLAGS = $(INCLUDES) $(libdmapsharing_4_0_la_CFLAGS)
+
+INTROSPECTION_GIRS = Dmap-4.0.gir
girdir = $(datadir)/gir-1.0
gir_DATA = $(INTROSPECTION_GIRS)
diff --git a/libdmapsharing/daap-connection.c b/libdmapsharing/dmap-av-connection.c
similarity index 86%
rename from libdmapsharing/daap-connection.c
rename to libdmapsharing/dmap-av-connection.c
index 35f905e..7a3fe49 100644
--- a/libdmapsharing/daap-connection.c
+++ b/libdmapsharing/dmap-av-connection.c
@@ -20,20 +20,20 @@
#include "config.h"
-#include <libdmapsharing/daap-connection.h>
+#include <libdmapsharing/dmap-av-connection.h>
#include <libdmapsharing/dmap-structure.h>
#include <libdmapsharing/test-dmap-db.h>
-#define DAAP_CONNECTION_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), DAAP_TYPE_CONNECTION,
DAAPConnectionPrivate))
+#define DMAP_AV_CONNECTION_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), DMAP_TYPE_AV_CONNECTION,
DmapAvConnectionPrivate))
-static DMAPContentCode
-_get_protocol_version_cc (DMAPConnection * connection)
+static DmapContentCode
+_get_protocol_version_cc (DmapConnection * connection)
{
return DMAP_CC_APRO;
}
static gchar *
-_get_query_metadata (DMAPConnection * connection)
+_get_query_metadata (DmapConnection * connection)
{
return g_strdup ("dmap.itemid,dmap.itemname,daap.songalbum,"
"daap.songartist,daap.songgenre,daap.songsize,"
@@ -43,12 +43,12 @@ _get_query_metadata (DMAPConnection * connection)
"daap.sortartist,daap.sortalbum,com.apple.itunes.has-video");
}
-static DMAPRecord *
-_handle_mlcl (DMAPConnection * connection, DMAPRecordFactory * factory,
+static DmapRecord *
+_handle_mlcl (DmapConnection * connection, DmapRecordFactory * factory,
GNode * n, int *item_id)
{
GNode *n2;
- DMAPRecord *record = NULL;
+ DmapRecord *record = NULL;
const gchar *title = NULL;
const gchar *album = NULL;
const gchar *artist = NULL;
@@ -65,7 +65,7 @@ _handle_mlcl (DMAPConnection * connection, DMAPRecordFactory * factory,
gint bitrate = 0;
for (n2 = n->children; n2; n2 = n2->next) {
- DMAPStructureItem *meta_item;
+ DmapStructureItem *meta_item;
meta_item = n2->data;
@@ -157,10 +157,10 @@ _handle_mlcl (DMAPConnection * connection, DMAPRecordFactory * factory,
}
static void
-daap_connection_class_init (DAAPConnectionClass * klass)
+dmap_av_connection_class_init (DmapAvConnectionClass * klass)
{
GObjectClass *object_class = G_OBJECT_CLASS (klass);
- DMAPConnectionClass *parent_class =
+ DmapConnectionClass *parent_class =
DMAP_CONNECTION_CLASS (object_class);
parent_class->get_protocol_version_cc = _get_protocol_version_cc;
@@ -168,16 +168,16 @@ daap_connection_class_init (DAAPConnectionClass * klass)
parent_class->handle_mlcl = _handle_mlcl;
}
-DAAPConnection *
-daap_connection_new (const char *name,
+DmapAvConnection *
+dmap_av_connection_new (const char *name,
const char *host,
guint port,
- DMAPDb * db,
- DMAPRecordFactory * factory)
+ DmapDb * db,
+ DmapRecordFactory * factory)
{
- DAAPConnection *connection;
+ DmapAvConnection *connection;
- connection = g_object_new (DAAP_TYPE_CONNECTION,
+ connection = g_object_new (DMAP_TYPE_AV_CONNECTION,
"name", name,
"host", host,
"port", port,
@@ -189,22 +189,22 @@ daap_connection_new (const char *name,
}
static void
-daap_connection_init (DAAPConnection * connection)
+dmap_av_connection_init (DmapAvConnection * connection)
{
}
-G_DEFINE_TYPE (DAAPConnection, daap_connection, DMAP_TYPE_CONNECTION);
+G_DEFINE_TYPE (DmapAvConnection, dmap_av_connection, DMAP_TYPE_CONNECTION);
#ifdef HAVE_CHECK
#include <check.h>
-#include <libdmapsharing/test-daap-record.h>
-#include <libdmapsharing/test-daap-record-factory.h>
+#include <libdmapsharing/test-dmap-av-record.h>
+#include <libdmapsharing/test-dmap-av-record-factory.h>
START_TEST(_get_protocol_version_cc_test)
{
- DMAPConnection *conn = g_object_new (DAAP_TYPE_CONNECTION, NULL);
- DMAPContentCode cc = _get_protocol_version_cc (conn);
+ DmapConnection *conn = g_object_new (DMAP_TYPE_AV_CONNECTION, NULL);
+ DmapContentCode cc = _get_protocol_version_cc (conn);
fail_unless (cc == DMAP_CC_APRO);
g_object_unref (conn);
}
@@ -225,17 +225,17 @@ START_TEST(_get_query_metadata_test)
}
END_TEST
-START_TEST(daap_connection_new_test)
+START_TEST(dmap_av_connection_new_test)
{
char *str;
int port;
- DMAPDb *db1, *db2;
- DMAPRecordFactory *factory1, *factory2;
+ DmapDb *db1, *db2;
+ DmapRecordFactory *factory1, *factory2;
db1 = DMAP_DB(test_dmap_db_new());
- factory1 = DMAP_RECORD_FACTORY(test_daap_record_factory_new());
+ factory1 = DMAP_RECORD_FACTORY(test_dmap_av_record_factory_new());
- DAAPConnection *connection = daap_connection_new("foo",
+ DmapAvConnection *connection = dmap_av_connection_new("foo",
"foo.example.com",
3689,
db1,
@@ -268,9 +268,9 @@ END_TEST
START_TEST(_handle_mlcl_test)
{
- TestDAAPRecordFactory *factory;
+ TestDmapAvRecordFactory *factory;
GNode *parent;
- DMAPRecord *record;
+ DmapRecord *record;
char *expected_title = "title", *title = NULL;
char *expected_album = "album", *album = NULL;
char *expected_artist = "artist", *artist = NULL;
@@ -305,7 +305,7 @@ START_TEST(_handle_mlcl_test)
dmap_structure_add(parent, DMAP_CC_ASSZ, expected_size);
dmap_structure_add(parent, DMAP_CC_ASBR, expected_bitrate);
- factory = test_daap_record_factory_new();
+ factory = test_dmap_av_record_factory_new();
record = _handle_mlcl(NULL, DMAP_RECORD_FACTORY(factory), parent, &item_id);
ck_assert_int_eq(expected_item_id, item_id);
@@ -368,10 +368,10 @@ END_TEST
/* Do not crash on bad field code (~0). */
START_TEST(_handle_mlcl_bad_code_test)
{
- DMAPStructureItem *item;
- TestDAAPRecordFactory *factory;
+ DmapStructureItem *item;
+ TestDmapAvRecordFactory *factory;
GNode *parent, *child;
- DMAPRecord *record;
+ DmapRecord *record;
int item_id;
char *set_value = "value";
char *expected_title = "title", *title = NULL;
@@ -379,7 +379,7 @@ START_TEST(_handle_mlcl_bad_code_test)
parent = dmap_structure_add(NULL, DMAP_CC_MLCL);
/* A node with a bad content code. */
- item = g_new0(DMAPStructureItem, 1);
+ item = g_new0(DmapStructureItem, 1);
item->content_code = ~0;
item->size = strlen(set_value);
g_value_init(&(item->content), G_TYPE_STRING);
@@ -390,7 +390,7 @@ START_TEST(_handle_mlcl_bad_code_test)
/* A well-formed node. */
dmap_structure_add(parent, DMAP_CC_MINM, expected_title);
- factory = test_daap_record_factory_new();
+ factory = test_dmap_av_record_factory_new();
record = _handle_mlcl(NULL, DMAP_RECORD_FACTORY(factory), parent, &item_id);
g_object_get(record, "title", &title, NULL);
@@ -401,6 +401,6 @@ START_TEST(_handle_mlcl_bad_code_test)
}
END_TEST
-#include "daap-connection-suite.c"
+#include "dmap-av-connection-suite.c"
#endif
diff --git a/libdmapsharing/dmap-av-connection.h b/libdmapsharing/dmap-av-connection.h
new file mode 100644
index 0000000..21542d7
--- /dev/null
+++ b/libdmapsharing/dmap-av-connection.h
@@ -0,0 +1,107 @@
+/*
+ * 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 __DMAP_AV_CONNECTION_H
+#define __DMAP_AV_CONNECTION_H
+
+#include <glib-object.h>
+
+#include <libdmapsharing/dmap-connection.h>
+#include <libdmapsharing/dmap-db.h>
+
+G_BEGIN_DECLS
+/**
+ * DMAP_TYPE_AV_CONNECTION:
+ *
+ * The type for #DmapAvConnection.
+ */
+#define DMAP_TYPE_AV_CONNECTION (dmap_av_connection_get_type ())
+/**
+ * DMAP_AV_CONNECTION:
+ * @o: Object which is subject to casting.
+ *
+ * Casts a #DmapAvConnection or derived pointer into a (DmapAvConnection *) pointer.
+ * Depending on the current debugging level, this function may invoke
+ * certain runtime checks to identify invalid casts.
+ */
+#define DMAP_AV_CONNECTION(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), DMAP_TYPE_AV_CONNECTION,
DmapAvConnection))
+/**
+ * DMAP_AV_CONNECTION_CLASS:
+ * @k: a valid #DmapAvConnectionClass
+ *
+ * Casts a derived #DmapAvConnectionClass structure into a #DmapAvConnectionClass
+ * structure.
+ */
+#define DMAP_AV_CONNECTION_CLASS(k) (G_TYPE_CHECK_CLASS_CAST((k), DMAP_TYPE_AV_CONNECTION,
DmapAvConnectionClass))
+/**
+ * IS_DMAP_AV_CONNECTION:
+ * @o: Instance to check for being a %DMAP_TYPE_AV_CONNECTION.
+ *
+ * Checks whether a valid #GTypeInstance pointer is of type %DMAP_TYPE_AV_CONNECTION.
+ */
+#define IS_DMAP_AV_CONNECTION(o) (G_TYPE_CHECK_INSTANCE_TYPE ((o), DMAP_TYPE_AV_CONNECTION))
+/**
+ * IS_DMAP_AV_CONNECTION_CLASS:
+ * @k: a #DmapAvConnectionClass
+ *
+ * Checks whether @k "is a" valid #DmapAvConnectionClass structure of type
+ * %DMAP_AV_CONNECTION or derived.
+ */
+#define IS_DMAP_AV_CONNECTION_CLASS(k) (G_TYPE_CHECK_CLASS_TYPE ((k), DMAP_TYPE_AV_CONNECTION))
+/**
+ * DMAP_AV_CONNECTION_GET_CLASS:
+ * @o: a #DmapAvConnection instance.
+ *
+ * Get the class structure associated to a #DmapAvConnection instance.
+ *
+ * Returns: pointer to object class structure.
+ */
+#define DMAP_AV_CONNECTION_GET_CLASS(o) (G_TYPE_INSTANCE_GET_CLASS ((o), DMAP_TYPE_AV_CONNECTION,
DmapAvConnectionClass))
+typedef struct DmapAvConnectionPrivate DmapAvConnectionPrivate;
+
+typedef struct
+{
+ DmapConnectionClass dmap_connection_class;
+} DmapAvConnectionClass;
+
+typedef struct
+{
+ DmapConnection dmap_connection_instance;
+ DmapAvConnectionPrivate *priv;
+} DmapAvConnection;
+
+GType dmap_av_connection_get_type (void);
+
+/**
+ * dmap_av_connection_new:
+ * @name: The name of the share to connect to.
+ * @host: The host of the share to connect to.
+ * @port: The port of the share to connect to.
+ * @db: (transfer full): The db that will receive the records found in the share.
+ * @factory: (transfer full): A factory to create records.
+ *
+ * Create a new DAAP connection.
+ *
+ * Returns: a pointer to a DmapAvConnection.
+ */
+DmapAvConnection *dmap_av_connection_new (const char *name,
+ const char *host,
+ guint port,
+ DmapDb * db,
+ DmapRecordFactory * factory);
+
+G_END_DECLS
+#endif /* __DMAP_AV_CONNECTION_H */
diff --git a/libdmapsharing/daap-record.c b/libdmapsharing/dmap-av-record.c
similarity index 83%
rename from libdmapsharing/daap-record.c
rename to libdmapsharing/dmap-av-record.c
index 9da802c..875ac37 100644
--- a/libdmapsharing/daap-record.c
+++ b/libdmapsharing/dmap-av-record.c
@@ -20,11 +20,11 @@
#include "config.h"
-#include <libdmapsharing/daap-record.h>
+#include <libdmapsharing/dmap-av-record.h>
#include <libdmapsharing/dmap-enums.h>
static void
-daap_record_default_init (DAAPRecordInterface * iface)
+dmap_av_record_default_init (DmapAvRecordInterface * iface)
{
static gboolean is_initialized = FALSE;
@@ -197,33 +197,33 @@ daap_record_default_init (DAAPRecordInterface * iface)
}
}
-G_DEFINE_INTERFACE(DAAPRecord, daap_record, G_TYPE_OBJECT)
+G_DEFINE_INTERFACE(DmapAvRecord, dmap_av_record, G_TYPE_OBJECT)
gboolean
-daap_record_itunes_compat (DAAPRecord * record)
+dmap_av_record_itunes_compat (DmapAvRecord * record)
{
- return DAAP_RECORD_GET_INTERFACE (record)->itunes_compat (record);
+ return DMAP_AV_RECORD_GET_INTERFACE (record)->itunes_compat (record);
}
GInputStream *
-daap_record_read (DAAPRecord * record, GError ** err)
+dmap_av_record_read (DmapAvRecord * record, GError ** err)
{
- return DAAP_RECORD_GET_INTERFACE (record)->read (record, err);
+ return DMAP_AV_RECORD_GET_INTERFACE (record)->read (record, err);
}
gint
-daap_record_cmp_by_album (gpointer a, gpointer b, DMAPDb * db)
+dmap_av_record_cmp_by_album (gpointer a, gpointer b, DmapDb * db)
{
- DAAPRecord *record_a, *record_b;
+ DmapAvRecord *record_a, *record_b;
gchar *album_a, *album_b;
gchar *sort_album_a, *sort_album_b;
gint track_a, track_b;
gint ret;
record_a =
- DAAP_RECORD (dmap_db_lookup_by_id (db, GPOINTER_TO_UINT (a)));
+ DMAP_AV_RECORD (dmap_db_lookup_by_id (db, GPOINTER_TO_UINT (a)));
record_b =
- DAAP_RECORD (dmap_db_lookup_by_id (db, GPOINTER_TO_UINT (b)));
+ DMAP_AV_RECORD (dmap_db_lookup_by_id (db, GPOINTER_TO_UINT (b)));
g_assert (record_a);
g_assert (record_b);
@@ -258,12 +258,12 @@ daap_record_cmp_by_album (gpointer a, gpointer b, DMAPDb * db)
#include <check.h>
#include <stdio.h>
#include <stdlib.h>
-#include <libdmapsharing/test-daap-record.h>
+#include <libdmapsharing/test-dmap-av-record.h>
#include <libdmapsharing/test-dmap-db.h>
-START_TEST(daap_record_read_test)
+START_TEST(dmap_av_record_read_test)
{
- DAAPRecord *record;
+ DmapAvRecord *record;
GInputStream *stream;
GError *error = NULL;
gssize count;
@@ -287,10 +287,10 @@ START_TEST(daap_record_read_test)
sprintf(uri, "file://%s", template);
- record = DAAP_RECORD(test_daap_record_new());
+ record = DMAP_AV_RECORD(test_dmap_av_record_new());
g_object_set(record, "location", uri, NULL);
- stream = daap_record_read(record, &error);
+ stream = dmap_av_record_read(record, &error);
ck_assert(NULL == error);
@@ -309,16 +309,16 @@ START_TEST(daap_record_read_test)
}
END_TEST
-START_TEST(daap_record_read_bad_path_test)
+START_TEST(dmap_av_record_read_bad_path_test)
{
- DAAPRecord *record;
+ DmapAvRecord *record;
GError *error = NULL;
const char *uri = "/xxx";
- record = DAAP_RECORD(test_daap_record_new());
+ record = DMAP_AV_RECORD(test_dmap_av_record_new());
g_object_set(record, "location", uri, NULL);
- daap_record_read(record, &error);
+ dmap_av_record_read(record, &error);
ck_assert(NULL != error);
@@ -326,60 +326,60 @@ START_TEST(daap_record_read_bad_path_test)
}
END_TEST
-START_TEST(daap_record_itunes_compat_test)
+START_TEST(dmap_av_record_itunes_compat_test)
{
- DAAPRecord *record;
+ DmapAvRecord *record;
gboolean ok;
- record = DAAP_RECORD(test_daap_record_new());
+ record = DMAP_AV_RECORD(test_dmap_av_record_new());
g_object_set(record, "format", "mp3", NULL);
- ok = daap_record_itunes_compat(record);
+ ok = dmap_av_record_itunes_compat(record);
ck_assert(TRUE == ok);
g_object_unref(record);
}
END_TEST
-START_TEST(daap_record_itunes_compat_no_test)
+START_TEST(dmap_av_record_itunes_compat_no_test)
{
- DAAPRecord *record;
+ DmapAvRecord *record;
gboolean ok;
- record = DAAP_RECORD(test_daap_record_new());
+ record = DMAP_AV_RECORD(test_dmap_av_record_new());
g_object_set(record, "format", "ogg", NULL);
- ok = daap_record_itunes_compat(record);
+ ok = dmap_av_record_itunes_compat(record);
ck_assert(FALSE == ok);
g_object_unref(record);
}
END_TEST
-START_TEST(daap_record_cmp_by_album_test)
+START_TEST(dmap_av_record_cmp_by_album_test)
{
gint id;
gchar *album;
- TestDAAPRecord *record;
+ TestDmapAvRecord *record;
GList *records = NULL;
- DMAPDb *db = DMAP_DB(test_dmap_db_new());
+ DmapDb *db = DMAP_DB(test_dmap_db_new());
/* Create records, add to database, add identifiers to list. */
- record = test_daap_record_new();
+ record = test_dmap_av_record_new();
g_object_set(record, "songalbum", "a", NULL);
g_object_set(record, "sort-album", "a", NULL);
id = dmap_db_add(db, DMAP_RECORD(record));
g_object_unref(record);
records = g_list_append (records, GINT_TO_POINTER(id));
- record = test_daap_record_new();
+ record = test_dmap_av_record_new();
g_object_set(record, "songalbum", "c", NULL);
g_object_set(record, "sort-album", "c", NULL);
id = dmap_db_add(db, DMAP_RECORD(record));
g_object_unref(record);
records = g_list_append (records, GINT_TO_POINTER(id));
- record = test_daap_record_new();
+ record = test_dmap_av_record_new();
g_object_set(record, "songalbum", "b", NULL);
g_object_set(record, "sort-album", "b", NULL);
id = dmap_db_add(db, DMAP_RECORD(record));
@@ -388,47 +388,47 @@ START_TEST(daap_record_cmp_by_album_test)
/* Check list of record identifiers is not yet sorted (a, c, b). */
id = GPOINTER_TO_INT(g_list_nth_data(records, 0));
- record = TEST_DAAP_RECORD(dmap_db_lookup_by_id(db, id));
+ record = TEST_DMAP_AV_RECORD(dmap_db_lookup_by_id(db, id));
g_object_get(record, "songalbum", &album, NULL);
ck_assert_str_eq("a", album);
g_object_unref(record);
g_free(album);
id = GPOINTER_TO_INT(g_list_nth_data(records, 1));
- record = TEST_DAAP_RECORD(dmap_db_lookup_by_id(db, id));
+ record = TEST_DMAP_AV_RECORD(dmap_db_lookup_by_id(db, id));
g_object_get(record, "songalbum", &album, NULL);
ck_assert_str_eq("c", album);
g_object_unref(record);
g_free(album);
id = GPOINTER_TO_INT(g_list_nth_data(records, 2));
- record = TEST_DAAP_RECORD(dmap_db_lookup_by_id(db, id));
+ record = TEST_DMAP_AV_RECORD(dmap_db_lookup_by_id(db, id));
g_object_get(record, "songalbum", &album, NULL);
ck_assert_str_eq("b", album);
g_object_unref(record);
g_free(album);
records = g_list_sort_with_data(records,
- (GCompareDataFunc) daap_record_cmp_by_album,
+ (GCompareDataFunc) dmap_av_record_cmp_by_album,
db);
/* Check list of record identifiers is now sorted (a, b, c). */
id = GPOINTER_TO_INT(g_list_nth_data(records, 0));
- record = TEST_DAAP_RECORD(dmap_db_lookup_by_id(db, id));
+ record = TEST_DMAP_AV_RECORD(dmap_db_lookup_by_id(db, id));
g_object_get(record, "songalbum", &album, NULL);
ck_assert_str_eq("a", album);
g_object_unref(record);
g_free(album);
id = GPOINTER_TO_INT(g_list_nth_data(records, 1));
- record = TEST_DAAP_RECORD(dmap_db_lookup_by_id(db, id));
+ record = TEST_DMAP_AV_RECORD(dmap_db_lookup_by_id(db, id));
g_object_get(record, "songalbum", &album, NULL);
ck_assert_str_eq("b", album);
g_object_unref(record);
g_free(album);
id = GPOINTER_TO_INT(g_list_nth_data(records, 2));
- record = TEST_DAAP_RECORD(dmap_db_lookup_by_id(db, id));
+ record = TEST_DMAP_AV_RECORD(dmap_db_lookup_by_id(db, id));
g_object_get(record, "songalbum", &album, NULL);
ck_assert_str_eq("c", album);
g_object_unref(record);
@@ -439,6 +439,6 @@ START_TEST(daap_record_cmp_by_album_test)
}
END_TEST
-#include "daap-record-suite.c"
+#include "dmap-av-record-suite.c"
#endif
diff --git a/libdmapsharing/daap-record.h b/libdmapsharing/dmap-av-record.h
similarity index 52%
rename from libdmapsharing/daap-record.h
rename to libdmapsharing/dmap-av-record.h
index 4292463..596e8c9 100644
--- a/libdmapsharing/daap-record.h
+++ b/libdmapsharing/dmap-av-record.h
@@ -18,8 +18,8 @@
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
*/
-#ifndef __DAAP_RECORD_H
-#define __DAAP_RECORD_H
+#ifndef __DMAP_AV_RECORD_H
+#define __DMAP_AV_RECORD_H
#include <glib.h>
#include <gio/gio.h>
@@ -29,81 +29,81 @@
G_BEGIN_DECLS
/**
- * DAAP_TYPE_RECORD:
+ * DMAP_TYPE_AV_RECORD:
*
- * The type for #DAAPRecord.
+ * The type for #DmapAvRecord.
*/
-#define DAAP_TYPE_RECORD (daap_record_get_type ())
+#define DMAP_TYPE_AV_RECORD (dmap_av_record_get_type ())
/**
- * DAAP_RECORD:
+ * DMAP_AV_RECORD:
* @o: Object which is subject to casting.
*
- * Casts a #DAAPRecord or derived pointer into a (DAAPRecord *) pointer.
+ * Casts a #DmapAvRecord or derived pointer into a (DmapAvRecord *) pointer.
* Depending on the current debugging level, this function may invoke
* certain runtime checks to identify invalid casts.
*/
-#define DAAP_RECORD(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), \
- DAAP_TYPE_RECORD, DAAPRecord))
+#define DMAP_AV_RECORD(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), \
+ DMAP_TYPE_AV_RECORD, DmapAvRecord))
/**
- * IS_DAAP_RECORD:
- * @o: Instance to check for being a %DAAP_TYPE_RECORD.
+ * IS_DMAP_AV_RECORD:
+ * @o: Instance to check for being a %DMAP_TYPE_AV_RECORD.
*
- * Checks whether a valid #GTypeInstance pointer is of type %DAAP_TYPE_RECORD.
+ * Checks whether a valid #GTypeInstance pointer is of type %DMAP_TYPE_AV_RECORD.
*/
-#define IS_DAAP_RECORD(o) (G_TYPE_CHECK_INSTANCE_TYPE ((o), \
- DAAP_TYPE_RECORD))
+#define IS_DMAP_AV_RECORD(o) (G_TYPE_CHECK_INSTANCE_TYPE ((o), \
+ DMAP_TYPE_AV_RECORD))
/**
- * DAAP_RECORD_GET_INTERFACE:
- * @o: a #DAAPRecord instance.
+ * DMAP_AV_RECORD_GET_INTERFACE:
+ * @o: a #DmapAvRecord instance.
*
- * Get the class structure associated to a #DAAPRecord instance.
+ * Get the class structure associated to a #DmapAvRecord instance.
*
* Returns: pointer to object interface structure.
*/
-#define DAAP_RECORD_GET_INTERFACE(o) (G_TYPE_INSTANCE_GET_INTERFACE ((o), \
- DAAP_TYPE_RECORD, DAAPRecordInterface))
-typedef struct _DAAPRecord DAAPRecord;
-typedef struct _DAAPRecordInterface DAAPRecordInterface;
+#define DMAP_AV_RECORD_GET_INTERFACE(o) (G_TYPE_INSTANCE_GET_INTERFACE ((o), \
+ DMAP_TYPE_AV_RECORD, DmapAvRecordInterface))
+typedef struct _DmapAvRecord DmapAvRecord;
+typedef struct _DmapAvRecordInterface DmapAvRecordInterface;
-struct _DAAPRecordInterface
+struct _DmapAvRecordInterface
{
GTypeInterface parent;
- gboolean (*itunes_compat) (DAAPRecord * record);
- GInputStream *(*read) (DAAPRecord * record, GError ** err);
+ gboolean (*itunes_compat) (DmapAvRecord * record);
+ GInputStream *(*read) (DmapAvRecord * record, GError ** err);
};
-GType daap_record_get_type (void);
+GType dmap_av_record_get_type (void);
/**
- * daap_record_itunes_compat:
- * @record: A DAAPRecord.
+ * dmap_av_record_itunes_compat:
+ * @record: A DmapAvRecord.
*
* Returns: TRUE if record is compatible with iTunes, else FALSE.
*/
-gboolean daap_record_itunes_compat (DAAPRecord * record);
+gboolean dmap_av_record_itunes_compat (DmapAvRecord * record);
/**
- * daap_record_read:
- * @record: a DAAPRecord.
+ * dmap_av_record_read:
+ * @record: a DmapAvRecord.
* @err: a GError.
*
* Returns: A GInputStream that provides read-only access to the data stream
* associated with record.
*/
-GInputStream *daap_record_read (DAAPRecord * record, GError ** err);
+GInputStream *dmap_av_record_read (DmapAvRecord * record, GError ** err);
/**
- * daap_record_cmp_by_album:
+ * dmap_av_record_cmp_by_album:
* @a: first ID.
* @b: second ID.
- * @db: A DMAPDb for which a and b are valid ID's.
+ * @db: A DmapDb for which a and b are valid ID's.
*
* Compares the two records associated with the provided keys according
* to album. Suitable to sort lists of albums.
*/
-gint daap_record_cmp_by_album (gpointer a, gpointer b, DMAPDb * db);
+gint dmap_av_record_cmp_by_album (gpointer a, gpointer b, DmapDb * db);
-#endif /* __DAAP_RECORD_H */
+#endif /* __DMAP_AV_RECORD_H */
G_END_DECLS
diff --git a/libdmapsharing/daap-share.c b/libdmapsharing/dmap-av-share.c
similarity index 90%
rename from libdmapsharing/daap-share.c
rename to libdmapsharing/dmap-av-share.c
index 29280f3..1cea7c1 100644
--- a/libdmapsharing/daap-share.c
+++ b/libdmapsharing/dmap-av-share.c
@@ -43,69 +43,69 @@
#include <libdmapsharing/dmap-gst-input-stream.h>
#endif /* HAVE_GSTREAMERAPP */
-guint daap_share_get_desired_port (DMAPShare * share);
-const char *daap_share_get_type_of_service (DMAPShare * share);
-void daap_share_server_info (DMAPShare * share,
+guint dmap_av_share_get_desired_port (DmapShare * share);
+const char *dmap_av_share_get_type_of_service (DmapShare * share);
+void dmap_av_share_server_info (DmapShare * share,
SoupServer * server,
SoupMessage * message,
const char *path,
GHashTable * query, SoupClientContext * context);
-void daap_share_message_add_standard_headers (DMAPShare * share,
+void dmap_av_share_message_add_standard_headers (DmapShare * share,
SoupMessage * message);
-static void databases_browse_xxx (DMAPShare * share,
+static void databases_browse_xxx (DmapShare * share,
SoupServer * server,
SoupMessage * msg,
const char *path,
GHashTable * query,
SoupClientContext * context);
-static void databases_items_xxx (DMAPShare * share,
+static void databases_items_xxx (DmapShare * share,
SoupServer * server,
SoupMessage * msg,
const char *path,
GHashTable * query,
SoupClientContext * context);
-static struct DMAPMetaDataMap *get_meta_data_map (DMAPShare * share);
-static void add_entry_to_mlcl (guint id, DMAPRecord * record, gpointer mb);
+static struct DmapMetaDataMap *get_meta_data_map (DmapShare * share);
+static void add_entry_to_mlcl (guint id, DmapRecord * record, gpointer mb);
#define DAAP_TYPE_OF_SERVICE "_daap._tcp"
#define DAAP_PORT 3689
-G_DEFINE_TYPE (DAAPShare, daap_share, DMAP_TYPE_SHARE);
+G_DEFINE_TYPE (DmapAvShare, dmap_av_share, DMAP_TYPE_SHARE);
static void
-daap_share_class_init (DAAPShareClass * klass)
+dmap_av_share_class_init (DmapAvShareClass * klass)
{
GObjectClass *object_class = G_OBJECT_CLASS (klass);
- DMAPShareClass *parent_class = DMAP_SHARE_CLASS (object_class);
+ DmapShareClass *parent_class = DMAP_SHARE_CLASS (object_class);
- parent_class->get_desired_port = daap_share_get_desired_port;
- parent_class->get_type_of_service = daap_share_get_type_of_service;
+ parent_class->get_desired_port = dmap_av_share_get_desired_port;
+ parent_class->get_type_of_service = dmap_av_share_get_type_of_service;
parent_class->message_add_standard_headers =
- daap_share_message_add_standard_headers;
+ dmap_av_share_message_add_standard_headers;
parent_class->get_meta_data_map = get_meta_data_map;
parent_class->add_entry_to_mlcl = add_entry_to_mlcl;
parent_class->databases_browse_xxx = databases_browse_xxx;
parent_class->databases_items_xxx = databases_items_xxx;
- parent_class->server_info = daap_share_server_info;
+ parent_class->server_info = dmap_av_share_server_info;
}
static void
-daap_share_init (DAAPShare * share)
+dmap_av_share_init (DmapAvShare * share)
{
}
-DAAPShare *
-daap_share_new (const char *name,
+DmapAvShare *
+dmap_av_share_new (const char *name,
const char *password,
- DMAPDb * db,
- DMAPContainerDb * container_db, gchar * transcode_mimetype)
+ DmapDb * db,
+ DmapContainerDb * container_db, gchar * transcode_mimetype)
{
- DAAPShare *share;
+ DmapAvShare *share;
g_object_ref (db);
g_object_ref (container_db);
- share = DAAP_SHARE (g_object_new (DAAP_TYPE_SHARE,
+ share = DMAP_AV_SHARE (g_object_new (DMAP_TYPE_AV_SHARE,
"name", name,
"password", password,
"db", db,
@@ -120,7 +120,7 @@ daap_share_new (const char *name,
}
void
-daap_share_message_add_standard_headers (DMAPShare * share,
+dmap_av_share_message_add_standard_headers (DmapShare * share,
SoupMessage * message)
{
soup_message_headers_append (message->response_headers, "DMAP-Server",
@@ -132,19 +132,19 @@ daap_share_message_add_standard_headers (DMAPShare * share,
#define DAAP_TIMEOUT 1800
guint
-daap_share_get_desired_port (DMAPShare * share)
+dmap_av_share_get_desired_port (DmapShare * share)
{
return DAAP_PORT;
}
const char *
-daap_share_get_type_of_service (DMAPShare * share)
+dmap_av_share_get_type_of_service (DmapShare * share)
{
return DAAP_TYPE_OF_SERVICE;
}
void
-daap_share_server_info (DMAPShare * share,
+dmap_av_share_server_info (DmapShare * share,
SoupServer * server,
SoupMessage * message,
const char *path,
@@ -256,7 +256,7 @@ typedef enum
PARENT_CONTAINER_ID
} DAAPMetaData;
-static struct DMAPMetaDataMap meta_data_map[] = {
+static struct DmapMetaDataMap meta_data_map[] = {
{"dmap.itemid", ITEM_ID},
{"dmap.itemname", ITEM_NAME},
{"dmap.itemkind", ITEM_KIND},
@@ -341,7 +341,7 @@ done:
static void
send_chunked_file (SoupServer * server, SoupMessage * message,
- DAAPRecord * record, guint64 filesize, guint64 offset,
+ DmapAvRecord * record, guint64 filesize, guint64 offset,
const gchar * transcode_mimetype)
{
gchar *format = NULL;
@@ -366,7 +366,7 @@ send_chunked_file (SoupServer * server, SoupMessage * message,
cd->server = server;
- stream = G_INPUT_STREAM (daap_record_read (record, &error));
+ stream = G_INPUT_STREAM (dmap_av_record_read (record, &error));
if (error != NULL) {
g_warning ("Couldn't open %s: %s.", location, error->message);
goto done;
@@ -478,7 +478,7 @@ done:
}
static void
-add_entry_to_mlcl (guint id, DMAPRecord * record, gpointer _mb)
+add_entry_to_mlcl (guint id, DmapRecord * record, gpointer _mb)
{
GNode *mlit;
gboolean has_video = 0;
@@ -511,7 +511,7 @@ add_entry_to_mlcl (guint id, DMAPRecord * record, gpointer _mb)
(gchar) DAAP_SONG_DATA_KIND_NONE);
/* FIXME: Any use for this?
* if (_dmap_share_client_requested (mb->bits, SONG_DATA_URL))
- * dmap_structure_add (mlit, DMAP_CC_ASUL,
"daap://192.168.0.100:%u/databases/1/items/%d.%s?session-id=%s", data->port, *id, daap_record_get_format
(DAAP_RECORD (record)), data->session_id);
+ * dmap_structure_add (mlit, DMAP_CC_ASUL,
"daap://192.168.0.100:%u/databases/1/items/%d.%s?session-id=%s", data->port, *id, dmap_av_record_get_format
(DMAP_AV_RECORD (record)), data->session_id);
*/
if (_dmap_share_client_requested (mb->bits, SONG_ALBUM)) {
gchar *album = NULL;
@@ -680,7 +680,7 @@ add_entry_to_mlcl (guint id, DMAPRecord * record, gpointer _mb)
}
static void
-genre_tabulator (gpointer id, DMAPRecord * record, GHashTable * ht)
+genre_tabulator (gpointer id, DmapRecord * record, GHashTable * ht)
{
const gchar *genre;
@@ -692,7 +692,7 @@ genre_tabulator (gpointer id, DMAPRecord * record, GHashTable * ht)
}
static void
-artist_tabulator (gpointer id, DMAPRecord * record, GHashTable * ht)
+artist_tabulator (gpointer id, DmapRecord * record, GHashTable * ht)
{
const gchar *artist;
@@ -704,7 +704,7 @@ artist_tabulator (gpointer id, DMAPRecord * record, GHashTable * ht)
}
static void
-album_tabulator (gpointer id, DMAPRecord * record, GHashTable * ht)
+album_tabulator (gpointer id, DmapRecord * record, GHashTable * ht)
{
const gchar *album;
@@ -726,7 +726,7 @@ add_to_category_listing (gpointer key, gpointer user_data)
}
static void
-databases_browse_xxx (DMAPShare * share,
+databases_browse_xxx (DmapShare * share,
SoupServer * server,
SoupMessage * msg,
const char *path,
@@ -741,7 +741,7 @@ databases_browse_xxx (DMAPShare * share,
* MLIT listing item
* ...
*/
- DMAPDb *db;
+ DmapDb *db;
const gchar *rest_of_path;
GNode *abro, *node;
gchar *filter;
@@ -750,7 +750,7 @@ databases_browse_xxx (DMAPShare * share,
guint num_genre;
const gchar *browse_category;
GHashTable *category_items;
- DMAPContentCode category_cc;
+ DmapContentCode category_cc;
GList *values;
rest_of_path = strchr (path + 1, '/');
@@ -811,13 +811,13 @@ databases_browse_xxx (DMAPShare * share,
}
static void
-databases_items_xxx (DMAPShare * share,
+databases_items_xxx (DmapShare * share,
SoupServer * server,
SoupMessage * msg,
const char *path,
GHashTable * query, SoupClientContext * context)
{
- DMAPDb *db;
+ DmapDb *db;
gchar *transcode_mimetype = NULL;
const gchar *rest_of_path;
const gchar *id_str;
@@ -825,14 +825,14 @@ databases_items_xxx (DMAPShare * share,
const gchar *range_header;
guint64 filesize;
guint64 offset = 0;
- DAAPRecord *record;
+ DmapAvRecord *record;
rest_of_path = strchr (path + 1, '/');
id_str = rest_of_path + 9;
id = strtoul (id_str, NULL, 10);
g_object_get (share, "db", &db, NULL);
- record = DAAP_RECORD (dmap_db_lookup_by_id (db, id));
+ record = DMAP_AV_RECORD (dmap_db_lookup_by_id (db, id));
g_object_get (record, "filesize", &filesize, NULL);
DMAP_SHARE_GET_CLASS (share)->message_add_standard_headers
@@ -876,8 +876,8 @@ databases_items_xxx (DMAPShare * share,
g_free(transcode_mimetype);
}
-static struct DMAPMetaDataMap *
-get_meta_data_map (DMAPShare * share)
+static struct DmapMetaDataMap *
+get_meta_data_map (DmapShare * share)
{
return meta_data_map;
}
@@ -886,21 +886,21 @@ get_meta_data_map (DMAPShare * share)
#include <check.h>
#include <libdmapsharing/test-dmap-db.h>
-#include <libdmapsharing/test-daap-record.h>
+#include <libdmapsharing/test-dmap-av-record.h>
#include <libdmapsharing/test-dmap-container-db.h>
#include <libdmapsharing/test-dmap-container-record.h>
#include <sys/types.h>
#include <sys/stat.h>
#include <unistd.h>
-static DMAPShare *
+static DmapShare *
_build_share(char *name)
{
- DMAPDb *db;
- DMAPContainerRecord *container_record;
- DMAPContainerDb *container_db;
- DMAPRecord *record;
- DMAPShare *share;
+ DmapDb *db;
+ DmapContainerRecord *container_record;
+ DmapContainerDb *container_db;
+ DmapRecord *record;
+ DmapShare *share;
struct stat statbuf;
db = DMAP_DB(test_dmap_db_new());
@@ -911,7 +911,7 @@ _build_share(char *name)
ck_abort();
}
- record = DMAP_RECORD(test_daap_record_new());
+ record = DMAP_RECORD(test_dmap_av_record_new());
g_object_set(record, "songgenre", "genre1", NULL);
g_object_set(record, "songartist", "artist1", NULL);
g_object_set(record, "songalbum", "album1", NULL);
@@ -923,7 +923,7 @@ _build_share(char *name)
ck_abort();
}
- record = DMAP_RECORD(test_daap_record_new());
+ record = DMAP_RECORD(test_dmap_av_record_new());
g_object_set(record, "songgenre", "genre2", NULL);
g_object_set(record, "songartist", "artist2", NULL);
g_object_set(record, "songalbum", "album2", NULL);
@@ -931,7 +931,7 @@ _build_share(char *name)
g_object_set(record, "filesize", statbuf.st_size, NULL);
dmap_db_add(db, record);
- share = DMAP_SHARE(daap_share_new(name,
+ share = DMAP_SHARE(dmap_av_share_new(name,
NULL,
db,
container_db,
@@ -944,26 +944,26 @@ _build_share(char *name)
return share;
}
-START_TEST(daap_share_get_desired_port_test)
+START_TEST(dmap_av_share_get_desired_port_test)
{
- DMAPShare *share = _build_share("daap_share_get_desired_port_test");
- ck_assert_int_eq(DAAP_PORT, daap_share_get_desired_port(share));
+ DmapShare *share = _build_share("dmap_av_share_get_desired_port_test");
+ ck_assert_int_eq(DAAP_PORT, dmap_av_share_get_desired_port(share));
g_object_unref(share);
}
END_TEST
-START_TEST(daap_share_get_type_of_service_test)
+START_TEST(dmap_av_share_get_type_of_service_test)
{
- DMAPShare *share = _build_share("daap_share_get_type_of_service_test");
- ck_assert_str_eq(DAAP_TYPE_OF_SERVICE, daap_share_get_type_of_service(share));
+ DmapShare *share = _build_share("dmap_av_share_get_type_of_service_test");
+ ck_assert_str_eq(DAAP_TYPE_OF_SERVICE, dmap_av_share_get_type_of_service(share));
g_object_unref(share);
}
END_TEST
-START_TEST(daap_share_server_info_test)
+START_TEST(dmap_av_share_server_info_test)
{
- char *nameprop = "daap_share_server_info_test";
- DMAPShare *share;
+ char *nameprop = "dmap_av_share_server_info_test";
+ DmapShare *share;
SoupServer *server;
SoupMessage *message;
SoupMessageBody *body;
@@ -971,7 +971,7 @@ START_TEST(daap_share_server_info_test)
const guint8 *data;
gsize length;
GNode *root;
- DMAPStructureItem *item;
+ DmapStructureItem *item;
share = _build_share(nameprop);
server = soup_server_new(NULL, NULL);
@@ -980,7 +980,7 @@ START_TEST(daap_share_server_info_test)
/* Causes auth. method to be set to DMAP_SHARE_AUTH_METHOD_PASSWORD. */
g_object_set(share, "password", "password", NULL);
- daap_share_server_info(share, server, message, "/", NULL, NULL);
+ dmap_av_share_server_info(share, server, message, "/", NULL, NULL);
g_object_get(message, "response-body", &body, NULL);
buffer = soup_message_body_flatten(body);
@@ -1040,14 +1040,14 @@ START_TEST(daap_share_server_info_test)
}
END_TEST
-START_TEST(daap_share_message_add_standard_headers_test)
+START_TEST(dmap_av_share_message_add_standard_headers_test)
{
const char *header;
- DMAPShare *share;
+ DmapShare *share;
SoupMessage *message;
SoupMessageHeaders *headers;
- share = _build_share("daap_share_message_add_standard_headers_test");
+ share = _build_share("dmap_av_share_message_add_standard_headers_test");
message = soup_message_new(SOUP_METHOD_GET, "http://test/");
soup_message_headers_append(message->response_headers,
@@ -1065,7 +1065,7 @@ END_TEST
START_TEST(databases_browse_xxx_test)
{
char *nameprop = "databases_browse_xxx_test";
- DMAPShare *share;
+ DmapShare *share;
SoupServer *server;
SoupMessage *message;
GHashTable *query;
@@ -1074,7 +1074,7 @@ START_TEST(databases_browse_xxx_test)
const guint8 *data;
gsize length;
GNode *root;
- DMAPStructureItem *item;
+ DmapStructureItem *item;
share = _build_share(nameprop);
server = soup_server_new(NULL, NULL);
@@ -1110,9 +1110,9 @@ START_TEST(databases_browse_xxx_test)
ck_assert(NULL != root);
ck_assert_str_eq("genre2",
- ((DMAPStructureItem *) root->children->data)->content.data->v_pointer);
+ ((DmapStructureItem *) root->children->data)->content.data->v_pointer);
ck_assert_str_eq("genre1",
- ((DMAPStructureItem *) root->next->children->data)->content.data->v_pointer);
+ ((DmapStructureItem *) root->next->children->data)->content.data->v_pointer);
g_object_unref(share);
g_hash_table_destroy(query);
@@ -1122,7 +1122,7 @@ END_TEST
START_TEST(databases_browse_xxx_artists_test)
{
char *nameprop = "databases_browse_xxx_artists_test";
- DMAPShare *share;
+ DmapShare *share;
SoupServer *server;
SoupMessage *message;
GHashTable *query;
@@ -1151,9 +1151,9 @@ START_TEST(databases_browse_xxx_artists_test)
ck_assert(NULL != root);
ck_assert_str_eq("artist2",
- ((DMAPStructureItem *) root->children->data)->content.data->v_pointer);
+ ((DmapStructureItem *) root->children->data)->content.data->v_pointer);
ck_assert_str_eq("artist1",
- ((DMAPStructureItem *) root->next->children->data)->content.data->v_pointer);
+ ((DmapStructureItem *) root->next->children->data)->content.data->v_pointer);
g_object_unref(share);
g_hash_table_destroy(query);
@@ -1163,7 +1163,7 @@ END_TEST
START_TEST(databases_browse_xxx_albums_test)
{
char *nameprop = "databases_browse_xxx_albums_test";
- DMAPShare *share;
+ DmapShare *share;
SoupServer *server;
SoupMessage *message;
GHashTable *query;
@@ -1192,9 +1192,9 @@ START_TEST(databases_browse_xxx_albums_test)
ck_assert(NULL != root);
ck_assert_str_eq("album2",
- ((DMAPStructureItem *) root->children->data)->content.data->v_pointer);
+ ((DmapStructureItem *) root->children->data)->content.data->v_pointer);
ck_assert_str_eq("album1",
- ((DMAPStructureItem *) root->next->children->data)->content.data->v_pointer);
+ ((DmapStructureItem *) root->next->children->data)->content.data->v_pointer);
g_object_unref(share);
g_hash_table_destroy(query);
@@ -1204,7 +1204,7 @@ END_TEST
START_TEST(databases_browse_xxx_bad_category_test)
{
char *nameprop = "databases_browse_xxx_bad_category_test";
- DMAPShare *share;
+ DmapShare *share;
SoupServer *server;
SoupMessage *message;
GHashTable *query;
@@ -1238,17 +1238,17 @@ END_TEST
START_TEST(databases_items_xxx_test)
{
char *nameprop = "databases_items_xxx_test";
- DMAPShare *share;
+ DmapShare *share;
SoupServer *server;
SoupMessage *message;
SoupMessageBody *body = NULL;
SoupBuffer *buffer;
gsize length;
GNode *root;
- DMAPStructureItem *item;
+ DmapStructureItem *item;
char path[PATH_MAX + 1];
- DMAPDb *db = NULL;
- DMAPRecord *record = NULL;
+ DmapDb *db = NULL;
+ DmapRecord *record = NULL;
guint64 size1 = 0, size2 = 0;
const guint8 *contents1;
char *location, *contents2, *etag_out;
@@ -1308,7 +1308,7 @@ END_TEST
START_TEST(databases_items_xxx_test_bad_id)
{
char *nameprop = "databases_items_xxx_test";
- DMAPShare *share;
+ DmapShare *share;
SoupServer *server;
SoupMessage *message;
SoupMessageBody *body;
@@ -1316,7 +1316,7 @@ START_TEST(databases_items_xxx_test_bad_id)
const guint8 *data;
gsize length;
GNode *root;
- DMAPStructureItem *item;
+ DmapStructureItem *item;
char path[PATH_MAX + 1];
share = _build_share(nameprop);
@@ -1331,6 +1331,6 @@ START_TEST(databases_items_xxx_test_bad_id)
}
END_TEST
-#include "daap-share-suite.c"
+#include "dmap-av-share-suite.c"
#endif
diff --git a/libdmapsharing/dmap-av-share.h b/libdmapsharing/dmap-av-share.h
new file mode 100644
index 0000000..c84c93d
--- /dev/null
+++ b/libdmapsharing/dmap-av-share.h
@@ -0,0 +1,118 @@
+/*
+ * Header for DAAP (e.g., iTunes Music) sharing
+ *
+ * Copyright (C) 2005 Charles Schmidt <cschmidt2 emich edu>
+ *
+ * Modifications 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 __DMAP_AV_SHARE_H
+#define __DMAP_AV_SHARE_H
+
+#include <glib-object.h>
+
+#include <libdmapsharing/dmap-share.h>
+#include <libdmapsharing/dmap-db.h>
+#include <libdmapsharing/dmap-container-db.h>
+
+G_BEGIN_DECLS
+/**
+ * DMAP_TYPE_AV_SHARE:
+ *
+ * The type for #DmapAvShare.
+ */
+#define DMAP_TYPE_AV_SHARE (dmap_av_share_get_type ())
+/**
+ * DMAP_AV_SHARE:
+ * @o: Object which is subject to casting.
+ *
+ * Casts a #DmapAvShare or derived pointer into a (DmapAvShare*) pointer.
+ * Depending on the current debugging level, this function may invoke
+ * certain runtime checks to identify invalid casts.
+ */
+#define DMAP_AV_SHARE(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), \
+ DMAP_TYPE_AV_SHARE, DmapAvShare))
+/**
+ * DMAP_AV_SHARE_CLASS:
+ * @k: a valid #DmapAvShareClass
+ *
+ * Casts a derived #DmapAvShareClass structure into a #DmapAvShareClass structure.
+ */
+#define DMAP_AV_SHARE_CLASS(k) (G_TYPE_CHECK_CLASS_CAST((k), \
+ DMAP_TYPE_AV_SHARE, DmapAvShareClass))
+/**
+ * IS_DMAP_AV_SHARE:
+ * @o: Instance to check for being a %DMAP_TYPE_AV_SHARE.
+ *
+ * Checks whether a valid #GTypeInstance pointer is of type %DMAP_TYPE_AV_SHARE.
+ */
+#define IS_DMAP_AV_SHARE(o) (G_TYPE_CHECK_INSTANCE_TYPE ((o), \
+ DMAP_TYPE_AV_SHARE))
+/**
+ * IS_DMAP_AV_SHARE_CLASS:
+ * @k: a #DmapAvShareClass
+ *
+ * Checks whether @k "is a" valid #DmapAvShareClass structure of type
+ * %DMAP_AV_SHARE or derived.
+ */
+#define IS_DMAP_AV_SHARE_CLASS(k) (G_TYPE_CHECK_CLASS_TYPE ((k), \
+ DMAP_TYPE_AV_SHARE))
+/**
+ * DMAP_AV_SHARE_GET_CLASS:
+ * @o: a #DmapAvShare instance.
+ *
+ * Get the class structure associated to a #DmapAvShare instance.
+ *
+ * Returns: pointer to object class structure.
+ */
+#define DMAP_AV_SHARE_GET_CLASS(o) (G_TYPE_INSTANCE_GET_CLASS ((o), \
+ DMAP_TYPE_AV_SHARE, DmapAvShareClass))
+typedef struct DmapAvSharePrivate DmapAvSharePrivate;
+
+typedef struct
+{
+ DmapShareClass dmap_share_class;
+} DmapAvShareClass;
+
+typedef struct
+{
+ DmapShare dmap_share_instance;
+ DmapAvSharePrivate *priv;
+} DmapAvShare;
+
+GType dmap_av_share_get_type (void);
+
+/**
+ * dmap_av_share_new:
+ * @name: The name that will be published by mDNS.
+ * @password: A share password or NULL.
+ * @db: A media database.
+ * @container_db: A container (album) database.
+ * @transcode_mimetype: A transcode mimetype or NULL.
+ *
+ * Creates a new DAAP share and publishes it using mDNS.
+ *
+ * Returns: a pointer to a DmapAvShare.
+ */
+DmapAvShare *dmap_av_share_new (const char *name, const char *password,
+ DmapDb * db, DmapContainerDb * container_db,
+ gchar * transcode_mimetype);
+
+#endif /* __DMAP_AV_SHARE_H */
+
+G_END_DECLS
diff --git a/libdmapsharing/dmap-connection.c b/libdmapsharing/dmap-connection.c
index 59112c3..82fbb83 100644
--- a/libdmapsharing/dmap-connection.c
+++ b/libdmapsharing/dmap-connection.c
@@ -39,12 +39,12 @@
#define ITUNES_7_SERVER "iTunes/7"
-static gboolean dmap_connection_do_something (DMAPConnection * connection);
+static gboolean dmap_connection_do_something (DmapConnection * connection);
-G_DEFINE_TYPE (DMAPConnection, dmap_connection, G_TYPE_OBJECT);
-#define DMAP_CONNECTION_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), DMAP_TYPE_CONNECTION,
DMAPConnectionPrivate))
+G_DEFINE_TYPE (DmapConnection, dmap_connection, G_TYPE_OBJECT);
+#define DMAP_CONNECTION_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), DMAP_TYPE_CONNECTION,
DmapConnectionPrivate))
-struct DMAPConnectionPrivate
+struct DmapConnectionPrivate
{
char *name;
char *username;
@@ -70,10 +70,10 @@ struct DMAPConnectionPrivate
GSList *playlists;
GHashTable *item_id_to_uri;
- DMAPDb *db;
- DMAPRecordFactory *record_factory;
+ DmapDb *db;
+ DmapRecordFactory *record_factory;
- DMAPConnectionState state;
+ DmapConnectionState state;
gboolean use_response_handler_thread;
float progress;
@@ -117,7 +117,7 @@ static guint signals[LAST_SIGNAL] = { 0, };
static void
dmap_connection_dispose (GObject * object)
{
- DMAPConnectionPrivate *priv = DMAP_CONNECTION (object)->priv;
+ DmapConnectionPrivate *priv = DMAP_CONNECTION (object)->priv;
GSList *l;
g_debug ("DAAP connection dispose");
@@ -134,7 +134,7 @@ dmap_connection_dispose (GObject * object)
if (priv->playlists) {
for (l = priv->playlists; l; l = l->next) {
- DMAPPlaylist *playlist = l->data;
+ DmapPlaylist *playlist = l->data;
/* FIXME: refstring: */
g_list_foreach (playlist->uris, (GFunc) g_free, NULL);
@@ -185,7 +185,7 @@ dmap_connection_finalize (GObject * object)
{
g_debug ("Finalize");
- DMAPConnection *connection;
+ DmapConnection *connection;
g_return_if_fail (object != NULL);
g_return_if_fail (IS_DMAP_CONNECTION (object));
@@ -207,7 +207,7 @@ dmap_connection_set_property (GObject * object,
guint prop_id,
const GValue * value, GParamSpec * pspec)
{
- DMAPConnectionPrivate *priv = DMAP_CONNECTION (object)->priv;
+ DmapConnectionPrivate *priv = DMAP_CONNECTION (object)->priv;
switch (prop_id) {
case PROP_NAME:
@@ -271,7 +271,7 @@ dmap_connection_get_property (GObject * object,
guint prop_id,
GValue * value, GParamSpec * pspec)
{
- DMAPConnectionPrivate *priv = DMAP_CONNECTION (object)->priv;
+ DmapConnectionPrivate *priv = DMAP_CONNECTION (object)->priv;
switch (prop_id) {
case PROP_DB:
@@ -314,7 +314,7 @@ dmap_connection_get_property (GObject * object,
}
static void
-dmap_connection_class_init (DMAPConnectionClass * klass)
+dmap_connection_class_init (DmapConnectionClass * klass)
{
GObjectClass *object_class = G_OBJECT_CLASS (klass);
@@ -327,13 +327,13 @@ dmap_connection_class_init (DMAPConnectionClass * klass)
object_class->set_property = dmap_connection_set_property;
object_class->get_property = dmap_connection_get_property;
- g_type_class_add_private (klass, sizeof (DMAPConnectionPrivate));
+ g_type_class_add_private (klass, sizeof (DmapConnectionPrivate));
g_object_class_install_property (object_class,
PROP_DB,
g_param_spec_object ("db",
- "DMAPDb",
- "DMAPDb object",
+ "DmapDb",
+ "DmapDb object",
DMAP_TYPE_DB,
G_PARAM_READWRITE
|
@@ -432,7 +432,7 @@ dmap_connection_class_init (DMAPConnectionClass * klass)
(object_class),
G_SIGNAL_RUN_LAST,
G_STRUCT_OFFSET
- (DMAPConnectionClass,
+ (DmapConnectionClass,
authenticate), NULL, NULL,
dmap_marshal_generated_VOID__STRING_POINTER_POINTER_POINTER_BOOLEAN,
G_TYPE_NONE, 5,
@@ -444,40 +444,40 @@ dmap_connection_class_init (DMAPConnectionClass * klass)
signals[CONNECTING] =
g_signal_new ("connecting", G_TYPE_FROM_CLASS (object_class),
G_SIGNAL_RUN_LAST,
- G_STRUCT_OFFSET (DMAPConnectionClass,
+ G_STRUCT_OFFSET (DmapConnectionClass,
connecting), NULL, NULL,
dmap_marshal_generated_VOID__ULONG_FLOAT, G_TYPE_NONE, 2,
G_TYPE_ULONG, G_TYPE_FLOAT);
signals[CONNECTED] =
g_signal_new ("connected", G_TYPE_FROM_CLASS (object_class),
G_SIGNAL_RUN_LAST,
- G_STRUCT_OFFSET (DMAPConnectionClass,
+ G_STRUCT_OFFSET (DmapConnectionClass,
connected), NULL, NULL,
g_cclosure_marshal_VOID__VOID, G_TYPE_NONE, 0);
signals[DISCONNECTED] =
g_signal_new ("disconnected",
G_TYPE_FROM_CLASS (object_class),
G_SIGNAL_RUN_LAST,
- G_STRUCT_OFFSET (DMAPConnectionClass,
+ G_STRUCT_OFFSET (DmapConnectionClass,
disconnected), NULL, NULL,
g_cclosure_marshal_VOID__VOID, G_TYPE_NONE, 0);
signals[OPERATION_DONE] =
g_signal_new ("operation-done",
G_TYPE_FROM_CLASS (object_class),
G_SIGNAL_RUN_FIRST,
- G_STRUCT_OFFSET (DMAPConnectionClass,
+ G_STRUCT_OFFSET (DmapConnectionClass,
operation_done), NULL, NULL,
g_cclosure_marshal_VOID__VOID, G_TYPE_NONE, 0);
}
static void
-dmap_connection_init (DMAPConnection * connection)
+dmap_connection_init (DmapConnection * connection)
{
connection->priv = DMAP_CONNECTION_GET_PRIVATE (connection);
}
static void
-connection_connected (DMAPConnection * connection)
+connection_connected (DmapConnection * connection)
{
g_debug ("Emitting connected");
@@ -489,7 +489,7 @@ connection_connected (DMAPConnection * connection)
}
static void
-connection_disconnected (DMAPConnection * connection)
+connection_disconnected (DmapConnection * connection)
{
g_debug ("Emitting disconnected");
@@ -501,7 +501,7 @@ connection_disconnected (DMAPConnection * connection)
}
static void
-connection_operation_done (DMAPConnection * connection)
+connection_operation_done (DmapConnection * connection)
{
g_debug ("Emitting operation done");
@@ -511,7 +511,7 @@ connection_operation_done (DMAPConnection * connection)
}
SoupMessage *
-dmap_connection_build_message (DMAPConnection * connection,
+dmap_connection_build_message (DmapConnection * connection,
const char *path,
gboolean need_hash,
gdouble version,
@@ -573,7 +573,7 @@ g_zfree_wrapper (voidpf opaque, voidpf address)
#endif
static void
-connection_set_error_message (DMAPConnection * connection,
+connection_set_error_message (DmapConnection * connection,
const char *message)
{
/* FIXME: obtain a lock */
@@ -589,14 +589,14 @@ typedef struct
{
SoupMessage *message;
int status;
- DMAPConnection *connection;
+ DmapConnection *connection;
- DMAPResponseHandler response_handler;
+ DmapResponseHandler response_handler;
gpointer user_data;
} DAAPResponseData;
static gboolean
-emit_progress_idle (DMAPConnection * connection)
+emit_progress_idle (DmapConnection * connection)
{
g_debug ("Emitting progress");
@@ -611,7 +611,7 @@ emit_progress_idle (DMAPConnection * connection)
static void
actual_http_response_handler (DAAPResponseData * data)
{
- DMAPConnectionPrivate *priv;
+ DmapConnectionPrivate *priv;
GNode *structure;
char *new_response = NULL;
const char *response;
@@ -730,7 +730,7 @@ actual_http_response_handler (DAAPResponseData * data)
connection_set_error_message (data->connection,
("libdmapsharing is not able to connect to iTunes 7 shares"));
} else if (SOUP_STATUS_IS_SUCCESSFUL (data->status)) {
- DMAPStructureItem *item;
+ DmapStructureItem *item;
if ( /* FIXME: !rb_is_main_thread () */ TRUE) {
priv->progress = -1.0f;
@@ -836,16 +836,16 @@ http_response_handler (SoupSession * session,
}
static gboolean
-http_get (DMAPConnection * connection,
+http_get (DmapConnection * connection,
const char *path,
gboolean need_hash,
gdouble version,
gint req_id,
gboolean send_close,
- DMAPResponseHandler handler,
+ DmapResponseHandler handler,
gpointer user_data, gboolean use_thread)
{
- DMAPConnectionPrivate *priv = connection->priv;
+ DmapConnectionPrivate *priv = connection->priv;
DAAPResponseData *data;
SoupMessage *message;
@@ -876,20 +876,20 @@ http_get (DMAPConnection * connection,
}
gboolean
-dmap_connection_get (DMAPConnection * self,
+dmap_connection_get (DmapConnection * self,
const gchar * path,
gboolean need_hash,
- DMAPResponseHandler handler, gpointer user_data)
+ DmapResponseHandler handler, gpointer user_data)
{
return http_get (self, path, need_hash,
self->priv->dmap_version, 0, FALSE,
- (DMAPResponseHandler) handler, user_data, FALSE);
+ (DmapResponseHandler) handler, user_data, FALSE);
}
static void
-dmap_connection_state_done (DMAPConnection * connection, gboolean result)
+dmap_connection_state_done (DmapConnection * connection, gboolean result)
{
- DMAPConnectionPrivate *priv = connection->priv;
+ DmapConnectionPrivate *priv = connection->priv;
g_debug ("Transitioning to next state from %d", priv->state);
@@ -948,11 +948,11 @@ dmap_connection_state_done (DMAPConnection * connection, gboolean result)
}
static void
-handle_server_info (DMAPConnection * connection,
+handle_server_info (DmapConnection * connection,
guint status, GNode * structure, gpointer user_data)
{
- DMAPConnectionPrivate *priv = connection->priv;
- DMAPStructureItem *item = NULL;
+ DmapConnectionPrivate *priv = connection->priv;
+ DmapStructureItem *item = NULL;
if (!SOUP_STATUS_IS_SUCCESSFUL (status) || structure == NULL) {
dmap_connection_state_done (connection, FALSE);
@@ -974,11 +974,11 @@ handle_server_info (DMAPConnection * connection,
}
static void
-handle_login (DMAPConnection * connection,
+handle_login (DmapConnection * connection,
guint status, GNode * structure, gpointer user_data)
{
- DMAPConnectionPrivate *priv = connection->priv;
- DMAPStructureItem *item = NULL;
+ DmapConnectionPrivate *priv = connection->priv;
+ DmapStructureItem *item = NULL;
if (status == SOUP_STATUS_UNAUTHORIZED
|| status == SOUP_STATUS_FORBIDDEN) {
@@ -1013,11 +1013,11 @@ handle_login (DMAPConnection * connection,
}
static void
-handle_update (DMAPConnection * connection,
+handle_update (DmapConnection * connection,
guint status, GNode * structure, gpointer user_data)
{
- DMAPConnectionPrivate *priv = connection->priv;
- DMAPStructureItem *item;
+ DmapConnectionPrivate *priv = connection->priv;
+ DmapStructureItem *item;
if (structure == NULL || SOUP_STATUS_IS_SUCCESSFUL (status) == FALSE) {
dmap_connection_state_done (connection, FALSE);
@@ -1037,11 +1037,11 @@ handle_update (DMAPConnection * connection,
}
static void
-handle_database_info (DMAPConnection * connection,
+handle_database_info (DmapConnection * connection,
guint status, GNode * structure, gpointer user_data)
{
- DMAPConnectionPrivate *priv = connection->priv;
- DMAPStructureItem *item = NULL;
+ DmapConnectionPrivate *priv = connection->priv;
+ DmapStructureItem *item = NULL;
GNode *listing_node;
gint n_databases = 0;
@@ -1084,11 +1084,11 @@ handle_database_info (DMAPConnection * connection,
}
static void
-handle_song_listing (DMAPConnection * connection,
+handle_song_listing (DmapConnection * connection,
guint status, GNode * structure, gpointer user_data)
{
- DMAPConnectionPrivate *priv = connection->priv;
- DMAPStructureItem *item = NULL;
+ DmapConnectionPrivate *priv = connection->priv;
+ DmapStructureItem *item = NULL;
GNode *listing_node;
gint returned_count;
gint i;
@@ -1150,7 +1150,7 @@ handle_song_listing (DMAPConnection * connection,
for (i = 0, n = listing_node->children; n; i++, n = n->next) {
gint item_id = 0;
- DMAPRecord *record =
+ DmapRecord *record =
DMAP_CONNECTION_GET_CLASS (connection)->handle_mlcl
(connection, priv->record_factory, n,
&item_id);
@@ -1211,8 +1211,8 @@ handle_song_listing (DMAPConnection * connection,
static int
compare_playlists_by_name (gconstpointer a, gconstpointer b)
{
- const DMAPPlaylist *playlist1 = a;
- const DMAPPlaylist *playlist2 = b;
+ const DmapPlaylist *playlist1 = a;
+ const DmapPlaylist *playlist2 = b;
return strcmp (playlist1->name, playlist2->name);
}
@@ -1225,10 +1225,10 @@ compare_playlists_by_name (gconstpointer a, gconstpointer b)
*/
static void
-handle_playlists (DMAPConnection * connection,
+handle_playlists (DmapConnection * connection,
guint status, GNode * structure, gpointer user_data)
{
- DMAPConnectionPrivate *priv = connection->priv;
+ DmapConnectionPrivate *priv = connection->priv;
GNode *listing_node;
gint i;
GNode *n;
@@ -1246,10 +1246,10 @@ handle_playlists (DMAPConnection * connection,
}
for (i = 0, n = listing_node->children; n; n = n->next, i++) {
- DMAPStructureItem *item;
+ DmapStructureItem *item;
gint id;
gchar *name;
- DMAPPlaylist *playlist;
+ DmapPlaylist *playlist;
item = dmap_structure_find_item (n, DMAP_CC_ABPL);
if (item != NULL) {
@@ -1270,7 +1270,7 @@ handle_playlists (DMAPConnection * connection,
}
name = g_value_dup_string (&(item->content));
- playlist = g_new0 (DMAPPlaylist, 1);
+ playlist = g_new0 (DmapPlaylist, 1);
playlist->id = id;
playlist->name = name;
g_debug ("Got playlist %p: name %s, id %d", playlist,
@@ -1288,11 +1288,11 @@ handle_playlists (DMAPConnection * connection,
}
static void
-handle_playlist_entries (DMAPConnection * connection,
+handle_playlist_entries (DmapConnection * connection,
guint status, GNode * structure, gpointer user_data)
{
- DMAPConnectionPrivate *priv = connection->priv;
- DMAPPlaylist *playlist;
+ DmapConnectionPrivate *priv = connection->priv;
+ DmapPlaylist *playlist;
GNode *listing_node;
GNode *node;
gint i;
@@ -1304,7 +1304,7 @@ handle_playlist_entries (DMAPConnection * connection,
}
playlist =
- (DMAPPlaylist *) g_slist_nth_data (priv->playlists,
+ (DmapPlaylist *) g_slist_nth_data (priv->playlists,
priv->reading_playlist);
g_assert (playlist);
@@ -1319,7 +1319,7 @@ handle_playlist_entries (DMAPConnection * connection,
node = node->next, i++) {
gchar *item_uri;
gint playlist_item_id;
- DMAPStructureItem *item;
+ DmapStructureItem *item;
item = dmap_structure_find_item (node, DMAP_CC_MIID);
if (item == NULL) {
@@ -1348,7 +1348,7 @@ handle_playlist_entries (DMAPConnection * connection,
}
static void
-handle_logout (DMAPConnection * connection,
+handle_logout (DmapConnection * connection,
guint status, GNode * structure, gpointer user_data)
{
connection_disconnected (connection);
@@ -1358,7 +1358,7 @@ handle_logout (DMAPConnection * connection,
}
static void
-dmap_connection_finish (DMAPConnection * connection)
+dmap_connection_finish (DmapConnection * connection)
{
g_return_if_fail (IS_DMAP_CONNECTION (connection));
@@ -1370,9 +1370,9 @@ dmap_connection_finish (DMAPConnection * connection)
}
static gboolean
-dmap_connection_do_something (DMAPConnection * connection)
+dmap_connection_do_something (DmapConnection * connection)
{
- DMAPConnectionPrivate *priv = connection->priv;
+ DmapConnectionPrivate *priv = connection->priv;
char *meta;
char *path;
@@ -1385,7 +1385,7 @@ dmap_connection_do_something (DMAPConnection * connection)
g_debug ("Getting DAAP server info");
if (!http_get
(connection, "/server-info", FALSE, 0.0, 0, FALSE,
- (DMAPResponseHandler) handle_server_info, NULL, FALSE)) {
+ (DmapResponseHandler) handle_server_info, NULL, FALSE)) {
g_debug ("Could not get DAAP connection info");
dmap_connection_state_done (connection, FALSE);
}
@@ -1395,7 +1395,7 @@ dmap_connection_do_something (DMAPConnection * connection)
// NOTE: libsoup will signal if password required and not present.
g_debug ("Logging into DAAP server");
if (!http_get (connection, "/login", FALSE, 0.0, 0, FALSE,
- (DMAPResponseHandler) handle_login, NULL,
+ (DmapResponseHandler) handle_login, NULL,
FALSE)) {
g_debug ("Could not login to DAAP server");
dmap_connection_state_done (connection, FALSE);
@@ -1410,7 +1410,7 @@ dmap_connection_do_something (DMAPConnection * connection)
priv->session_id);
if (!http_get
(connection, path, TRUE, priv->dmap_version, 0, FALSE,
- (DMAPResponseHandler) handle_update, NULL, FALSE)) {
+ (DmapResponseHandler) handle_update, NULL, FALSE)) {
g_debug ("Could not get server database revision number");
dmap_connection_state_done (connection, FALSE);
}
@@ -1424,7 +1424,7 @@ dmap_connection_do_something (DMAPConnection * connection)
priv->session_id, priv->revision_number);
if (!http_get
(connection, path, TRUE, priv->dmap_version, 0, FALSE,
- (DMAPResponseHandler) handle_database_info, NULL,
+ (DmapResponseHandler) handle_database_info, NULL,
FALSE)) {
g_debug ("Could not get DAAP database info");
dmap_connection_state_done (connection, FALSE);
@@ -1442,7 +1442,7 @@ dmap_connection_do_something (DMAPConnection * connection)
priv->revision_number, meta);
if (!http_get
(connection, path, TRUE, priv->dmap_version, 0, FALSE,
- (DMAPResponseHandler) handle_song_listing, NULL, TRUE)) {
+ (DmapResponseHandler) handle_song_listing, NULL, TRUE)) {
g_debug ("Could not get DAAP song listing");
dmap_connection_state_done (connection, FALSE);
}
@@ -1458,7 +1458,7 @@ dmap_connection_do_something (DMAPConnection * connection)
priv->revision_number);
if (!http_get
(connection, path, TRUE, priv->dmap_version, 0, FALSE,
- (DMAPResponseHandler) handle_playlists, NULL, TRUE)) {
+ (DmapResponseHandler) handle_playlists, NULL, TRUE)) {
g_debug ("Could not get DAAP playlists");
dmap_connection_state_done (connection, FALSE);
}
@@ -1467,8 +1467,8 @@ dmap_connection_do_something (DMAPConnection * connection)
case DMAP_GET_PLAYLIST_ENTRIES:
{
- DMAPPlaylist *playlist =
- (DMAPPlaylist *)
+ DmapPlaylist *playlist =
+ (DmapPlaylist *)
g_slist_nth_data (priv->playlists,
priv->reading_playlist);
@@ -1482,7 +1482,7 @@ dmap_connection_do_something (DMAPConnection * connection)
if (!http_get
(connection, path, TRUE, priv->dmap_version, 0,
FALSE,
- (DMAPResponseHandler) handle_playlist_entries,
+ (DmapResponseHandler) handle_playlist_entries,
NULL, TRUE)) {
g_debug ("Could not get entries for DAAP playlist %d",
priv->reading_playlist);
dmap_connection_state_done (connection,
@@ -1498,7 +1498,7 @@ dmap_connection_do_something (DMAPConnection * connection)
priv->session_id);
if (!http_get
(connection, path, TRUE, priv->dmap_version, 0, FALSE,
- (DMAPResponseHandler) handle_logout, NULL, FALSE)) {
+ (DmapResponseHandler) handle_logout, NULL, FALSE)) {
g_debug ("Could not log out of DAAP server");
dmap_connection_state_done (connection, FALSE);
}
@@ -1518,7 +1518,7 @@ dmap_connection_do_something (DMAPConnection * connection)
}
gboolean
-dmap_connection_is_connected (DMAPConnection * connection)
+dmap_connection_is_connected (DmapConnection * connection)
{
g_return_val_if_fail (IS_DMAP_CONNECTION (connection), FALSE);
@@ -1527,8 +1527,8 @@ dmap_connection_is_connected (DMAPConnection * connection)
typedef struct
{
- DMAPConnection *connection;
- DMAPConnectionFunc callback;
+ DmapConnection *connection;
+ DmapConnectionFunc callback;
gpointer user_data;
GDestroyNotify destroy;
} ConnectionResponseData;
@@ -1543,7 +1543,7 @@ connection_response_data_free (gpointer data)
}
static void
-connected_cb (DMAPConnection * connection, ConnectionResponseData * rdata)
+connected_cb (DmapConnection * connection, ConnectionResponseData * rdata)
{
gboolean result;
@@ -1571,7 +1571,7 @@ connected_cb (DMAPConnection * connection, ConnectionResponseData * rdata)
}
static void
-authenticate_cb (SoupSession *session, SoupMessage *msg, SoupAuth *auth, gboolean retrying, DMAPConnection
*connection)
+authenticate_cb (SoupSession *session, SoupMessage *msg, SoupAuth *auth, gboolean retrying, DmapConnection
*connection)
{
if (retrying || ! connection->priv->password) {
g_debug ("Requesting password from application");
@@ -1593,7 +1593,7 @@ authenticate_cb (SoupSession *session, SoupMessage *msg, SoupAuth *auth, gboolea
}
void
-dmap_connection_authenticate_message (DMAPConnection * connection, SoupSession *session, SoupMessage
*message, SoupAuth *auth, const char *password)
+dmap_connection_authenticate_message (DmapConnection * connection, SoupSession *session, SoupMessage
*message, SoupAuth *auth, const char *password)
{
char *username = NULL;
@@ -1609,7 +1609,7 @@ dmap_connection_authenticate_message (DMAPConnection * connection, SoupSession *
}
void
-dmap_connection_setup (DMAPConnection * connection)
+dmap_connection_setup (DmapConnection * connection)
{
connection->priv->session = soup_session_new ();
@@ -1625,11 +1625,11 @@ dmap_connection_setup (DMAPConnection * connection)
soup_uri_set_path (connection->priv->base_uri, "");
}
-// FIXME: it would be nice if this mirrored the use of DMAPMdnsBrowser. That is, connect callback handler to
a signal.
+// FIXME: it would be nice if this mirrored the use of DmapMdnsBrowser. That is, connect callback handler to
a signal.
// This would allow Vala to associated a lambda function with the signal.
void
-dmap_connection_start (DMAPConnection * connection,
- DMAPConnectionFunc callback, gpointer user_data)
+dmap_connection_start (DmapConnection * connection,
+ DmapConnectionFunc callback, gpointer user_data)
{
ConnectionResponseData *rdata;
@@ -1671,7 +1671,7 @@ dmap_connection_start (DMAPConnection * connection,
}
static void
-disconnected_cb (DMAPConnection * connection, ConnectionResponseData * rdata)
+disconnected_cb (DmapConnection * connection, ConnectionResponseData * rdata)
{
gboolean result;
@@ -1697,11 +1697,11 @@ disconnected_cb (DMAPConnection * connection, ConnectionResponseData * rdata)
}
void
-dmap_connection_disconnect (DMAPConnection * connection,
- DMAPConnectionFunc callback,
+dmap_connection_disconnect (DmapConnection * connection,
+ DmapConnectionFunc callback,
gpointer user_data)
{
- DMAPConnectionPrivate *priv = connection->priv;
+ DmapConnectionPrivate *priv = connection->priv;
ConnectionResponseData *rdata;
g_return_if_fail (IS_DMAP_CONNECTION (connection));
@@ -1746,9 +1746,9 @@ dmap_connection_disconnect (DMAPConnection * connection,
}
SoupMessageHeaders *
-dmap_connection_get_headers (DMAPConnection * connection, const gchar * uri)
+dmap_connection_get_headers (DmapConnection * connection, const gchar * uri)
{
- DMAPConnectionPrivate *priv = connection->priv;
+ DmapConnectionPrivate *priv = connection->priv;
SoupMessageHeaders *headers = NULL;
char hash[33] = { 0 };
char *norb_daap_uri = (char *) uri;
@@ -1785,7 +1785,7 @@ dmap_connection_get_headers (DMAPConnection * connection, const gchar * uri)
// FIXME: unify this with share API? Build Container DB?
GSList *
-dmap_connection_get_playlists (DMAPConnection * connection)
+dmap_connection_get_playlists (DmapConnection * connection)
{
return connection->priv->playlists;
}
diff --git a/libdmapsharing/dmap-connection.h b/libdmapsharing/dmap-connection.h
index c84c886..1475091 100644
--- a/libdmapsharing/dmap-connection.h
+++ b/libdmapsharing/dmap-connection.h
@@ -34,31 +34,31 @@ G_BEGIN_DECLS typedef struct
char *name;
int id;
GList *uris;
-} DMAPPlaylist;
+} DmapPlaylist;
/**
* DMAP_TYPE_CONNECTION:
*
- * The type for #DMAPConnection.
+ * The type for #DmapConnection.
*/
#define DMAP_TYPE_CONNECTION (dmap_connection_get_type ())
/**
* DMAP_CONNECTION:
* @o: Object which is subject to casting.
*
- * Casts a #DMAPConnection or derived pointer into a (DMAPConnection *) pointer.
+ * Casts a #DmapConnection or derived pointer into a (DmapConnection *) pointer.
* Depending on the current debugging level, this function may invoke
* certain runtime checks to identify invalid casts.
*/
-#define DMAP_CONNECTION(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), DMAP_TYPE_CONNECTION,
DMAPConnection))
+#define DMAP_CONNECTION(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), DMAP_TYPE_CONNECTION,
DmapConnection))
/**
* DMAP_CONNECTION_CLASS:
- * @k: a valid #DMAPConnectionClass
+ * @k: a valid #DmapConnectionClass
*
- * Casts a derived #DMAPConnectionClass structure into a #DMAPConnectionClass
+ * Casts a derived #DmapConnectionClass structure into a #DmapConnectionClass
* structure.
*/
-#define DMAP_CONNECTION_CLASS(k) (G_TYPE_CHECK_CLASS_CAST((k), DMAP_TYPE_CONNECTION,
DMAPConnectionClass))
+#define DMAP_CONNECTION_CLASS(k) (G_TYPE_CHECK_CLASS_CAST((k), DMAP_TYPE_CONNECTION,
DmapConnectionClass))
/**
* IS_DMAP_CONNECTION:
* @o: Instance to check for being a %DMAP_TYPE_CONNECTION.
@@ -68,23 +68,23 @@ G_BEGIN_DECLS typedef struct
#define IS_DMAP_CONNECTION(o) (G_TYPE_CHECK_INSTANCE_TYPE ((o), DMAP_TYPE_CONNECTION))
/**
* IS_DMAP_CONNECTION_CLASS:
- * @k: a #DMAPConnectionClass
+ * @k: a #DmapConnectionClass
*
- * Checks whether @k "is a" valid #DMAPConnectionClass structure of type
+ * Checks whether @k "is a" valid #DmapConnectionClass structure of type
* %DMAP_CONNECTION or derived.
*/
#define IS_DMAP_CONNECTION_CLASS(k) (G_TYPE_CHECK_CLASS_TYPE ((k), DMAP_TYPE_CONNECTION))
/**
* DMAP_CONNECTION_GET_CLASS:
- * @o: a #DMAPConnection instance.
+ * @o: a #DmapConnection instance.
*
- * Get the class structure associated to a #DMAPConnection instance.
+ * Get the class structure associated to a #DmapConnection instance.
*
* Returns: pointer to object class structure.
*/
-#define DMAP_CONNECTION_GET_CLASS(o) (G_TYPE_INSTANCE_GET_CLASS ((o), DMAP_TYPE_CONNECTION,
DMAPConnectionClass))
+#define DMAP_CONNECTION_GET_CLASS(o) (G_TYPE_INSTANCE_GET_CLASS ((o), DMAP_TYPE_CONNECTION,
DmapConnectionClass))
-typedef struct DMAPConnectionPrivate DMAPConnectionPrivate;
+typedef struct DmapConnectionPrivate DmapConnectionPrivate;
typedef enum
{
@@ -97,57 +97,57 @@ typedef enum
DMAP_GET_PLAYLIST_ENTRIES,
DMAP_LOGOUT,
DMAP_DONE
-} DMAPConnectionState;
+} DmapConnectionState;
typedef struct
{
GObject parent;
- DMAPConnectionPrivate *priv;
-} DMAPConnection;
+ DmapConnectionPrivate *priv;
+} DmapConnection;
typedef struct
{
GObjectClass parent;
/* Pure virtual methods: */
- DMAPContentCode (*get_protocol_version_cc) (DMAPConnection *
+ DmapContentCode (*get_protocol_version_cc) (DmapConnection *
connection);
- gchar *(*get_query_metadata) (DMAPConnection * connection);
- DMAPRecord *(*handle_mlcl) (DMAPConnection * connection,
- DMAPRecordFactory * factory, GNode * mlcl,
+ gchar *(*get_query_metadata) (DmapConnection * connection);
+ DmapRecord *(*handle_mlcl) (DmapConnection * connection,
+ DmapRecordFactory * factory, GNode * mlcl,
gint * item_id);
SoupMessage *(*build_message)
- (DMAPConnection * connection,
+ (DmapConnection * connection,
const gchar * path,
gboolean need_hash,
gdouble version, gint req_id, gboolean send_close);
- void (*connected) (DMAPConnection * connection);
- void (*disconnected) (DMAPConnection * connection);
+ void (*connected) (DmapConnection * connection);
+ void (*disconnected) (DmapConnection * connection);
- char *(*authenticate) (DMAPConnection * connection, const char *name);
- void (*connecting) (DMAPConnection * connection,
- DMAPConnectionState state, float progress);
+ char *(*authenticate) (DmapConnection * connection, const char *name);
+ void (*connecting) (DmapConnection * connection,
+ DmapConnectionState state, float progress);
- void (*operation_done) (DMAPConnection * connection);
+ void (*operation_done) (DmapConnection * connection);
-} DMAPConnectionClass;
+} DmapConnectionClass;
/* hmm, maybe should give more error information? */
-typedef gboolean (*DMAPConnectionFunc) (DMAPConnection * connection,
+typedef gboolean (*DmapConnectionFunc) (DmapConnection * connection,
gboolean result,
const char *reason,
gpointer user_data);
-typedef void (*DMAPResponseHandler) (DMAPConnection * connection,
+typedef void (*DmapResponseHandler) (DmapConnection * connection,
guint status,
GNode * structure, gpointer user_data);
GType dmap_connection_get_type (void);
-gboolean dmap_connection_is_connected (DMAPConnection * connection);
-void dmap_connection_setup (DMAPConnection * connection);
+gboolean dmap_connection_is_connected (DmapConnection * connection);
+void dmap_connection_setup (DmapConnection * connection);
/**
* dmap_connection_start:
@@ -157,19 +157,19 @@ void dmap_connection_setup (DMAPConnection * connection);
*
* Connect to the remote DMAP share.
*/
-void dmap_connection_start (DMAPConnection * connection,
- DMAPConnectionFunc callback,
+void dmap_connection_start (DmapConnection * connection,
+ DmapConnectionFunc callback,
gpointer user_data);
-void dmap_connection_disconnect (DMAPConnection * connection,
- DMAPConnectionFunc callback,
+void dmap_connection_disconnect (DmapConnection * connection,
+ DmapConnectionFunc callback,
gpointer user_data);
-SoupMessageHeaders *dmap_connection_get_headers (DMAPConnection * connection,
+SoupMessageHeaders *dmap_connection_get_headers (DmapConnection * connection,
const char *uri);
-GSList *dmap_connection_get_playlists (DMAPConnection * connection);
+GSList *dmap_connection_get_playlists (DmapConnection * connection);
-SoupMessage *dmap_connection_build_message (DMAPConnection * connection,
+SoupMessage *dmap_connection_build_message (DmapConnection * connection,
const gchar * path,
gboolean need_hash,
gdouble version,
@@ -177,7 +177,7 @@ SoupMessage *dmap_connection_build_message (DMAPConnection * connection,
/**
* dmap_connection_authenticate_message:
- * @connection: A #DMAPConnection
+ * @connection: A #DmapConnection
* @session: A #SoupSession
* @message: A #SoupMessage
* @auth: A #SoupAuth
@@ -185,21 +185,21 @@ SoupMessage *dmap_connection_build_message (DMAPConnection * connection,
*
* Attach an authentication credential to a request. This
* method should be called by a function that is connected to the
- * #DMAPConnection::authenticate signal. The signal will provide the
+ * #DmapConnection::authenticate signal. The signal will provide the
* connection, session, message and auth to that function. That function
* should obtain a password and provide it to this method.
*/
-void dmap_connection_authenticate_message (DMAPConnection *connection,
+void dmap_connection_authenticate_message (DmapConnection *connection,
SoupSession *session,
SoupMessage *message,
SoupAuth *auth,
const char *password);
-gboolean dmap_connection_get (DMAPConnection * self,
+gboolean dmap_connection_get (DmapConnection * self,
const gchar * path,
gboolean need_hash,
- DMAPResponseHandler handler,
+ DmapResponseHandler handler,
gpointer user_data);
G_END_DECLS
diff --git a/libdmapsharing/dmap-container-db.c b/libdmapsharing/dmap-container-db.c
index e89d5c9..c756d1e 100644
--- a/libdmapsharing/dmap-container-db.c
+++ b/libdmapsharing/dmap-container-db.c
@@ -21,32 +21,32 @@
#include <libdmapsharing/dmap-container-db.h>
static void
-dmap_container_db_default_init (DMAPContainerDbInterface * iface)
+dmap_container_db_default_init (DmapContainerDbInterface * iface)
{
}
-G_DEFINE_INTERFACE(DMAPContainerDb, dmap_container_db, G_TYPE_OBJECT)
+G_DEFINE_INTERFACE(DmapContainerDb, dmap_container_db, G_TYPE_OBJECT)
void
-dmap_container_db_add (DMAPContainerDb * db, DMAPContainerRecord *record)
+dmap_container_db_add (DmapContainerDb * db, DmapContainerRecord *record)
{
return DMAP_CONTAINER_DB_GET_INTERFACE (db)->add (db, record);
}
-DMAPContainerRecord *
-dmap_container_db_lookup_by_id (DMAPContainerDb * db, guint id)
+DmapContainerRecord *
+dmap_container_db_lookup_by_id (DmapContainerDb * db, guint id)
{
return DMAP_CONTAINER_DB_GET_INTERFACE (db)->lookup_by_id (db, id);
}
void
-dmap_container_db_foreach (DMAPContainerDb * db, DMAPIdContainerRecordFunc func, gpointer data)
+dmap_container_db_foreach (DmapContainerDb * db, DmapIdContainerRecordFunc func, gpointer data)
{
DMAP_CONTAINER_DB_GET_INTERFACE (db)->foreach (db, func, data);
}
gulong
-dmap_container_db_count (DMAPContainerDb * db)
+dmap_container_db_count (DmapContainerDb * db)
{
return DMAP_CONTAINER_DB_GET_INTERFACE (db)->count (db);
}
diff --git a/libdmapsharing/dmap-container-db.h b/libdmapsharing/dmap-container-db.h
index 968ea0a..f19d999 100644
--- a/libdmapsharing/dmap-container-db.h
+++ b/libdmapsharing/dmap-container-db.h
@@ -29,19 +29,19 @@ G_BEGIN_DECLS
/**
* DMAP_TYPE_CONTAINER_DB:
*
- * The type for #DMAPContainerDb.
+ * The type for #DmapContainerDb.
*/
#define DMAP_TYPE_CONTAINER_DB (dmap_container_db_get_type ())
/**
* DMAP_CONTAINER_DB:
* @o: Object which is subject to casting.
*
- * Casts a #DMAPContainerDb or derived pointer into a (DMAPContainerDb*)
+ * Casts a #DmapContainerDb or derived pointer into a (DmapContainerDb*)
* pointer. Depending on the current debugging level, this function may invoke
* certain runtime checks to identify invalid casts.
*/
#define DMAP_CONTAINER_DB(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), \
- DMAP_TYPE_CONTAINER_DB, DMAPContainerDb))
+ DMAP_TYPE_CONTAINER_DB, DmapContainerDb))
/**
* IS_DMAP_CONTAINER_DB:
* @o: Instance to check for being a %DMAP_TYPE_CONTAINER_DB.
@@ -53,38 +53,38 @@ G_BEGIN_DECLS
DMAP_TYPE_CONTAINER_DB))
/**
* DMAP_CONTAINER_DB_GET_INTERFACE:
- * @o: a #DMAPContainerDb instance.
+ * @o: a #DmapContainerDb instance.
*
- * Get the interface structure associated to a #DMAPContainerDb instance.
+ * Get the interface structure associated to a #DmapContainerDb instance.
*
* Returns: pointer to object interface structure.
*/
#define DMAP_CONTAINER_DB_GET_INTERFACE(o) (G_TYPE_INSTANCE_GET_INTERFACE ((o), \
- DMAP_TYPE_CONTAINER_DB, DMAPContainerDbInterface))
-typedef struct _DMAPContainerDb DMAPContainerDb;
-typedef struct _DMAPContainerDbInterface DMAPContainerDbInterface;
+ DMAP_TYPE_CONTAINER_DB, DmapContainerDbInterface))
+typedef struct _DmapContainerDb DmapContainerDb;
+typedef struct _DmapContainerDbInterface DmapContainerDbInterface;
/**
- * DMAPIdContainerRecordFunc:
+ * DmapIdContainerRecordFunc:
* @id: a DMAP container record ID
- * @record: a #DMAPContainerRecord
+ * @record: a #DmapContainerRecord
* @user_data: (closure): user data
*
* The type of function passed to dmap_container_db_foreach().
*/
-typedef void (*DMAPIdContainerRecordFunc) (guint id, DMAPContainerRecord *record, gpointer user_data);
+typedef void (*DmapIdContainerRecordFunc) (guint id, DmapContainerRecord *record, gpointer user_data);
-struct _DMAPContainerDbInterface
+struct _DmapContainerDbInterface
{
GTypeInterface parent;
- void (*add) (DMAPContainerDb * db, DMAPContainerRecord * record);
+ void (*add) (DmapContainerDb * db, DmapContainerRecord * record);
- DMAPContainerRecord *(*lookup_by_id) (DMAPContainerDb * db, guint id);
+ DmapContainerRecord *(*lookup_by_id) (DmapContainerDb * db, guint id);
- void (*foreach) (DMAPContainerDb * db, DMAPIdContainerRecordFunc func, gpointer data);
+ void (*foreach) (DmapContainerDb * db, DmapIdContainerRecordFunc func, gpointer data);
- gint64 (*count) (DMAPContainerDb * db);
+ gint64 (*count) (DmapContainerDb * db);
};
GType dmap_container_db_get_type (void);
@@ -96,8 +96,8 @@ GType dmap_container_db_get_type (void);
*
* Add a record to the database.
*/
-void dmap_container_db_add (DMAPContainerDb * db,
- DMAPContainerRecord * record);
+void dmap_container_db_add (DmapContainerDb * db,
+ DmapContainerRecord * record);
/**
* dmap_container_db_lookup_by_id:
@@ -107,7 +107,7 @@ void dmap_container_db_add (DMAPContainerDb * db,
* Returns: (transfer full): the database record corresponding to @id. This record should
* be unrefed when no longer required.
*/
-DMAPContainerRecord *dmap_container_db_lookup_by_id (DMAPContainerDb * db,
+DmapContainerRecord *dmap_container_db_lookup_by_id (DmapContainerDb * db,
guint id);
/**
@@ -118,8 +118,8 @@ DMAPContainerRecord *dmap_container_db_lookup_by_id (DMAPContainerDb * db,
*
* Apply a function to each record in a container database.
*/
-void dmap_container_db_foreach (DMAPContainerDb * db,
- DMAPIdContainerRecordFunc func, gpointer data);
+void dmap_container_db_foreach (DmapContainerDb * db,
+ DmapIdContainerRecordFunc func, gpointer data);
/**
* dmap_container_db_count:
@@ -127,7 +127,7 @@ void dmap_container_db_foreach (DMAPContainerDb * db,
*
* Returns: the number of records in the database.
*/
-gulong dmap_container_db_count (DMAPContainerDb * db);
+gulong dmap_container_db_count (DmapContainerDb * db);
#endif /* __DMAP_CONTAINER_DB_H */
diff --git a/libdmapsharing/dmap-container-record.c b/libdmapsharing/dmap-container-record.c
index 9b775c7..6e188f3 100644
--- a/libdmapsharing/dmap-container-record.c
+++ b/libdmapsharing/dmap-container-record.c
@@ -21,7 +21,7 @@
#include <libdmapsharing/dmap-container-record.h>
static void
-dmap_container_record_default_init (DMAPContainerRecordInterface * iface)
+dmap_container_record_default_init (DmapContainerRecordInterface * iface)
{
static gboolean is_initialized = FALSE;
@@ -37,10 +37,10 @@ dmap_container_record_default_init (DMAPContainerRecordInterface * iface)
}
}
-G_DEFINE_INTERFACE(DMAPContainerRecord, dmap_container_record, G_TYPE_OBJECT)
+G_DEFINE_INTERFACE(DmapContainerRecord, dmap_container_record, G_TYPE_OBJECT)
guint
-dmap_container_record_get_id (DMAPContainerRecord * record)
+dmap_container_record_get_id (DmapContainerRecord * record)
{
return DMAP_CONTAINER_RECORD_GET_INTERFACE (record)->get_id (record);
}
@@ -50,22 +50,22 @@ dmap_container_record_get_id (DMAPContainerRecord * record)
* a pointer to the "whole" media database (in which the ID is valid)?
*/
void
-dmap_container_record_add_entry (DMAPContainerRecord * container_record,
- DMAPRecord * record, gint id)
+dmap_container_record_add_entry (DmapContainerRecord * container_record,
+ DmapRecord * record, gint id)
{
DMAP_CONTAINER_RECORD_GET_INTERFACE (container_record)->
add_entry (container_record, record, id);
}
guint64
-dmap_container_record_get_entry_count (DMAPContainerRecord * record)
+dmap_container_record_get_entry_count (DmapContainerRecord * record)
{
return DMAP_CONTAINER_RECORD_GET_INTERFACE (record)->
get_entry_count (record);
}
-DMAPDb *
-dmap_container_record_get_entries (DMAPContainerRecord * record)
+DmapDb *
+dmap_container_record_get_entries (DmapContainerRecord * record)
{
return DMAP_CONTAINER_RECORD_GET_INTERFACE (record)->
get_entries (record);
diff --git a/libdmapsharing/dmap-container-record.h b/libdmapsharing/dmap-container-record.h
index c031a4a..1930c83 100644
--- a/libdmapsharing/dmap-container-record.h
+++ b/libdmapsharing/dmap-container-record.h
@@ -28,19 +28,19 @@ G_BEGIN_DECLS
/**
* DMAP_TYPE_CONTAINER_RECORD:
*
- * The type for #DMAPContainerRecord.
+ * The type for #DmapContainerRecord.
*/
#define DMAP_TYPE_CONTAINER_RECORD (dmap_container_record_get_type ())
/**
* DMAP_CONTAINER_RECORD:
* @o: Object which is subject to casting.
*
- * Casts a #DMAPContainerRecord or derived pointer into a (DMAPContainerRecord*)
+ * Casts a #DmapContainerRecord or derived pointer into a (DmapContainerRecord*)
* pointer. Depending on the current debugging level, this function may invoke
* certain runtime checks to identify invalid casts.
*/
#define DMAP_CONTAINER_RECORD(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), \
- DMAP_TYPE_CONTAINER_RECORD, DMAPContainerRecord))
+ DMAP_TYPE_CONTAINER_RECORD, DmapContainerRecord))
/**
* IS_DMAP_CONTAINER_RECORD:
* @o: Instance to check for being a %DMAP_TYPE_CONTAINER_RECORD.
@@ -52,68 +52,68 @@ G_BEGIN_DECLS
DMAP_TYPE_CONTAINER_RECORD))
/**
* DMAP_CONTAINER_RECORD_GET_INTERFACE:
- * @o: a #DMAPContainerRecord instance.
+ * @o: a #DmapContainerRecord instance.
*
- * Get the class structure associated to a #DMAPContainerRecord instance.
+ * Get the class structure associated to a #DmapContainerRecord instance.
*
* Returns: pointer to object interface structure.
*/
#define DMAP_CONTAINER_RECORD_GET_INTERFACE(o) (G_TYPE_INSTANCE_GET_INTERFACE ((o), \
- DMAP_TYPE_CONTAINER_RECORD, DMAPContainerRecordInterface))
-typedef struct _DMAPContainerRecord DMAPContainerRecord;
-typedef struct _DMAPContainerRecordInterface DMAPContainerRecordInterface;
+ DMAP_TYPE_CONTAINER_RECORD, DmapContainerRecordInterface))
+typedef struct _DmapContainerRecord DmapContainerRecord;
+typedef struct _DmapContainerRecordInterface DmapContainerRecordInterface;
-struct _DMAPContainerRecordInterface
+struct _DmapContainerRecordInterface
{
GTypeInterface parent;
- guint (*get_id) (DMAPContainerRecord * record);
+ guint (*get_id) (DmapContainerRecord * record);
- void (*add_entry) (DMAPContainerRecord * container_record,
- DMAPRecord * record, gint id);
+ void (*add_entry) (DmapContainerRecord * container_record,
+ DmapRecord * record, gint id);
- guint64 (*get_entry_count) (DMAPContainerRecord * record);
+ guint64 (*get_entry_count) (DmapContainerRecord * record);
- DMAPDb *(*get_entries) (DMAPContainerRecord * record);
+ DmapDb *(*get_entries) (DmapContainerRecord * record);
};
GType dmap_container_record_get_type (void);
/**
* dmap_container_record_get_id:
- * @record: A DMAPContainerRecord.
+ * @record: A DmapContainerRecord.
*
* Returns: the ID for the given record.
*/
-guint dmap_container_record_get_id (DMAPContainerRecord * record);
+guint dmap_container_record_get_id (DmapContainerRecord * record);
/**
* dmap_container_record_add_entry:
- * @container_record: A DMAPContainerRecord.
- * @record: A DMAPRecord.
+ * @container_record: A DmapContainerRecord.
+ * @record: A DmapRecord.
* @id: The record's ID.
*
* Add a record to the database. It is assumed that the record is placed
* directly into the database (not copied) and not freed.
*/
-void dmap_container_record_add_entry (DMAPContainerRecord * container_record,
- DMAPRecord * record, gint id);
+void dmap_container_record_add_entry (DmapContainerRecord * container_record,
+ DmapRecord * record, gint id);
/**
* dmap_container_record_get_entry_count:
- * @record: A DMAPContainerRecord.
+ * @record: A DmapContainerRecord.
*
* Returns: the number of records in the container record.
*/
-guint64 dmap_container_record_get_entry_count (DMAPContainerRecord * record);
+guint64 dmap_container_record_get_entry_count (DmapContainerRecord * record);
/**
* dmap_container_record_get_entries:
- * @record: A DMAPContainerRecord.
+ * @record: A DmapContainerRecord.
*
- * Returns: (transfer full): A pointer to a DMAPDb containing the entries contained in record.
+ * Returns: (transfer full): A pointer to a DmapDb containing the entries contained in record.
*/
-DMAPDb *dmap_container_record_get_entries (DMAPContainerRecord * record);
+DmapDb *dmap_container_record_get_entries (DmapContainerRecord * record);
#endif /* __DMAP_CONTAINER_RECORD_H */
diff --git a/libdmapsharing/dacp-connection.c b/libdmapsharing/dmap-control-connection.c
similarity index 63%
rename from libdmapsharing/dacp-connection.c
rename to libdmapsharing/dmap-control-connection.c
index fe7cf8c..554b71d 100644
--- a/libdmapsharing/dacp-connection.c
+++ b/libdmapsharing/dmap-control-connection.c
@@ -20,18 +20,18 @@
#include "config.h"
-#include <libdmapsharing/dacp-connection.h>
+#include <libdmapsharing/dmap-control-connection.h>
#include <libdmapsharing/dmap-structure.h>
-#define DACP_CONNECTION_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), DACP_TYPE_CONNECTION,
DACPConnectionPrivate))
+#define DMAP_CONTROL_CONNECTION_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), DACP_TYPE_CONNECTION,
DmapControlConnectionPrivate))
/* FIXME:
-struct DACPConnectionPrivate {
+struct DmapControlConnectionPrivate {
};
*/
-static DMAPContentCode
-get_protocol_version_cc (DMAPConnection * connection)
+static DmapContentCode
+get_protocol_version_cc (DmapConnection * connection)
{
/* FIXME: */
g_error ("Not implemented");
@@ -39,15 +39,15 @@ get_protocol_version_cc (DMAPConnection * connection)
}
static gchar *
-get_query_metadata (DMAPConnection * connection)
+get_query_metadata (DmapConnection * connection)
{
/* FIXME: */
g_error ("Not implemented");
return NULL;
}
-static DMAPRecord *
-handle_mlcl (DMAPConnection * connection, DMAPRecordFactory * factory,
+static DmapRecord *
+handle_mlcl (DmapConnection * connection, DmapRecordFactory * factory,
GNode * n, int *item_id)
{
/* FIXME: */
@@ -56,10 +56,10 @@ handle_mlcl (DMAPConnection * connection, DMAPRecordFactory * factory,
}
static void
-dacp_connection_class_init (DACPConnectionClass * klass)
+dmap_control_connection_class_init (DmapControlConnectionClass * klass)
{
GObjectClass *object_class = G_OBJECT_CLASS (klass);
- DMAPConnectionClass *parent_class =
+ DmapConnectionClass *parent_class =
DMAP_CONNECTION_CLASS (object_class);
parent_class->get_protocol_version_cc = get_protocol_version_cc;
@@ -67,17 +67,17 @@ dacp_connection_class_init (DACPConnectionClass * klass)
parent_class->handle_mlcl = handle_mlcl;
/* FIXME:
- * g_type_class_add_private (klass, sizeof (DACPConnectionPrivate));
+ * g_type_class_add_private (klass, sizeof (DmapControlConnectionPrivate));
*/
}
-DACPConnection *
-dacp_connection_new (const char *name,
+DmapControlConnection *
+dmap_control_connection_new (const char *name,
const char *host,
guint port,
- DMAPDb * db, DMAPRecordFactory * factory)
+ DmapDb * db, DmapRecordFactory * factory)
{
- DACPConnection *connection;
+ DmapControlConnection *connection;
connection = g_object_new (DACP_TYPE_CONNECTION,
"name", name,
@@ -89,11 +89,11 @@ dacp_connection_new (const char *name,
}
static void
-dacp_connection_init (DACPConnection * connection)
+dmap_control_connection_init (DmapControlConnection * connection)
{
/* FIXME:
- * connection->priv = DACP_CONNECTION_GET_PRIVATE (connection);
+ * connection->priv = DMAP_CONTROL_CONNECTION_GET_PRIVATE (connection);
*/
}
-G_DEFINE_TYPE (DACPConnection, dacp_connection, DMAP_TYPE_CONNECTION);
+G_DEFINE_TYPE (DmapControlConnection, dmap_control_connection, DMAP_TYPE_CONNECTION);
diff --git a/libdmapsharing/dmap-control-connection.h b/libdmapsharing/dmap-control-connection.h
new file mode 100644
index 0000000..044e1d6
--- /dev/null
+++ b/libdmapsharing/dmap-control-connection.h
@@ -0,0 +1,94 @@
+/*
+ * 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 __DMAP_CONTROL_CONNECTION_H
+#define __DMAP_CONTROL_CONNECTION_H
+
+#include <glib-object.h>
+
+#include <libdmapsharing/dmap-connection.h>
+#include <libdmapsharing/dmap-db.h>
+
+G_BEGIN_DECLS
+/**
+ * DACP_TYPE_CONNECTION:
+ *
+ * The type for #DmapControlConnection.
+ */
+#define DACP_TYPE_CONNECTION (dmap_control_connection_get_type ())
+/**
+ * DMAP_CONTROL_CONNECTION:
+ * @o: Object which is subject to casting.
+ *
+ * Casts a #DmapControlConnection or derived pointer into a (DmapControlConnection *) pointer.
+ * Depending on the current debugging level, this function may invoke
+ * certain runtime checks to identify invalid casts.
+ */
+#define DMAP_CONTROL_CONNECTION(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), DACP_TYPE_CONNECTION,
DmapControlConnection))
+/**
+ * DMAP_CONTROL_CONNECTION_CLASS:
+ * @k: a valid #DmapControlConnectionClass
+ *
+ * Casts a derived #DmapControlConnectionClass structure into a #DmapControlConnectionClass
+ * structure.
+ */
+#define DMAP_CONTROL_CONNECTION_CLASS(k) (G_TYPE_CHECK_CLASS_CAST((k), DACP_TYPE_CONNECTION,
DmapControlConnectionClass))
+/**
+ * IS_DMAP_CONTROL_CONNECTION:
+ * @o: Instance to check for being a %DACP_TYPE_CONNECTION.
+ *
+ * Checks whether a valid #GTypeInstance pointer is of type %DACP_TYPE_CONNECTION.
+ */
+#define IS_DMAP_CONTROL_CONNECTION(o) (G_TYPE_CHECK_INSTANCE_TYPE ((o), DACP_TYPE_CONNECTION))
+/**
+ * IS_DMAP_CONTROL_CONNECTION_CLASS:
+ * @k: a #DmapControlConnectionClass
+ *
+ * Checks whether @k "is a" valid #DmapControlConnectionClass structure of type
+ * %DMAP_CONTROL_CONNECTION or derived.
+ */
+#define IS_DMAP_CONTROL_CONNECTION_CLASS(k) (G_TYPE_CHECK_CLASS_TYPE ((k), DACP_TYPE_CONNECTION))
+/**
+ * DMAP_CONTROL_CONNECTION_GET_CLASS:
+ * @o: a #DmapControlConnection instance.
+ *
+ * Get the class structure associated to a #DmapControlConnection instance.
+ *
+ * Returns: pointer to object class structure.
+ */
+#define DMAP_CONTROL_CONNECTION_GET_CLASS(o) (G_TYPE_INSTANCE_GET_CLASS ((o), DACP_TYPE_CONNECTION,
DmapControlConnectionClass))
+typedef struct DmapControlConnectionPrivate DmapControlConnectionPrivate;
+
+typedef struct
+{
+ DmapConnectionClass dmap_connection_class;
+} DmapControlConnectionClass;
+
+typedef struct
+{
+ DmapConnection dmap_connection_instance;
+ DmapControlConnectionPrivate *priv;
+} DmapControlConnection;
+
+GType dmap_control_connection_get_type (void);
+
+DmapControlConnection *dmap_control_connection_new (const char *name,
+ const char *host,
+ guint port,
+ DmapDb * db,
+ DmapRecordFactory * factory);
+G_END_DECLS
+#endif /* __DMAP_CONTROL_CONNECTION_H */
diff --git a/libdmapsharing/dacp-player.c b/libdmapsharing/dmap-control-player.c
similarity index 63%
rename from libdmapsharing/dacp-player.c
rename to libdmapsharing/dmap-control-player.c
index 56299b6..8fd37f1 100644
--- a/libdmapsharing/dacp-player.c
+++ b/libdmapsharing/dmap-control-player.c
@@ -15,12 +15,12 @@
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
*/
-#include <libdmapsharing/dacp-player.h>
+#include <libdmapsharing/dmap-control-player.h>
#include <libdmapsharing/dmap-enums.h>
-#include <libdmapsharing/daap-record.h>
+#include <libdmapsharing/dmap-av-record.h>
static void
-dacp_player_default_init (DACPPlayerInterface * iface)
+dmap_control_player_default_init (DmapControlPlayerInterface * iface)
{
static gboolean initialized = FALSE;
@@ -68,55 +68,55 @@ dacp_player_default_init (DACPPlayerInterface * iface)
}
}
-G_DEFINE_INTERFACE(DACPPlayer, dacp_player, G_TYPE_OBJECT)
+G_DEFINE_INTERFACE(DmapControlPlayer, dmap_control_player, G_TYPE_OBJECT)
-DAAPRecord *
-dacp_player_now_playing_record (DACPPlayer * player)
+DmapAvRecord *
+dmap_control_player_now_playing_record (DmapControlPlayer * player)
{
- return DACP_PLAYER_GET_INTERFACE (player)->
+ return DMAP_CONTROL_PLAYER_GET_INTERFACE (player)->
now_playing_record (player);
}
guchar *
-dacp_player_now_playing_artwork (DACPPlayer * player, guint width,
+dmap_control_player_now_playing_artwork (DmapControlPlayer * player, guint width,
guint height)
{
- return DACP_PLAYER_GET_INTERFACE (player)->
+ return DMAP_CONTROL_PLAYER_GET_INTERFACE (player)->
now_playing_artwork (player, width, height);
}
void
-dacp_player_play_pause (DACPPlayer * player)
+dmap_control_player_play_pause (DmapControlPlayer * player)
{
- DACP_PLAYER_GET_INTERFACE (player)->play_pause (player);
+ DMAP_CONTROL_PLAYER_GET_INTERFACE (player)->play_pause (player);
}
void
-dacp_player_pause (DACPPlayer * player)
+dmap_control_player_pause (DmapControlPlayer * player)
{
- DACP_PLAYER_GET_INTERFACE (player)->pause (player);
+ DMAP_CONTROL_PLAYER_GET_INTERFACE (player)->pause (player);
}
void
-dacp_player_next_item (DACPPlayer * player)
+dmap_control_player_next_item (DmapControlPlayer * player)
{
- DACP_PLAYER_GET_INTERFACE (player)->next_item (player);
+ DMAP_CONTROL_PLAYER_GET_INTERFACE (player)->next_item (player);
}
void
-dacp_player_prev_item (DACPPlayer * player)
+dmap_control_player_prev_item (DmapControlPlayer * player)
{
- DACP_PLAYER_GET_INTERFACE (player)->prev_item (player);
+ DMAP_CONTROL_PLAYER_GET_INTERFACE (player)->prev_item (player);
}
void
-dacp_player_cue_clear (DACPPlayer * player)
+dmap_control_player_cue_clear (DmapControlPlayer * player)
{
- DACP_PLAYER_GET_INTERFACE (player)->cue_clear (player);
+ DMAP_CONTROL_PLAYER_GET_INTERFACE (player)->cue_clear (player);
}
void
-dacp_player_cue_play (DACPPlayer * player, GList * records, guint index)
+dmap_control_player_cue_play (DmapControlPlayer * player, GList * records, guint index)
{
- DACP_PLAYER_GET_INTERFACE (player)->cue_play (player, records, index);
+ DMAP_CONTROL_PLAYER_GET_INTERFACE (player)->cue_play (player, records, index);
}
diff --git a/libdmapsharing/dmap-control-player.h b/libdmapsharing/dmap-control-player.h
new file mode 100644
index 0000000..45da5cf
--- /dev/null
+++ b/libdmapsharing/dmap-control-player.h
@@ -0,0 +1,147 @@
+/* Copyright (C) Alexandre Rosenfeld 2010 <alexandre rosenfeld gmail 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; 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 _DMAP_CONTROL_PLAYER_H_
+#define _DMAP_CONTROL_PLAYER_H_
+
+#include <glib-object.h>
+
+#include "dmap-av-record.h"
+
+G_BEGIN_DECLS
+/**
+ * DACP_TYPE_PLAYER:
+ *
+ * The type for #DmapControlPlayer.
+ */
+#define DMAP_TYPE_CONTROL_PLAYER (dmap_control_player_get_type ())
+/**
+ * DMAP_CONTROL_PLAYER:
+ * @o: Object which is subject to casting.
+ *
+ * Casts a #DmapControlPlayer or derived pointer into a (DmapControlPlayer *) pointer.
+ * Depending on the current debugging level, this function may invoke
+ * certain runtime checks to identify invalid casts.
+ */
+#define DMAP_CONTROL_PLAYER(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), DMAP_TYPE_CONTROL_PLAYER,
DmapControlPlayer))
+/**
+ * IS_DMAP_CONTROL_PLAYER:
+ * @o: Instance to check for being a %DACP_TYPE_PLAYER.
+ *
+ * Checks whether a valid #GTypeInstance pointer is of type %DACP_TYPE_PLAYER.
+ */
+#define IS_DMAP_CONTROL_PLAYER(o) (G_TYPE_CHECK_INSTANCE_TYPE ((o), DMAP_TYPE_CONTROL_PLAYER))
+/**
+ * DMAP_CONTROL_PLAYER_GET_INTERFACE:
+ * @o: a #DmapControlPlayer instance.
+ *
+ * Get the insterface structure associated to a #DmapControlPlayer instance.
+ *
+ * Returns: pointer to object interface structure.
+ */
+#define DMAP_CONTROL_PLAYER_GET_INTERFACE(o) (G_TYPE_INSTANCE_GET_INTERFACE ((o), \
+ DMAP_TYPE_CONTROL_PLAYER, DmapControlPlayerInterface))
+typedef struct _DmapControlPlayerInterface DmapControlPlayerInterface;
+typedef struct _DmapControlPlayer DmapControlPlayer;
+
+typedef enum
+{
+ DACP_REPEAT_NONE = 0,
+ DACP_REPEAT_SINGLE = 1,
+ DACP_REPEAT_ALL = 2
+} DACPRepeatState;
+
+typedef enum
+{
+ DACP_PLAY_STOPPED = 2,
+ DACP_PLAY_PAUSED = 3,
+ DACP_PLAY_PLAYING = 4
+} DACPPlayState;
+
+struct _DmapControlPlayerInterface
+{
+ GTypeInterface parent_class;
+
+ DmapAvRecord *(*now_playing_record) (DmapControlPlayer * player);
+ guchar *(*now_playing_artwork) (DmapControlPlayer * player,
+ guint width, guint height);
+ void (*play_pause) (DmapControlPlayer * player);
+ void (*pause) (DmapControlPlayer * player);
+ void (*next_item) (DmapControlPlayer * player);
+ void (*prev_item) (DmapControlPlayer * player);
+
+ void (*cue_clear) (DmapControlPlayer * player);
+ void (*cue_play) (DmapControlPlayer * player, GList * records, guint index);
+};
+
+GType dmap_control_player_get_type (void);
+
+/**
+ * dmap_control_player_now_playing_record:
+ * @player: a player
+ */
+DmapAvRecord *dmap_control_player_now_playing_record (DmapControlPlayer * player);
+
+/**
+ * dmap_control_player_now_playing_artwork:
+ * @player: a player
+ * @width: width
+ * @height: height
+ */
+guchar *dmap_control_player_now_playing_artwork (DmapControlPlayer * player,
+ guint width, guint height);
+
+/**
+ * dmap_control_player_play_pause:
+ * @player: a player
+ */
+void dmap_control_player_play_pause (DmapControlPlayer * player);
+
+/**
+ * dmap_control_player_pause:
+ * @player: a player
+ */
+void dmap_control_player_pause (DmapControlPlayer * player);
+
+/**
+ * dmap_control_player_next_item:
+ * @player: a player
+ */
+void dmap_control_player_next_item (DmapControlPlayer * player);
+
+/**
+ * dmap_control_player_now_prev_item:
+ * @player: a player
+ */
+void dmap_control_player_prev_item (DmapControlPlayer * player);
+
+/**
+ * dmap_control_player_cue_clear:
+ * @player: a player
+ */
+void dmap_control_player_cue_clear (DmapControlPlayer * player);
+
+/**
+ * dmap_control_player_cue_play:
+ * @player: a player
+ * @records : a list of records
+ * @index: an index
+ */
+void dmap_control_player_cue_play (DmapControlPlayer * player, GList * records, guint index);
+
+G_END_DECLS
+#endif /* _DMAP_CONTROL_PLAYER_H_ */
diff --git a/libdmapsharing/dacp-share.c b/libdmapsharing/dmap-control-share.c
similarity index 82%
rename from libdmapsharing/dacp-share.c
rename to libdmapsharing/dmap-control-share.c
index 83e6031..93f7414 100644
--- a/libdmapsharing/dacp-share.c
+++ b/libdmapsharing/dmap-control-share.c
@@ -42,16 +42,16 @@
#include <libdmapsharing/dmap-structure.h>
#include <libdmapsharing/dmap-share.h>
-#include <libdmapsharing/dacp-share.h>
-#include <libdmapsharing/dacp-connection.h>
-#include <libdmapsharing/dacp-player.h>
+#include <libdmapsharing/dmap-control-share.h>
+#include <libdmapsharing/dmap-control-connection.h>
+#include <libdmapsharing/dmap-control-player.h>
-void dacp_share_ctrl_int (DMAPShare * share,
+void dmap_control_share_ctrl_int (DmapShare * share,
SoupServer * server,
SoupMessage * message,
const char *path,
GHashTable * query, SoupClientContext * context);
-void dacp_share_login (DMAPShare * share,
+void dmap_control_share_login (DmapShare * share,
SoupServer * server,
SoupMessage * message,
const char *path,
@@ -60,9 +60,9 @@ void dacp_share_login (DMAPShare * share,
#define DACP_TYPE_OF_SERVICE "_touch-able._tcp"
#define DACP_PORT 3689
-struct DACPSharePrivate
+struct DmapControlSharePrivate
{
- DMAPMdnsBrowser *mdns_browser;
+ DmapMdnsBrowser *mdns_browser;
gchar *library_name;
GHashTable *remotes;
@@ -71,7 +71,7 @@ struct DACPSharePrivate
GSList *update_queue;
- DACPPlayer *player;
+ DmapControlPlayer *player;
};
/*
@@ -82,10 +82,10 @@ typedef struct
gchar *host;
guint port;
gchar *pair_txt;
- DMAPConnection *connection;
+ DmapConnection *connection;
} DACPRemoteInfo;
-#define DACP_SHARE_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), DACP_TYPE_SHARE, DACPSharePrivate))
+#define DMAP_CONTROL_SHARE_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), DMAP_TYPE_CONTROL_SHARE,
DmapControlSharePrivate))
enum
{
@@ -108,7 +108,7 @@ enum
static guint signals[LAST_SIGNAL] = { 0, };
-G_DEFINE_TYPE (DACPShare, dacp_share, DAAP_TYPE_SHARE);
+G_DEFINE_TYPE (DmapControlShare, dmap_control_share, DMAP_TYPE_SHARE);
static gchar *
get_dbid (void)
@@ -135,7 +135,7 @@ get_dbid (void)
}
static void
-dacp_share_update_txt_records (DACPShare * share)
+dmap_control_share_update_txt_records (DmapControlShare * share)
{
gchar *dbid_record;
gchar *library_name_record;
@@ -161,23 +161,23 @@ dacp_share_update_txt_records (DACPShare * share)
}
static void
-dacp_share_set_property (GObject * object,
+dmap_control_share_set_property (GObject * object,
guint prop_id,
const GValue * value, GParamSpec * pspec)
{
- DACPShare *share = DACP_SHARE (object);
+ DmapControlShare *share = DMAP_CONTROL_SHARE (object);
switch (prop_id) {
case PROP_LIBRARY_NAME:
g_free (share->priv->library_name);
share->priv->library_name = g_value_dup_string (value);
- dacp_share_update_txt_records (share);
+ dmap_control_share_update_txt_records (share);
break;
case PROP_PLAYER:
if (share->priv->player) {
g_object_unref (share->priv->player);
}
- share->priv->player = DACP_PLAYER (g_value_dup_object (value));
+ share->priv->player = DMAP_CONTROL_PLAYER (g_value_dup_object (value));
break;
default:
G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
@@ -186,10 +186,10 @@ dacp_share_set_property (GObject * object,
}
static void
-dacp_share_get_property (GObject * object,
+dmap_control_share_get_property (GObject * object,
guint prop_id, GValue * value, GParamSpec * pspec)
{
- DACPShare *share = DACP_SHARE (object);
+ DmapControlShare *share = DMAP_CONTROL_SHARE (object);
switch (prop_id) {
case PROP_LIBRARY_NAME:
@@ -205,9 +205,9 @@ dacp_share_get_property (GObject * object,
}
static void
-dacp_share_dispose (GObject * object)
+dmap_control_share_dispose (GObject * object)
{
- DACPShare *share = DACP_SHARE (object);
+ DmapControlShare *share = DMAP_CONTROL_SHARE (object);
g_clear_object(&share->priv->mdns_browser);
g_clear_object(&share->priv->player);
@@ -222,39 +222,39 @@ dacp_share_dispose (GObject * object)
share->priv->remotes = NULL;
}
- G_OBJECT_CLASS (dacp_share_parent_class)->dispose (object);
+ G_OBJECT_CLASS (dmap_control_share_parent_class)->dispose (object);
}
static void
-dacp_share_finalize (GObject * object)
+dmap_control_share_finalize (GObject * object)
{
- DACPShare *share = DACP_SHARE (object);
+ DmapControlShare *share = DMAP_CONTROL_SHARE (object);
g_free (share->priv->library_name);
- G_OBJECT_CLASS (dacp_share_parent_class)->finalize (object);
+ G_OBJECT_CLASS (dmap_control_share_parent_class)->finalize (object);
}
const char *
-dacp_share_get_type_of_service (DMAPShare * share)
+dmap_control_share_get_type_of_service (DmapShare * share)
{
return DACP_TYPE_OF_SERVICE;
}
static void
-dacp_share_class_init (DACPShareClass * klass)
+dmap_control_share_class_init (DmapControlShareClass * klass)
{
GObjectClass *object_class = G_OBJECT_CLASS (klass);
- DMAPShareClass *dmap_class = DMAP_SHARE_CLASS (object_class);
+ DmapShareClass *dmap_class = DMAP_SHARE_CLASS (object_class);
- object_class->get_property = dacp_share_get_property;
- object_class->set_property = dacp_share_set_property;
- object_class->dispose = dacp_share_dispose;
- object_class->finalize = dacp_share_finalize;
+ object_class->get_property = dmap_control_share_get_property;
+ object_class->set_property = dmap_control_share_set_property;
+ object_class->dispose = dmap_control_share_dispose;
+ object_class->finalize = dmap_control_share_finalize;
- dmap_class->get_type_of_service = dacp_share_get_type_of_service;
- dmap_class->ctrl_int = dacp_share_ctrl_int;
- dmap_class->login = dacp_share_login;
+ dmap_class->get_type_of_service = dmap_control_share_get_type_of_service;
+ dmap_class->ctrl_int = dmap_control_share_ctrl_int;
+ dmap_class->login = dmap_control_share_login;
g_object_class_install_property (object_class,
PROP_LIBRARY_NAME,
@@ -275,8 +275,8 @@ dacp_share_class_init (DACPShareClass * klass)
G_PARAM_CONSTRUCT_ONLY));
/**
- * DACPShare::remote-found
- * @share: the #DACPShare that received the signal.
+ * DmapControlShare::remote-found
+ * @share: the #DmapControlShare that received the signal.
* @service_name: the remote identifier.
* @remote_name: the remote friendly name.
*
@@ -286,15 +286,15 @@ dacp_share_class_init (DACPShareClass * klass)
g_signal_new ("remote-found",
G_TYPE_FROM_CLASS (object_class),
G_SIGNAL_RUN_LAST,
- G_STRUCT_OFFSET (DACPShareClass, remote_found),
+ G_STRUCT_OFFSET (DmapControlShareClass, remote_found),
NULL,
NULL,
dmap_marshal_generated_VOID__STRING_STRING,
G_TYPE_NONE, 2, G_TYPE_STRING, G_TYPE_STRING);
/**
- * DACPShare::remote-lost
- * @share: the #DACPShare that received the signal
+ * DmapControlShare::remote-lost
+ * @share: the #DmapControlShare that received the signal
* @service_name: the remote identifier.
*
* Signal emited when a remote is lost in the local network.
@@ -303,15 +303,15 @@ dacp_share_class_init (DACPShareClass * klass)
g_signal_new ("remote-lost",
G_TYPE_FROM_CLASS (object_class),
G_SIGNAL_RUN_LAST,
- G_STRUCT_OFFSET (DACPShareClass, remote_lost),
+ G_STRUCT_OFFSET (DmapControlShareClass, remote_lost),
NULL,
NULL,
g_cclosure_marshal_VOID__STRING,
G_TYPE_NONE, 1, G_TYPE_STRING);
/**
- * DACPShare::remote-paired
- * @share: the #DACPShare that received the signal
+ * DmapControlShare::remote-paired
+ * @share: the #DmapControlShare that received the signal
* @service_name: the remote identifier.
* @connected: indicates if the connection was succesfull or not.
*
@@ -321,15 +321,15 @@ dacp_share_class_init (DACPShareClass * klass)
g_signal_new ("remote-paired",
G_TYPE_FROM_CLASS (object_class),
G_SIGNAL_RUN_LAST,
- G_STRUCT_OFFSET (DACPShareClass, remote_paired),
+ G_STRUCT_OFFSET (DmapControlShareClass, remote_paired),
NULL,
NULL,
dmap_marshal_generated_VOID__STRING_BOOLEAN,
G_TYPE_NONE, 2, G_TYPE_STRING, G_TYPE_BOOLEAN);
/**
- * DACPShare::lookup-guid
- * @share: the #DACPShare that received the signal
+ * DmapControlShare::lookup-guid
+ * @share: the #DmapControlShare that received the signal
* @guid: a string containing the guid to be validated.
*
* Signal emited when the remote has logged in before and wants to be
@@ -340,15 +340,15 @@ dacp_share_class_init (DACPShareClass * klass)
g_signal_new ("lookup-guid",
G_TYPE_FROM_CLASS (object_class),
G_SIGNAL_RUN_LAST,
- G_STRUCT_OFFSET (DACPShareClass, lookup_guid),
+ G_STRUCT_OFFSET (DmapControlShareClass, lookup_guid),
NULL,
NULL,
dmap_marshal_generated_BOOLEAN__STRING,
G_TYPE_BOOLEAN, 1, G_TYPE_STRING);
/**
- * DACPShare::add-guid
- * @share: the #DACPShare that received the signal
+ * DmapControlShare::add-guid
+ * @share: the #DmapControlShare that received the signal
* @guid: a string containing the guid to be saved.
*
* Signal emited when the remote wants to log in and save a special guid
@@ -363,19 +363,19 @@ dacp_share_class_init (DACPShareClass * klass)
g_signal_new ("add-guid",
G_TYPE_FROM_CLASS (object_class),
G_SIGNAL_RUN_LAST,
- G_STRUCT_OFFSET (DACPShareClass, add_guid),
+ G_STRUCT_OFFSET (DmapControlShareClass, add_guid),
NULL,
NULL,
g_cclosure_marshal_VOID__STRING,
G_TYPE_NONE, 1, G_TYPE_STRING);
- g_type_class_add_private (klass, sizeof (DACPSharePrivate));
+ g_type_class_add_private (klass, sizeof (DmapControlSharePrivate));
}
static void
-dacp_share_init (DACPShare * share)
+dmap_control_share_init (DmapControlShare * share)
{
- share->priv = DACP_SHARE_GET_PRIVATE (share);
+ share->priv = DMAP_CONTROL_SHARE_GET_PRIVATE (share);
share->priv->current_revision = 2;
@@ -388,8 +388,8 @@ dacp_share_init (DACPShare * share)
}
void
-mdns_remote_added (DMAPMdnsBrowser * browser,
- DMAPMdnsService * service, DACPShare * share)
+mdns_remote_added (DmapMdnsBrowser * browser,
+ DmapMdnsService * service, DmapControlShare * share)
{
guint port;
DACPRemoteInfo *remote_info;
@@ -425,22 +425,22 @@ mdns_remote_added (DMAPMdnsBrowser * browser,
}
void
-mdns_remote_removed (DMAPMdnsBrowser * browser,
- const char *service_name, DACPShare * share)
+mdns_remote_removed (DmapMdnsBrowser * browser,
+ const char *service_name, DmapControlShare * share)
{
g_signal_emit (share, signals[REMOTE_LOST], 0, service_name);
g_hash_table_remove (share->priv->remotes, service_name);
}
-DACPShare *
-dacp_share_new (const gchar * library_name,
- DACPPlayer * player,
- DMAPDb * db, DMAPContainerDb * container_db)
+DmapControlShare *
+dmap_control_share_new (const gchar * library_name,
+ DmapControlPlayer * player,
+ DmapDb * db, DmapContainerDb * container_db)
{
- DACPShare *share;
+ DmapControlShare *share;
- share = DACP_SHARE (g_object_new (DACP_TYPE_SHARE,
+ share = DMAP_CONTROL_SHARE (g_object_new (DMAP_TYPE_CONTROL_SHARE,
"name", get_dbid (),
"library-name", library_name,
"password", NULL,
@@ -457,7 +457,7 @@ dacp_share_new (const gchar * library_name,
}
void
-dacp_share_start_lookup (DACPShare * share)
+dmap_control_share_start_lookup (DmapControlShare * share)
{
GError *error;
@@ -489,13 +489,13 @@ static gboolean
remove_remotes_cb (gpointer service_name, gpointer remote_info,
gpointer share)
{
- g_signal_emit ((DACPShare *) share,
+ g_signal_emit ((DmapControlShare *) share,
signals[REMOTE_LOST], 0, (gchar *) service_name);
return TRUE;
}
void
-dacp_share_stop_lookup (DACPShare * share)
+dmap_control_share_stop_lookup (DmapControlShare * share)
{
GError *error;
@@ -519,10 +519,10 @@ dacp_share_stop_lookup (DACPShare * share)
}
static void
-dacp_share_fill_playstatusupdate (DACPShare * share, SoupMessage * message)
+dmap_control_share_fill_playstatusupdate (DmapControlShare * share, SoupMessage * message)
{
GNode *cmst;
- DAAPRecord *record;
+ DmapAvRecord *record;
DACPPlayState play_state;
DACPRepeatState repeat_state;
gboolean shuffle_state;
@@ -534,7 +534,7 @@ dacp_share_fill_playstatusupdate (DACPShare * share, SoupMessage * message)
"shuffle-state", &shuffle_state,
"playing-time", &playing_time, NULL);
- record = dacp_player_now_playing_record (share->priv->player);
+ record = dmap_control_player_now_playing_record (share->priv->player);
cmst = dmap_structure_add (NULL, DMAP_CC_CMST);
dmap_structure_add (cmst, DMAP_CC_MSTT, (gint32) DMAP_STATUS_OK);
@@ -588,7 +588,7 @@ dacp_share_fill_playstatusupdate (DACPShare * share, SoupMessage * message)
}
static void
-dacp_share_send_playstatusupdate (DACPShare * share)
+dmap_control_share_send_playstatusupdate (DmapControlShare * share)
{
GSList *list;
SoupServer *server = NULL;
@@ -597,7 +597,7 @@ dacp_share_send_playstatusupdate (DACPShare * share)
if (server) {
for (list = share->priv->update_queue; list;
list = list->next) {
- dacp_share_fill_playstatusupdate (share,
+ dmap_control_share_fill_playstatusupdate (share,
(SoupMessage*) list->data);
soup_server_unpause_message (server,
(SoupMessage*) list->data);
@@ -609,14 +609,14 @@ dacp_share_send_playstatusupdate (DACPShare * share)
}
void
-dacp_share_player_updated (DACPShare * share)
+dmap_control_share_player_updated (DmapControlShare * share)
{
share->priv->current_revision++;
- dacp_share_send_playstatusupdate (share);
+ dmap_control_share_send_playstatusupdate (share);
}
static void
-status_update_message_finished (SoupMessage * message, DACPShare * share)
+status_update_message_finished (SoupMessage * message, DmapControlShare * share)
{
share->priv->update_queue =
g_slist_remove (share->priv->update_queue, message);
@@ -630,7 +630,7 @@ debug_param (gpointer key, gpointer val, gpointer user_data)
}
void
-dacp_share_login (DMAPShare * share,
+dmap_control_share_login (DmapShare * share,
SoupServer * server,
SoupMessage * message,
const char *path,
@@ -663,7 +663,7 @@ dacp_share_login (DMAPShare * share,
}
void
-dacp_share_ctrl_int (DMAPShare * share,
+dmap_control_share_ctrl_int (DmapShare * share,
SoupServer * server,
SoupMessage * message,
const char *path,
@@ -671,7 +671,7 @@ dacp_share_ctrl_int (DMAPShare * share,
{
const char *rest_of_path;
- DACPShare *dacp_share = DACP_SHARE (share);
+ DmapControlShare *dmap_control_share = DMAP_CONTROL_SHARE (share);
g_debug ("Path is %s.", path);
if (query) {
@@ -769,7 +769,7 @@ dacp_share_ctrl_int (DMAPShare * share,
0) {
gulong volume;
- g_object_get (dacp_share->priv->player,
+ g_object_get (dmap_control_share->priv->player,
"volume", &volume, NULL);
dmap_structure_add (cmgt, DMAP_CC_CMVO,
volume);
@@ -789,7 +789,7 @@ dacp_share_ctrl_int (DMAPShare * share,
gdouble volume =
strtod (g_hash_table_lookup
(query, "dmcp.volume"), NULL);
- g_object_set (dacp_share->priv->player, "volume",
+ g_object_set (dmap_control_share->priv->player, "volume",
(gulong) volume, NULL);
}
soup_message_set_status (message, SOUP_STATUS_NO_CONTENT);
@@ -808,7 +808,7 @@ dacp_share_ctrl_int (DMAPShare * share,
dmap_structure_add (casp, DMAP_CC_MINM, "Computer");
dmap_structure_add (casp, DMAP_CC_MSMA, (gint32) 0);
- g_object_get (dacp_share->priv->player, "volume", &volume, NULL);
+ g_object_get (dmap_control_share->priv->player, "volume", &volume, NULL);
dmap_structure_add (casp, DMAP_CC_CMVO, volume);
_dmap_share_message_set_from_dmap_structure (share, message,
@@ -820,31 +820,31 @@ dacp_share_ctrl_int (DMAPShare * share,
g_hash_table_lookup (query, "revision-number");
gint revision_number = atoi (revision);
- if (revision_number >= dacp_share->priv->current_revision) {
+ if (revision_number >= dmap_control_share->priv->current_revision) {
g_object_ref (message);
- dacp_share->priv->update_queue =
- g_slist_prepend (dacp_share->
+ dmap_control_share->priv->update_queue =
+ g_slist_prepend (dmap_control_share->
priv->update_queue, message);
g_signal_connect_object (message, "finished",
G_CALLBACK
(status_update_message_finished),
- dacp_share, 0);
+ dmap_control_share, 0);
soup_server_pause_message (server, message);
} else {
- dacp_share_fill_playstatusupdate (dacp_share,
+ dmap_control_share_fill_playstatusupdate (dmap_control_share,
message);
}
} else if (g_ascii_strcasecmp ("/1/playpause", rest_of_path) == 0) {
- dacp_player_play_pause (dacp_share->priv->player);
+ dmap_control_player_play_pause (dmap_control_share->priv->player);
soup_message_set_status (message, SOUP_STATUS_NO_CONTENT);
} else if (g_ascii_strcasecmp ("/1/pause", rest_of_path) == 0) {
- dacp_player_pause (dacp_share->priv->player);
+ dmap_control_player_pause (dmap_control_share->priv->player);
soup_message_set_status (message, SOUP_STATUS_NO_CONTENT);
} else if (g_ascii_strcasecmp ("/1/nextitem", rest_of_path) == 0) {
- dacp_player_next_item (dacp_share->priv->player);
+ dmap_control_player_next_item (dmap_control_share->priv->player);
soup_message_set_status (message, SOUP_STATUS_NO_CONTENT);
} else if (g_ascii_strcasecmp ("/1/previtem", rest_of_path) == 0) {
- dacp_player_prev_item (dacp_share->priv->player);
+ dmap_control_player_prev_item (dmap_control_share->priv->player);
soup_message_set_status (message, SOUP_STATUS_NO_CONTENT);
} else if (g_ascii_strcasecmp ("/1/nowplayingartwork", rest_of_path)
== 0) {
@@ -859,7 +859,7 @@ dacp_share_ctrl_int (DMAPShare * share,
if (g_hash_table_lookup (query, "mh"))
height = atoi (g_hash_table_lookup (query, "mh"));
artwork_filename =
- dacp_player_now_playing_artwork (dacp_share->
+ dmap_control_player_now_playing_artwork (dmap_control_share->
priv->player, width,
height);
if (!artwork_filename) {
@@ -917,7 +917,7 @@ dacp_share_ctrl_int (DMAPShare * share,
SOUP_STATUS_NO_CONTENT);
return;
} else if (g_ascii_strcasecmp ("clear", command) == 0) {
- dacp_player_cue_clear (dacp_share->priv->player);
+ dmap_control_player_cue_clear (dmap_control_share->priv->player);
soup_message_set_status (message,
SOUP_STATUS_NO_CONTENT);
} else if (g_ascii_strcasecmp ("play", command) == 0) {
@@ -927,7 +927,7 @@ dacp_share_ctrl_int (DMAPShare * share,
GHashTable *records;
GList *sorted_records;
GSList *filter_def;
- DMAPDb *db;
+ DmapDb *db;
gint index =
atoi (g_hash_table_lookup (query, "index"));
@@ -941,14 +941,14 @@ dacp_share_ctrl_int (DMAPShare * share,
sorted_records =
g_list_sort_with_data (sorted_records,
(GCompareDataFunc)
- daap_record_cmp_by_album,
+ dmap_av_record_cmp_by_album,
db);
} else if (sort_by != NULL) {
g_warning ("Unknown sort column: %s",
sort_by);
}
- dacp_player_cue_play (dacp_share->priv->player,
+ dmap_control_player_cue_play (dmap_control_share->priv->player,
sorted_records, index);
g_list_free (sorted_records);
@@ -981,7 +981,7 @@ dacp_share_ctrl_int (DMAPShare * share,
#define PASSCODE_LENGTH 4
static gchar *
-dacp_share_pairing_code (DACPShare * share, gchar * pair_txt,
+dmap_control_share_pairing_code (DmapControlShare * share, gchar * pair_txt,
gchar passcode[4])
{
int i;
@@ -1011,16 +1011,16 @@ dacp_share_pairing_code (DACPShare * share, gchar * pair_txt,
}
void
-connection_handler_cb (DMAPConnection * connection, guint status,
+connection_handler_cb (DmapConnection * connection, guint status,
GNode * structure, gpointer user_data)
{
gboolean connected;
GHashTableIter iter;
gpointer key, value;
- DACPShare *share = user_data;
+ DmapControlShare *share = user_data;
DACPRemoteInfo *remote_info = NULL;
gchar *service_name = NULL;
- DMAPStructureItem *item = NULL;
+ DmapStructureItem *item = NULL;
gchar *pairing_guid;
g_debug ("Pairing returned with code %u", status);
@@ -1068,7 +1068,7 @@ connection_handler_cb (DMAPConnection * connection, guint status,
}
void
-dacp_share_pair (DACPShare * share, gchar * service_name, gchar passcode[4])
+dmap_control_share_pair (DmapControlShare * share, gchar * service_name, gchar passcode[4])
{
gchar *pairing_code;
gchar *name;
@@ -1090,16 +1090,16 @@ dacp_share_pair (DACPShare * share, gchar * service_name, gchar passcode[4])
g_object_get (share, "name", &name, NULL);
- remote_info->connection = DMAP_CONNECTION (dacp_connection_new (name,
+ remote_info->connection = DMAP_CONNECTION (dmap_control_connection_new (name,
remote_info->host, remote_info->port,
NULL,
NULL));
- /* This is required since we don't call DMAPConnection default handler */
+ /* This is required since we don't call DmapConnection default handler */
dmap_connection_setup (remote_info->connection);
/* Get the remote path for pairing */
pairing_code =
- dacp_share_pairing_code (share, remote_info->pair_txt,
+ dmap_control_share_pairing_code (share, remote_info->pair_txt,
passcode);
path = g_strdup_printf ("/pair?pairingcode=%s&servicename=%s",
pairing_code, name);
@@ -1108,7 +1108,7 @@ dacp_share_pair (DACPShare * share, gchar * service_name, gchar passcode[4])
g_debug ("Pairing remote in %s:%d/%s", remote_info->host,
remote_info->port, path);
- /* Let DMAPConnection do the heavy work */
+ /* Let DmapConnection do the heavy work */
dmap_connection_get (remote_info->connection, path, FALSE,
connection_handler_cb, share);
diff --git a/libdmapsharing/dmap-control-share.h b/libdmapsharing/dmap-control-share.h
new file mode 100644
index 0000000..0c3b9b2
--- /dev/null
+++ b/libdmapsharing/dmap-control-share.h
@@ -0,0 +1,168 @@
+/*
+ * Header for DACP (e.g., iTunes Remote) sharing
+ *
+ * Copyright (C) 2010 Alexandre Rosenfeld <airmind gmail 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; 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 __DMAP_CONTROL_SHARE_H
+#define __DMAP_CONTROL_SHARE_H
+
+#include <glib-object.h>
+
+#include <libdmapsharing/dmap-control-player.h>
+#include <libdmapsharing/dmap-share.h>
+#include <libdmapsharing/dmap-db.h>
+#include <libdmapsharing/dmap-container-db.h>
+#include <libdmapsharing/dmap-av-share.h>
+
+G_BEGIN_DECLS
+/**
+ * DMAP_TYPE_CONTROL_SHARE:
+ *
+ * The type for #DmapControlShare.
+ */
+#define DMAP_TYPE_CONTROL_SHARE (dmap_control_share_get_type ())
+/**
+ * DMAP_CONTROL_SHARE:
+ * @o: Object which is subject to casting.
+ *
+ * Casts a #DmapControlShare or derived pointer into a (DmapControlShare*) pointer.
+ * Depending on the current debugging level, this function may invoke
+ * certain runtime checks to identify invalid casts.
+ */
+#define DMAP_CONTROL_SHARE(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), \
+ DMAP_TYPE_CONTROL_SHARE, DmapControlShare))
+/**
+ * DMAP_CONTROL_SHARE_CLASS:
+ * @k: a valid #DmapControlShareClass
+ *
+ * Casts a derived #DmapControlShareClass structure into a #DmapControlShareClass structure.
+ */
+#define DMAP_CONTROL_SHARE_CLASS(k) (G_TYPE_CHECK_CLASS_CAST((k), \
+ DMAP_TYPE_CONTROL_SHARE, DmapControlShareClass))
+/**
+ * IS_DMAP_CONTROL_SHARE:
+ * @o: Instance to check for being a %DMAP_TYPE_CONTROL_SHARE.
+ *
+ * Checks whether a valid #GTypeInstance pointer is of type %DMAP_TYPE_CONTROL_SHARE.
+ */
+#define IS_DMAP_CONTROL_SHARE(o) (G_TYPE_CHECK_INSTANCE_TYPE ((o), \
+ DMAP_TYPE_CONTROL_SHARE))
+/**
+ * IS_DMAP_CONTROL_SHARE_CLASS:
+ * @k: a #DmapControlShareClass
+ *
+ * Checks whether @k "is a" valid #DmapControlShareClass structure of type
+ * %DMAP_CONTROL_SHARE or derived.
+ */
+#define IS_DMAP_CONTROL_SHARE_CLASS(k) (G_TYPE_CHECK_CLASS_TYPE ((k), \
+ DMAP_TYPE_CONTROL_SHARE))
+/**
+ * DMAP_CONTROL_SHARE_GET_CLASS:
+ * @o: a #DmapControlShare instance.
+ *
+ * Get the class structure associated to a #DmapControlShare instance.
+ *
+ * Returns: pointer to object class structure.
+ */
+#define DMAP_CONTROL_SHARE_GET_CLASS(o) (G_TYPE_INSTANCE_GET_CLASS ((o), \
+ DMAP_TYPE_CONTROL_SHARE, DmapControlShareClass))
+typedef struct DmapControlSharePrivate DmapControlSharePrivate;
+
+typedef struct
+{
+ DmapAvShare dmap_av_share_instance;
+ DmapControlSharePrivate *priv;
+} DmapControlShare;
+
+typedef struct
+{
+ DmapAvShareClass dmap_av_share_class;
+
+ gboolean (*lookup_guid) (DmapControlShare * share, gchar * guid);
+ void (*add_guid) (DmapControlShare * share, gchar * guid);
+
+ void (*remote_found) (DmapControlShare * share,
+ gchar * service_name, gchar * remote_name);
+ void (*remote_lost) (DmapControlShare * share, gchar * service_name);
+ void (*remote_paired) (DmapControlShare * share,
+ gchar * service_name, gboolean connected);
+} DmapControlShareClass;
+
+GType dmap_control_share_get_type (void);
+
+/**
+ * dmap_control_share_new:
+ * @library_name: The library name that will be shown in the remote.
+ * @player: A #DmapControlPlayer instance, used to retrieve information from a player
+ * implementation.
+ * @db: a media database represented by a #DmapDb instance.
+ * @container_db: a container (album) database represented by a #DmapContainerDb
+ * instance.
+ *
+ * Creates a new DACP share and publishes it using mDNS.
+ *
+ * Returns: a pointer to a #DmapControlShare.
+ */
+DmapControlShare *dmap_control_share_new (const gchar * library_name, DmapControlPlayer * player,
+ DmapDb * db, DmapContainerDb * container_db);
+
+/**
+ * dmap_control_share_pair:
+ * @share: a #DmapControlShare
+ * @service_name: DACP client (remote) service identifier.
+ * @passcode: 4-Digit PIN code entered by the user.
+ *
+ * Pairs a DACP client (Remote) with this server. If the passcode is
+ * correct (the same as shown on the remote), the remote will start connecting
+ * to this server.
+ */
+void dmap_control_share_pair (DmapControlShare * share, gchar * service_name,
+ gchar passcode[4]);
+
+/**
+ * dmap_control_share_start_lookup:
+ * @share: A #DmapControlShare.
+ *
+ * Start looking up for DACP remotes. Connect to #DmapControlShare::remote-found signal
+ * to detect new remotes. Be aware that when a #DmapControlShare is created, only
+ * after calling this function is that it starts looking up for Remotes on the
+ * network.
+ */
+void dmap_control_share_start_lookup (DmapControlShare * share);
+
+/**
+ * dmap_control_share_stop_lookup:
+ * @share: A #DmapControlShare.
+ *
+ * Stop looking up for DACP remotes.
+ */
+void dmap_control_share_stop_lookup (DmapControlShare * share);
+
+/**
+ * dmap_control_share_player_update:
+ * @share: A #DmapControlShare.
+ *
+ * Signals that the player has been updated (different track playing, playing
+ * state changed, suffle state changed, etc).
+ */
+void dmap_control_share_player_updated (DmapControlShare * share);
+
+#endif /* __DMAP_CONTROL_SHARE_H */
+
+G_END_DECLS
diff --git a/libdmapsharing/dmap-db.c b/libdmapsharing/dmap-db.c
index 45f7a86..7d6b5d5 100644
--- a/libdmapsharing/dmap-db.c
+++ b/libdmapsharing/dmap-db.c
@@ -24,57 +24,57 @@
typedef struct FilterData
{
- DMAPDb *db;
+ DmapDb *db;
GSList *filter_def;
GHashTable *ht;
} FilterData;
static void
-dmap_db_default_init (DMAPDbInterface * iface)
+dmap_db_default_init (DmapDbInterface * iface)
{
}
-G_DEFINE_INTERFACE(DMAPDb, dmap_db, G_TYPE_OBJECT)
+G_DEFINE_INTERFACE(DmapDb, dmap_db, G_TYPE_OBJECT)
-DMAPRecord *
-dmap_db_lookup_by_id (const DMAPDb * db, guint id)
+DmapRecord *
+dmap_db_lookup_by_id (const DmapDb * db, guint id)
{
return DMAP_DB_GET_INTERFACE (db)->lookup_by_id (db, id);
}
guint
-dmap_db_lookup_id_by_location (const DMAPDb * db, const gchar * location)
+dmap_db_lookup_id_by_location (const DmapDb * db, const gchar * location)
{
return DMAP_DB_GET_INTERFACE (db)->lookup_id_by_location (db,
location);
}
void
-dmap_db_foreach (const DMAPDb * db, DMAPIdRecordFunc func, gpointer data)
+dmap_db_foreach (const DmapDb * db, DmapIdRecordFunc func, gpointer data)
{
DMAP_DB_GET_INTERFACE (db)->foreach (db, func, data);
}
guint
-dmap_db_add (DMAPDb * db, DMAPRecord * record)
+dmap_db_add (DmapDb * db, DmapRecord * record)
{
return DMAP_DB_GET_INTERFACE (db)->add (db, record);
}
guint
-dmap_db_add_with_id (DMAPDb * db, DMAPRecord * record, guint id)
+dmap_db_add_with_id (DmapDb * db, DmapRecord * record, guint id)
{
return DMAP_DB_GET_INTERFACE (db)->add_with_id (db, record, id);
}
guint
-dmap_db_add_path (DMAPDb * db, const gchar * path)
+dmap_db_add_path (DmapDb * db, const gchar * path)
{
return DMAP_DB_GET_INTERFACE (db)->add_path (db, path);
}
gulong
-dmap_db_count (const DMAPDb * db)
+dmap_db_count (const DmapDb * db)
{
return DMAP_DB_GET_INTERFACE (db)->count (db);
}
@@ -127,7 +127,7 @@ _dmap_db_strsplit_using_quotes (const gchar * str)
}
static gboolean
-compare_record_property (DMAPRecord * record, const gchar * property_name,
+compare_record_property (DmapRecord * record, const gchar * property_name,
const gchar * property_value)
{
GParamSpec *pspec;
@@ -217,7 +217,7 @@ compare_record_property (DMAPRecord * record, const gchar * property_name,
}
static void
-apply_filter (guint id, DMAPRecord * record, gpointer data)
+apply_filter (guint id, DmapRecord * record, gpointer data)
{
FilterData *fd;
gboolean accept = FALSE;
@@ -240,7 +240,7 @@ apply_filter (guint id, DMAPRecord * record, gpointer data)
for (list = fd->filter_def; list != NULL; list = list->next) {
for (filter = list->data; filter != NULL;
filter = filter->next) {
- DMAPDbFilterDefinition *def = filter->data;
+ DmapDbFilterDefinition *def = filter->data;
const gchar *property_name;
query_key = def->key;
@@ -287,7 +287,7 @@ apply_filter (guint id, DMAPRecord * record, gpointer data)
}
GHashTable *
-dmap_db_apply_filter (DMAPDb * db, GSList * filter_def)
+dmap_db_apply_filter (DmapDb * db, GSList * filter_def)
{
GHashTable *ht;
FilterData data;
@@ -298,7 +298,7 @@ dmap_db_apply_filter (DMAPDb * db, GSList * filter_def)
data.filter_def = filter_def;
data.ht = ht;
- dmap_db_foreach (db, (DMAPIdRecordFunc) apply_filter, &data);
+ dmap_db_foreach (db, (DmapIdRecordFunc) apply_filter, &data);
return data.ht;
}
diff --git a/libdmapsharing/dmap-db.h b/libdmapsharing/dmap-db.h
index 4e41268..dfc1d94 100644
--- a/libdmapsharing/dmap-db.h
+++ b/libdmapsharing/dmap-db.h
@@ -29,19 +29,19 @@ G_BEGIN_DECLS
/**
* DMAP_TYPE_DB:
*
- * The type for #DMAPDb.
+ * The type for #DmapDb.
*/
#define DMAP_TYPE_DB (dmap_db_get_type ())
/**
* DMAP_DB:
* @o: Object which is subject to casting.
*
- * Casts a #DMAPDb or derived pointer into a (DMAPDb *) pointer.
+ * Casts a #DmapDb or derived pointer into a (DmapDb *) pointer.
* Depending on the current debugging level, this function may invoke
* certain runtime checks to identify invalid casts.
*/
#define DMAP_DB(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), \
- DMAP_TYPE_DB, DMAPDb))
+ DMAP_TYPE_DB, DmapDb))
/**
* IS_DMAP_DB:
* @o: Instance to check for being a %DMAP_TYPE_DB.
@@ -52,47 +52,47 @@ G_BEGIN_DECLS
DMAP_TYPE_DB))
/**
* DMAP_DB_GET_INTERFACE:
- * @o: a #DMAPDb instance.
+ * @o: a #DmapDb instance.
*
- * Get the insterface structure associated to a #DMAPDb instance.
+ * Get the insterface structure associated to a #DmapDb instance.
*
* Returns: pointer to object interface structure.
*/
#define DMAP_DB_GET_INTERFACE(o) (G_TYPE_INSTANCE_GET_INTERFACE ((o), \
- DMAP_TYPE_DB, DMAPDbInterface))
-typedef struct _DMAPDb DMAPDb;
-typedef struct _DMAPDbInterface DMAPDbInterface;
+ DMAP_TYPE_DB, DmapDbInterface))
+typedef struct _DmapDb DmapDb;
+typedef struct _DmapDbInterface DmapDbInterface;
/**
- * DMAPIdRecordFunc:
+ * DmapIdRecordFunc:
* @id: a DMAP record ID
- * @record: a #DMAPRecord
+ * @record: a #DmapRecord
* @user_data: (closure): user data
*
* The type of function passed to dmap_db_foreach().
*/
-typedef void (*DMAPIdRecordFunc) (guint id, DMAPRecord *record, gpointer user_data);
+typedef void (*DmapIdRecordFunc) (guint id, DmapRecord *record, gpointer user_data);
-struct _DMAPDbInterface
+struct _DmapDbInterface
{
GTypeInterface parent;
- guint (*add) (DMAPDb * db, DMAPRecord * record);
- guint (*add_with_id) (DMAPDb * db, DMAPRecord * record, guint id);
- guint (*add_path) (DMAPDb * db, const gchar * path);
- DMAPRecord *(*lookup_by_id) (const DMAPDb * db, guint id);
- guint (*lookup_id_by_location) (const DMAPDb * db,
+ guint (*add) (DmapDb * db, DmapRecord * record);
+ guint (*add_with_id) (DmapDb * db, DmapRecord * record, guint id);
+ guint (*add_path) (DmapDb * db, const gchar * path);
+ DmapRecord *(*lookup_by_id) (const DmapDb * db, guint id);
+ guint (*lookup_id_by_location) (const DmapDb * db,
const gchar * location);
- void (*foreach) (const DMAPDb * db, DMAPIdRecordFunc func, gpointer data);
- gint64 (*count) (const DMAPDb * db);
+ void (*foreach) (const DmapDb * db, DmapIdRecordFunc func, gpointer data);
+ gint64 (*count) (const DmapDb * db);
};
-typedef struct DMAPDbFilterDefinition
+typedef struct DmapDbFilterDefinition
{
gchar *key;
gchar *value;
gboolean negate;
-} DMAPDbFilterDefinition;
+} DmapDbFilterDefinition;
GType dmap_db_get_type (void);
@@ -109,7 +109,7 @@ GType dmap_db_get_type (void);
* be placed elsewhere). In all cases, the record should be unrefed by the
* calling code.
*/
-guint dmap_db_add (DMAPDb * db, DMAPRecord * record);
+guint dmap_db_add (DmapDb * db, DmapRecord * record);
/**
* dmap_db_add_with_id:
@@ -123,7 +123,7 @@ guint dmap_db_add (DMAPDb * db, DMAPRecord * record);
*
* See also the notes for dmap_db_add regarding reference counting.
*/
-guint dmap_db_add_with_id (DMAPDb * db, DMAPRecord * record, guint id);
+guint dmap_db_add_with_id (DmapDb * db, DmapRecord * record, guint id);
/**
* dmap_db_add_path:
@@ -136,7 +136,7 @@ guint dmap_db_add_with_id (DMAPDb * db, DMAPRecord * record, guint id);
*
* See also the notes for dmap_db_add regarding reference counting.
*/
-guint dmap_db_add_path (DMAPDb * db, const gchar * path);
+guint dmap_db_add_path (DmapDb * db, const gchar * path);
/**
* dmap_db_lookup_by_id:
@@ -157,7 +157,7 @@ guint dmap_db_add_path (DMAPDb * db, const gchar * path);
* In this case, the reference count should not be incremented before
* returning a record pointer.
*/
-DMAPRecord *dmap_db_lookup_by_id (const DMAPDb * db, guint id);
+DmapRecord *dmap_db_lookup_by_id (const DmapDb * db, guint id);
/**
* dmap_db_lookup_id_by_location:
@@ -167,7 +167,7 @@ DMAPRecord *dmap_db_lookup_by_id (const DMAPDb * db, guint id);
* Returns: the database id for the record corresponding to @path or 0 if
* such a record does not exist.
*/
-guint dmap_db_lookup_id_by_location (const DMAPDb * db,
+guint dmap_db_lookup_id_by_location (const DmapDb * db,
const gchar * location);
/**
@@ -178,7 +178,7 @@ guint dmap_db_lookup_id_by_location (const DMAPDb * db,
*
* Apply a function to each record in a media database.
*/
-void dmap_db_foreach (const DMAPDb * db, DMAPIdRecordFunc func, gpointer data);
+void dmap_db_foreach (const DmapDb * db, DmapIdRecordFunc func, gpointer data);
/**
* dmap_db_count:
@@ -186,11 +186,11 @@ void dmap_db_foreach (const DMAPDb * db, DMAPIdRecordFunc func, gpointer data);
*
* Returns: the number of records in the database.
*/
-gulong dmap_db_count (const DMAPDb * db);
+gulong dmap_db_count (const DmapDb * db);
gchar **_dmap_db_strsplit_using_quotes (const gchar * str);
-GHashTable *dmap_db_apply_filter (DMAPDb * db, GSList * filter_def);
+GHashTable *dmap_db_apply_filter (DmapDb * db, GSList * filter_def);
#endif /* __DMAP_DB_H */
diff --git a/libdmapsharing/dmap-gst-input-stream.c b/libdmapsharing/dmap-gst-input-stream.c
index 18dd9d2..72ddc17 100644
--- a/libdmapsharing/dmap-gst-input-stream.c
+++ b/libdmapsharing/dmap-gst-input-stream.c
@@ -1,5 +1,5 @@
/*
- * DMAPGstInputStream class: Open a URI using dmap_gst_input_stream_new ().
+ * DmapGstInputStream class: Open a URI using dmap_gst_input_stream_new ().
* Data is decoded using GStreamer and is then made available by the class's
* read operations.
*
@@ -51,7 +51,7 @@ static const struct dmap_gst_format dmap_gst_formats[] = {
{NULL, NULL}
};
-struct DMAPGstInputStreamPrivate
+struct DmapGstInputStreamPrivate
{
GQueue *buffer;
gsize read_request; /* Size of data asked for */
@@ -65,7 +65,7 @@ struct DMAPGstInputStreamPrivate
#define DMAP_GST_INPUT_STREAM_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), \
DMAP_TYPE_GST_INPUT_STREAM, \
- DMAPGstInputStreamPrivate))
+ DmapGstInputStreamPrivate))
static goffset
dmap_gst_input_stream_tell (GSeekable * seekable)
@@ -87,7 +87,7 @@ dmap_gst_input_stream_seek (GSeekable * seekable,
GSeekType type,
GCancellable * cacellable, GError ** error)
{
- // FIXME: implement: DMAPGstInputStream *stream;
+ // FIXME: implement: DmapGstInputStream *stream;
// FIXME: implement: goffset absolute;
// FIXME: implement: stream = DMAP_GST_INPUT_STREAM (seekable);
@@ -154,7 +154,7 @@ dmap_gst_input_stream_truncate (GSeekable * seekable,
GCancellable * cancellable, GError ** error)
{
g_set_error (error, G_IO_ERROR, G_IO_ERROR_NOT_SUPPORTED,
- "Cannot truncate DMAPGstInputStream");
+ "Cannot truncate DmapGstInputStream");
return FALSE;
}
@@ -170,7 +170,7 @@ dmap_gst_input_stream_seekable_iface_init (GSeekableIface * iface)
void
dmap_gst_input_stream_new_buffer_cb (GstElement * element,
- DMAPGstInputStream * stream)
+ DmapGstInputStream * stream)
{
gsize i;
guint8 *ptr;
@@ -304,7 +304,7 @@ dmap_gst_input_stream_read (GInputStream * stream,
GCancellable * cancellable, GError ** error)
{
int i;
- DMAPGstInputStream *gst_stream = DMAP_GST_INPUT_STREAM (stream);
+ DmapGstInputStream *gst_stream = DMAP_GST_INPUT_STREAM (stream);
gint64 end_time;
end_time = g_get_monotonic_time () + QUEUE_POP_WAIT_SECONDS * G_TIME_SPAN_SECOND;
@@ -355,7 +355,7 @@ dmap_gst_input_stream_skip (GInputStream * stream,
}
static void
-dmap_gst_input_stream_kill_pipeline (DMAPGstInputStream * stream)
+dmap_gst_input_stream_kill_pipeline (DmapGstInputStream * stream)
{
DMAP_GST_INPUT_STREAM_GET_CLASS (stream)->kill_pipeline (stream);
}
@@ -364,7 +364,7 @@ static gboolean
dmap_gst_input_stream_close (GInputStream * stream,
GCancellable * cancellable, GError ** error)
{
- DMAPGstInputStream *gst_stream = DMAP_GST_INPUT_STREAM (stream);
+ DmapGstInputStream *gst_stream = DMAP_GST_INPUT_STREAM (stream);
dmap_gst_input_stream_kill_pipeline (gst_stream);
@@ -433,11 +433,11 @@ dmap_gst_input_stream_close_finish (GInputStream * stream,
}
static void
-dmap_gst_input_stream_class_init (DMAPGstInputStreamClass * klass)
+dmap_gst_input_stream_class_init (DmapGstInputStreamClass * klass)
{
GInputStreamClass *istream_class;
- g_type_class_add_private (klass, sizeof (DMAPGstInputStreamPrivate));
+ g_type_class_add_private (klass, sizeof (DmapGstInputStreamPrivate));
istream_class = G_INPUT_STREAM_CLASS (klass);
istream_class->read_fn = dmap_gst_input_stream_read;
@@ -452,7 +452,7 @@ dmap_gst_input_stream_class_init (DMAPGstInputStreamClass * klass)
}
static void
-dmap_gst_input_stream_init (DMAPGstInputStream * stream)
+dmap_gst_input_stream_init (DmapGstInputStream * stream)
{
stream->priv = DMAP_GST_INPUT_STREAM_GET_PRIVATE (stream);
@@ -469,7 +469,7 @@ dmap_gst_input_stream_init (DMAPGstInputStream * stream)
g_cond_init (&stream->priv->buffer_write_ready);
}
-G_DEFINE_TYPE_WITH_CODE (DMAPGstInputStream, dmap_gst_input_stream,
+G_DEFINE_TYPE_WITH_CODE (DmapGstInputStream, dmap_gst_input_stream,
G_TYPE_INPUT_STREAM,
G_IMPLEMENT_INTERFACE (G_TYPE_SEEKABLE,
dmap_gst_input_stream_seekable_iface_init));
diff --git a/libdmapsharing/dmap-gst-input-stream.h b/libdmapsharing/dmap-gst-input-stream.h
index 1abfa25..90723a3 100644
--- a/libdmapsharing/dmap-gst-input-stream.h
+++ b/libdmapsharing/dmap-gst-input-stream.h
@@ -1,5 +1,5 @@
/*
- * DMAPGstInputStream class: Open a URI using dmap_gst_input_stream_new ().
+ * DmapGstInputStream class: Open a URI using dmap_gst_input_stream_new ().
* Data is decoded using GStreamer and is then made available by the class's
* read operations.
*
@@ -30,35 +30,35 @@ G_BEGIN_DECLS
#define DMAP_TYPE_GST_INPUT_STREAM (dmap_gst_input_stream_get_type ())
#define DMAP_GST_INPUT_STREAM(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), \
DMAP_TYPE_GST_INPUT_STREAM, \
- DMAPGstInputStream))
+ DmapGstInputStream))
#define DMAP_GST_INPUT_STREAM_CLASS(k) (G_TYPE_CHECK_CLASS_CAST((k), \
DMAP_TYPE_GST_INPUT_STREAM, \
- DMAPGstInputStreamClass))
+ DmapGstInputStreamClass))
#define IS_DMAP_GST_INPUT_STREAM(o) (G_TYPE_CHECK_INSTANCE_TYPE ((o), \
DMAP_TYPE_GST_INPUT_STREAM))
#define IS_DMAP_GST_INPUT_STREAM_CLASS(k) (G_TYPE_CHECK_CLASS_TYPE ((k), \
DMAP_TYPE_GST_INPUT_STREAM_CLASS))
#define DMAP_GST_INPUT_STREAM_GET_CLASS(o) (G_TYPE_INSTANCE_GET_CLASS ((o), \
DMAP_TYPE_GST_INPUT_STREAM, \
- DMAPGstInputStreamClass))
-typedef struct DMAPGstInputStreamPrivate DMAPGstInputStreamPrivate;
+ DmapGstInputStreamClass))
+typedef struct DmapGstInputStreamPrivate DmapGstInputStreamPrivate;
typedef struct
{
GInputStream parent;
- DMAPGstInputStreamPrivate *priv;
-} DMAPGstInputStream;
+ DmapGstInputStreamPrivate *priv;
+} DmapGstInputStream;
typedef struct
{
GInputStreamClass parent;
- void (*kill_pipeline) (DMAPGstInputStream *);
-} DMAPGstInputStreamClass;
+ void (*kill_pipeline) (DmapGstInputStream *);
+} DmapGstInputStreamClass;
GType dmap_gst_input_stream_get_type (void);
-/* Supported transcode target formats (data read from DMAPGstInputStream
+/* Supported transcode target formats (data read from DmapGstInputStream
* will be in one of these formats): */
enum
{
@@ -72,7 +72,7 @@ GInputStream *dmap_gst_input_stream_new (const gchar * transcode_mimetype,
/* FIXME: this prototype was moved to the specific implementations in order to make this header file work
without GStreamer installed:
void dmap_gst_input_stream_new_buffer_cb (GstElement *element,
- DMAPGstInputStream *stream);
+ DmapGstInputStream *stream);
*/
gchar *dmapd_input_stream_strdup_format_extension (const gint format_code);
diff --git a/libdmapsharing/dmap-gst-mp3-input-stream.c b/libdmapsharing/dmap-gst-mp3-input-stream.c
index b21b631..d6f2b2a 100644
--- a/libdmapsharing/dmap-gst-mp3-input-stream.c
+++ b/libdmapsharing/dmap-gst-mp3-input-stream.c
@@ -1,5 +1,5 @@
/*
- * DMAPGstMP3InputStream class: Open a URI using dmap_gst_mp3_input_stream_new ().
+ * DmapGstMP3InputStream class: Open a URI using dmap_gst_mp3_input_stream_new ().
* Data is decoded using GStreamer and is then reencoded as an MP3
* stream by the class's read operations.
*
@@ -28,7 +28,7 @@
#define GST_APP_MAX_BUFFERS 1024
-struct DMAPGstMP3InputStreamPrivate
+struct DmapGstMP3InputStreamPrivate
{
GstElement *pipeline;
GstElement *src;
@@ -40,7 +40,7 @@ struct DMAPGstMP3InputStreamPrivate
/* FIXME: See note in dmap-gst-input-stream.h */
void dmap_gst_input_stream_new_buffer_cb (GstElement * element,
- DMAPGstInputStream * stream);
+ DmapGstInputStream * stream);
static void
pad_added_cb (GstElement * element,
@@ -69,7 +69,7 @@ dmap_gst_mp3_input_stream_new (GInputStream * src_stream)
{
GstStateChangeReturn sret;
GstState state;
- DMAPGstMP3InputStream *stream = NULL;
+ DmapGstMP3InputStream *stream = NULL;
GstElement *pipeline = NULL;
GstElement *src = NULL;
@@ -142,7 +142,7 @@ dmap_gst_mp3_input_stream_new (GInputStream * src_stream)
g_signal_connect (decode, "pad-added", G_CALLBACK (pad_added_cb), convert);
- /* FIXME: this technique is shared with dmapd-daap-share.c */
+ /* FIXME: this technique is shared with dmapd-dmap-av-share.c */
sret = gst_element_set_state (pipeline, GST_STATE_PLAYING);
if (GST_STATE_CHANGE_ASYNC == sret) {
if (GST_STATE_CHANGE_SUCCESS !=
@@ -199,32 +199,32 @@ done:
}
static void
-dmap_gst_mp3_input_stream_kill_pipeline (DMAPGstInputStream * stream)
+dmap_gst_mp3_input_stream_kill_pipeline (DmapGstInputStream * stream)
{
- DMAPGstMP3InputStream *mp3_stream =
+ DmapGstMP3InputStream *mp3_stream =
DMAP_GST_MP3_INPUT_STREAM (stream);
gst_element_set_state (mp3_stream->priv->pipeline, GST_STATE_NULL);
gst_object_unref (GST_OBJECT (mp3_stream->priv->pipeline));
}
-G_DEFINE_TYPE (DMAPGstMP3InputStream, dmap_gst_mp3_input_stream,
+G_DEFINE_TYPE (DmapGstMP3InputStream, dmap_gst_mp3_input_stream,
DMAP_TYPE_GST_INPUT_STREAM);
static void
-dmap_gst_mp3_input_stream_class_init (DMAPGstMP3InputStreamClass * klass)
+dmap_gst_mp3_input_stream_class_init (DmapGstMP3InputStreamClass * klass)
{
- DMAPGstInputStreamClass *parent_class =
+ DmapGstInputStreamClass *parent_class =
DMAP_GST_INPUT_STREAM_CLASS (klass);
g_type_class_add_private (klass,
- sizeof (DMAPGstMP3InputStreamPrivate));
+ sizeof (DmapGstMP3InputStreamPrivate));
parent_class->kill_pipeline = dmap_gst_mp3_input_stream_kill_pipeline;
}
static void
-dmap_gst_mp3_input_stream_init (DMAPGstMP3InputStream * stream)
+dmap_gst_mp3_input_stream_init (DmapGstMP3InputStream * stream)
{
stream->priv = DMAP_GST_MP3_INPUT_STREAM_GET_PRIVATE (stream);
diff --git a/libdmapsharing/dmap-gst-mp3-input-stream.h b/libdmapsharing/dmap-gst-mp3-input-stream.h
index eee2320..aebbdeb 100644
--- a/libdmapsharing/dmap-gst-mp3-input-stream.h
+++ b/libdmapsharing/dmap-gst-mp3-input-stream.h
@@ -1,5 +1,5 @@
/*
- * DMAPGstMP3InputStream class: Open a URI using dmap_gst_mp3_input_stream_new ().
+ * DmapGstMP3InputStream class: Open a URI using dmap_gst_mp3_input_stream_new ().
* Data is decoded using GStreamer and is then reencoded as an MP3
* stream by the class's read operations.
*
@@ -31,32 +31,32 @@ G_BEGIN_DECLS
#define DMAP_TYPE_GST_MP3_INPUT_STREAM (dmap_gst_mp3_input_stream_get_type ())
#define DMAP_GST_MP3_INPUT_STREAM(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), \
DMAP_TYPE_GST_MP3_INPUT_STREAM, \
- DMAPGstMP3InputStream))
+ DmapGstMP3InputStream))
#define DMAP_GST_MP3_INPUT_STREAM_CLASS(k) (G_TYPE_CHECK_CLASS_CAST((k), \
DMAP_TYPE_GST_MP3_INPUT_STREAM, \
- DMAPGstMP3InputStreamClass))
+ DmapGstMP3InputStreamClass))
#define IS_DMAP_GST_MP3_INPUT_STREAM(o) (G_TYPE_CHECK_INSTANCE_TYPE ((o), \
DMAP_TYPE_GST_MP3_INPUT_STREAM))
#define IS_DMAP_GST_MP3_INPUT_STREAM_CLASS(k) (G_TYPE_CHECK_CLASS_TYPE ((k), \
DMAP_TYPE_GST_MP3_INPUT_STREAM_CLASS))
#define DMAP_GST_MP3_INPUT_STREAM_GET_CLASS(o) (G_TYPE_INSTANCE_GET_CLASS ((o), \
DMAP_TYPE_GST_MP3_INPUT_STREAM, \
- DMAPGstMP3InputStreamClass))
+ DmapGstMP3InputStreamClass))
#define DMAP_GST_MP3_INPUT_STREAM_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), \
DMAP_TYPE_GST_MP3_INPUT_STREAM, \
- DMAPGstMP3InputStreamPrivate))
-typedef struct DMAPGstMP3InputStreamPrivate DMAPGstMP3InputStreamPrivate;
+ DmapGstMP3InputStreamPrivate))
+typedef struct DmapGstMP3InputStreamPrivate DmapGstMP3InputStreamPrivate;
typedef struct
{
- DMAPGstInputStream parent;
- DMAPGstMP3InputStreamPrivate *priv;
-} DMAPGstMP3InputStream;
+ DmapGstInputStream parent;
+ DmapGstMP3InputStreamPrivate *priv;
+} DmapGstMP3InputStream;
typedef struct
{
- DMAPGstInputStreamClass parent;
-} DMAPGstMP3InputStreamClass;
+ DmapGstInputStreamClass parent;
+} DmapGstMP3InputStreamClass;
GType dmap_gst_mp3_input_stream_get_type (void);
diff --git a/libdmapsharing/dmap-gst-qt-input-stream.c b/libdmapsharing/dmap-gst-qt-input-stream.c
index b35ff60..809ec8b 100644
--- a/libdmapsharing/dmap-gst-qt-input-stream.c
+++ b/libdmapsharing/dmap-gst-qt-input-stream.c
@@ -1,5 +1,5 @@
/*
- * DMAPGstQtInputStream class: Open a URI using dmap_gst_qt_input_stream_new ().
+ * DmapGstQtInputStream class: Open a URI using dmap_gst_qt_input_stream_new ().
* Data is decoded using GStreamer and is then reencoded as a QuickTime video
* stream by the class's read operations.
*
@@ -28,7 +28,7 @@
#define GST_APP_MAX_BUFFERS 1024
-struct DMAPGstQtInputStreamPrivate
+struct DmapGstQtInputStreamPrivate
{
GstElement *pipeline;
GstElement *src;
@@ -41,7 +41,7 @@ struct DMAPGstQtInputStreamPrivate
/* FIXME: See note in dmap-gst-input-stream.h */
void dmap_gst_input_stream_new_buffer_cb (GstElement * element,
- DMAPGstInputStream * stream);
+ DmapGstInputStream * stream);
static void
pad_added_cb (GstElement * element,
@@ -70,7 +70,7 @@ dmap_gst_qt_input_stream_new (GInputStream * src_stream)
{
GstStateChangeReturn sret;
GstState state;
- DMAPGstQtInputStream *stream = NULL;
+ DmapGstQtInputStream *stream = NULL;
GstElement *pipeline = NULL;
GstElement *src = NULL;
@@ -144,7 +144,7 @@ dmap_gst_qt_input_stream_new (GInputStream * src_stream)
g_signal_connect (decode, "pad-added", G_CALLBACK (pad_added_cb), convert);
- /* FIXME: this technique is shared with dmapd-daap-share.c */
+ /* FIXME: this technique is shared with dmapd-dmap-av-share.c */
sret = gst_element_set_state (pipeline, GST_STATE_PLAYING);
if (GST_STATE_CHANGE_ASYNC == sret) {
if (GST_STATE_CHANGE_SUCCESS !=
@@ -206,9 +206,9 @@ done:
}
static void
-dmap_gst_qt_input_stream_kill_pipeline (DMAPGstInputStream * stream)
+dmap_gst_qt_input_stream_kill_pipeline (DmapGstInputStream * stream)
{
- DMAPGstQtInputStream *qt_stream =
+ DmapGstQtInputStream *qt_stream =
DMAP_GST_QT_INPUT_STREAM (stream);
// FIXME: It seems that I need to send an EOS, because QuickTime writes
@@ -219,23 +219,23 @@ dmap_gst_qt_input_stream_kill_pipeline (DMAPGstInputStream * stream)
gst_object_unref (GST_OBJECT (qt_stream->priv->pipeline));
}
-G_DEFINE_TYPE (DMAPGstQtInputStream, dmap_gst_qt_input_stream,
+G_DEFINE_TYPE (DmapGstQtInputStream, dmap_gst_qt_input_stream,
DMAP_TYPE_GST_INPUT_STREAM);
static void
-dmap_gst_qt_input_stream_class_init (DMAPGstQtInputStreamClass * klass)
+dmap_gst_qt_input_stream_class_init (DmapGstQtInputStreamClass * klass)
{
- DMAPGstInputStreamClass *parent_class =
+ DmapGstInputStreamClass *parent_class =
DMAP_GST_INPUT_STREAM_CLASS (klass);
g_type_class_add_private (klass,
- sizeof (DMAPGstQtInputStreamPrivate));
+ sizeof (DmapGstQtInputStreamPrivate));
parent_class->kill_pipeline = dmap_gst_qt_input_stream_kill_pipeline;
}
static void
-dmap_gst_qt_input_stream_init (DMAPGstQtInputStream * stream)
+dmap_gst_qt_input_stream_init (DmapGstQtInputStream * stream)
{
stream->priv = DMAP_GST_QT_INPUT_STREAM_GET_PRIVATE (stream);
diff --git a/libdmapsharing/dmap-gst-qt-input-stream.h b/libdmapsharing/dmap-gst-qt-input-stream.h
index 8e2bda6..20d69c4 100644
--- a/libdmapsharing/dmap-gst-qt-input-stream.h
+++ b/libdmapsharing/dmap-gst-qt-input-stream.h
@@ -1,5 +1,5 @@
/*
- * DMAPGstQtInputStream class: Open a URI using dmap_gst_qt_input_stream_new ().
+ * DmapGstQtInputStream class: Open a URI using dmap_gst_qt_input_stream_new ().
* Data is decoded using GStreamer and is then reencoded as a QuickTime video
* stream by the class's read operations.
*
@@ -31,32 +31,32 @@ G_BEGIN_DECLS
#define DMAP_TYPE_GST_QT_INPUT_STREAM (dmap_gst_qt_input_stream_get_type ())
#define DMAP_GST_QT_INPUT_STREAM(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), \
DMAP_TYPE_GST_QT_INPUT_STREAM, \
- DMAPGstQtInputStream))
+ DmapGstQtInputStream))
#define DMAP_GST_QT_INPUT_STREAM_CLASS(k) (G_TYPE_CHECK_CLASS_CAST((k), \
DMAP_TYPE_GST_QT_INPUT_STREAM, \
- DMAPGstQtInputStreamClass))
+ DmapGstQtInputStreamClass))
#define IS_DMAP_GST_QT_INPUT_STREAM(o) (G_TYPE_CHECK_INSTANCE_TYPE ((o), \
DMAP_TYPE_GST_QT_INPUT_STREAM))
#define IS_DMAP_GST_QT_INPUT_STREAM_CLASS(k) (G_TYPE_CHECK_CLASS_TYPE ((k), \
DMAP_TYPE_GST_QT_INPUT_STREAM_CLASS))
#define DMAP_GST_QT_INPUT_STREAM_GET_CLASS(o) (G_TYPE_INSTANCE_GET_CLASS ((o), \
DMAP_TYPE_GST_QT_INPUT_STREAM, \
- DMAPGstQtInputStreamClass))
+ DmapGstQtInputStreamClass))
#define DMAP_GST_QT_INPUT_STREAM_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), \
DMAP_TYPE_GST_QT_INPUT_STREAM, \
- DMAPGstQtInputStreamPrivate))
-typedef struct DMAPGstQtInputStreamPrivate DMAPGstQtInputStreamPrivate;
+ DmapGstQtInputStreamPrivate))
+typedef struct DmapGstQtInputStreamPrivate DmapGstQtInputStreamPrivate;
typedef struct
{
- DMAPGstInputStream parent;
- DMAPGstQtInputStreamPrivate *priv;
-} DMAPGstQtInputStream;
+ DmapGstInputStream parent;
+ DmapGstQtInputStreamPrivate *priv;
+} DmapGstQtInputStream;
typedef struct
{
- DMAPGstInputStreamClass parent;
-} DMAPGstQtInputStreamClass;
+ DmapGstInputStreamClass parent;
+} DmapGstQtInputStreamClass;
GType dmap_gst_qt_input_stream_get_type (void);
diff --git a/libdmapsharing/dmap-gst-wav-input-stream.c b/libdmapsharing/dmap-gst-wav-input-stream.c
index 0e98dce..52e5566 100644
--- a/libdmapsharing/dmap-gst-wav-input-stream.c
+++ b/libdmapsharing/dmap-gst-wav-input-stream.c
@@ -1,5 +1,5 @@
/*
- * DMAPGstWAVInputStream class: Open a URI using dmap_gst_wav_input_stream_new ().
+ * DmapGstWavInputStream class: Open a URI using dmap_gst_wav_input_stream_new ().
* Data is decoded using GStreamer and is then reencoded as a WAV
* stream by the class's read operations.
*
@@ -28,7 +28,7 @@
#define GST_APP_MAX_BUFFERS 1024
-struct DMAPGstWAVInputStreamPrivate
+struct DmapGstWavInputStreamPrivate
{
GstElement *pipeline;
GstElement *src;
@@ -41,7 +41,7 @@ struct DMAPGstWAVInputStreamPrivate
/* FIXME: See note in dmap-gst-input-stream.h */
void dmap_gst_input_stream_new_buffer_cb (GstElement * element,
- DMAPGstInputStream * stream);
+ DmapGstInputStream * stream);
static void
pad_added_cb (GstElement * element,
@@ -70,7 +70,7 @@ dmap_gst_wav_input_stream_new (GInputStream * src_stream)
{
GstStateChangeReturn sret;
GstState state;
- DMAPGstWAVInputStream *stream = NULL;
+ DmapGstWavInputStream *stream = NULL;
GstElement *pipeline = NULL;
GstElement *src = NULL;
@@ -153,7 +153,7 @@ dmap_gst_wav_input_stream_new (GInputStream * src_stream)
g_signal_connect (decode, "pad-added", G_CALLBACK (pad_added_cb), convert);
- /* FIXME: this technique is shared with dmapd-daap-share.c */
+ /* FIXME: this technique is shared with dmapd-dmap-av-share.c */
sret = gst_element_set_state (pipeline, GST_STATE_PLAYING);
if (GST_STATE_CHANGE_ASYNC == sret) {
if (GST_STATE_CHANGE_SUCCESS !=
@@ -215,33 +215,33 @@ done:
}
static void
-dmap_gst_wav_input_stream_kill_pipeline (DMAPGstInputStream * stream)
+dmap_gst_wav_input_stream_kill_pipeline (DmapGstInputStream * stream)
{
- DMAPGstWAVInputStream *wav_stream =
+ DmapGstWavInputStream *wav_stream =
DMAP_GST_WAV_INPUT_STREAM (stream);
gst_element_set_state (wav_stream->priv->pipeline, GST_STATE_NULL);
gst_object_unref (GST_OBJECT (wav_stream->priv->pipeline));
}
-G_DEFINE_TYPE (DMAPGstWAVInputStream, dmap_gst_wav_input_stream,
+G_DEFINE_TYPE (DmapGstWavInputStream, dmap_gst_wav_input_stream,
DMAP_TYPE_GST_INPUT_STREAM)
static void
- dmap_gst_wav_input_stream_class_init (DMAPGstWAVInputStreamClass
+ dmap_gst_wav_input_stream_class_init (DmapGstWavInputStreamClass
* klass)
{
- DMAPGstInputStreamClass *parent_class =
+ DmapGstInputStreamClass *parent_class =
DMAP_GST_INPUT_STREAM_CLASS (klass);
g_type_class_add_private (klass,
- sizeof (DMAPGstWAVInputStreamPrivate));
+ sizeof (DmapGstWavInputStreamPrivate));
parent_class->kill_pipeline = dmap_gst_wav_input_stream_kill_pipeline;
}
static void
-dmap_gst_wav_input_stream_init (DMAPGstWAVInputStream * stream)
+dmap_gst_wav_input_stream_init (DmapGstWavInputStream * stream)
{
stream->priv = DMAP_GST_WAV_INPUT_STREAM_GET_PRIVATE (stream);
diff --git a/libdmapsharing/dmap-gst-wav-input-stream.h b/libdmapsharing/dmap-gst-wav-input-stream.h
index 5b7a7c0..a2d366a 100644
--- a/libdmapsharing/dmap-gst-wav-input-stream.h
+++ b/libdmapsharing/dmap-gst-wav-input-stream.h
@@ -1,5 +1,5 @@
/*
- * DMAPGstWAVInputStream class: Open a URI using dmap_gst_wav_input_stream_new ().
+ * DmapGstWavInputStream class: Open a URI using dmap_gst_wav_input_stream_new ().
* Data is decoded using GStreamer and is then reencoded as a MP3
* stream by the class's read operations.
*
@@ -31,32 +31,32 @@ G_BEGIN_DECLS
#define DMAP_TYPE_GST_WAV_INPUT_STREAM (dmap_gst_wav_input_stream_get_type ())
#define DMAP_GST_WAV_INPUT_STREAM(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), \
DMAP_TYPE_GST_WAV_INPUT_STREAM, \
- DMAPGstWAVInputStream))
+ DmapGstWavInputStream))
#define DMAP_GST_WAV_INPUT_STREAM_CLASS(k) (G_TYPE_CHECK_CLASS_CAST((k), \
DMAP_TYPE_GST_WAV_INPUT_STREAM, \
- DMAPGstWAVInputStreamClass))
+ DmapGstWavInputStreamClass))
#define IS_DMAP_GST_WAV_INPUT_STREAM(o) (G_TYPE_CHECK_INSTANCE_TYPE ((o), \
DMAP_TYPE_GST_WAV_INPUT_STREAM))
#define IS_DMAP_GST_WAV_INPUT_STREAM_CLASS(k) (G_TYPE_CHECK_CLASS_TYPE ((k), \
DMAP_TYPE_GST_WAV_INPUT_STREAM_CLASS))
#define DMAP_GST_WAV_INPUT_STREAM_GET_CLASS(o) (G_TYPE_INSTANCE_GET_CLASS ((o), \
DMAP_TYPE_GST_WAV_INPUT_STREAM, \
- DMAPGstWAVInputStreamClass))
+ DmapGstWavInputStreamClass))
#define DMAP_GST_WAV_INPUT_STREAM_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), \
DMAP_TYPE_GST_WAV_INPUT_STREAM, \
- DMAPGstWAVInputStreamPrivate))
-typedef struct DMAPGstWAVInputStreamPrivate DMAPGstWAVInputStreamPrivate;
+ DmapGstWavInputStreamPrivate))
+typedef struct DmapGstWavInputStreamPrivate DmapGstWavInputStreamPrivate;
typedef struct
{
- DMAPGstInputStream parent;
- DMAPGstWAVInputStreamPrivate *priv;
-} DMAPGstWAVInputStream;
+ DmapGstInputStream parent;
+ DmapGstWavInputStreamPrivate *priv;
+} DmapGstWavInputStream;
typedef struct
{
- DMAPGstInputStreamClass parent;
-} DMAPGstWAVInputStreamClass;
+ DmapGstInputStreamClass parent;
+} DmapGstWavInputStreamClass;
GType dmap_gst_wav_input_stream_get_type (void);
diff --git a/libdmapsharing/dpap-connection.c b/libdmapsharing/dmap-image-connection.c
similarity index 78%
rename from libdmapsharing/dpap-connection.c
rename to libdmapsharing/dmap-image-connection.c
index d68b826..d911ac5 100644
--- a/libdmapsharing/dpap-connection.c
+++ b/libdmapsharing/dmap-image-connection.c
@@ -20,34 +20,34 @@
#include "config.h"
-#include <libdmapsharing/dpap-connection.h>
+#include <libdmapsharing/dmap-image-connection.h>
#include <libdmapsharing/dmap-structure.h>
-#define DPAP_CONNECTION_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), DPAP_TYPE_CONNECTION,
DPAPConnectionPrivate))
+#define DMAP_IMAGE_CONNECTION_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), DMAP_TYPE_IMAGE_CONNECTION,
DmapImageConnectionPrivate))
/* FIXME:
-struct DPAPConnectionPrivate {
+struct DmapImageConnectionPrivate {
};
*/
-static DMAPContentCode
-get_protocol_version_cc (DMAPConnection * connection)
+static DmapContentCode
+get_protocol_version_cc (DmapConnection * connection)
{
return DMAP_CC_PPRO;
}
static gchar *
-get_query_metadata (DMAPConnection * connection)
+get_query_metadata (DmapConnection * connection)
{
return g_strdup ("all");
}
-static DMAPRecord *
-handle_mlcl (DMAPConnection * connection, DMAPRecordFactory * factory,
+static DmapRecord *
+handle_mlcl (DmapConnection * connection, DmapRecordFactory * factory,
GNode * n, int *item_id)
{
GNode *n2;
- DMAPRecord *record = NULL;
+ DmapRecord *record = NULL;
const gchar *filename = NULL;
const gchar *aspect_ratio = NULL;
const gchar *format = NULL;
@@ -62,7 +62,7 @@ handle_mlcl (DMAPConnection * connection, DMAPRecordFactory * factory,
gint rating = 0;
for (n2 = n->children; n2; n2 = n2->next) {
- DMAPStructureItem *meta_item;
+ DmapStructureItem *meta_item;
meta_item = n2->data;
@@ -152,10 +152,10 @@ handle_mlcl (DMAPConnection * connection, DMAPRecordFactory * factory,
}
static void
-dpap_connection_class_init (DPAPConnectionClass * klass)
+dmap_image_connection_class_init (DmapImageConnectionClass * klass)
{
GObjectClass *object_class = G_OBJECT_CLASS (klass);
- DMAPConnectionClass *parent_class =
+ DmapConnectionClass *parent_class =
DMAP_CONNECTION_CLASS (object_class);
parent_class->get_protocol_version_cc = get_protocol_version_cc;
@@ -163,19 +163,19 @@ dpap_connection_class_init (DPAPConnectionClass * klass)
parent_class->handle_mlcl = handle_mlcl;
/* FIXME:
- * g_type_class_add_private (klass, sizeof (DPAPConnectionPrivate));
+ * g_type_class_add_private (klass, sizeof (DmapImageConnectionPrivate));
*/
}
-DPAPConnection *
-dpap_connection_new (const char *name,
+DmapImageConnection *
+dmap_image_connection_new (const char *name,
const char *host,
guint port,
- DMAPDb * db, DMAPRecordFactory * factory)
+ DmapDb * db, DmapRecordFactory * factory)
{
- DPAPConnection *connection;
+ DmapImageConnection *connection;
- connection = g_object_new (DPAP_TYPE_CONNECTION,
+ connection = g_object_new (DMAP_TYPE_IMAGE_CONNECTION,
"name", name,
"db", db,
"host", host,
@@ -185,11 +185,11 @@ dpap_connection_new (const char *name,
}
static void
-dpap_connection_init (DPAPConnection * connection)
+dmap_image_connection_init (DmapImageConnection * connection)
{
/* FIXME:
- * connection->priv = DPAP_CONNECTION_GET_PRIVATE (connection);
+ * connection->priv = DMAP_IMAGE_CONNECTION_GET_PRIVATE (connection);
*/
}
-G_DEFINE_TYPE (DPAPConnection, dpap_connection, DMAP_TYPE_CONNECTION);
+G_DEFINE_TYPE (DmapImageConnection, dmap_image_connection, DMAP_TYPE_CONNECTION);
diff --git a/libdmapsharing/dmap-image-connection.h b/libdmapsharing/dmap-image-connection.h
new file mode 100644
index 0000000..07d422e
--- /dev/null
+++ b/libdmapsharing/dmap-image-connection.h
@@ -0,0 +1,94 @@
+/*
+ * 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 __DMAP_IMAGE_CONNECTION_H
+#define __DMAP_IMAGE_CONNECTION_H
+
+#include <glib-object.h>
+
+#include <libdmapsharing/dmap-connection.h>
+#include <libdmapsharing/dmap-db.h>
+
+G_BEGIN_DECLS
+/**
+ * DMAP_TYPE_IMAGE_CONNECTION:
+ *
+ * The type for #DmapImageConnection.
+ */
+#define DMAP_TYPE_IMAGE_CONNECTION (dmap_image_connection_get_type ())
+/**
+ * DMAP_IMAGE_CONNECTION:
+ * @o: Object which is subject to casting.
+ *
+ * Casts a #DmapImageConnection or derived pointer into a (DmapImageConnection *) pointer.
+ * Depending on the current debugging level, this function may invoke
+ * certain runtime checks to identify invalid casts.
+ */
+#define DMAP_IMAGE_CONNECTION(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), DMAP_TYPE_IMAGE_CONNECTION,
DmapImageConnection))
+/**
+ * DMAP_IMAGE_CONNECTION_CLASS:
+ * @k: a valid #DmapImageConnectionClass
+ *
+ * Casts a derived #DmapImageConnectionClass structure into a #DmapImageConnectionClass
+ * structure.
+ */
+#define DMAP_IMAGE_CONNECTION_CLASS(k) (G_TYPE_CHECK_CLASS_CAST((k), DMAP_TYPE_IMAGE_CONNECTION,
DmapImageConnectionClass))
+/**
+ * IS_DMAP_IMAGE_CONNECTION:
+ * @o: Instance to check for being a %DMAP_TYPE_IMAGE_CONNECTION.
+ *
+ * Checks whether a valid #GTypeInstance pointer is of type %DMAP_TYPE_IMAGE_CONNECTION.
+ */
+#define IS_DMAP_IMAGE_CONNECTION(o) (G_TYPE_CHECK_INSTANCE_TYPE ((o), DMAP_TYPE_IMAGE_CONNECTION))
+/**
+ * IS_DMAP_IMAGE_CONNECTION_CLASS:
+ * @k: a #DmapImageConnectionClass
+ *
+ * Checks whether @k "is a" valid #DmapImageConnectionClass structure of type
+ * %DMAP_IMAGE_CONNECTION or derived.
+ */
+#define IS_DMAP_IMAGE_CONNECTION_CLASS(k) (G_TYPE_CHECK_CLASS_TYPE ((k), DMAP_TYPE_IMAGE_CONNECTION))
+/**
+ * DMAP_IMAGE_CONNECTION_GET_CLASS:
+ * @o: a #DmapImageConnection instance.
+ *
+ * Get the class structure associated to a #DmapImageConnection instance.
+ *
+ * Returns: pointer to object class structure.
+ */
+#define DMAP_IMAGE_CONNECTION_GET_CLASS(o) (G_TYPE_INSTANCE_GET_CLASS ((o), DMAP_TYPE_IMAGE_CONNECTION,
DmapImageConnectionClass))
+typedef struct DmapImageConnectionPrivate DmapImageConnectionPrivate;
+
+typedef struct
+{
+ DmapConnectionClass dmap_connection_class;
+} DmapImageConnectionClass;
+
+typedef struct
+{
+ DmapConnection dmap_connection_instance;
+ DmapImageConnectionPrivate *priv;
+} DmapImageConnection;
+
+GType dmap_image_connection_get_type (void);
+
+DmapImageConnection *dmap_image_connection_new (const char *name,
+ const char *host,
+ guint port,
+ DmapDb * db,
+ DmapRecordFactory * factory);
+G_END_DECLS
+#endif /* __DMAP_IMAGE_CONNECTION_H */
diff --git a/libdmapsharing/dpap-record.c b/libdmapsharing/dmap-image-record.c
similarity index 92%
rename from libdmapsharing/dpap-record.c
rename to libdmapsharing/dmap-image-record.c
index 391fd58..06ffa1c 100644
--- a/libdmapsharing/dpap-record.c
+++ b/libdmapsharing/dmap-image-record.c
@@ -19,10 +19,10 @@
*/
#include <libdmapsharing/dmap-record.h>
-#include <libdmapsharing/dpap-record.h>
+#include <libdmapsharing/dmap-image-record.h>
static void
-dpap_record_default_init (DPAPRecordInterface * iface)
+dmap_image_record_default_init (DmapImageRecordInterface * iface)
{
static gboolean is_initialized = FALSE;
@@ -129,10 +129,10 @@ dpap_record_default_init (DPAPRecordInterface * iface)
}
}
-G_DEFINE_INTERFACE(DPAPRecord, dpap_record, G_TYPE_OBJECT)
+G_DEFINE_INTERFACE(DmapImageRecord, dmap_image_record, G_TYPE_OBJECT)
GInputStream *
-dpap_record_read (DPAPRecord * record, GError ** err)
+dmap_image_record_read (DmapImageRecord * record, GError ** err)
{
- return DPAP_RECORD_GET_INTERFACE (record)->read (record, err);
+ return DMAP_IMAGE_RECORD_GET_INTERFACE (record)->read (record, err);
}
diff --git a/libdmapsharing/dmap-image-record.h b/libdmapsharing/dmap-image-record.h
new file mode 100644
index 0000000..1b994c3
--- /dev/null
+++ b/libdmapsharing/dmap-image-record.h
@@ -0,0 +1,88 @@
+/*
+ * Database record interface for DPAP 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 __DMAP_IMAGE_RECORD_H
+#define __DMAP_IMAGE_RECORD_H
+
+#include <glib.h>
+#include <gio/gio.h>
+
+#include <libdmapsharing/dmap-record.h>
+
+G_BEGIN_DECLS
+/**
+ * DMAP_TYPE_IMAGE_RECORD:
+ *
+ * The type for #DmapImageRecord.
+ */
+#define DMAP_TYPE_IMAGE_RECORD (dmap_image_record_get_type ())
+/**
+ * DMAP_IMAGE_RECORD:
+ * @o: Object which is subject to casting.
+ *
+ * Casts a #DmapImageRecord or derived pointer into a (DmapImageRecord *) pointer.
+ * Depending on the current debugging level, this function may invoke
+ * certain runtime checks to identify invalid casts.
+ */
+#define DMAP_IMAGE_RECORD(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), \
+ DMAP_TYPE_IMAGE_RECORD, DmapImageRecord))
+/**
+ * IS_DMAP_IMAGE_RECORD:
+ * @o: Instance to check for being a %DMAP_TYPE_IMAGE_RECORD.
+ *
+ * Checks whether a valid #GTypeInstance pointer is of type %DMAP_TYPE_IMAGE_RECORD.
+ */
+#define IS_DMAP_IMAGE_RECORD(o) (G_TYPE_CHECK_INSTANCE_TYPE ((o), \
+ DMAP_TYPE_IMAGE_RECORD))
+/**
+ * DMAP_IMAGE_RECORD_GET_INTERFACE:
+ * @o: a #DmapImageRecord instance.
+ *
+ * Get the class structure associated to a #DmapImageRecord instance.
+ *
+ * Returns: pointer to object interface structure.
+ */
+#define DMAP_IMAGE_RECORD_GET_INTERFACE(o) (G_TYPE_INSTANCE_GET_INTERFACE ((o), \
+ DMAP_TYPE_IMAGE_RECORD, DmapImageRecordInterface))
+typedef struct _DmapImageRecord DmapImageRecord;
+typedef struct _DmapImageRecordInterface DmapImageRecordInterface;
+
+struct _DmapImageRecordInterface
+{
+ GTypeInterface parent;
+
+ GInputStream *(*read) (DmapImageRecord * record, GError ** err);
+};
+
+GType dmap_image_record_get_type (void);
+
+/**
+ * dmap_image_record_read:
+ * @record: a DmapImageRecord.
+ * @err: a GError.
+ *
+ * Returns: A GInputStream that provides read-only access to the data stream
+ * associated with record.
+ */
+GInputStream *dmap_image_record_read (DmapImageRecord * record, GError ** err);
+
+#endif /* __DMAP_IMAGE_RECORD_H */
+
+G_END_DECLS
diff --git a/libdmapsharing/dpap-share.c b/libdmapsharing/dmap-image-share.c
similarity index 84%
rename from libdmapsharing/dpap-share.c
rename to libdmapsharing/dmap-image-share.c
index 3db0493..60b382f 100644
--- a/libdmapsharing/dpap-share.c
+++ b/libdmapsharing/dmap-image-share.c
@@ -44,42 +44,42 @@
#include <libdmapsharing/dmap-private-utils.h>
#include <libdmapsharing/dmap-structure.h>
-static void dpap_share_set_property (GObject * object,
+static void dmap_image_share_set_property (GObject * object,
guint prop_id,
const GValue * value,
GParamSpec * pspec);
-static void dpap_share_get_property (GObject * object,
+static void dmap_image_share_get_property (GObject * object,
guint prop_id,
GValue * value, GParamSpec * pspec);
-static void dpap_share_dispose (GObject * object);
-guint dpap_share_get_desired_port (DMAPShare * share);
-const char *dpap_share_get_type_of_service (DMAPShare * share);
-void dpap_share_server_info (DMAPShare * share,
+static void dmap_image_share_dispose (GObject * object);
+guint dmap_image_share_get_desired_port (DmapShare * share);
+const char *dmap_image_share_get_type_of_service (DmapShare * share);
+void dmap_image_share_server_info (DmapShare * share,
SoupServer * server,
SoupMessage * message,
const char *path,
GHashTable * query, SoupClientContext * context);
-void dpap_share_message_add_standard_headers (DMAPShare * share,
+void dmap_image_share_message_add_standard_headers (DmapShare * share,
SoupMessage * message);
-static void databases_browse_xxx (DMAPShare * share,
+static void databases_browse_xxx (DmapShare * share,
SoupServer * server,
SoupMessage * msg,
const char *path,
GHashTable * query,
SoupClientContext * context);
-static void databases_items_xxx (DMAPShare * share,
+static void databases_items_xxx (DmapShare * share,
SoupServer * server,
SoupMessage * msg,
const char *path,
GHashTable * query,
SoupClientContext * context);
-static struct DMAPMetaDataMap *get_meta_data_map (DMAPShare * share);
-static void add_entry_to_mlcl (guint id, DMAPRecord * record, gpointer mb);
+static struct DmapMetaDataMap *get_meta_data_map (DmapShare * share);
+static void add_entry_to_mlcl (guint id, DmapRecord * record, gpointer mb);
#define DPAP_TYPE_OF_SERVICE "_dpap._tcp"
#define DPAP_PORT 8770
-struct DPAPSharePrivate
+struct DmapImageSharePrivate
{
gchar unused;
};
@@ -89,46 +89,46 @@ struct DPAPSharePrivate
*/
static GMappedFile *mapped_file = NULL;
-#define DPAP_SHARE_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), DPAP_TYPE_SHARE, DPAPSharePrivate))
+#define DMAP_IMAGE_SHARE_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), DMAP_TYPE_IMAGE_SHARE,
DmapImageSharePrivate))
-G_DEFINE_TYPE (DPAPShare, dpap_share, DMAP_TYPE_SHARE);
+G_DEFINE_TYPE (DmapImageShare, dmap_image_share, DMAP_TYPE_SHARE);
static void
-dpap_share_class_init (DPAPShareClass * klass)
+dmap_image_share_class_init (DmapImageShareClass * klass)
{
GObjectClass *object_class = G_OBJECT_CLASS (klass);
- DMAPShareClass *parent_class = DMAP_SHARE_CLASS (object_class);
+ DmapShareClass *parent_class = DMAP_SHARE_CLASS (object_class);
- object_class->get_property = dpap_share_get_property;
- object_class->set_property = dpap_share_set_property;
- object_class->dispose = dpap_share_dispose;
+ object_class->get_property = dmap_image_share_get_property;
+ object_class->set_property = dmap_image_share_set_property;
+ object_class->dispose = dmap_image_share_dispose;
- parent_class->get_desired_port = dpap_share_get_desired_port;
- parent_class->get_type_of_service = dpap_share_get_type_of_service;
+ parent_class->get_desired_port = dmap_image_share_get_desired_port;
+ parent_class->get_type_of_service = dmap_image_share_get_type_of_service;
parent_class->message_add_standard_headers =
- dpap_share_message_add_standard_headers;
+ dmap_image_share_message_add_standard_headers;
parent_class->get_meta_data_map = get_meta_data_map;
parent_class->add_entry_to_mlcl = add_entry_to_mlcl;
parent_class->databases_browse_xxx = databases_browse_xxx;
parent_class->databases_items_xxx = databases_items_xxx;
- parent_class->server_info = dpap_share_server_info;
+ parent_class->server_info = dmap_image_share_server_info;
- g_type_class_add_private (klass, sizeof (DPAPSharePrivate));
+ g_type_class_add_private (klass, sizeof (DmapImageSharePrivate));
}
static void
-dpap_share_init (DPAPShare * share)
+dmap_image_share_init (DmapImageShare * share)
{
- share->priv = DPAP_SHARE_GET_PRIVATE (share);
+ share->priv = DMAP_IMAGE_SHARE_GET_PRIVATE (share);
/* FIXME: do I need to manually call parent _init? */
}
static void
-dpap_share_set_property (GObject * object,
+dmap_image_share_set_property (GObject * object,
guint prop_id,
const GValue * value, GParamSpec * pspec)
{
- // DPAPShare *share = DPAP_SHARE (object);
+ // DmapImageShare *share = DMAP_IMAGE_SHARE (object);
switch (prop_id) {
/* FIXME: */
@@ -139,10 +139,10 @@ dpap_share_set_property (GObject * object,
}
static void
-dpap_share_get_property (GObject * object,
+dmap_image_share_get_property (GObject * object,
guint prop_id, GValue * value, GParamSpec * pspec)
{
- // DPAPShare *share = DPAP_SHARE (object);
+ // DmapImageShare *share = DMAP_IMAGE_SHARE (object);
switch (prop_id) {
default:
@@ -152,7 +152,7 @@ dpap_share_get_property (GObject * object,
}
static void
-dpap_share_dispose (GObject * object)
+dmap_image_share_dispose (GObject * object)
{
/* FIXME: implement in parent */
}
@@ -160,15 +160,15 @@ dpap_share_dispose (GObject * object)
/* FIXME: trancode_mimetype currently not used for DPAP, only DAAP.
* Threrfore, it is not passed to g_object_new.
*/
-DPAPShare *
-dpap_share_new (const char *name,
+DmapImageShare *
+dmap_image_share_new (const char *name,
const char *password,
gpointer db,
gpointer container_db, gchar * transcode_mimetype)
{
- DPAPShare *share;
+ DmapImageShare *share;
- share = DPAP_SHARE (g_object_new (DPAP_TYPE_SHARE,
+ share = DMAP_IMAGE_SHARE (g_object_new (DMAP_TYPE_IMAGE_SHARE,
"name", name,
"password", password,
"db", db,
@@ -182,7 +182,7 @@ dpap_share_new (const char *name,
}
void
-dpap_share_message_add_standard_headers (DMAPShare * share,
+dmap_image_share_message_add_standard_headers (DmapShare * share,
SoupMessage * message)
{
soup_message_headers_append (message->response_headers, "DPAP-Server",
@@ -194,19 +194,19 @@ dpap_share_message_add_standard_headers (DMAPShare * share,
#define DPAP_TIMEOUT 1800
guint
-dpap_share_get_desired_port (DMAPShare * share)
+dmap_image_share_get_desired_port (DmapShare * share)
{
return DPAP_PORT;
}
const char *
-dpap_share_get_type_of_service (DMAPShare * share)
+dmap_image_share_get_type_of_service (DmapShare * share)
{
return DPAP_TYPE_OF_SERVICE;
}
void
-dpap_share_server_info (DMAPShare * share,
+dmap_image_share_server_info (DmapShare * share,
SoupServer * server,
SoupMessage * message,
const char *path,
@@ -288,7 +288,7 @@ typedef enum
PHOTO_IMAGECOMMENTS
} DPAPMetaData;
-static struct DMAPMetaDataMap meta_data_map[] = {
+static struct DmapMetaDataMap meta_data_map[] = {
{"dmap.itemid", ITEM_ID},
{"dmap.itemname", ITEM_NAME},
{"dmap.itemkind", ITEM_KIND},
@@ -343,7 +343,7 @@ file_to_mmap (const char *location)
}
static void
-add_entry_to_mlcl (guint id, DMAPRecord * record, gpointer _mb)
+add_entry_to_mlcl (guint id, DmapRecord * record, gpointer _mb)
{
GNode *mlit;
struct MLCL_Bits *mb = (struct MLCL_Bits *) _mb;
@@ -495,7 +495,7 @@ add_entry_to_mlcl (guint id, DMAPRecord * record, gpointer _mb)
}
static void
-databases_browse_xxx (DMAPShare * share,
+databases_browse_xxx (DmapShare * share,
SoupServer * server,
SoupMessage * msg,
const char *path,
@@ -506,7 +506,7 @@ databases_browse_xxx (DMAPShare * share,
static void
send_chunked_file (SoupServer * server, SoupMessage * message,
- DPAPRecord * record, guint64 filesize)
+ DmapImageRecord * record, guint64 filesize)
{
GInputStream *stream;
char *location = NULL;
@@ -517,7 +517,7 @@ send_chunked_file (SoupServer * server, SoupMessage * message,
cd->server = server;
- stream = G_INPUT_STREAM (dpap_record_read (record, &error));
+ stream = G_INPUT_STREAM (dmap_image_record_read (record, &error));
if (error != NULL) {
g_warning ("Couldn't open %s: %s.", location, error->message);
@@ -560,25 +560,25 @@ done:
}
static void
-databases_items_xxx (DMAPShare * share,
+databases_items_xxx (DmapShare * share,
SoupServer * server,
SoupMessage * msg,
const char *path,
GHashTable * query, SoupClientContext * context)
{
- DMAPDb *db;
+ DmapDb *db;
const gchar *rest_of_path;
const gchar *id_str;
guint id;
guint64 filesize;
- DPAPRecord *record;
+ DmapImageRecord *record;
rest_of_path = strchr (path + 1, '/');
id_str = rest_of_path + 9;
id = strtoul (id_str, NULL, 10);
g_object_get (share, "db", &db, NULL);
- record = DPAP_RECORD (dmap_db_lookup_by_id (db, id));
+ record = DMAP_IMAGE_RECORD (dmap_db_lookup_by_id (db, id));
g_object_get (record, "large-filesize", &filesize, NULL);
DMAP_SHARE_GET_CLASS (share)->message_add_standard_headers
@@ -590,8 +590,8 @@ databases_items_xxx (DMAPShare * share,
g_object_unref (record);
}
-static struct DMAPMetaDataMap *
-get_meta_data_map (DMAPShare * share)
+static struct DmapMetaDataMap *
+get_meta_data_map (DmapShare * share)
{
return meta_data_map;
}
diff --git a/libdmapsharing/dmap-image-share.h b/libdmapsharing/dmap-image-share.h
new file mode 100644
index 0000000..bb9338f
--- /dev/null
+++ b/libdmapsharing/dmap-image-share.h
@@ -0,0 +1,115 @@
+/*
+ * Header for DPAP (e.g., iPhoto Picture) sharing
+ *
+ * Copyright (C) 2005 Charles Schmidt <cschmidt2 emich edu>
+ *
+ * Modifications 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 __DMAP_IMAGE_SHARE_H
+#define __DMAP_IMAGE_SHARE_H
+
+#include <glib-object.h>
+
+#include <libdmapsharing/dmap-share.h>
+
+G_BEGIN_DECLS
+/**
+ * DMAP_TYPE_IMAGE_SHARE:
+ *
+ * The type for #DmapImageShare.
+ */
+#define DMAP_TYPE_IMAGE_SHARE (dmap_image_share_get_type ())
+/**
+ * DMAP_IMAGE_SHARE:
+ * @o: Object which is subject to casting.
+ *
+ * Casts a #DmapImageShare or derived pointer into a (DmapImageShare*) pointer.
+ * Depending on the current debugging level, this function may invoke
+ * certain runtime checks to identify invalid casts.
+ */
+#define DMAP_IMAGE_SHARE(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), \
+ DMAP_TYPE_IMAGE_SHARE, DmapImageShare))
+/**
+ * DMAP_IMAGE_SHARE_CLASS:
+ * @k: a valid #DmapImageShareClass
+ *
+ * Casts a derived #DmapImageShareClass structure into a #DmapImageShareClass structure.
+ */
+#define DMAP_IMAGE_SHARE_CLASS(k) (G_TYPE_CHECK_CLASS_CAST((k), \
+ DMAP_TYPE_IMAGE_SHARE, DmapImageShareClass))
+/**
+ * IS_DMAP_IMAGE_SHARE:
+ * @o: Instance to check for being a %DMAP_TYPE_IMAGE_SHARE.
+ *
+ * Checks whether a valid #GTypeInstance pointer is of type %DMAP_TYPE_IMAGE_SHARE.
+ */
+#define IS_DMAP_IMAGE_SHARE(o) (G_TYPE_CHECK_INSTANCE_TYPE ((o), \
+ DMAP_TYPE_IMAGE_SHARE))
+/**
+ * IS_DMAP_IMAGE_SHARE_CLASS:
+ * @k: a #DmapImageShareClass
+ *
+ * Checks whether @k "is a" valid #DmapImageShareClass structure of type
+ * %DMAP_IMAGE_SHARE or derived.
+ */
+#define IS_DMAP_IMAGE_SHARE_CLASS(k) (G_TYPE_CHECK_CLASS_TYPE ((k), DMAP_TYPE_IMAGE_SHARE))
+/**
+ * DMAP_IMAGE_SHARE_GET_CLASS:
+ * @o: a #DmapImageShare instance.
+ *
+ * Get the class structure associated to a #DmapImageShare instance.
+ *
+ * Returns: pointer to object class structure.
+ */
+#define DMAP_IMAGE_SHARE_GET_CLASS(o) (G_TYPE_INSTANCE_GET_CLASS ((o), \
+ DMAP_TYPE_IMAGE_SHARE, DmapImageShareClass))
+typedef struct DmapImageSharePrivate DmapImageSharePrivate;
+
+typedef struct
+{
+ DmapShareClass dmap_share_class;
+} DmapImageShareClass;
+
+typedef struct
+{
+ DmapShare dmap_share_instance;
+ DmapImageSharePrivate *priv;
+} DmapImageShare;
+
+GType dmap_image_share_get_type (void);
+
+/**
+ * dmap_image_share_new:
+ * @name: The name that will be published by mDNS.
+ * @password: A share password or NULL.
+ * @db: A media database.
+ * @container_db: A container (album) database.
+ * @transcode_mimetype: A transcode mimetype or NULL.
+ *
+ * Creates a new DPAP share and publishes it using mDNS.
+ *
+ * Returns: a pointer to a DmapImageShare.
+ */
+DmapImageShare *dmap_image_share_new (const char *name, const char *password,
+ gpointer db, gpointer container_db,
+ gchar * transcode_mimetype);
+
+#endif /* __DMAP_IMAGE_SHARE_H */
+
+G_END_DECLS
diff --git a/libdmapsharing/dmap-md5.c b/libdmapsharing/dmap-md5.c
index 0e38d21..c164dac 100644
--- a/libdmapsharing/dmap-md5.c
+++ b/libdmapsharing/dmap-md5.c
@@ -78,9 +78,9 @@ byteReverse (unsigned char *buf, unsigned longs)
#endif /* #if 0 */
static void
-DMAP_MD5Init (DMAPHashContext * ctx, gint version)
+DMAP_MD5Init (DmapHashContext * ctx, gint version)
{
- memset (ctx, 0, sizeof (DMAPHashContext));
+ memset (ctx, 0, sizeof (DmapHashContext));
ctx->buf[0] = 0x67452301;
ctx->buf[1] = 0xefcdab89;
ctx->buf[2] = 0x98badcfe;
@@ -93,7 +93,7 @@ DMAP_MD5Init (DMAPHashContext * ctx, gint version)
}
static void
-DMAP_MD5Update (DMAPHashContext * ctx, unsigned char const *buf, unsigned int len)
+DMAP_MD5Update (DmapHashContext * ctx, unsigned char const *buf, unsigned int len)
{
guint32 t;
@@ -138,7 +138,7 @@ DMAP_MD5Update (DMAPHashContext * ctx, unsigned char const *buf, unsigned int le
}
static void
-DMAP_MD5Final (DMAPHashContext * ctx, unsigned char digest[16])
+DMAP_MD5Final (DmapHashContext * ctx, unsigned char digest[16])
{
unsigned count;
unsigned char *p;
@@ -318,7 +318,7 @@ dmap_hash_progressive_to_string (const unsigned char *digest, gchar * string)
static void
GenerateStatic_42 ()
{
- DMAPHashContext ctx;
+ DmapHashContext ctx;
unsigned char *p = staticHash_42;
int i;
unsigned char buf[16];
@@ -378,7 +378,7 @@ GenerateStatic_42 ()
static void
GenerateStatic_45 ()
{
- DMAPHashContext ctx;
+ DmapHashContext ctx;
unsigned char *p = staticHash_45;
int i;
unsigned char buf[16];
@@ -442,7 +442,7 @@ dmap_hash_generate (short version_major,
guchar hash_select, guchar * out, gint request_id)
{
unsigned char buf[16];
- DMAPHashContext ctx;
+ DmapHashContext ctx;
gint i;
unsigned char *hashTable = (version_major == 3) ?
@@ -482,7 +482,7 @@ dmap_hash_generate (short version_major,
return;
}
-void dmap_hash_progressive_init (DMAPHashContext *context)
+void dmap_hash_progressive_init (DmapHashContext *context)
{
/* FIXME: Share this stuff with dmap_hash_generate() */
if (!staticHashDone) {
@@ -494,14 +494,14 @@ void dmap_hash_progressive_init (DMAPHashContext *context)
DMAP_MD5Init (context, 1);
}
-void dmap_hash_progressive_update (DMAPHashContext *context,
+void dmap_hash_progressive_update (DmapHashContext *context,
unsigned char const *buffer,
unsigned int length)
{
DMAP_MD5Update (context, buffer, length);
}
-void dmap_hash_progressive_final (DMAPHashContext *context,
+void dmap_hash_progressive_final (DmapHashContext *context,
unsigned char digest[16])
{
/* FIXME: This is only equivalent to dmap_hash_generate()
@@ -543,7 +543,7 @@ START_TEST(test_dmap_hash_progressive)
guchar hash1[33] = { 0 };
guchar hash2[33] = { 0 };
guchar *value = (guchar *) "ABCDEFGHIJKLMNOPQRSTUVWXYZ";
- DMAPHashContext context;
+ DmapHashContext context;
dmap_hash_progressive_init (&context);
dmap_hash_progressive_update (&context, value, 5);
diff --git a/libdmapsharing/dmap-md5.h b/libdmapsharing/dmap-md5.h
index b28bf49..1101d62 100644
--- a/libdmapsharing/dmap-md5.h
+++ b/libdmapsharing/dmap-md5.h
@@ -27,21 +27,21 @@
G_BEGIN_DECLS
-typedef struct DMAPHashContext
+typedef struct DmapHashContext
{
guint32 buf[4];
guint32 bits[2];
unsigned char in[64];
gint version;
-} DMAPHashContext;
+} DmapHashContext;
-void dmap_hash_progressive_init (DMAPHashContext *context);
+void dmap_hash_progressive_init (DmapHashContext *context);
-void dmap_hash_progressive_update (DMAPHashContext *context,
+void dmap_hash_progressive_update (DmapHashContext *context,
unsigned char const *buffer,
unsigned int length);
-void dmap_hash_progressive_final (DMAPHashContext *context,
+void dmap_hash_progressive_final (DmapHashContext *context,
unsigned char digest[16]);
void dmap_hash_progressive_to_string (const unsigned char *digest, gchar * string);
diff --git a/libdmapsharing/dmap-mdns-browser-avahi.c b/libdmapsharing/dmap-mdns-browser-avahi.c
index f842928..d9b8b34 100644
--- a/libdmapsharing/dmap-mdns-browser-avahi.c
+++ b/libdmapsharing/dmap-mdns-browser-avahi.c
@@ -42,9 +42,9 @@
#include <avahi-glib/glib-malloc.h>
#include <avahi-glib/glib-watch.h>
-struct _DMAPMdnsBrowserPrivate
+struct _DmapMdnsBrowserPrivate
{
- DMAPMdnsServiceType service_type;
+ DmapMdnsServiceType service_type;
AvahiClient *client;
AvahiGLibPoll *poll;
AvahiServiceBrowser *service_browser;
@@ -63,11 +63,11 @@ enum
#define AVAHI_ADDRESS_STR_MAX (40) /* IPv6 Max = 4*8 + 7 + 1 for NUL */
#endif
-static void dmap_mdns_browser_class_init (DMAPMdnsBrowserClass * klass);
-static void dmap_mdns_browser_init (DMAPMdnsBrowser * browser);
+static void dmap_mdns_browser_class_init (DmapMdnsBrowserClass * klass);
+static void dmap_mdns_browser_init (DmapMdnsBrowser * browser);
static void dmap_mdns_browser_dispose (GObject * object);
static void dmap_mdns_browser_finalize (GObject * object);
-static void avahi_client_init (DMAPMdnsBrowser * browser);
+static void avahi_client_init (DmapMdnsBrowser * browser);
static void resolve_cb (AvahiServiceResolver * service_resolver,
AvahiIfIndex interface,
AvahiProtocol protocol,
@@ -81,14 +81,14 @@ static void resolve_cb (AvahiServiceResolver * service_resolver,
#ifdef HAVE_AVAHI_0_6
AvahiLookupResultFlags flags,
#endif
- DMAPMdnsBrowser * browser);
-static gboolean dmap_mdns_browser_resolve (DMAPMdnsBrowser * browser,
+ DmapMdnsBrowser * browser);
+static gboolean dmap_mdns_browser_resolve (DmapMdnsBrowser * browser,
const gchar * name,
const gchar * domain);
-static void browser_add_service (DMAPMdnsBrowser * browser,
+static void browser_add_service (DmapMdnsBrowser * browser,
const gchar * service_name,
const gchar * domain);
-static void browser_remove_service (DMAPMdnsBrowser * browser,
+static void browser_remove_service (DmapMdnsBrowser * browser,
const gchar * service_name);
static void browse_cb (AvahiServiceBrowser * service_browser,
AvahiIfIndex interface,
@@ -99,13 +99,13 @@ static void browse_cb (AvahiServiceBrowser * service_browser,
#ifdef HAVE_AVAHI_0_6
AvahiLookupResultFlags flags,
#endif
- DMAPMdnsBrowser * browser);
+ DmapMdnsBrowser * browser);
-#define DMAP_MDNS_BROWSER_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), DMAP_TYPE_MDNS_BROWSER,
DMAPMdnsBrowserPrivate))
+#define DMAP_MDNS_BROWSER_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), DMAP_TYPE_MDNS_BROWSER,
DmapMdnsBrowserPrivate))
static guint dmap_mdns_browser_signals[LAST_SIGNAL] = { 0, };
-G_DEFINE_TYPE (DMAPMdnsBrowser, dmap_mdns_browser, G_TYPE_OBJECT);
+G_DEFINE_TYPE (DmapMdnsBrowser, dmap_mdns_browser, G_TYPE_OBJECT);
GQuark
dmap_mdns_browser_error_quark (void)
@@ -120,7 +120,7 @@ dmap_mdns_browser_error_quark (void)
}
static void
-dmap_mdns_browser_class_init (DMAPMdnsBrowserClass * klass)
+dmap_mdns_browser_class_init (DmapMdnsBrowserClass * klass)
{
GObjectClass *object_class = G_OBJECT_CLASS (klass);
@@ -129,13 +129,13 @@ dmap_mdns_browser_class_init (DMAPMdnsBrowserClass * klass)
object_class->dispose = dmap_mdns_browser_dispose;
object_class->finalize = dmap_mdns_browser_finalize;
- g_type_class_add_private (klass, sizeof (DMAPMdnsBrowserPrivate));
+ g_type_class_add_private (klass, sizeof (DmapMdnsBrowserPrivate));
dmap_mdns_browser_signals[SERVICE_ADDED] =
g_signal_new ("service-added",
G_TYPE_FROM_CLASS (object_class),
G_SIGNAL_RUN_LAST,
- G_STRUCT_OFFSET (DMAPMdnsBrowserClass,
+ G_STRUCT_OFFSET (DmapMdnsBrowserClass,
service_added), NULL, NULL,
g_cclosure_marshal_VOID__POINTER, G_TYPE_NONE,
1, DMAP_TYPE_MDNS_SERVICE);
@@ -143,14 +143,14 @@ dmap_mdns_browser_class_init (DMAPMdnsBrowserClass * klass)
g_signal_new ("service-removed",
G_TYPE_FROM_CLASS (object_class),
G_SIGNAL_RUN_LAST,
- G_STRUCT_OFFSET (DMAPMdnsBrowserClass,
+ G_STRUCT_OFFSET (DmapMdnsBrowserClass,
service_removed), NULL, NULL,
g_cclosure_marshal_VOID__STRING, G_TYPE_NONE, 1,
G_TYPE_STRING);
}
static void
-dmap_mdns_browser_init (DMAPMdnsBrowser * browser)
+dmap_mdns_browser_init (DmapMdnsBrowser * browser)
{
browser->priv = DMAP_MDNS_BROWSER_GET_PRIVATE (browser);
avahi_client_init (browser);
@@ -159,12 +159,12 @@ dmap_mdns_browser_init (DMAPMdnsBrowser * browser)
static void
dmap_mdns_browser_dispose (GObject * object)
{
- DMAPMdnsBrowser *browser = DMAP_MDNS_BROWSER (object);
+ DmapMdnsBrowser *browser = DMAP_MDNS_BROWSER (object);
GSList *walk;
- DMAPMdnsService *service;
+ DmapMdnsService *service;
for (walk = browser->priv->services; walk; walk = walk->next) {
- service = (DMAPMdnsService *) walk->data;
+ service = (DmapMdnsService *) walk->data;
g_object_unref (service);
}
g_slist_free (browser->priv->services);
@@ -197,10 +197,10 @@ dmap_mdns_browser_finalize (GObject * object)
G_OBJECT_CLASS (dmap_mdns_browser_parent_class)->finalize (object);
}
-DMAPMdnsBrowser *
-dmap_mdns_browser_new (DMAPMdnsServiceType type)
+DmapMdnsBrowser *
+dmap_mdns_browser_new (DmapMdnsServiceType type)
{
- DMAPMdnsBrowser *browser_object;
+ DmapMdnsBrowser *browser_object;
g_return_val_if_fail (type >= DMAP_MDNS_SERVICE_TYPE_INVALID
&& type <= DMAP_MDNS_SERVICE_TYPE_LAST,
@@ -215,7 +215,7 @@ dmap_mdns_browser_new (DMAPMdnsServiceType type)
}
gboolean
-dmap_mdns_browser_start (DMAPMdnsBrowser * browser, GError ** error)
+dmap_mdns_browser_start (DmapMdnsBrowser * browser, GError ** error)
{
if (browser->priv->client == NULL) {
g_set_error (error,
@@ -255,7 +255,7 @@ dmap_mdns_browser_start (DMAPMdnsBrowser * browser, GError ** error)
}
gboolean
-dmap_mdns_browser_stop (DMAPMdnsBrowser * browser, GError ** error)
+dmap_mdns_browser_stop (DmapMdnsBrowser * browser, GError ** error)
{
if (browser->priv->client == NULL) {
g_set_error (error,
@@ -278,14 +278,14 @@ dmap_mdns_browser_stop (DMAPMdnsBrowser * browser, GError ** error)
}
G_CONST_RETURN GSList *
-dmap_mdns_browser_get_services (DMAPMdnsBrowser * browser)
+dmap_mdns_browser_get_services (DmapMdnsBrowser * browser)
{
g_return_val_if_fail (browser != NULL, NULL);
return browser->priv->services;
}
-DMAPMdnsServiceType
-dmap_mdns_browser_get_service_type (DMAPMdnsBrowser * browser)
+DmapMdnsServiceType
+dmap_mdns_browser_get_service_type (DmapMdnsBrowser * browser)
{
g_return_val_if_fail (browser != NULL,
DMAP_MDNS_SERVICE_TYPE_INVALID);
@@ -294,7 +294,7 @@ dmap_mdns_browser_get_service_type (DMAPMdnsBrowser * browser)
static void
client_cb (AvahiClient * client,
- AvahiClientState state, DMAPMdnsBrowser * browser)
+ AvahiClientState state, DmapMdnsBrowser * browser)
{
/* Called whenever the client or server state changes */
@@ -311,7 +311,7 @@ client_cb (AvahiClient * client,
}
static void
-avahi_client_init (DMAPMdnsBrowser * browser)
+avahi_client_init (DmapMdnsBrowser * browser)
{
gint error = 0;
@@ -355,14 +355,14 @@ resolve_cb (AvahiServiceResolver * service_resolver,
#ifdef HAVE_AVAHI_0_6
AvahiLookupResultFlags flags,
#endif
- DMAPMdnsBrowser * browser)
+ DmapMdnsBrowser * browser)
{
gchar *name = NULL;
gchar *pair = NULL; /* FIXME: extract DACP-specific items into sub-class. Ensure in Howl and
dns-sd code too. */
- DMAPMdnsServiceTransportProtocol transport_protocol = DMAP_MDNS_SERVICE_TRANSPORT_PROTOCOL_TCP; //
FIXME: subclass
+ DmapMdnsServiceTransportProtocol transport_protocol = DMAP_MDNS_SERVICE_TRANSPORT_PROTOCOL_TCP; //
FIXME: subclass
gchar host[AVAHI_ADDRESS_STR_MAX];
gboolean pp = FALSE;
- DMAPMdnsService *service;
+ DmapMdnsService *service;
switch (event) {
case AVAHI_RESOLVER_FAILURE:
@@ -456,7 +456,7 @@ resolve_cb (AvahiServiceResolver * service_resolver,
}
static gboolean
-dmap_mdns_browser_resolve (DMAPMdnsBrowser * browser,
+dmap_mdns_browser_resolve (DmapMdnsBrowser * browser,
const gchar * name, const gchar * domain)
{
AvahiServiceResolver *service_resolver;
@@ -486,14 +486,14 @@ dmap_mdns_browser_resolve (DMAPMdnsBrowser * browser,
}
static void
-browser_add_service (DMAPMdnsBrowser * browser,
+browser_add_service (DmapMdnsBrowser * browser,
const gchar * service_name, const gchar * domain)
{
dmap_mdns_browser_resolve (browser, service_name, domain);
}
static void
-browser_remove_service (DMAPMdnsBrowser * browser, const gchar * service_name)
+browser_remove_service (DmapMdnsBrowser * browser, const gchar * service_name)
{
g_signal_emit (browser,
dmap_mdns_browser_signals[SERVICE_REMOVED],
@@ -509,7 +509,7 @@ browse_cb (AvahiServiceBrowser * service_browser,
#ifdef HAVE_AVAHI_0_6
AvahiLookupResultFlags flags,
#endif
- DMAPMdnsBrowser * browser)
+ DmapMdnsBrowser * browser)
{
gboolean local;
diff --git a/libdmapsharing/dmap-mdns-browser-dnssd.c b/libdmapsharing/dmap-mdns-browser-dnssd.c
index 7a250bf..bffb30f 100644
--- a/libdmapsharing/dmap-mdns-browser-dnssd.c
+++ b/libdmapsharing/dmap-mdns-browser-dnssd.c
@@ -30,9 +30,9 @@
#include "dmap-mdns-browser.h"
-struct _DMAPMdnsBrowserPrivate
+struct _DmapMdnsBrowserPrivate
{
- DMAPMdnsBrowserServiceType service_type;
+ DmapMdnsBrowserServiceType service_type;
DNSServiceRef sd_browse_ref;
GSList *services;
GSList *backlog;
@@ -42,10 +42,10 @@ typedef struct _ServiceContext
{
DNSServiceRef service_discovery_ref;
DNSServiceRef host_lookup_ref;
- DMAPMdnsBrowser *browser;
+ DmapMdnsBrowser *browser;
DNSServiceFlags flags;
uint32_t interface_index;
- DMAPMdnsBrowserService service;
+ DmapMdnsBrowserService service;
gchar *domain;
} ServiceContext;
@@ -56,21 +56,21 @@ enum
LAST_SIGNAL
};
-#define DMAP_MDNS_BROWSER_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), DMAP_TYPE_MDNS_BROWSER,
DMAPMdnsBrowserPrivate))
+#define DMAP_MDNS_BROWSER_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), DMAP_TYPE_MDNS_BROWSER,
DmapMdnsBrowserPrivate))
static guint dmap_mdns_browser_signals[LAST_SIGNAL] = { 0, };
-G_DEFINE_TYPE (DMAPMdnsBrowser, dmap_mdns_browser, G_TYPE_OBJECT);
+G_DEFINE_TYPE (DmapMdnsBrowser, dmap_mdns_browser, G_TYPE_OBJECT);
static void
-dmap_mdns_browser_init (DMAPMdnsBrowser * browser)
+dmap_mdns_browser_init (DmapMdnsBrowser * browser)
{
g_assert (NULL != browser);
browser->priv = DMAP_MDNS_BROWSER_GET_PRIVATE (browser);
}
-free_service (DMAPMdnsBrowserService * service)
+free_service (DmapMdnsBrowserService * service)
{
g_assert (NULL != service);
@@ -100,9 +100,9 @@ signal_service_added (ServiceContext *context)
{
g_assert (NULL != context);
- DMAPMdnsBrowserService *service;
+ DmapMdnsBrowserService *service;
- service = g_new0 (DMAPMdnsBrowserService, 1);
+ service = g_new0 (DmapMdnsBrowserService, 1);
// FIXME: The name and service_name variables need to be renamed.
// Wait until working on DACP because I think this is when
@@ -178,7 +178,7 @@ dns_service_browse_reply (DNSServiceRef sd_ref,
goto done;
}
- DMAPMdnsBrowser *browser = (DMAPMdnsBrowser *) udata;
+ DmapMdnsBrowser *browser = (DmapMdnsBrowser *) udata;
ServiceContext *context = g_new0 (ServiceContext, 1);
context->browser = g_object_ref (browser);
@@ -365,7 +365,7 @@ add_service_discovery_to_event_loop (ServiceContext *context)
static gboolean
browse_result_available_cb (GIOChannel * gio,
- GIOCondition condition, DMAPMdnsBrowser * browser)
+ GIOCondition condition, DmapMdnsBrowser * browser)
{
gboolean fnval = FALSE;
@@ -414,7 +414,7 @@ done:
}
static gboolean
-add_browse_to_event_loop (DMAPMdnsBrowser *browser)
+add_browse_to_event_loop (DmapMdnsBrowser *browser)
{
gboolean fnval = FALSE;
@@ -440,12 +440,12 @@ done:
static void
dmap_mdns_browser_dispose (GObject * object)
{
- DMAPMdnsBrowser *browser = DMAP_MDNS_BROWSER (object);
+ DmapMdnsBrowser *browser = DMAP_MDNS_BROWSER (object);
GSList *walk;
- DMAPMdnsBrowserService *service;
+ DmapMdnsBrowserService *service;
for (walk = browser->priv->services; NULL != walk; walk = walk->next) {
- service = (DMAPMdnsBrowserService *) walk->data;
+ service = (DmapMdnsBrowserService *) walk->data;
g_object_unref (service);
}
@@ -462,7 +462,7 @@ dmap_mdns_browser_finalize (GObject * object)
}
static void
-dmap_mdns_browser_class_init (DMAPMdnsBrowserClass * klass)
+dmap_mdns_browser_class_init (DmapMdnsBrowserClass * klass)
{
GObjectClass *object_class = G_OBJECT_CLASS (klass);
@@ -471,14 +471,14 @@ dmap_mdns_browser_class_init (DMAPMdnsBrowserClass * klass)
object_class->dispose = dmap_mdns_browser_dispose;
object_class->finalize = dmap_mdns_browser_finalize;
- g_type_class_add_private (klass, sizeof (DMAPMdnsBrowserPrivate));
+ g_type_class_add_private (klass, sizeof (DmapMdnsBrowserPrivate));
// Signal makeup
dmap_mdns_browser_signals[SERVICE_ADDED] =
g_signal_new ("service-added",
G_TYPE_FROM_CLASS (object_class),
G_SIGNAL_RUN_LAST,
- G_STRUCT_OFFSET (DMAPMdnsBrowserClass,
+ G_STRUCT_OFFSET (DmapMdnsBrowserClass,
service_added), NULL, NULL,
g_cclosure_marshal_VOID__POINTER, G_TYPE_NONE,
1, G_TYPE_POINTER);
@@ -487,16 +487,16 @@ dmap_mdns_browser_class_init (DMAPMdnsBrowserClass * klass)
g_signal_new ("service-removed",
G_TYPE_FROM_CLASS (object_class),
G_SIGNAL_RUN_LAST,
- G_STRUCT_OFFSET (DMAPMdnsBrowserClass,
+ G_STRUCT_OFFSET (DmapMdnsBrowserClass,
service_removed), NULL, NULL,
g_cclosure_marshal_VOID__STRING, G_TYPE_NONE, 1,
G_TYPE_STRING);
}
-DMAPMdnsBrowser *
-dmap_mdns_browser_new (DMAPMdnsBrowserServiceType type)
+DmapMdnsBrowser *
+dmap_mdns_browser_new (DmapMdnsBrowserServiceType type)
{
- DMAPMdnsBrowser *browser_object = 0;
+ DmapMdnsBrowser *browser_object = 0;
g_return_val_if_fail (type >= DMAP_MDNS_BROWSER_SERVICE_TYPE_INVALID
&& type <= DMAP_MDNS_BROWSER_SERVICE_TYPE_LAST,
@@ -512,7 +512,7 @@ dmap_mdns_browser_new (DMAPMdnsBrowserServiceType type)
}
gboolean
-dmap_mdns_browser_start (DMAPMdnsBrowser * browser, GError ** error)
+dmap_mdns_browser_start (DmapMdnsBrowser * browser, GError ** error)
{
gboolean fnval = FALSE;
@@ -541,7 +541,7 @@ dmap_mdns_browser_start (DMAPMdnsBrowser * browser, GError ** error)
}
gboolean
-dmap_mdns_browser_stop (DMAPMdnsBrowser * browser, GError ** error)
+dmap_mdns_browser_stop (DmapMdnsBrowser * browser, GError ** error)
{
if (NULL != browser->priv->sd_browse_ref) {
DNSServiceRefDeallocate (browser->priv->sd_browse_ref);
@@ -565,15 +565,15 @@ dmap_mdns_browser_error_quark (void)
}
G_CONST_RETURN GSList *
-dmap_mdns_browser_get_services (DMAPMdnsBrowser * browser)
+dmap_mdns_browser_get_services (DmapMdnsBrowser * browser)
{
g_return_val_if_fail (browser != NULL, NULL);
return browser->priv->services;
}
-DMAPMdnsBrowserServiceType
-dmap_mdns_browser_get_service_type (DMAPMdnsBrowser * browser)
+DmapMdnsBrowserServiceType
+dmap_mdns_browser_get_service_type (DmapMdnsBrowser * browser)
{
g_return_val_if_fail (browser != NULL,
DMAP_MDNS_BROWSER_SERVICE_TYPE_INVALID);
diff --git a/libdmapsharing/dmap-mdns-browser-howl.c b/libdmapsharing/dmap-mdns-browser-howl.c
index 2b0c730..3b36685 100644
--- a/libdmapsharing/dmap-mdns-browser-howl.c
+++ b/libdmapsharing/dmap-mdns-browser-howl.c
@@ -44,9 +44,9 @@
#include <libgnomevfs/gnome-vfs-address.h>
#include <libgnomevfs/gnome-vfs-resolve.h>
-struct DMAPMdnsBrowserPrivate
+struct DmapMdnsBrowserPrivate
{
- DMAPMdnsBrowserServiceType service_type;
+ DmapMdnsBrowserServiceType service_type;
sw_discovery *discovery;
sw_discovery_oid *oid;
@@ -72,16 +72,16 @@ enum
#undef VERSION
#include <howl.h>
-static void dmap_mdns_browser_class_init (DMAPMdnsBrowserClass * klass);
-static void dmap_mdns_browser_init (DMAPMdnsBrowser * browser);
+static void dmap_mdns_browser_class_init (DmapMdnsBrowserClass * klass);
+static void dmap_mdns_browser_init (DmapMdnsBrowser * browser);
static void dmap_mdns_browser_dispose (GObject * object);
static void dmap_mdns_browser_finalize (GObject * object);
-#define DMAP_MDNS_BROWSER_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), DMAP_TYPE_MDNS_BROWSER,
DMAPMdnsBrowserPrivate))
+#define DMAP_MDNS_BROWSER_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), DMAP_TYPE_MDNS_BROWSER,
DmapMdnsBrowserPrivate))
static guint signals[LAST_SIGNAL] = { 0, };
-G_DEFINE_TYPE (DMAPMdnsBrowser, dmap_mdns_browser, G_TYPE_OBJECT);
+G_DEFINE_TYPE (DmapMdnsBrowser, dmap_mdns_browser, G_TYPE_OBJECT);
GQuark
dmap_mdns_browser_error_quark (void)
@@ -97,7 +97,7 @@ dmap_mdns_browser_error_quark (void)
static gboolean
howl_in_cb (GIOChannel * io_channel,
- GIOCondition condition, DMAPMdnsBrowser * browser)
+ GIOCondition condition, DmapMdnsBrowser * browser)
{
sw_salt salt;
@@ -111,7 +111,7 @@ howl_in_cb (GIOChannel * io_channel,
}
static void
-howl_client_init (DMAPMdnsBrowser * browser)
+howl_client_init (DmapMdnsBrowser * browser)
{
sw_result result;
int fd;
@@ -136,7 +136,7 @@ howl_client_init (DMAPMdnsBrowser * browser)
}
static gboolean
-host_is_local (DMAPMdnsBrowser * browser, const char *host)
+host_is_local (DmapMdnsBrowser * browser, const char *host)
{
GnomeVFSAddress *remote;
gboolean equal;
@@ -167,7 +167,7 @@ host_is_local (DMAPMdnsBrowser * browser, const char *host)
}
static void
-set_local_address (DMAPMdnsBrowser * browser)
+set_local_address (DmapMdnsBrowser * browser)
{
char host_name[256];
GnomeVFSResolveHandle *rh;
@@ -207,14 +207,14 @@ resolve_cb (sw_discovery discovery,
sw_ipv4_address address,
sw_port port,
sw_octets text_record,
- sw_ulong text_record_length, DMAPMdnsBrowser * browser)
+ sw_ulong text_record_length, DmapMdnsBrowser * browser)
{
char *host;
char *name;
char *pair;
sw_text_record_iterator it;
gboolean pp = FALSE;
- DMAPMdnsBrowserService *service;
+ DmapMdnsBrowserService *service;
host = g_malloc (16);
name = NULL;
@@ -265,7 +265,7 @@ resolve_cb (sw_discovery discovery,
name = g_strdup (service_name);
}
- service = g_new0 (DMAPMdnsBrowserService, 1);
+ service = g_new0 (DmapMdnsBrowserService, 1);
service->service_name = g_strdup (service_name);
service->name = name;
service->host = g_strdup (host);
@@ -286,7 +286,7 @@ resolve_cb (sw_discovery discovery,
}
static gboolean
-dmap_mdns_browser_resolve (DMAPMdnsBrowser * browser, const char *name)
+dmap_mdns_browser_resolve (DmapMdnsBrowser * browser, const char *name)
{
sw_result result;
sw_discovery_oid oid;
@@ -303,13 +303,13 @@ dmap_mdns_browser_resolve (DMAPMdnsBrowser * browser, const char *name)
}
static void
-browser_add_service (DMAPMdnsBrowser * browser, const char *service_name)
+browser_add_service (DmapMdnsBrowser * browser, const char *service_name)
{
dmap_mdns_browser_resolve (browser, service_name);
}
static void
-browser_remove_service (DMAPMdnsBrowser * browser, const char *service_name)
+browser_remove_service (DmapMdnsBrowser * browser, const char *service_name)
{
g_signal_emit (browser,
dmap_mdns_browser_signals[SERVICE_REMOVED],
@@ -323,7 +323,7 @@ browse_cb (sw_discovery discovery,
sw_uint32 interface_index,
sw_const_string name,
sw_const_string type,
- sw_const_string domain, DMAPMdnsBrowser * browser)
+ sw_const_string domain, DmapMdnsBrowser * browser)
{
if (status == SW_DISCOVERY_BROWSE_ADD_SERVICE) {
browser_add_service (browser, name);
@@ -334,10 +334,10 @@ browse_cb (sw_discovery discovery,
return SW_OKAY;
}
-DMAPMdnsBrowser *
-dmap_mdns_browser_new (DMAPMdnsBrowserServiceType type)
+DmapMdnsBrowser *
+dmap_mdns_browser_new (DmapMdnsBrowserServiceType type)
{
- DMAPMdnsBrowser *browser_object;
+ DmapMdnsBrowser *browser_object;
g_return_val_if_fail (type >= DMAP_MDNS_BROWSER_SERVICE_TYPE_INVALID
&& type <= DMAP_MDNS_BROWSER_SERVICE_TYPE_LAST,
@@ -352,7 +352,7 @@ dmap_mdns_browser_new (DMAPMdnsBrowserServiceType type)
}
gboolean
-dmap_mdns_browser_start (DMAPMdnsBrowser * browser, GError ** error)
+dmap_mdns_browser_start (DmapMdnsBrowser * browser, GError ** error)
{
sw_result result;
@@ -394,7 +394,7 @@ dmap_mdns_browser_start (DMAPMdnsBrowser * browser, GError ** error)
}
gboolean
-dmap_mdns_browser_stop (DMAPMdnsBrowser * browser, GError ** error)
+dmap_mdns_browser_stop (DmapMdnsBrowser * browser, GError ** error)
{
if (browser->priv->discovery == NULL) {
g_set_error (error,
@@ -420,8 +420,8 @@ dmap_mdns_browser_stop (DMAPMdnsBrowser * browser, GError ** error)
return TRUE;
}
-DMAPMdnsBrowserServiceType
-dmap_mdns_browser_get_service_type (DMAPMdnsBrowser * browser)
+DmapMdnsBrowserServiceType
+dmap_mdns_browser_get_service_type (DmapMdnsBrowser * browser)
{
g_return_val_if_fail (browser != NULL,
DMAP_MDNS_BROWSER_SERVICE_TYPE_INVALID);
@@ -429,7 +429,7 @@ dmap_mdns_browser_get_service_type (DMAPMdnsBrowser * browser)
}
static void
-dmap_mdns_browser_class_init (DMAPMdnsBrowserClass * klass)
+dmap_mdns_browser_class_init (DmapMdnsBrowserClass * klass)
{
GObjectClass *object_class = G_OBJECT_CLASS (klass);
@@ -440,7 +440,7 @@ dmap_mdns_browser_class_init (DMAPMdnsBrowserClass * klass)
g_signal_new ("service-added",
G_TYPE_FROM_CLASS (object_class),
G_SIGNAL_RUN_LAST,
- G_STRUCT_OFFSET (DMAPMdnsBrowserClass,
+ G_STRUCT_OFFSET (DmapMdnsBrowserClass,
service_added), NULL, NULL,
g_cclosure_marshal_VOID__POINTER, G_TYPE_NONE,
1, G_TYPE_POINTER);
@@ -448,19 +448,19 @@ dmap_mdns_browser_class_init (DMAPMdnsBrowserClass * klass)
g_signal_new ("service-removed",
G_TYPE_FROM_CLASS (object_class),
G_SIGNAL_RUN_LAST,
- G_STRUCT_OFFSET (DMAPMdnsBrowserClass,
+ G_STRUCT_OFFSET (DmapMdnsBrowserClass,
service_removed), NULL, NULL,
g_cclosure_marshal_VOID__STRING, G_TYPE_NONE, 1,
G_TYPE_STRING);
- g_type_class_add_private (klass, sizeof (DMAPMdnsBrowserPrivate));
+ g_type_class_add_private (klass, sizeof (DmapMdnsBrowserPrivate));
}
static void
-dmap_mdns_browser_init (DMAPMdnsBrowser * browser)
+dmap_mdns_browser_init (DmapMdnsBrowser * browser)
{
browser->priv = DMAP_MDNS_BROWSER_GET_PRIVATE (browser);
- memset (browser->priv, 0, sizeof (DMAPMdnsBrowserPrivate));
+ memset (browser->priv, 0, sizeof (DmapMdnsBrowserPrivate));
set_local_address (browser);
@@ -468,7 +468,7 @@ dmap_mdns_browser_init (DMAPMdnsBrowser * browser)
}
static void
-resolver_free (sw_discovery_oid * oid, DMAPMdnsBrowser * browser)
+resolver_free (sw_discovery_oid * oid, DmapMdnsBrowser * browser)
{
sw_discovery_cancel (*browser->priv->discovery, *oid);
g_free (oid);
@@ -477,16 +477,16 @@ resolver_free (sw_discovery_oid * oid, DMAPMdnsBrowser * browser)
static void
dmap_mdns_browser_dispose (GObject * object)
{
- DMAPMdnsBrowser *browser = DMAP_MDNS_BROWSER (object);
+ DmapMdnsBrowser *browser = DMAP_MDNS_BROWSER (object);
GSList *walk;
- DMAPMdnsBrowserService *service;
+ DmapMdnsBrowserService *service;
if (browser->priv->oid) {
dmap_mdns_browser_stop (browser, NULL);
}
for (walk = browser->priv->services; walk; walk = walk->next) {
- service = (DMAPMdnsBrowserService *) walk->data;
+ service = (DmapMdnsBrowserService *) walk->data;
g_object_unref (service);
}
g_slist_free (browser->priv->services);
diff --git a/libdmapsharing/dmap-mdns-browser.h b/libdmapsharing/dmap-mdns-browser.h
index 3124ef2..13bb9e3 100644
--- a/libdmapsharing/dmap-mdns-browser.h
+++ b/libdmapsharing/dmap-mdns-browser.h
@@ -31,25 +31,25 @@ G_BEGIN_DECLS
/**
* DMAP_TYPE_MDNS_BROWSER:
*
- * The type for #DMAPMdnsBrowser.
+ * The type for #DmapMdnsBrowser.
*/
#define DMAP_TYPE_MDNS_BROWSER (dmap_mdns_browser_get_type ())
/**
* DMAP_MDNS_BROWSER:
* @o: Object which is subject to casting.
*
- * Casts a #DMAPMdnsBrowser or derived pointer into a (DMAPMdnsBrowser *) pointer.
+ * Casts a #DmapMdnsBrowser or derived pointer into a (DmapMdnsBrowser *) pointer.
* Depending on the current debugging level, this function may invoke
* certain runtime checks to identify invalid casts.
*/
-#define DMAP_MDNS_BROWSER(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), DMAP_TYPE_MDNS_BROWSER,
DMAPMdnsBrowser))
+#define DMAP_MDNS_BROWSER(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), DMAP_TYPE_MDNS_BROWSER,
DmapMdnsBrowser))
/**
* DMAP_MDNS_BROWSER_CLASS:
- * @k: a valid #DMAPMdnsBrowserClass
+ * @k: a valid #DmapMdnsBrowserClass
*
- * Casts a derived #DMAPMdnsBrowserClass structure into a #DMAPMdnsBrowserClass structure.
+ * Casts a derived #DmapMdnsBrowserClass structure into a #DmapMdnsBrowserClass structure.
*/
-#define DMAP_MDNS_BROWSER_CLASS(k) (G_TYPE_CHECK_CLASS_CAST((k), DMAP_TYPE_MDNS_BROWSER,
DMAPMdnsBrowserClass))
+#define DMAP_MDNS_BROWSER_CLASS(k) (G_TYPE_CHECK_CLASS_CAST((k), DMAP_TYPE_MDNS_BROWSER,
DmapMdnsBrowserClass))
/**
* IS_DMAP_MDNS_BROWSER:
* @o: Instance to check for being a %DMAP_TYPE_MDNS_BROWSER.
@@ -59,46 +59,46 @@ G_BEGIN_DECLS
#define IS_DMAP_MDNS_BROWSER(o) (G_TYPE_CHECK_INSTANCE_TYPE ((o), DMAP_TYPE_MDNS_BROWSER))
/**
* IS_DMAP_MDNS_BROWSER_CLASS:
- * @k: a #DMAPMdnsBrowserClass
+ * @k: a #DmapMdnsBrowserClass
*
- * Checks whether @k "is a" valid #DMAPMdnsBrowserClass structure of type
+ * Checks whether @k "is a" valid #DmapMdnsBrowserClass structure of type
* %DMAP_MDNS_BROWSER or derived.
*/
#define IS_DMAP_MDNS_BROWSER_CLASS(k) (G_TYPE_CHECK_CLASS_TYPE ((k), DMAP_TYPE_MDNS_BROWSER))
/**
* DMAP_MDNS_BROWSER_GET_CLASS:
- * @o: a #DMAPMdnsBrowser instance.
+ * @o: a #DmapMdnsBrowser instance.
*
- * Get the class structure associated to a #DMAPMdnsBrowser instance.
+ * Get the class structure associated to a #DmapMdnsBrowser instance.
*
* Returns: pointer to object class structure.
*/
-#define DMAP_MDNS_BROWSER_GET_CLASS(o) (G_TYPE_INSTANCE_GET_CLASS ((o), DMAP_TYPE_MDNS_BROWSER,
DMAPMdnsBrowserClass))
-typedef struct _DMAPMdnsBrowser DMAPMdnsBrowser;
-typedef struct _DMAPMdnsBrowserClass DMAPMdnsBrowserClass;
-typedef struct _DMAPMdnsBrowserPrivate DMAPMdnsBrowserPrivate;
+#define DMAP_MDNS_BROWSER_GET_CLASS(o) (G_TYPE_INSTANCE_GET_CLASS ((o), DMAP_TYPE_MDNS_BROWSER,
DmapMdnsBrowserClass))
+typedef struct _DmapMdnsBrowser DmapMdnsBrowser;
+typedef struct _DmapMdnsBrowserClass DmapMdnsBrowserClass;
+typedef struct _DmapMdnsBrowserPrivate DmapMdnsBrowserPrivate;
typedef enum
{
DMAP_MDNS_BROWSER_ERROR_NOT_RUNNING = 0,
DMAP_MDNS_BROWSER_ERROR_FAILED,
-} DMAPMdnsBrowserError;
+} DmapMdnsBrowserError;
-struct _DMAPMdnsBrowserClass
+struct _DmapMdnsBrowserClass
{
GObjectClass parent_class;
- void (*service_added) (DMAPMdnsBrowser * browser,
- DMAPMdnsService * service);
- void (*service_removed) (DMAPMdnsBrowser * browser,
- DMAPMdnsService * service);
+ void (*service_added) (DmapMdnsBrowser * browser,
+ DmapMdnsService * service);
+ void (*service_removed) (DmapMdnsBrowser * browser,
+ DmapMdnsService * service);
};
-struct _DMAPMdnsBrowser
+struct _DmapMdnsBrowser
{
GObject object;
- DMAPMdnsBrowserPrivate *priv;
+ DmapMdnsBrowserPrivate *priv;
};
#define DMAP_MDNS_BROWSER_ERROR dmap_mdns_browser_error_quark ()
@@ -113,41 +113,41 @@ GType dmap_mdns_browser_get_type (void);
*
* Creates a new mDNS browser.
*
- * Returns: a pointer to a DMAPMdnsBrowser.
+ * Returns: a pointer to a DmapMdnsBrowser.
*/
-DMAPMdnsBrowser *dmap_mdns_browser_new (DMAPMdnsServiceType type);
+DmapMdnsBrowser *dmap_mdns_browser_new (DmapMdnsServiceType type);
/**
* dmap_mdns_browser_start:
- * @browser: A DMAPMdnsBrowser.
+ * @browser: A DmapMdnsBrowser.
* @error: A GError.
*
- * Starts a DMAPMdnsBrowser.
+ * Starts a DmapMdnsBrowser.
*
* Returns: TRUE on success, else FALSE.
*/
-gboolean dmap_mdns_browser_start (DMAPMdnsBrowser * browser, GError ** error);
+gboolean dmap_mdns_browser_start (DmapMdnsBrowser * browser, GError ** error);
/**
* dmap_mdns_browser_stop:
- * @browser: A DMAPMdnsBrowser.
+ * @browser: A DmapMdnsBrowser.
* @error: A GError.
*
- * Stops a DMAPMdnsBrowser.
+ * Stops a DmapMdnsBrowser.
*
* Returns: TRUE on success, else FALSE.
*/
-gboolean dmap_mdns_browser_stop (DMAPMdnsBrowser * browser, GError ** error);
+gboolean dmap_mdns_browser_stop (DmapMdnsBrowser * browser, GError ** error);
-G_CONST_RETURN GSList *dmap_mdns_browser_get_services (DMAPMdnsBrowser *
+G_CONST_RETURN GSList *dmap_mdns_browser_get_services (DmapMdnsBrowser *
browser);
-DMAPMdnsServiceType dmap_mdns_browser_get_service_type (DMAPMdnsBrowser
+DmapMdnsServiceType dmap_mdns_browser_get_service_type (DmapMdnsBrowser
* browser);
/**
- * DMAPMdnsBrowser::service-added:
- * @browser: the #DMAPMdnsBrowser which received the signal.
- * @service: #DMAPMdnsService
+ * DmapMdnsBrowser::service-added:
+ * @browser: the #DmapMdnsBrowser which received the signal.
+ * @service: #DmapMdnsService
*
* Emitted each time a service becomes available to @browser
*/
diff --git a/libdmapsharing/dmap-mdns-publisher-avahi.c b/libdmapsharing/dmap-mdns-publisher-avahi.c
index 37c0105..27387cd 100644
--- a/libdmapsharing/dmap-mdns-publisher-avahi.c
+++ b/libdmapsharing/dmap-mdns-publisher-avahi.c
@@ -38,13 +38,13 @@
#include "dmap-mdns-avahi.h"
#include "dmap-mdns-publisher.h"
-static void dmap_mdns_publisher_class_init (DMAPMdnsPublisherClass * klass);
-static void dmap_mdns_publisher_init (DMAPMdnsPublisher * publisher);
+static void dmap_mdns_publisher_class_init (DmapMdnsPublisherClass * klass);
+static void dmap_mdns_publisher_init (DmapMdnsPublisher * publisher);
static void dmap_mdns_publisher_finalize (GObject * object);
-#define DMAP_MDNS_PUBLISHER_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), DMAP_TYPE_MDNS_PUBLISHER,
DMAPMdnsPublisherPrivate))
+#define DMAP_MDNS_PUBLISHER_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), DMAP_TYPE_MDNS_PUBLISHER,
DmapMdnsPublisherPrivate))
-struct DMAPMdnsPublisherService
+struct DmapMdnsPublisherService
{
char *name;
guint port;
@@ -53,7 +53,7 @@ struct DMAPMdnsPublisherService
gchar **txt_records;
};
-struct DMAPMdnsPublisherPrivate
+struct DmapMdnsPublisherPrivate
{
AvahiClient *client;
AvahiEntryGroup *entry_group;
@@ -69,7 +69,7 @@ enum
static guint signals[LAST_SIGNAL] = { 0, };
-G_DEFINE_TYPE (DMAPMdnsPublisher, dmap_mdns_publisher, G_TYPE_OBJECT);
+G_DEFINE_TYPE (DmapMdnsPublisher, dmap_mdns_publisher, G_TYPE_OBJECT);
static gpointer publisher_object = NULL;
@@ -86,14 +86,14 @@ dmap_mdns_publisher_error_quark (void)
}
static void
-emit_published (char *name, DMAPMdnsPublisher * publisher)
+emit_published (char *name, DmapMdnsPublisher * publisher)
{
g_signal_emit (publisher, signals[PUBLISHED], 0, name);
}
static void
entry_group_cb (AvahiEntryGroup * group,
- AvahiEntryGroupState state, DMAPMdnsPublisher * publisher)
+ AvahiEntryGroupState state, DmapMdnsPublisher * publisher)
{
if (state == AVAHI_ENTRY_GROUP_ESTABLISHED) {
g_slist_foreach (publisher->priv->service,
@@ -110,8 +110,8 @@ entry_group_cb (AvahiEntryGroup * group,
}
static gboolean
-create_service (struct DMAPMdnsPublisherService *service,
- DMAPMdnsPublisher * publisher, GError ** error)
+create_service (struct DmapMdnsPublisherService *service,
+ DmapMdnsPublisher * publisher, GError ** error)
{
int ret;
const char *password_record;
@@ -162,7 +162,7 @@ create_service (struct DMAPMdnsPublisherService *service,
}
static gboolean
-create_services (DMAPMdnsPublisher * publisher, GError ** error)
+create_services (DmapMdnsPublisher * publisher, GError ** error)
{
GSList *ptr;
int ret;
@@ -212,19 +212,19 @@ create_services (DMAPMdnsPublisher * publisher, GError ** error)
}
static gboolean
-refresh_services (DMAPMdnsPublisher * publisher, GError ** error)
+refresh_services (DmapMdnsPublisher * publisher, GError ** error)
{
return create_services (publisher, error);
}
-static struct DMAPMdnsPublisherService *
+static struct DmapMdnsPublisherService *
find_service_by_port (GSList * list, guint port)
{
GSList *ptr;
for (ptr = list; ptr; ptr = g_slist_next (ptr)) {
if (port ==
- ((struct DMAPMdnsPublisherService *) ptr->data)->port)
+ ((struct DmapMdnsPublisherService *) ptr->data)->port)
break;
}
@@ -232,11 +232,11 @@ find_service_by_port (GSList * list, guint port)
}
gboolean
-dmap_mdns_publisher_rename_at_port (DMAPMdnsPublisher * publisher,
+dmap_mdns_publisher_rename_at_port (DmapMdnsPublisher * publisher,
guint port,
const char *name, GError ** error)
{
- struct DMAPMdnsPublisherService *ptr;
+ struct DmapMdnsPublisherService *ptr;
g_return_val_if_fail (publisher != NULL, FALSE);
@@ -261,14 +261,14 @@ dmap_mdns_publisher_rename_at_port (DMAPMdnsPublisher * publisher,
}
gboolean
-dmap_mdns_publisher_publish (DMAPMdnsPublisher * publisher,
+dmap_mdns_publisher_publish (DmapMdnsPublisher * publisher,
const char *name,
guint port,
const char *type_of_service,
gboolean password_required,
gchar ** txt_records, GError ** error)
{
- struct DMAPMdnsPublisherService *service;
+ struct DmapMdnsPublisherService *service;
if (publisher->priv->client == NULL) {
g_set_error (error,
@@ -279,7 +279,7 @@ dmap_mdns_publisher_publish (DMAPMdnsPublisher * publisher,
return FALSE;
}
- service = g_new0 (struct DMAPMdnsPublisherService, 1);
+ service = g_new0 (struct DmapMdnsPublisherService, 1);
service->name = g_strdup (name);
service->port = port;
@@ -294,7 +294,7 @@ dmap_mdns_publisher_publish (DMAPMdnsPublisher * publisher,
}
static void
-free_service (struct DMAPMdnsPublisherService *service, gpointer user_data)
+free_service (struct DmapMdnsPublisherService *service, gpointer user_data)
{
g_free (service->name);
g_free (service->type_of_service);
@@ -303,10 +303,10 @@ free_service (struct DMAPMdnsPublisherService *service, gpointer user_data)
}
gboolean
-dmap_mdns_publisher_withdraw (DMAPMdnsPublisher * publisher,
+dmap_mdns_publisher_withdraw (DmapMdnsPublisher * publisher,
guint port, GError ** error)
{
- struct DMAPMdnsPublisherService *ptr;
+ struct DmapMdnsPublisherService *ptr;
if (publisher->priv->client == NULL) {
g_set_error (error,
@@ -388,7 +388,7 @@ dmap_mdns_publisher_constructor (GType type,
}
static void
-dmap_mdns_publisher_class_init (DMAPMdnsPublisherClass * klass)
+dmap_mdns_publisher_class_init (DmapMdnsPublisherClass * klass)
{
GObjectClass *object_class = G_OBJECT_CLASS (klass);
@@ -401,7 +401,7 @@ dmap_mdns_publisher_class_init (DMAPMdnsPublisherClass * klass)
g_signal_new ("published",
G_TYPE_FROM_CLASS (object_class),
G_SIGNAL_RUN_LAST,
- G_STRUCT_OFFSET (DMAPMdnsPublisherClass,
+ G_STRUCT_OFFSET (DmapMdnsPublisherClass,
published), NULL, NULL,
g_cclosure_marshal_VOID__STRING, G_TYPE_NONE, 1,
G_TYPE_STRING);
@@ -409,16 +409,16 @@ dmap_mdns_publisher_class_init (DMAPMdnsPublisherClass * klass)
g_signal_new ("name-collision",
G_TYPE_FROM_CLASS (object_class),
G_SIGNAL_RUN_LAST,
- G_STRUCT_OFFSET (DMAPMdnsPublisherClass,
+ G_STRUCT_OFFSET (DmapMdnsPublisherClass,
name_collision), NULL, NULL,
g_cclosure_marshal_VOID__STRING, G_TYPE_NONE, 1,
G_TYPE_STRING);
- g_type_class_add_private (klass, sizeof (DMAPMdnsPublisherPrivate));
+ g_type_class_add_private (klass, sizeof (DmapMdnsPublisherPrivate));
}
static void
-dmap_mdns_publisher_init (DMAPMdnsPublisher * publisher)
+dmap_mdns_publisher_init (DmapMdnsPublisher * publisher)
{
publisher->priv = DMAP_MDNS_PUBLISHER_GET_PRIVATE (publisher);
@@ -430,7 +430,7 @@ dmap_mdns_publisher_init (DMAPMdnsPublisher * publisher)
static void
dmap_mdns_publisher_finalize (GObject * object)
{
- DMAPMdnsPublisher *publisher;
+ DmapMdnsPublisher *publisher;
g_return_if_fail (object != NULL);
g_return_if_fail (IS_DMAP_MDNS_PUBLISHER (object));
@@ -463,7 +463,7 @@ dmap_mdns_publisher_finalize (GObject * object)
G_OBJECT_CLASS (dmap_mdns_publisher_parent_class)->finalize (object);
}
-DMAPMdnsPublisher *
+DmapMdnsPublisher *
dmap_mdns_publisher_new (void)
{
if (publisher_object) {
diff --git a/libdmapsharing/dmap-mdns-publisher-dnssd.c b/libdmapsharing/dmap-mdns-publisher-dnssd.c
index 6898c2b..0577837 100644
--- a/libdmapsharing/dmap-mdns-publisher-dnssd.c
+++ b/libdmapsharing/dmap-mdns-publisher-dnssd.c
@@ -26,9 +26,9 @@
#include "dmap-mdns-publisher.h"
-#define DMAP_MDNS_PUBLISHER_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), DMAP_TYPE_MDNS_PUBLISHER,
DMAPMdnsPublisherPrivate))
+#define DMAP_MDNS_PUBLISHER_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), DMAP_TYPE_MDNS_PUBLISHER,
DmapMdnsPublisherPrivate))
-struct DMAPMdnsPublisherPrivate
+struct DmapMdnsPublisherPrivate
{
DNSServiceRef sdref;
char *name;
@@ -42,7 +42,7 @@ enum {
static guint signals [LAST_SIGNAL] = { 0, };
-G_DEFINE_TYPE (DMAPMdnsPublisher, dmap_mdns_publisher, G_TYPE_OBJECT)
+G_DEFINE_TYPE (DmapMdnsPublisher, dmap_mdns_publisher, G_TYPE_OBJECT)
static gpointer publisher_object = NULL;
@@ -56,7 +56,7 @@ dmap_mdns_publisher_error_quark (void)
}
gboolean
-dmap_mdns_publisher_rename_at_port (DMAPMdnsPublisher *publisher,
+dmap_mdns_publisher_rename_at_port (DmapMdnsPublisher *publisher,
guint port,
const char *name,
GError **error)
@@ -110,7 +110,7 @@ _build_txt_record(gboolean password_required, gchar **txt_records, uint16_t *txt
}
gboolean
-dmap_mdns_publisher_publish (DMAPMdnsPublisher *publisher,
+dmap_mdns_publisher_publish (DmapMdnsPublisher *publisher,
const char *name,
guint port,
const char *type_of_service,
@@ -160,7 +160,7 @@ done:
}
gboolean
-dmap_mdns_publisher_withdraw (DMAPMdnsPublisher *publisher,
+dmap_mdns_publisher_withdraw (DmapMdnsPublisher *publisher,
guint port,
GError **error)
{
@@ -198,7 +198,7 @@ dmap_mdns_publisher_get_property (GObject *object,
static void
dmap_mdns_publisher_finalize (GObject *object)
{
- DMAPMdnsPublisher *publisher;
+ DmapMdnsPublisher *publisher;
g_return_if_fail (object != NULL);
g_return_if_fail (IS_DMAP_MDNS_PUBLISHER (object));
@@ -213,7 +213,7 @@ dmap_mdns_publisher_finalize (GObject *object)
}
static void
-dmap_mdns_publisher_class_init (DMAPMdnsPublisherClass *klass)
+dmap_mdns_publisher_class_init (DmapMdnsPublisherClass *klass)
{
GObjectClass *object_class = G_OBJECT_CLASS (klass);
@@ -225,7 +225,7 @@ dmap_mdns_publisher_class_init (DMAPMdnsPublisherClass *klass)
g_signal_new ("published",
G_TYPE_FROM_CLASS (object_class),
G_SIGNAL_RUN_LAST,
- G_STRUCT_OFFSET (DMAPMdnsPublisherClass, published),
+ G_STRUCT_OFFSET (DmapMdnsPublisherClass, published),
NULL,
NULL,
g_cclosure_marshal_VOID__STRING,
@@ -235,23 +235,23 @@ dmap_mdns_publisher_class_init (DMAPMdnsPublisherClass *klass)
g_signal_new ("name-collision",
G_TYPE_FROM_CLASS (object_class),
G_SIGNAL_RUN_LAST,
- G_STRUCT_OFFSET (DMAPMdnsPublisherClass, name_collision),
+ G_STRUCT_OFFSET (DmapMdnsPublisherClass, name_collision),
NULL,
NULL,
g_cclosure_marshal_VOID__STRING,
G_TYPE_NONE,
1, G_TYPE_STRING);
- g_type_class_add_private (klass, sizeof (DMAPMdnsPublisherPrivate));
+ g_type_class_add_private (klass, sizeof (DmapMdnsPublisherPrivate));
}
static void
-dmap_mdns_publisher_init (DMAPMdnsPublisher *publisher)
+dmap_mdns_publisher_init (DmapMdnsPublisher *publisher)
{
publisher->priv = DMAP_MDNS_PUBLISHER_GET_PRIVATE (publisher);
}
-DMAPMdnsPublisher *
+DmapMdnsPublisher *
dmap_mdns_publisher_new (void)
{
if (publisher_object) {
diff --git a/libdmapsharing/dmap-mdns-publisher.h b/libdmapsharing/dmap-mdns-publisher.h
index 25a3db5..2df449f 100644
--- a/libdmapsharing/dmap-mdns-publisher.h
+++ b/libdmapsharing/dmap-mdns-publisher.h
@@ -29,34 +29,34 @@
G_BEGIN_DECLS
#define DMAP_TYPE_MDNS_PUBLISHER (dmap_mdns_publisher_get_type ())
-#define DMAP_MDNS_PUBLISHER(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), DMAP_TYPE_MDNS_PUBLISHER,
DMAPMdnsPublisher))
-#define DMAP_MDNS_PUBLISHER_CLASS(k) (G_TYPE_CHECK_CLASS_CAST((k), DMAP_TYPE_MDNS_PUBLISHER,
DMAPMdnsPublisherClass))
+#define DMAP_MDNS_PUBLISHER(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), DMAP_TYPE_MDNS_PUBLISHER,
DmapMdnsPublisher))
+#define DMAP_MDNS_PUBLISHER_CLASS(k) (G_TYPE_CHECK_CLASS_CAST((k), DMAP_TYPE_MDNS_PUBLISHER,
DmapMdnsPublisherClass))
#define IS_DMAP_MDNS_PUBLISHER(o) (G_TYPE_CHECK_INSTANCE_TYPE ((o), DMAP_TYPE_MDNS_PUBLISHER))
#define IS_DMAP_MDNS_PUBLISHER_CLASS(k) (G_TYPE_CHECK_CLASS_TYPE ((k), DMAP_TYPE_MDNS_PUBLISHER))
-#define DMAP_MDNS_PUBLISHER_GET_CLASS(o) (G_TYPE_INSTANCE_GET_CLASS ((o), DMAP_TYPE_MDNS_PUBLISHER,
DMAPMdnsPublisherClass))
-typedef struct DMAPMdnsPublisherPrivate DMAPMdnsPublisherPrivate;
+#define DMAP_MDNS_PUBLISHER_GET_CLASS(o) (G_TYPE_INSTANCE_GET_CLASS ((o), DMAP_TYPE_MDNS_PUBLISHER,
DmapMdnsPublisherClass))
+typedef struct DmapMdnsPublisherPrivate DmapMdnsPublisherPrivate;
typedef struct
{
GObject object;
- DMAPMdnsPublisherPrivate *priv;
-} DMAPMdnsPublisher;
+ DmapMdnsPublisherPrivate *priv;
+} DmapMdnsPublisher;
typedef struct
{
GObjectClass parent_class;
- void (*published) (DMAPMdnsPublisher * publisher, const char *name);
- void (*name_collision) (DMAPMdnsPublisher * publisher,
+ void (*published) (DmapMdnsPublisher * publisher, const char *name);
+ void (*name_collision) (DmapMdnsPublisher * publisher,
const char *name);
-} DMAPMdnsPublisherClass;
+} DmapMdnsPublisherClass;
typedef enum
{
DMAP_MDNS_PUBLISHER_ERROR_NOT_RUNNING,
DMAP_MDNS_PUBLISHER_ERROR_FAILED,
-} DMAPMdnsPublisherError;
+} DmapMdnsPublisherError;
#define DMAP_MDNS_PUBLISHER_ERROR dmap_mdns_publisher_error_quark ()
@@ -64,18 +64,18 @@ GQuark dmap_mdns_publisher_error_quark (void);
GType dmap_mdns_publisher_get_type (void);
-DMAPMdnsPublisher *dmap_mdns_publisher_new (void);
-gboolean dmap_mdns_publisher_publish (DMAPMdnsPublisher * publisher,
+DmapMdnsPublisher *dmap_mdns_publisher_new (void);
+gboolean dmap_mdns_publisher_publish (DmapMdnsPublisher * publisher,
const char *name,
guint port,
const char *type_of_service,
gboolean password_required,
gchar ** txt_records, GError ** error);
-gboolean dmap_mdns_publisher_rename_at_port (DMAPMdnsPublisher * publisher,
+gboolean dmap_mdns_publisher_rename_at_port (DmapMdnsPublisher * publisher,
guint port,
const char *name,
GError ** error);
-gboolean dmap_mdns_publisher_withdraw (DMAPMdnsPublisher * publisher,
+gboolean dmap_mdns_publisher_withdraw (DmapMdnsPublisher * publisher,
guint port, GError ** error);
G_END_DECLS
diff --git a/libdmapsharing/dmap-mdns-service.c b/libdmapsharing/dmap-mdns-service.c
index 891a5f4..712d3e3 100644
--- a/libdmapsharing/dmap-mdns-service.c
+++ b/libdmapsharing/dmap-mdns-service.c
@@ -30,7 +30,7 @@
#include <glib/gi18n.h>
#include <glib-object.h>
-struct _DMAPMdnsServicePrivate
+struct _DmapMdnsServicePrivate
{
gchar *service_name;
gchar *name;
@@ -38,7 +38,7 @@ struct _DMAPMdnsServicePrivate
guint port;
gboolean password_protected;
gchar *pair; // FIXME: subclass
- DMAPMdnsServiceTransportProtocol transport_protocol; // FIXME: subclass
+ DmapMdnsServiceTransportProtocol transport_protocol; // FIXME: subclass
};
enum {
@@ -58,7 +58,7 @@ dmap_mdns_service_set_property (GObject *object,
const GValue *value,
GParamSpec *pspec)
{
- DMAPMdnsService *service = DMAP_MDNS_SERVICE (object);
+ DmapMdnsService *service = DMAP_MDNS_SERVICE (object);
switch (prop_id) {
case PROP_SERVICE_NAME:
@@ -100,7 +100,7 @@ dmap_mdns_service_get_property (GObject *object,
GValue *value,
GParamSpec *pspec)
{
- DMAPMdnsService *service = DMAP_MDNS_SERVICE (object);
+ DmapMdnsService *service = DMAP_MDNS_SERVICE (object);
switch (prop_id) {
case PROP_SERVICE_NAME:
@@ -132,21 +132,21 @@ dmap_mdns_service_get_property (GObject *object,
}
}
-static void dmap_mdns_service_class_init (DMAPMdnsServiceClass * klass);
-static void dmap_mdns_service_init (DMAPMdnsService * service);
+static void dmap_mdns_service_class_init (DmapMdnsServiceClass * klass);
+static void dmap_mdns_service_init (DmapMdnsService * service);
static void dmap_mdns_service_dispose (GObject * object);
static void dmap_mdns_service_finalize (GObject * object);
-#define DMAP_MDNS_SERVICE_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), DMAP_TYPE_MDNS_SERVICE,
DMAPMdnsServicePrivate))
+#define DMAP_MDNS_SERVICE_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), DMAP_TYPE_MDNS_SERVICE,
DmapMdnsServicePrivate))
-G_DEFINE_TYPE (DMAPMdnsService, dmap_mdns_service, G_TYPE_OBJECT);
+G_DEFINE_TYPE (DmapMdnsService, dmap_mdns_service, G_TYPE_OBJECT);
static void
-dmap_mdns_service_class_init (DMAPMdnsServiceClass * klass)
+dmap_mdns_service_class_init (DmapMdnsServiceClass * klass)
{
GObjectClass *object_class = G_OBJECT_CLASS (klass);
- g_type_class_add_private (klass, sizeof (DMAPMdnsServicePrivate));
+ g_type_class_add_private (klass, sizeof (DmapMdnsServicePrivate));
object_class->dispose = dmap_mdns_service_dispose;
object_class->finalize = dmap_mdns_service_finalize;
@@ -217,7 +217,7 @@ dmap_mdns_service_class_init (DMAPMdnsServiceClass * klass)
}
static void
-dmap_mdns_service_init (DMAPMdnsService * service)
+dmap_mdns_service_init (DmapMdnsService * service)
{
service->priv = DMAP_MDNS_SERVICE_GET_PRIVATE (service);
}
@@ -231,7 +231,7 @@ dmap_mdns_service_dispose (GObject * object)
static void
dmap_mdns_service_finalize (GObject * object)
{
- DMAPMdnsService *service = DMAP_MDNS_SERVICE (object);
+ DmapMdnsService *service = DMAP_MDNS_SERVICE (object);
g_signal_handlers_destroy (object);
diff --git a/libdmapsharing/dmap-mdns-service.h b/libdmapsharing/dmap-mdns-service.h
index 89a08cb..920cea0 100644
--- a/libdmapsharing/dmap-mdns-service.h
+++ b/libdmapsharing/dmap-mdns-service.h
@@ -26,25 +26,25 @@ G_BEGIN_DECLS
/**
* DMAP_TYPE_MDNS_SERVICE:
*
- * The type for #DMAPMdnsService.
+ * The type for #DmapMdnsService.
*/
#define DMAP_TYPE_MDNS_SERVICE (dmap_mdns_service_get_type ())
/**
* DMAP_MDNS_SERVICE:
* @o: Object which is subject to casting.
*
- * Casts a #DMAPMdnsService or derived pointer into a (DMAPMdnsService *) pointer.
+ * Casts a #DmapMdnsService or derived pointer into a (DmapMdnsService *) pointer.
* Depending on the current debugging level, this function may invoke
* certain runtime checks to identify invalid casts.
*/
-#define DMAP_MDNS_SERVICE(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), DMAP_TYPE_MDNS_SERVICE,
DMAPMdnsService))
+#define DMAP_MDNS_SERVICE(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), DMAP_TYPE_MDNS_SERVICE,
DmapMdnsService))
/**
* DMAP_MDNS_SERVICE_CLASS:
- * @k: a valid #DMAPMdnsServiceClass
+ * @k: a valid #DmapMdnsServiceClass
*
- * Casts a derived #DMAPMdnsServiceClass structure into a #DMAPMdnsServiceClass structure.
+ * Casts a derived #DmapMdnsServiceClass structure into a #DmapMdnsServiceClass structure.
*/
-#define DMAP_MDNS_SERVICE_CLASS(k) (G_TYPE_CHECK_CLASS_CAST((k), DMAP_TYPE_MDNS_SERVICE,
DMAPMdnsServiceClass))
+#define DMAP_MDNS_SERVICE_CLASS(k) (G_TYPE_CHECK_CLASS_CAST((k), DMAP_TYPE_MDNS_SERVICE,
DmapMdnsServiceClass))
/**
* IS_DMAP_MDNS_SERVICE:
* @o: Instance to check for being a %DMAP_TYPE_MDNS_SERVICE.
@@ -54,28 +54,28 @@ G_BEGIN_DECLS
#define IS_DMAP_MDNS_SERVICE(o) (G_TYPE_CHECK_INSTANCE_TYPE ((o), DMAP_TYPE_MDNS_SERVICE))
/**
* IS_DMAP_MDNS_SERVICE_CLASS:
- * @k: a #DMAPMdnsServiceClass
+ * @k: a #DmapMdnsServiceClass
*
- * Checks whether @k "is a" valid #DMAPMdnsServiceClass structure of type
+ * Checks whether @k "is a" valid #DmapMdnsServiceClass structure of type
* %DMAP_MDNS_SERVICE or derived.
*/
#define IS_DMAP_MDNS_SERVICE_CLASS(k) (G_TYPE_CHECK_CLASS_TYPE ((k), DMAP_TYPE_MDNS_SERVICE))
/**
* DMAP_MDNS_SERVICE_GET_CLASS:
- * @o: a #DMAPMdnsService instance.
+ * @o: a #DmapMdnsService instance.
*
- * Get the class structure associated to a #DMAPMdnsService instance.
+ * Get the class structure associated to a #DmapMdnsService instance.
*
* Returns: pointer to object class structure.
*/
-#define DMAP_MDNS_SERVICE_GET_CLASS(o) (G_TYPE_INSTANCE_GET_CLASS ((o), DMAP_TYPE_MDNS_SERVICE,
DMAPMdnsServiceClass))
-typedef struct _DMAPMdnsService DMAPMdnsService;
-typedef struct _DMAPMdnsServiceClass DMAPMdnsServiceClass;
-typedef struct _DMAPMdnsServicePrivate DMAPMdnsServicePrivate;
-typedef struct _DMAPMdnsServiceService DMAPMdnsServiceService;
+#define DMAP_MDNS_SERVICE_GET_CLASS(o) (G_TYPE_INSTANCE_GET_CLASS ((o), DMAP_TYPE_MDNS_SERVICE,
DmapMdnsServiceClass))
+typedef struct _DmapMdnsService DmapMdnsService;
+typedef struct _DmapMdnsServiceClass DmapMdnsServiceClass;
+typedef struct _DmapMdnsServicePrivate DmapMdnsServicePrivate;
+typedef struct _DmapMdnsServiceService DmapMdnsServiceService;
/**
- * DMAPMdnsServiceType:
+ * DmapMdnsServiceType:
* @DMAP_MDNS_SERVICE_TYPE_INVALID: an invalid service type
* @DMAP_MDNS_SERVICE_TYPE_DAAP: a DAAP service type
* @DMAP_MDNS_SERVICE_TYPE_DPAP: a DPAP service type
@@ -94,7 +94,7 @@ typedef enum
DMAP_MDNS_SERVICE_TYPE_DACP,
DMAP_MDNS_SERVICE_TYPE_RAOP,
DMAP_MDNS_SERVICE_TYPE_LAST = DMAP_MDNS_SERVICE_TYPE_RAOP
-} DMAPMdnsServiceType;
+} DmapMdnsServiceType;
// FIXME: this is only for RAOP and corresponds to the "tp" txt record.
// This should be in a sub-class.
@@ -103,7 +103,7 @@ typedef enum
DMAP_MDNS_SERVICE_TRANSPORT_PROTOCOL_TCP = 0,
DMAP_MDNS_SERVICE_TRANSPORT_PROTOCOL_UDP,
DMAP_MDNS_SERVICE_TRANSPORT_PROTOCOL_LAST = DMAP_MDNS_SERVICE_TRANSPORT_PROTOCOL_UDP
-} DMAPMdnsServiceTransportProtocol;
+} DmapMdnsServiceTransportProtocol;
static const char * const service_type_name[] = {
NULL,
@@ -113,16 +113,16 @@ static const char * const service_type_name[] = {
"_raop._tcp"
};
-struct _DMAPMdnsServiceClass
+struct _DmapMdnsServiceClass
{
GObjectClass parent_class;
};
-struct _DMAPMdnsService
+struct _DmapMdnsService
{
GObject object;
- DMAPMdnsServicePrivate *priv;
+ DmapMdnsServicePrivate *priv;
};
GType dmap_mdns_service_get_type (void);
diff --git a/libdmapsharing/dmap-record-factory.c b/libdmapsharing/dmap-record-factory.c
index a3d1d83..f603cf8 100644
--- a/libdmapsharing/dmap-record-factory.c
+++ b/libdmapsharing/dmap-record-factory.c
@@ -1,5 +1,5 @@
/*
- * Database interface for a DMAPRecord Factory
+ * Database interface for a DmapRecord Factory
*
* Copyright (C) 2008 W. Michael Petullo <mike flyn org>
*
@@ -21,14 +21,14 @@
#include <libdmapsharing/dmap-record-factory.h>
static void
-dmap_record_factory_default_init (DMAPRecordFactoryInterface * iface)
+dmap_record_factory_default_init (DmapRecordFactoryInterface * iface)
{
}
-G_DEFINE_INTERFACE(DMAPRecordFactory, dmap_record_factory, G_TYPE_OBJECT)
+G_DEFINE_INTERFACE(DmapRecordFactory, dmap_record_factory, G_TYPE_OBJECT)
-DMAPRecord *
-dmap_record_factory_create (DMAPRecordFactory * factory, gpointer user_data)
+DmapRecord *
+dmap_record_factory_create (DmapRecordFactory * factory, gpointer user_data)
{
return DMAP_RECORD_FACTORY_GET_INTERFACE (factory)->create (factory,
user_data);
diff --git a/libdmapsharing/dmap-record-factory.h b/libdmapsharing/dmap-record-factory.h
index e9d4309..4e1de37 100644
--- a/libdmapsharing/dmap-record-factory.h
+++ b/libdmapsharing/dmap-record-factory.h
@@ -1,5 +1,5 @@
/*
- * Database interface for a DMAPRecord factory
+ * Database interface for a DmapRecord factory
*
* Copyright (C) 2008 W. Michael Petullo <mike flyn org>
*
@@ -29,19 +29,19 @@ G_BEGIN_DECLS
/**
* DMAP_TYPE_RECORD_FACTORY:
*
- * The type for #DMAPRecordFactory.
+ * The type for #DmapRecordFactory.
*/
#define DMAP_TYPE_RECORD_FACTORY (dmap_record_factory_get_type ())
/**
* DMAP_RECORD_FACTORY:
* @o: Object which is subject to casting.
*
- * Casts a #DMAPRecordFactory or derived pointer into a (DMAPRecordFactory *)
+ * Casts a #DmapRecordFactory or derived pointer into a (DmapRecordFactory *)
* pointer. Depending on the current debugging level, this function may invoke
* certain runtime checks to identify invalid casts.
*/
#define DMAP_RECORD_FACTORY(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), \
- DMAP_TYPE_RECORD_FACTORY, DMAPRecordFactory))
+ DMAP_TYPE_RECORD_FACTORY, DmapRecordFactory))
/**
* IS_DMAP_RECORD_FACTORY:
* @o: Instance to check for being a %DMAP_TYPE_RECORD_FACTORY.
@@ -53,24 +53,24 @@ G_BEGIN_DECLS
DMAP_TYPE_RECORD_FACTORY))
/**
* DMAP_RECORD_FACTORY_GET_INTERFACE:
- * @o: a #DMAPRecordFactory instance.
+ * @o: a #DmapRecordFactory instance.
*
- * Get the interface structure associated to a #DMAPRecordFactory instance.
+ * Get the interface structure associated to a #DmapRecordFactory instance.
*
* Returns: pointer to object interface structure.
*/
#define DMAP_RECORD_FACTORY_GET_INTERFACE(o) \
(G_TYPE_INSTANCE_GET_INTERFACE ((o), \
DMAP_TYPE_RECORD_FACTORY, \
- DMAPRecordFactoryInterface))
-typedef struct _DMAPRecordFactory DMAPRecordFactory;
-typedef struct _DMAPRecordFactoryInterface DMAPRecordFactoryInterface;
+ DmapRecordFactoryInterface))
+typedef struct _DmapRecordFactory DmapRecordFactory;
+typedef struct _DmapRecordFactoryInterface DmapRecordFactoryInterface;
-struct _DMAPRecordFactoryInterface
+struct _DmapRecordFactoryInterface
{
GTypeInterface parent;
- DMAPRecord *(*create) (DMAPRecordFactory * factory,
+ DmapRecord *(*create) (DmapRecordFactory * factory,
gpointer user_data);
};
@@ -78,12 +78,12 @@ GType dmap_record_factory_get_type (void);
/**
* dmap_record_factory_create:
- * @factory: A DMAPRecordFactory.
+ * @factory: A DmapRecordFactory.
* @user_data: Some piece of data that may be used to initialize return value.
*
- * Returns: (transfer full): a new DMAPRecord.
+ * Returns: (transfer full): a new DmapRecord.
*/
-DMAPRecord *dmap_record_factory_create (DMAPRecordFactory * factory,
+DmapRecord *dmap_record_factory_create (DmapRecordFactory * factory,
gpointer user_data);
#endif /* __DMAP_RECORD_FACTORY_H */
diff --git a/libdmapsharing/dmap-record.c b/libdmapsharing/dmap-record.c
index fdaf665..fe2b96d 100644
--- a/libdmapsharing/dmap-record.c
+++ b/libdmapsharing/dmap-record.c
@@ -21,20 +21,20 @@
#include <libdmapsharing/dmap-record.h>
static void
-dmap_record_default_init (DMAPRecordInterface * iface)
+dmap_record_default_init (DmapRecordInterface * iface)
{
}
-G_DEFINE_INTERFACE(DMAPRecord, dmap_record, G_TYPE_OBJECT)
+G_DEFINE_INTERFACE(DmapRecord, dmap_record, G_TYPE_OBJECT)
GArray *
-dmap_record_to_blob (DMAPRecord * record)
+dmap_record_to_blob (DmapRecord * record)
{
return DMAP_RECORD_GET_INTERFACE (record)->to_blob (record);
}
gboolean
-dmap_record_set_from_blob (DMAPRecord * record, GArray * blob)
+dmap_record_set_from_blob (DmapRecord * record, GArray * blob)
{
return DMAP_RECORD_GET_INTERFACE (record)->set_from_blob (record,
blob);
diff --git a/libdmapsharing/dmap-record.h b/libdmapsharing/dmap-record.h
index 5444ce7..7f862b0 100644
--- a/libdmapsharing/dmap-record.h
+++ b/libdmapsharing/dmap-record.h
@@ -27,19 +27,19 @@ G_BEGIN_DECLS
/**
* DMAP_TYPE_RECORD:
*
- * The type for #DMAPRecord.
+ * The type for #DmapRecord.
*/
#define DMAP_TYPE_RECORD (dmap_record_get_type ())
/**
* DMAP_RECORD:
* @o: Object which is subject to casting.
*
- * Casts a #DMAPRecord or derived pointer into a (DMAPRecord *) pointer.
+ * Casts a #DmapRecord or derived pointer into a (DmapRecord *) pointer.
* Depending on the current debugging level, this function may invoke
* certain runtime checks to identify invalid casts.
*/
#define DMAP_RECORD(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), \
- DMAP_TYPE_RECORD, DMAPRecord))
+ DMAP_TYPE_RECORD, DmapRecord))
/**
* IS_DMAP_RECORD:
* @o: Instance to check for being a %DMAP_TYPE_RECORD.
@@ -50,23 +50,23 @@ G_BEGIN_DECLS
DMAP_TYPE_RECORD))
/**
* DMAP_RECORD_GET_INTERFACE:
- * @o: a #DAAPRecord instance.
+ * @o: a #DmapAvRecord instance.
*
- * Get the class structure associated to a #DAAPRecord instance.
+ * Get the class structure associated to a #DmapAvRecord instance.
*
* Returns: pointer to object class structure.
*/
#define DMAP_RECORD_GET_INTERFACE(o) (G_TYPE_INSTANCE_GET_INTERFACE ((o), \
- DMAP_TYPE_RECORD, DMAPRecordInterface))
-typedef struct _DMAPRecord DMAPRecord;
-typedef struct _DMAPRecordInterface DMAPRecordInterface;
+ DMAP_TYPE_RECORD, DmapRecordInterface))
+typedef struct _DmapRecord DmapRecord;
+typedef struct _DmapRecordInterface DmapRecordInterface;
-struct _DMAPRecordInterface
+struct _DmapRecordInterface
{
GTypeInterface parent;
- GArray *(*to_blob) (DMAPRecord * record);
- gboolean (*set_from_blob) (DMAPRecord * record, GArray * blob);
+ GArray *(*to_blob) (DmapRecord * record);
+ gboolean (*set_from_blob) (DmapRecord * record, GArray * blob);
};
typedef unsigned long long bitwise;
@@ -77,17 +77,17 @@ typedef enum
DMAP_MEDIA_KIND_MOVIE = 2,
DMAP_MEDIA_KIND_PODCAST = 32,
DMAP_MEDIA_KIND_TV_SHOW = 64
-} DMAPMediaKind;
+} DmapMediaKind;
GType dmap_record_get_type (void);
/**
* dmap_record_to_blob:
- * @record: A DMAPRecord.
+ * @record: A DmapRecord.
*
* Returns: A byte array representation of the record.
*/
-GArray *dmap_record_to_blob (DMAPRecord * record);
+GArray *dmap_record_to_blob (DmapRecord * record);
/**
* dmap_record_from_blob:
@@ -96,7 +96,7 @@ GArray *dmap_record_to_blob (DMAPRecord * record);
*
* Returns: True on success, else false.
*/
-gboolean dmap_record_set_from_blob (DMAPRecord * record,
+gboolean dmap_record_set_from_blob (DmapRecord * record,
GArray * blob);
#endif /* __DMAP_RECORD_H */
diff --git a/libdmapsharing/dmap-share.c b/libdmapsharing/dmap-share.c
index e738bd0..3002505 100644
--- a/libdmapsharing/dmap-share.c
+++ b/libdmapsharing/dmap-share.c
@@ -53,7 +53,7 @@ enum
PROP_TXT_RECORDS
};
-struct DMAPSharePrivate
+struct DmapSharePrivate
{
gchar *name;
guint port;
@@ -64,20 +64,20 @@ struct DMAPSharePrivate
*/
char *transcode_mimetype;
- DMAPShareAuthMethod auth_method;
+ DmapShareAuthMethod auth_method;
/* mDNS/DNS-SD publishing things */
gboolean server_active;
gboolean published;
- DMAPMdnsPublisher *publisher;
+ DmapMdnsPublisher *publisher;
/* HTTP server things */
SoupServer *server;
guint revision_number;
/* The media database */
- DMAPDb *db;
- DMAPContainerDb *container_db;
+ DmapDb *db;
+ DmapContainerDb *container_db;
/* TXT-RECORDS published by mDNS */
gchar **txt_records;
@@ -86,12 +86,12 @@ struct DMAPSharePrivate
};
typedef void (*ShareBitwiseDestroyFunc) (void *);
-typedef DMAPRecord *(*ShareBitwiseLookupByIdFunc) (void *db, guint id);
+typedef DmapRecord *(*ShareBitwiseLookupByIdFunc) (void *db, guint id);
/* FIXME: name this something else, as it is more than just share/bitwise now */
struct share_bitwise_t
{
- DMAPShare *share;
+ DmapShare *share;
struct MLCL_Bits mb;
GSList *id_list;
guint32 size;
@@ -99,24 +99,24 @@ struct share_bitwise_t
/* FIXME: ick, void * is DMAPDDb * or GHashTable *
* in next two fields:*/
void *db;
- DMAPRecord *(*lookup_by_id) (void *db, guint id);
+ DmapRecord *(*lookup_by_id) (void *db, guint id);
void (*destroy) (void *);
};
-static void dmap_share_init (DMAPShare * share);
-static void dmap_share_class_init (DMAPShareClass * klass);
+static void dmap_share_init (DmapShare * share);
+static void dmap_share_class_init (DmapShareClass * klass);
-G_DEFINE_ABSTRACT_TYPE (DMAPShare, dmap_share, G_TYPE_OBJECT)
+G_DEFINE_ABSTRACT_TYPE (DmapShare, dmap_share, G_TYPE_OBJECT)
#define DMAP_SHARE_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), \
- DMAP_TYPE_SHARE, DMAPSharePrivate));
+ DMAP_TYPE_SHARE, DmapSharePrivate));
static gboolean
_dmap_share_soup_auth_callback (SoupAuthDomain * auth_domain,
SoupMessage * msg,
const char *username,
gpointer password,
- DMAPShare * share)
+ DmapShare * share)
{
gboolean allowed;
const char *path;
@@ -135,7 +135,7 @@ server_info_adapter (SoupServer * server,
SoupMessage * message,
const char *path,
GHashTable * query,
- SoupClientContext * context, DMAPShare * share)
+ SoupClientContext * context, DmapShare * share)
{
DMAP_SHARE_GET_CLASS (share)->server_info (share,
server,
@@ -148,7 +148,7 @@ content_codes_adapter (SoupServer * server,
SoupMessage * message,
const char *path,
GHashTable * query,
- SoupClientContext * context, DMAPShare * share)
+ SoupClientContext * context, DmapShare * share)
{
DMAP_SHARE_GET_CLASS (share)->content_codes (share,
server,
@@ -161,7 +161,7 @@ login_adapter (SoupServer * server,
SoupMessage * message,
const char *path,
GHashTable * query,
- SoupClientContext * context, DMAPShare * share)
+ SoupClientContext * context, DmapShare * share)
{
DMAP_SHARE_GET_CLASS (share)->login (share,
server,
@@ -173,7 +173,7 @@ logout_adapter (SoupServer * server,
SoupMessage * message,
const char *path,
GHashTable * query,
- SoupClientContext * context, DMAPShare * share)
+ SoupClientContext * context, DmapShare * share)
{
DMAP_SHARE_GET_CLASS (share)->logout (share,
server,
@@ -185,7 +185,7 @@ update_adapter (SoupServer * server,
SoupMessage * message,
const char *path,
GHashTable * query,
- SoupClientContext * context, DMAPShare * share)
+ SoupClientContext * context, DmapShare * share)
{
DMAP_SHARE_GET_CLASS (share)->update (share,
server,
@@ -197,7 +197,7 @@ databases_adapter (SoupServer * server,
SoupMessage * message,
const char *path,
GHashTable * query,
- SoupClientContext * context, DMAPShare * share)
+ SoupClientContext * context, DmapShare * share)
{
DMAP_SHARE_GET_CLASS (share)->databases (share,
server,
@@ -210,7 +210,7 @@ ctrl_int_adapter (SoupServer * server,
SoupMessage * message,
const char *path,
GHashTable * query,
- SoupClientContext * context, DMAPShare * share)
+ SoupClientContext * context, DmapShare * share)
{
DMAP_SHARE_GET_CLASS (share)->ctrl_int (share,
server,
@@ -219,7 +219,7 @@ ctrl_int_adapter (SoupServer * server,
}
gboolean
-_dmap_share_server_start (DMAPShare *share)
+_dmap_share_server_start (DmapShare *share)
{
guint desired_port = DMAP_SHARE_GET_CLASS (share)->get_desired_port (share);
gboolean password_required;
@@ -316,7 +316,7 @@ _dmap_share_server_start (DMAPShare *share)
}
static gboolean
-_dmap_share_server_stop (DMAPShare * share)
+_dmap_share_server_stop (DmapShare * share)
{
g_debug ("Stopping music sharing server on port %d",
share->priv->port);
@@ -338,7 +338,7 @@ _dmap_share_server_stop (DMAPShare * share)
}
gboolean
-_dmap_share_publish_start (DMAPShare * share)
+_dmap_share_publish_start (DmapShare * share)
{
GError *error;
gboolean res;
@@ -375,7 +375,7 @@ _dmap_share_publish_start (DMAPShare * share)
}
static gboolean
-_dmap_share_publish_stop (DMAPShare * share)
+_dmap_share_publish_stop (DmapShare * share)
{
if (share->priv->publisher) {
gboolean res;
@@ -399,7 +399,7 @@ _dmap_share_publish_stop (DMAPShare * share)
}
static void
-_dmap_share_restart (DMAPShare * share)
+_dmap_share_restart (DmapShare * share)
{
gboolean res;
@@ -414,7 +414,7 @@ _dmap_share_restart (DMAPShare * share)
}
static void
-_dmap_share_maybe_restart (DMAPShare * share)
+_dmap_share_maybe_restart (DmapShare * share)
{
if (share->priv->published) {
_dmap_share_restart (share);
@@ -422,7 +422,7 @@ _dmap_share_maybe_restart (DMAPShare * share)
}
static void
-_dmap_share_set_name (DMAPShare * share, const char *name)
+_dmap_share_set_name (DmapShare * share, const char *name)
{
GError *error;
@@ -447,7 +447,7 @@ _dmap_share_set_name (DMAPShare * share, const char *name)
}
static void
-_dmap_share_set_password (DMAPShare * share, const char *password)
+_dmap_share_set_password (DmapShare * share, const char *password)
{
g_return_if_fail (share != NULL);
@@ -472,7 +472,7 @@ _dmap_share_set_property (GObject * object,
guint prop_id,
const GValue * value, GParamSpec * pspec)
{
- DMAPShare *share = DMAP_SHARE (object);
+ DmapShare *share = DMAP_SHARE (object);
switch (prop_id) {
case PROP_NAME:
@@ -511,7 +511,7 @@ static void
_dmap_share_get_property (GObject * object,
guint prop_id, GValue * value, GParamSpec * pspec)
{
- DMAPShare *share = DMAP_SHARE (object);
+ DmapShare *share = DMAP_SHARE (object);
switch (prop_id) {
case PROP_SERVER:
@@ -554,7 +554,7 @@ _dmap_share_get_property (GObject * object,
static void
_dmap_share_dispose (GObject * object)
{
- DMAPShare *share = DMAP_SHARE (object);
+ DmapShare *share = DMAP_SHARE (object);
g_clear_object (&share->priv->db);
g_clear_object (&share->priv->container_db);
@@ -567,9 +567,9 @@ _dmap_share_dispose (GObject * object)
static void
_dmap_share_finalize (GObject * object)
{
- DMAPShare *share = DMAP_SHARE (object);
+ DmapShare *share = DMAP_SHARE (object);
- g_debug ("Finalizing DMAPShare");
+ g_debug ("Finalizing DmapShare");
if (share->priv->published) {
_dmap_share_publish_stop (share);
@@ -588,7 +588,7 @@ _dmap_share_finalize (GObject * object)
}
static void
-dmap_share_class_init (DMAPShareClass * klass)
+dmap_share_class_init (DmapShareClass * klass)
{
GObjectClass *object_class = G_OBJECT_CLASS (klass);
@@ -694,25 +694,25 @@ dmap_share_class_init (DMAPShareClass * klass)
G_TYPE_STRV,
G_PARAM_READWRITE));
- g_type_class_add_private (klass, sizeof (DMAPSharePrivate));
+ g_type_class_add_private (klass, sizeof (DmapSharePrivate));
}
static void
-published_adapter (DMAPMdnsPublisher * publisher,
- const char *name, DMAPShare * share)
+published_adapter (DmapMdnsPublisher * publisher,
+ const char *name, DmapShare * share)
{
DMAP_SHARE_GET_CLASS (share)->published (share, publisher, name);
}
static void
-name_collision_adapter (DMAPMdnsPublisher * publisher,
- const char *name, DMAPShare * share)
+name_collision_adapter (DmapMdnsPublisher * publisher,
+ const char *name, DmapShare * share)
{
DMAP_SHARE_GET_CLASS (share)->name_collision (share, publisher, name);
}
static void
-dmap_share_init (DMAPShare * share)
+dmap_share_init (DmapShare * share)
{
share->priv = DMAP_SHARE_GET_PRIVATE (share);
@@ -730,13 +730,13 @@ dmap_share_init (DMAPShare * share)
}
guint
-_dmap_share_get_auth_method (DMAPShare * share)
+_dmap_share_get_auth_method (DmapShare * share)
{
return share->priv->auth_method;
}
guint
-_dmap_share_get_revision_number (DMAPShare * share)
+_dmap_share_get_revision_number (DmapShare * share)
{
return share->priv->revision_number;
}
@@ -782,7 +782,7 @@ _dmap_share_get_revision_number_from_query (GHashTable * query,
}
gboolean
-_dmap_share_session_id_validate (DMAPShare * share,
+_dmap_share_session_id_validate (DmapShare * share,
SoupClientContext * context,
SoupMessage * message,
GHashTable * query, guint32 * id)
@@ -829,7 +829,7 @@ _dmap_share_session_id_validate (DMAPShare * share,
}
static guint32
-session_id_generate (DMAPShare * share, SoupClientContext * context)
+session_id_generate (DmapShare * share, SoupClientContext * context)
{
guint32 id;
@@ -839,7 +839,7 @@ session_id_generate (DMAPShare * share, SoupClientContext * context)
}
guint32
-_dmap_share_session_id_create (DMAPShare * share, SoupClientContext * context)
+_dmap_share_session_id_create (DmapShare * share, SoupClientContext * context)
{
guint32 id;
const char *addr;
@@ -868,14 +868,14 @@ _dmap_share_session_id_create (DMAPShare * share, SoupClientContext * context)
}
void
-_dmap_share_session_id_remove (DMAPShare * share,
+_dmap_share_session_id_remove (DmapShare * share,
SoupClientContext * context, guint32 id)
{
g_hash_table_remove (share->priv->session_ids, GUINT_TO_POINTER (id));
}
void
-_dmap_share_message_set_from_dmap_structure (DMAPShare * share,
+_dmap_share_message_set_from_dmap_structure (DmapShare * share,
SoupMessage * message,
GNode * structure)
{
@@ -931,8 +931,8 @@ _dmap_share_soup_auth_filter (SoupAuthDomain * auth_domain,
}
void
-_dmap_share_published (DMAPShare * share,
- DMAPMdnsPublisher * publisher, const char *name)
+_dmap_share_published (DmapShare * share,
+ DmapMdnsPublisher * publisher, const char *name)
{
if (share->priv->name == NULL || name == NULL) {
return;
@@ -945,8 +945,8 @@ _dmap_share_published (DMAPShare * share,
}
void
-_dmap_share_name_collision (DMAPShare * share,
- DMAPMdnsPublisher * publisher, const char *name)
+_dmap_share_name_collision (DmapShare * share,
+ DmapMdnsPublisher * publisher, const char *name)
{
char *new_name = "FIXME";
@@ -965,7 +965,7 @@ _dmap_share_name_collision (DMAPShare * share,
}
void
-_dmap_share_content_codes (DMAPShare * share,
+_dmap_share_content_codes (DmapShare * share,
SoupServer * server,
SoupMessage * message,
const char *path,
@@ -980,7 +980,7 @@ _dmap_share_content_codes (DMAPShare * share,
* MDCL dictionary
* ...
*/
- const DMAPContentCodeDefinition *defs;
+ const DmapContentCodeDefinition *defs;
guint num_defs = 0;
guint i;
GNode *mccr;
@@ -1010,7 +1010,7 @@ _dmap_share_content_codes (DMAPShare * share,
}
void
-_dmap_share_login (DMAPShare * share,
+_dmap_share_login (DmapShare * share,
SoupServer * server,
SoupMessage * message,
const char *path,
@@ -1036,7 +1036,7 @@ _dmap_share_login (DMAPShare * share,
}
void
-_dmap_share_logout (DMAPShare * share,
+_dmap_share_logout (DmapShare * share,
SoupServer * server,
SoupMessage * message,
const char *path,
@@ -1060,7 +1060,7 @@ _dmap_share_logout (DMAPShare * share,
}
void
-_dmap_share_update (DMAPShare * share,
+_dmap_share_update (DmapShare * share,
SoupServer * server,
SoupMessage * message,
const char *path,
@@ -1101,7 +1101,7 @@ _dmap_share_update (DMAPShare * share,
}
bitwise
-_dmap_share_parse_meta_str (const char *attrs, struct DMAPMetaDataMap *mdm)
+_dmap_share_parse_meta_str (const char *attrs, struct DmapMetaDataMap *mdm)
{
guint i;
bitwise bits = 0;
@@ -1136,7 +1136,7 @@ _dmap_share_parse_meta_str (const char *attrs, struct DMAPMetaDataMap *mdm)
}
bitwise
-_dmap_share_parse_meta (GHashTable * query, struct DMAPMetaDataMap * mdm)
+_dmap_share_parse_meta (GHashTable * query, struct DmapMetaDataMap * mdm)
{
const gchar *attrs;
@@ -1148,7 +1148,7 @@ _dmap_share_parse_meta (GHashTable * query, struct DMAPMetaDataMap * mdm)
}
void
-_dmap_share_add_playlist_to_mlcl (gpointer id, DMAPContainerRecord * record,
+_dmap_share_add_playlist_to_mlcl (gpointer id, DmapContainerRecord * record,
gpointer _mb)
{
/* MLIT listing item
@@ -1165,7 +1165,7 @@ _dmap_share_add_playlist_to_mlcl (gpointer id, DMAPContainerRecord * record,
num_songs = dmap_container_record_get_entry_count (record);
g_object_get (record, "name", &name, NULL);
- /* FIXME: ITEM_ID, etc. is defined in DAAPShare, so I can't use
+ /* FIXME: ITEM_ID, etc. is defined in DmapAvShare, so I can't use
* with _dmap_share_client_requested() here (see add_entry_to_mlcl())
*/
@@ -1225,7 +1225,7 @@ _dmap_share_build_filter (gchar * filterstr)
gboolean negate;
gint parentheses_count;
gint quotes_count;
- DMAPDbFilterDefinition *def;
+ DmapDbFilterDefinition *def;
GSList *list = NULL;
GSList *filter = NULL;
@@ -1349,11 +1349,11 @@ _dmap_share_build_filter (gchar * filterstr)
} else if (value != NULL && *next_char != '!') {
// If we won't accept this character, we are ending a
// query key or value, so we should save them in a new
- // DMAPDbFilterDefinition. If is_value is TRUE, we will still
+ // DmapDbFilterDefinition. If is_value is TRUE, we will still
// parse the query value, so we must keep our def around.
// Otherwise, save it in the list of filters.
if (!def) {
- def = g_new0 (DMAPDbFilterDefinition, 1);
+ def = g_new0 (DmapDbFilterDefinition, 1);
}
if (is_key) {
def->key = value->str;
@@ -1398,8 +1398,8 @@ _dmap_share_build_filter (gchar * filterstr)
for (ptr1 = list; ptr1 != NULL; ptr1 = ptr1->next) {
for (ptr2 = ptr1->data; ptr2 != NULL; ptr2 = ptr2->next) {
g_debug ("%s = %s",
- ((DMAPDbFilterDefinition *) ptr2->data)->key,
- ((DMAPDbFilterDefinition *) ptr2->data)->value);
+ ((DmapDbFilterDefinition *) ptr2->data)->key,
+ ((DmapDbFilterDefinition *) ptr2->data)->value);
}
}
@@ -1413,7 +1413,7 @@ dmap_share_free_filter (GSList * filter)
for (ptr1 = filter; ptr1 != NULL; ptr1 = ptr1->next) {
for (ptr2 = ptr1->data; ptr2 != NULL; ptr2 = ptr2->next) {
- g_free (((DMAPDbFilterDefinition *) ptr2->data)->value);
+ g_free (((DmapDbFilterDefinition *) ptr2->data)->value);
g_free (ptr2->data);
}
}
@@ -1428,7 +1428,7 @@ typedef struct
} GroupInfo;
static void
-group_items (gpointer key, DMAPRecord * record, GHashTable * groups)
+group_items (gpointer key, DmapRecord * record, GHashTable * groups)
{
gchar *album, *artist;
GroupInfo *group_info;
@@ -1469,7 +1469,7 @@ debug_param (gpointer key, gpointer val, gpointer user_data)
}
void
-_dmap_share_ctrl_int (DMAPShare * share,
+_dmap_share_ctrl_int (DmapShare * share,
SoupServer * server,
SoupMessage * message,
const char *path,
@@ -1485,7 +1485,7 @@ _dmap_share_ctrl_int (DMAPShare * share,
static void
accumulate_mlcl_size_and_ids (guint id,
- DMAPRecord * record,
+ DmapRecord * record,
struct share_bitwise_t *share_bitwise)
{
share_bitwise->id_list = g_slist_append (share_bitwise->id_list, GUINT_TO_POINTER (id));
@@ -1529,7 +1529,7 @@ write_next_mlit (SoupMessage * message, struct share_bitwise_t *share_bitwise)
} else {
gchar *data = NULL;
guint length;
- DMAPRecord *record;
+ DmapRecord *record;
struct MLCL_Bits mb = { NULL, 0, NULL };
record = share_bitwise->lookup_by_id (share_bitwise->db,
@@ -1573,7 +1573,7 @@ chunked_message_finished (SoupMessage * message,
g_free (share_bitwise);
}
-DMAPRecord *
+DmapRecord *
g_hash_table_lookup_adapter (GHashTable * ht, guint id)
{
/* NOTE: each time this is called by write_next_mlit(), the
@@ -1584,7 +1584,7 @@ g_hash_table_lookup_adapter (GHashTable * ht, guint id)
}
void
-_dmap_share_databases (DMAPShare * share,
+_dmap_share_databases (DmapShare * share,
SoupServer * server,
SoupMessage * message,
const char *path,
@@ -1749,7 +1749,7 @@ _dmap_share_databases (DMAPShare * share,
GNode *adbs;
gchar *record_query;
GHashTable *records = NULL;
- struct DMAPMetaDataMap *map;
+ struct DmapMetaDataMap *map;
gint32 num_songs;
struct MLCL_Bits mb = { NULL, 0, NULL };
struct share_bitwise_t *share_bitwise;
@@ -1808,7 +1808,7 @@ _dmap_share_databases (DMAPShare * share,
share_bitwise->lookup_by_id = (ShareBitwiseLookupByIdFunc) dmap_db_lookup_by_id;
share_bitwise->destroy = NULL;
dmap_db_foreach (share->priv->db,
- (DMAPIdRecordFunc) accumulate_mlcl_size_and_ids,
+ (DmapIdRecordFunc) accumulate_mlcl_size_and_ids,
share_bitwise);
}
@@ -1872,7 +1872,7 @@ _dmap_share_databases (DMAPShare * share,
*/
GNode *aply;
GNode *mlit;
- struct DMAPMetaDataMap *map;
+ struct DmapMetaDataMap *map;
struct MLCL_Bits mb = { NULL, 0, NULL };
map = DMAP_SHARE_GET_CLASS (share)->get_meta_data_map (share);
@@ -1912,7 +1912,7 @@ _dmap_share_databases (DMAPShare * share,
dmap_structure_add (mlit, DMAP_CC_ABPL, (gchar) 1);
dmap_container_db_foreach (share->priv->container_db,
- (DMAPIdContainerRecordFunc)
+ (DmapIdContainerRecordFunc)
_dmap_share_add_playlist_to_mlcl,
&mb);
@@ -1935,7 +1935,7 @@ _dmap_share_databases (DMAPShare * share,
* ...
*/
GNode *apso;
- struct DMAPMetaDataMap *map;
+ struct DmapMetaDataMap *map;
struct MLCL_Bits mb = { NULL, 0, NULL };
guint pl_id;
gchar *record_query;
@@ -1978,7 +1978,7 @@ _dmap_share_databases (DMAPShare * share,
if (g_strcmp0 (sort_by, "album") == 0) {
keys = g_list_sort_with_data (keys,
(GCompareDataFunc)
- daap_record_cmp_by_album,
+ dmap_av_record_cmp_by_album,
share->priv->
db);
} else if (sort_by != NULL) {
@@ -2015,8 +2015,8 @@ _dmap_share_databases (DMAPShare * share,
(share)->add_entry_to_mlcl,
&mb);
} else {
- DMAPContainerRecord *record;
- DMAPDb *entries;
+ DmapContainerRecord *record;
+ DmapDb *entries;
guint num_songs;
record = dmap_container_db_lookup_by_id
diff --git a/libdmapsharing/dmap-share.h b/libdmapsharing/dmap-share.h
index f024f43..eb95617 100644
--- a/libdmapsharing/dmap-share.h
+++ b/libdmapsharing/dmap-share.h
@@ -39,27 +39,27 @@ G_BEGIN_DECLS
/**
* DMAP_TYPE_SHARE:
*
- * The type for #DMAPShare.
+ * The type for #DmapShare.
*/
#define DMAP_TYPE_SHARE (dmap_share_get_type ())
/**
* DMAP_SHARE:
* @o: Object which is subject to casting.
*
- * Casts a #DMAPShare or derived pointer into a (DMAPShare*) pointer.
+ * Casts a #DmapShare or derived pointer into a (DmapShare*) pointer.
* Depending on the current debugging level, this function may invoke
* certain runtime checks to identify invalid casts.
*/
#define DMAP_SHARE(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), \
- DMAP_TYPE_SHARE, DMAPShare))
+ DMAP_TYPE_SHARE, DmapShare))
/**
* DMAP_SHARE_CLASS:
- * @k: a valid #DMAPShareClass
+ * @k: a valid #DmapShareClass
*
- * Casts a derived #DMAPShareClass structure into a #DMAPShareClass structure.
+ * Casts a derived #DmapShareClass structure into a #DmapShareClass structure.
*/
#define DMAP_SHARE_CLASS(k) (G_TYPE_CHECK_CLASS_CAST((k), \
- DMAP_TYPE_SHARE, DMAPShareClass))
+ DMAP_TYPE_SHARE, DmapShareClass))
/**
* IS_DMAP_SHARE:
* @o: Instance to check for being a %DMAP_TYPE_SHARE.
@@ -70,59 +70,59 @@ G_BEGIN_DECLS
DMAP_TYPE_SHARE))
/**
* IS_DMAP_SHARE_CLASS:
- * @k: a #DMAPShareClass
+ * @k: a #DmapShareClass
*
- * Checks whether @k "is a" valid #DMAPShareClass structure of type
+ * Checks whether @k "is a" valid #DmapShareClass structure of type
* %DMAP_SHARE or derived.
*/
#define IS_DMAP_SHARE_CLASS(k) (G_TYPE_CHECK_CLASS_TYPE ((k), \
DMAP_TYPE_SHARE))
/**
* DMAP_SHARE_GET_CLASS:
- * @o: a #DMAPShare instance.
+ * @o: a #DmapShare instance.
*
- * Get the class structure associated to a #DMAPShare instance.
+ * Get the class structure associated to a #DmapShare instance.
*
* Returns: pointer to object class structure.
*/
#define DMAP_SHARE_GET_CLASS(o) (G_TYPE_INSTANCE_GET_CLASS ((o), \
- DMAP_TYPE_SHARE, DMAPShareClass))
+ DMAP_TYPE_SHARE, DmapShareClass))
#define DMAP_STATUS_OK 200
-typedef struct DMAPSharePrivate DMAPSharePrivate;
+typedef struct DmapSharePrivate DmapSharePrivate;
typedef struct
{
GObject parent;
- DMAPSharePrivate *priv;
-} DMAPShare;
+ DmapSharePrivate *priv;
+} DmapShare;
-typedef struct DMAPMetaDataMap DMAPMetaDataMap;
+typedef struct DmapMetaDataMap DmapMetaDataMap;
typedef enum
{
DMAP_SHARE_AUTH_METHOD_NONE = 0,
DMAP_SHARE_AUTH_METHOD_NAME_AND_PASSWORD = 1,
DMAP_SHARE_AUTH_METHOD_PASSWORD = 2
-} DMAPShareAuthMethod;
+} DmapShareAuthMethod;
typedef struct
{
GObjectClass parent;
/* Pure virtual methods: */
- guint (*get_desired_port) (DMAPShare * share);
- const char *(*get_type_of_service) (DMAPShare * share);
- void (*message_add_standard_headers) (DMAPShare * share,
+ guint (*get_desired_port) (DmapShare * share);
+ const char *(*get_type_of_service) (DmapShare * share);
+ void (*message_add_standard_headers) (DmapShare * share,
SoupMessage * msg);
- struct DMAPMetaDataMap *(*get_meta_data_map) (DMAPShare * share);
- void (*add_entry_to_mlcl) (guint id, DMAPRecord * record, gpointer mb);
- void (*databases_browse_xxx) (DMAPShare * share,
+ struct DmapMetaDataMap *(*get_meta_data_map) (DmapShare * share);
+ void (*add_entry_to_mlcl) (guint id, DmapRecord * record, gpointer mb);
+ void (*databases_browse_xxx) (DmapShare * share,
SoupServer * server,
SoupMessage * msg,
const char *path,
GHashTable * query,
SoupClientContext * context);
- void (*databases_items_xxx) (DMAPShare * share,
+ void (*databases_items_xxx) (DmapShare * share,
SoupServer * server,
SoupMessage * msg,
const char *path,
@@ -130,47 +130,47 @@ typedef struct
SoupClientContext * context);
/* Pure virtual methods: libsoup callbacks */
- void (*server_info) (DMAPShare * share, SoupServer * server,
+ void (*server_info) (DmapShare * share, SoupServer * server,
SoupMessage * message, const char *path,
GHashTable * query, SoupClientContext * ctx);
- void (*content_codes) (DMAPShare * share, SoupServer * server,
+ void (*content_codes) (DmapShare * share, SoupServer * server,
SoupMessage * message, const char *path,
GHashTable * query, SoupClientContext * ctx);
- void (*login) (DMAPShare * share, SoupServer * server,
+ void (*login) (DmapShare * share, SoupServer * server,
SoupMessage * message, const char *path,
GHashTable * query, SoupClientContext * ctx);
- void (*logout) (DMAPShare * share, SoupServer * server,
+ void (*logout) (DmapShare * share, SoupServer * server,
SoupMessage * message, const char *path,
GHashTable * query, SoupClientContext * ctx);
- void (*update) (DMAPShare * share, SoupServer * server,
+ void (*update) (DmapShare * share, SoupServer * server,
SoupMessage * message, const char *path,
GHashTable * query, SoupClientContext * ctx);
- void (*ctrl_int) (DMAPShare * share, SoupServer * server,
+ void (*ctrl_int) (DmapShare * share, SoupServer * server,
SoupMessage * message, const char *path,
GHashTable * query, SoupClientContext * ctx);
/* Virtual methods: MDNS callbacks */
- void (*published) (DMAPShare * share,
- DMAPMdnsPublisher * publisher, const char *name);
+ void (*published) (DmapShare * share,
+ DmapMdnsPublisher * publisher, const char *name);
- void (*name_collision) (DMAPShare * share,
- DMAPMdnsPublisher * publisher,
+ void (*name_collision) (DmapShare * share,
+ DmapMdnsPublisher * publisher,
const char *name);
/* Virtual methods: */
- void (*databases) (DMAPShare * share,
+ void (*databases) (DmapShare * share,
SoupServer * server,
SoupMessage * message,
const char *path,
GHashTable * query, SoupClientContext * context);
-} DMAPShareClass;
+} DmapShareClass;
-struct DMAPMetaDataMap
+struct DmapMetaDataMap
{
gchar *tag;
guint md;
@@ -184,28 +184,28 @@ struct MLCL_Bits
{
GNode *mlcl;
bitwise bits;
- DMAPShare *share;
+ DmapShare *share;
};
GType dmap_share_get_type (void);
/* Non-virtual methods */
-guint _dmap_share_get_auth_method (DMAPShare * share);
+guint _dmap_share_get_auth_method (DmapShare * share);
-guint _dmap_share_get_revision_number (DMAPShare * share);
+guint _dmap_share_get_revision_number (DmapShare * share);
gboolean _dmap_share_get_revision_number_from_query (GHashTable * query,
guint * number);
-gboolean _dmap_share_session_id_validate (DMAPShare * share,
+gboolean _dmap_share_session_id_validate (DmapShare * share,
SoupClientContext * context,
SoupMessage * msg,
GHashTable * query, guint32 * id);
-guint32 _dmap_share_session_id_create (DMAPShare * share,
+guint32 _dmap_share_session_id_create (DmapShare * share,
SoupClientContext * ctx);
-void _dmap_share_session_id_remove (DMAPShare * share,
+void _dmap_share_session_id_remove (DmapShare * share,
SoupClientContext * ctx, guint32 id);
gboolean _dmap_share_client_requested (bitwise bits, gint field);
@@ -215,22 +215,22 @@ gboolean _dmap_share_uri_is_local (const char *text_uri);
gboolean _dmap_share_soup_auth_filter (SoupAuthDomain * auth_domain,
SoupMessage * msg, gpointer user_data);
-gboolean _dmap_share_server_start (DMAPShare * share);
+gboolean _dmap_share_server_start (DmapShare * share);
-gboolean _dmap_share_publish_start (DMAPShare * share);
+gboolean _dmap_share_publish_start (DmapShare * share);
-void _dmap_share_message_set_from_dmap_structure (DMAPShare * share,
+void _dmap_share_message_set_from_dmap_structure (DmapShare * share,
SoupMessage * message,
GNode * structure);
bitwise _dmap_share_parse_meta (GHashTable * query,
- struct DMAPMetaDataMap *mdm);
+ struct DmapMetaDataMap *mdm);
bitwise _dmap_share_parse_meta_str (const char *attrs,
- struct DMAPMetaDataMap *mdm);
+ struct DmapMetaDataMap *mdm);
void _dmap_share_add_playlist_to_mlcl (gpointer id,
- DMAPContainerRecord * record,
+ DmapContainerRecord * record,
gpointer mb);
GSList *_dmap_share_build_filter (gchar * filterstr);
@@ -238,50 +238,50 @@ GSList *_dmap_share_build_filter (gchar * filterstr);
void dmap_share_free_filter (GSList * filter);
/* Virtual methods (libsoup callbacks with default implementation): */
-void _dmap_share_content_codes (DMAPShare * share,
+void _dmap_share_content_codes (DmapShare * share,
SoupServer * server,
SoupMessage * message,
const char *path,
GHashTable * query,
SoupClientContext * context);
-void _dmap_share_login (DMAPShare * share,
+void _dmap_share_login (DmapShare * share,
SoupServer * server,
SoupMessage * message,
const char *path,
GHashTable * query, SoupClientContext * context);
-void _dmap_share_logout (DMAPShare * share,
+void _dmap_share_logout (DmapShare * share,
SoupServer * server,
SoupMessage * message,
const char *path,
GHashTable * query, SoupClientContext * context);
-void _dmap_share_update (DMAPShare * share,
+void _dmap_share_update (DmapShare * share,
SoupServer * server,
SoupMessage * message,
const char *path,
GHashTable * query, SoupClientContext * context);
void
-_dmap_share_databases (DMAPShare * share,
+_dmap_share_databases (DmapShare * share,
SoupServer * server,
SoupMessage * message,
const char *path,
GHashTable * query, SoupClientContext * context);
-void _dmap_share_ctrl_int (DMAPShare * share,
+void _dmap_share_ctrl_int (DmapShare * share,
SoupServer * server,
SoupMessage * message,
const char *path,
GHashTable * query, SoupClientContext * context);
/* Virtual methods: MDNS callbacks */
-void _dmap_share_published (DMAPShare * share,
- DMAPMdnsPublisher * publisher, const char *name);
+void _dmap_share_published (DmapShare * share,
+ DmapMdnsPublisher * publisher, const char *name);
-void _dmap_share_name_collision (DMAPShare * share,
- DMAPMdnsPublisher * publisher,
+void _dmap_share_name_collision (DmapShare * share,
+ DmapMdnsPublisher * publisher,
const char *name);
#endif /* __DMAP_SHARE_H */
diff --git a/libdmapsharing/dmap-structure.c b/libdmapsharing/dmap-structure.c
index 8b0382d..2d3dddc 100644
--- a/libdmapsharing/dmap-structure.c
+++ b/libdmapsharing/dmap-structure.c
@@ -33,7 +33,7 @@
( (gint32)(gchar)(ch2) << 16 ) | \
( (gint32)(gchar)(ch3) << 24 ) ))
-static const DMAPContentCodeDefinition cc_defs[] = {
+static const DmapContentCodeDefinition cc_defs[] = {
{DMAP_RAW, 0, "", "", DMAP_TYPE_STRING},
{DMAP_CC_MDCL, MAKE_CONTENT_CODE ('m', 'd', 'c', 'l'),
"dmap.dictionary", "mdcl", DMAP_TYPE_CONTAINER},
@@ -349,17 +349,17 @@ static const DMAPContentCodeDefinition cc_defs[] = {
};
const gchar *
-dmap_content_code_name (DMAPContentCode code)
+dmap_content_code_name (DmapContentCode code)
{
return cc_defs[code - 1].name;
}
-DMAPType
-dmap_content_code_dmap_type (DMAPContentCode code)
+DmapType
+dmap_content_code_dmap_type (DmapContentCode code)
{
- DMAPType type = DMAP_TYPE_INVALID;
+ DmapType type = DMAP_TYPE_INVALID;
- if (code < sizeof cc_defs / sizeof(DMAPContentCodeDefinition)) {
+ if (code < sizeof cc_defs / sizeof(DmapContentCodeDefinition)) {
type = cc_defs[code - 1].type;
} else {
g_warning("Invalid content code: %d\n", code);
@@ -369,13 +369,13 @@ dmap_content_code_dmap_type (DMAPContentCode code)
}
const gchar *
-dmap_content_code_string (DMAPContentCode code)
+dmap_content_code_string (DmapContentCode code)
{
return cc_defs[code - 1].string;
}
static GType
-dmap_content_code_gtype (DMAPContentCode code)
+dmap_content_code_gtype (DmapContentCode code)
{
switch (dmap_content_code_dmap_type (code)) {
case DMAP_TYPE_BYTE:
@@ -403,8 +403,8 @@ dmap_content_code_gtype (DMAPContentCode code)
static gboolean
dmap_structure_node_serialize (GNode * node, GByteArray * array)
{
- DMAPStructureItem *item = node->data;
- DMAPType dmap_type;
+ DmapStructureItem *item = node->data;
+ DmapType dmap_type;
guint32 size = GINT32_TO_BE (item->size);
if (item->content_code != DMAP_RAW) {
@@ -520,7 +520,7 @@ dmap_structure_serialize (GNode * structure, guint * length)
return data;
}
-DMAPContentCode
+DmapContentCode
dmap_content_code_read_from_buffer (const gchar * buf)
{
gint32 c = MAKE_CONTENT_CODE (buf[0], buf[1], buf[2], buf[3]);
@@ -554,20 +554,20 @@ dmap_structure_parse_container_buffer (GNode * parent,
gint l = 0;
while (l < buf_length) {
- DMAPContentCode cc;
+ DmapContentCode cc;
gint codesize = 0;
- DMAPStructureItem *item = NULL;
+ DmapStructureItem *item = NULL;
GNode *node = NULL;
GType gtype;
if (parent
&& parent->parent
- && ((DMAPStructureItem *)parent->parent->data)
- && (DMAP_CC_ABGN == ((DMAPStructureItem *) parent->parent->data)->content_code
- || DMAP_CC_ABAR == ((DMAPStructureItem *) parent->parent->data)->content_code
- || DMAP_CC_ABAL == ((DMAPStructureItem *) parent->parent->data)->content_code)) {
+ && ((DmapStructureItem *)parent->parent->data)
+ && (DMAP_CC_ABGN == ((DmapStructureItem *) parent->parent->data)->content_code
+ || DMAP_CC_ABAR == ((DmapStructureItem *) parent->parent->data)->content_code
+ || DMAP_CC_ABAL == ((DmapStructureItem *) parent->parent->data)->content_code)) {
/* Assume DMAP_RAW, as grandparent is ABGN or similar. */
- item = g_new0 (DMAPStructureItem, 1);
+ item = g_new0 (DmapStructureItem, 1);
item->content_code = DMAP_RAW;
node = g_node_new (item);
g_node_append (parent, node);
@@ -608,7 +608,7 @@ dmap_structure_parse_container_buffer (GNode * parent,
}
l += 4;
- item = g_new0 (DMAPStructureItem, 1);
+ item = g_new0 (DmapStructureItem, 1);
item->content_code = cc;
node = g_node_new (item);
g_node_append (parent, node);
@@ -758,7 +758,7 @@ dmap_structure_parse (const gchar * buf, gint buf_length)
struct NodeFinder
{
- DMAPContentCode code;
+ DmapContentCode code;
GNode *node;
};
@@ -766,7 +766,7 @@ static gboolean
gnode_find_node (GNode * node, gpointer data)
{
struct NodeFinder *finder = (struct NodeFinder *) data;
- DMAPStructureItem *item = node->data;
+ DmapStructureItem *item = node->data;
if (item->content_code == finder->code) {
finder->node = node;
@@ -776,8 +776,8 @@ gnode_find_node (GNode * node, gpointer data)
return FALSE;
}
-DMAPStructureItem *
-dmap_structure_find_item (GNode * structure, DMAPContentCode code)
+DmapStructureItem *
+dmap_structure_find_item (GNode * structure, DmapContentCode code)
{
GNode *node = NULL;
@@ -791,11 +791,11 @@ dmap_structure_find_item (GNode * structure, DMAPContentCode code)
}
GNode *
-dmap_structure_add (GNode * parent, DMAPContentCode cc, ...)
+dmap_structure_add (GNode * parent, DmapContentCode cc, ...)
{
- DMAPType dmap_type;
+ DmapType dmap_type;
GType gtype;
- DMAPStructureItem *item;
+ DmapStructureItem *item;
va_list list;
GNode *node;
gchar *error = NULL;
@@ -805,7 +805,7 @@ dmap_structure_add (GNode * parent, DMAPContentCode cc, ...)
dmap_type = dmap_content_code_dmap_type (cc);
gtype = dmap_content_code_gtype (cc);
- item = g_new0 (DMAPStructureItem, 1);
+ item = g_new0 (DmapStructureItem, 1);
item->content_code = cc;
if (gtype != G_TYPE_NONE) {
@@ -871,7 +871,7 @@ dmap_structure_add (GNode * parent, DMAPContentCode cc, ...)
g_node_append (parent, node);
while (parent) {
- DMAPStructureItem *parent_item = parent->data;
+ DmapStructureItem *parent_item = parent->data;
if (cc == DMAP_RAW)
parent_item->size += item->size;
@@ -886,7 +886,7 @@ dmap_structure_add (GNode * parent, DMAPContentCode cc, ...)
}
GNode *
-dmap_structure_find_node (GNode * structure, DMAPContentCode code)
+dmap_structure_find_node (GNode * structure, DmapContentCode code)
{
struct NodeFinder *finder;
GNode *node = NULL;
@@ -906,9 +906,9 @@ dmap_structure_find_node (GNode * structure, DMAPContentCode code)
}
static void
-dmap_item_free (DMAPStructureItem * item)
+dmap_item_free (DmapStructureItem * item)
{
- DMAPType type = dmap_content_code_dmap_type (item->content_code);
+ DmapType type = dmap_content_code_dmap_type (item->content_code);
if (DMAP_TYPE_INVALID != type && DMAP_TYPE_CONTAINER != type) {
g_value_unset (&(item->content));
@@ -920,7 +920,7 @@ dmap_item_free (DMAPStructureItem * item)
static gboolean
gnode_free_dmap_item (GNode * node, gpointer data)
{
- dmap_item_free ((DMAPStructureItem *) node->data);
+ dmap_item_free ((DmapStructureItem *) node->data);
return FALSE;
}
@@ -938,7 +938,7 @@ dmap_structure_destroy (GNode * structure)
}
}
-const DMAPContentCodeDefinition *
+const DmapContentCodeDefinition *
dmap_content_codes (guint * number)
{
*number = G_N_ELEMENTS (cc_defs);
@@ -963,7 +963,7 @@ dmap_content_code_string_as_int32 (const gchar * str)
static gboolean
print_dmap_item (GNode * node, gpointer data)
{
- DMAPStructureItem *item;
+ DmapStructureItem *item;
const gchar *name;
gchar *value;
gint i;
@@ -1001,7 +1001,7 @@ dmap_structure_print (GNode * structure)
guint
dmap_structure_get_size (GNode * structure)
{
- DMAPStructureItem *item = (DMAPStructureItem *) structure->data;
+ DmapStructureItem *item = (DmapStructureItem *) structure->data;
g_assert (strlen(cc_defs[item->content_code].string) == 4);
g_assert (sizeof(item->size) == 4);
@@ -1012,5 +1012,5 @@ dmap_structure_get_size (GNode * structure)
void
dmap_structure_increase_by_predicted_size (GNode * structure, guint size)
{
- ((DMAPStructureItem *) structure->data)->size += size;
+ ((DmapStructureItem *) structure->data)->size += size;
}
diff --git a/libdmapsharing/dmap-structure.h b/libdmapsharing/dmap-structure.h
index 24a9a95..2b17950 100644
--- a/libdmapsharing/dmap-structure.h
+++ b/libdmapsharing/dmap-structure.h
@@ -194,23 +194,23 @@ G_BEGIN_DECLS typedef enum
DMAP_CC_CAHP,
DMAP_CC_CAIV,
DMAP_CC_CAVC
-} DMAPContentCode;
+} DmapContentCode;
-typedef struct _DMAPStructureItem DMAPStructureItem;
+typedef struct _DmapStructureItem DmapStructureItem;
-struct _DMAPStructureItem
+struct _DmapStructureItem
{
- DMAPContentCode content_code;
+ DmapContentCode content_code;
GValue content;
guint32 size;
};
-GNode *dmap_structure_add (GNode * parent, DMAPContentCode cc, ...);
+GNode *dmap_structure_add (GNode * parent, DmapContentCode cc, ...);
gchar *dmap_structure_serialize (GNode * structure, guint * length);
GNode *dmap_structure_parse (const gchar * buf, gint buf_length);
-DMAPStructureItem *dmap_structure_find_item (GNode * structure,
- DMAPContentCode code);
-GNode *dmap_structure_find_node (GNode * structure, DMAPContentCode code);
+DmapStructureItem *dmap_structure_find_item (GNode * structure,
+ DmapContentCode code);
+GNode *dmap_structure_find_node (GNode * structure, DmapContentCode code);
void dmap_structure_print (GNode * structure);
void dmap_structure_destroy (GNode * structure);
guint dmap_structure_get_size (GNode * structure);
@@ -230,26 +230,26 @@ typedef enum
DMAP_TYPE_CONTAINER = 0x000C,
DMAP_TYPE_POINTER = 0x002A,
DMAP_TYPE_INVALID = 0xFFFF
-} DMAPType;
+} DmapType;
-typedef struct _DMAPContentCodeDefinition DMAPContentCodeDefinition;
+typedef struct _DmapContentCodeDefinition DmapContentCodeDefinition;
-struct _DMAPContentCodeDefinition
+struct _DmapContentCodeDefinition
{
- DMAPContentCode code;
+ DmapContentCode code;
gint32 int_code;
const gchar *name;
const gchar *string;
- DMAPType type;
+ DmapType type;
};
-const DMAPContentCodeDefinition * dmap_content_codes (guint * number);
+const DmapContentCodeDefinition * dmap_content_codes (guint * number);
gint32 dmap_content_code_string_as_int32 (const gchar * str);
-const gchar *dmap_content_code_name (DMAPContentCode code);
-DMAPType dmap_content_code_dmap_type (DMAPContentCode code);
-const gchar *dmap_content_code_string (DMAPContentCode code);
+const gchar *dmap_content_code_name (DmapContentCode code);
+DmapType dmap_content_code_dmap_type (DmapContentCode code);
+const gchar *dmap_content_code_string (DmapContentCode code);
-DMAPContentCode dmap_content_code_read_from_buffer (const gchar * buf);
+DmapContentCode dmap_content_code_read_from_buffer (const gchar * buf);
G_END_DECLS
#endif
diff --git a/libdmapsharing/dmap.h b/libdmapsharing/dmap.h
index 1a8e40e..084b76c 100644
--- a/libdmapsharing/dmap.h
+++ b/libdmapsharing/dmap.h
@@ -1,9 +1,9 @@
#ifndef __DMAP_H
#define __DMAP_H
-#include <libdmapsharing/daap-connection.h>
-#include <libdmapsharing/daap-record.h>
-#include <libdmapsharing/daap-share.h>
+#include <libdmapsharing/dmap-av-connection.h>
+#include <libdmapsharing/dmap-av-record.h>
+#include <libdmapsharing/dmap-av-share.h>
#include <libdmapsharing/dmap-connection.h>
#include <libdmapsharing/dmap-container-db.h>
#include <libdmapsharing/dmap-container-record.h>
@@ -18,11 +18,11 @@
#include <libdmapsharing/dmap-record-factory.h>
#include <libdmapsharing/dmap-share.h>
#include <libdmapsharing/dmap-utils.h>
-#include <libdmapsharing/dpap-connection.h>
-#include <libdmapsharing/dpap-record.h>
-#include <libdmapsharing/dpap-share.h>
-#include <libdmapsharing/dacp-share.h>
-#include <libdmapsharing/dacp-player.h>
-#include <libdmapsharing/dacp-connection.h>
+#include <libdmapsharing/dmap-image-connection.h>
+#include <libdmapsharing/dmap-image-record.h>
+#include <libdmapsharing/dmap-image-share.h>
+#include <libdmapsharing/dmap-control-share.h>
+#include <libdmapsharing/dmap-control-player.h>
+#include <libdmapsharing/dmap-control-connection.h>
#endif /* __DMAP_H */
diff --git a/libdmapsharing/test-dpap-record-factory.c b/libdmapsharing/test-dmap-av-record-factory.c
similarity index 52%
rename from libdmapsharing/test-dpap-record-factory.c
rename to libdmapsharing/test-dmap-av-record-factory.c
index 89123f8..e2010d1 100644
--- a/libdmapsharing/test-dpap-record-factory.c
+++ b/libdmapsharing/test-dmap-av-record-factory.c
@@ -1,5 +1,5 @@
/*
- * DPAPRecord factory class
+ * DmapAvRecord factory class
*
* Copyright (C) 2008 W. Michael Petullo <mike flyn org>
*
@@ -18,45 +18,45 @@
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
*/
-#include "test-dpap-record-factory.h"
-#include "test-dpap-record.h"
+#include "test-dmap-av-record-factory.h"
+#include "test-dmap-av-record.h"
-DMAPRecord *
-test_dpap_record_factory_create (DMAPRecordFactory *factory, gpointer user_data)
+DmapRecord *
+test_dmap_av_record_factory_create (DmapRecordFactory *factory, gpointer user_data)
{
- return DMAP_RECORD (test_dpap_record_new ());
+ return DMAP_RECORD (test_dmap_av_record_new ());
}
static void
-test_dpap_record_factory_init (TestDPAPRecordFactory *factory)
+test_dmap_av_record_factory_init (TestDmapAvRecordFactory *factory)
{
}
static void
-test_dpap_record_factory_class_init (TestDPAPRecordFactoryClass *klass)
+test_dmap_av_record_factory_class_init (TestDmapAvRecordFactoryClass *klass)
{
}
static void
-test_dpap_record_factory_interface_init (gpointer iface, gpointer data)
+test_dmap_av_record_factory_interface_init (gpointer iface, gpointer data)
{
- DMAPRecordFactoryInterface *factory = iface;
+ DmapRecordFactoryInterface *factory = iface;
g_assert (G_TYPE_FROM_INTERFACE (factory) == DMAP_TYPE_RECORD_FACTORY);
- factory->create = test_dpap_record_factory_create;
+ factory->create = test_dmap_av_record_factory_create;
}
-G_DEFINE_TYPE_WITH_CODE (TestDPAPRecordFactory, test_dpap_record_factory, G_TYPE_OBJECT,
+G_DEFINE_TYPE_WITH_CODE (TestDmapAvRecordFactory, test_dmap_av_record_factory, G_TYPE_OBJECT,
G_IMPLEMENT_INTERFACE (DMAP_TYPE_RECORD_FACTORY,
- test_dpap_record_factory_interface_init))
+ test_dmap_av_record_factory_interface_init))
-TestDPAPRecordFactory *
-test_dpap_record_factory_new (void)
+TestDmapAvRecordFactory *
+test_dmap_av_record_factory_new (void)
{
- TestDPAPRecordFactory *factory;
+ TestDmapAvRecordFactory *factory;
- factory = TEST_DPAP_RECORD_FACTORY (g_object_new (TYPE_TEST_DPAP_RECORD_FACTORY, NULL));
+ factory = TEST_DMAP_AV_RECORD_FACTORY (g_object_new (TYPE_TEST_DMAP_AV_RECORD_FACTORY, NULL));
return factory;
}
diff --git a/libdmapsharing/test-dmap-av-record-factory.h b/libdmapsharing/test-dmap-av-record-factory.h
new file mode 100644
index 0000000..9180664
--- /dev/null
+++ b/libdmapsharing/test-dmap-av-record-factory.h
@@ -0,0 +1,58 @@
+/*
+ * TestDmapAvRecord factory class
+ *
+ * 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 __TEST_DMAP_AV_RECORD_FACTORY
+#define __TEST_DMAP_AV_RECORD_FACTORY
+
+#include <libdmapsharing/dmap.h>
+
+G_BEGIN_DECLS
+
+#define TYPE_TEST_DMAP_AV_RECORD_FACTORY (test_dmap_av_record_factory_get_type ())
+#define TEST_DMAP_AV_RECORD_FACTORY(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), \
+ TYPE_TEST_DMAP_AV_RECORD_FACTORY, TestDmapAvRecordFactory))
+#define TEST_DMAP_AV_RECORD_FACTORY_CLASS(k) (G_TYPE_CHECK_CLASS_CAST((k), \
+ TYPE_TEST_DMAP_AV_RECORD_FACTORY,
TestDmapAvRecordFactoryClass))
+#define IS_TEST_DMAP_AV_RECORD_FACTORY(o) (G_TYPE_CHECK_INSTANCE_TYPE ((o), \
+ TYPE_TEST_DMAP_AV_RECORD_FACTORY))
+#define IS_TEST_DMAP_AV_RECORD_FACTORY_CLASS(k) (G_TYPE_CHECK_CLASS_TYPE ((k), \
+ TYPE_TEST_DMAP_AV_RECORD_FACTORY_CLASS))
+#define TEST_DMAP_AV_RECORD_FACTORY_GET_CLASS(o) (G_TYPE_INSTANCE_GET_CLASS ((o), \
+ TYPE_TEST_DMAP_AV_RECORD_FACTORY,
TestDmapAvRecordFactoryClass))
+
+typedef struct TestDmapAvRecordFactoryPrivate TestDmapAvRecordFactoryPrivate;
+
+typedef struct {
+ GObject parent;
+} TestDmapAvRecordFactory;
+
+typedef struct {
+ GObjectClass parent;
+} TestDmapAvRecordFactoryClass;
+
+GType test_dmap_av_record_factory_get_type (void);
+
+TestDmapAvRecordFactory *test_dmap_av_record_factory_new (void);
+
+DmapRecord *test_dmap_av_record_factory_create (DmapRecordFactory *factory, gpointer user_data);
+
+#endif /* __TEST_DMAP_AV_RECORD_FACTORY */
+
+G_END_DECLS
diff --git a/libdmapsharing/test-daap-record.c b/libdmapsharing/test-dmap-av-record.c
similarity index 85%
rename from libdmapsharing/test-daap-record.c
rename to libdmapsharing/test-dmap-av-record.c
index 028320e..87eb590 100644
--- a/libdmapsharing/test-daap-record.c
+++ b/libdmapsharing/test-dmap-av-record.c
@@ -20,9 +20,9 @@
#include <string.h>
-#include "test-daap-record.h"
+#include "test-dmap-av-record.h"
-struct TestDAAPRecordPrivate {
+struct TestDmapAvRecordPrivate {
gint filesize;
gint rating;
char *location;
@@ -43,7 +43,7 @@ struct TestDAAPRecordPrivate {
gint32 year;
gint8 has_video;
guint64 songalbumid;
- DMAPMediaKind mediakind;
+ DmapMediaKind mediakind;
GArray *hash;
};
@@ -74,12 +74,12 @@ enum {
};
static void
-test_daap_record_set_property (GObject *object,
+test_dmap_av_record_set_property (GObject *object,
guint prop_id,
const GValue *value,
GParamSpec *pspec)
{
- TestDAAPRecord *record = TEST_DAAP_RECORD (object);
+ TestDmapAvRecord *record = TEST_DMAP_AV_RECORD (object);
switch (prop_id) {
case PROP_LOCATION:
@@ -167,12 +167,12 @@ test_daap_record_set_property (GObject *object,
}
static void
-test_daap_record_get_property (GObject *object,
+test_dmap_av_record_get_property (GObject *object,
guint prop_id,
GValue *value,
GParamSpec *pspec)
{
- TestDAAPRecord *record = TEST_DAAP_RECORD (object);
+ TestDmapAvRecord *record = TEST_DMAP_AV_RECORD (object);
switch (prop_id) {
case PROP_LOCATION:
@@ -244,9 +244,9 @@ test_daap_record_get_property (GObject *object,
}
}
-gboolean test_daap_record_itunes_compat (DAAPRecord *record)
+gboolean test_dmap_av_record_itunes_compat (DmapAvRecord *record)
{
- const gchar *format = TEST_DAAP_RECORD (record)->priv->format;
+ const gchar *format = TEST_DMAP_AV_RECORD (record)->priv->format;
if (! strcmp (format, "mp3")) {
return TRUE;
@@ -255,12 +255,12 @@ gboolean test_daap_record_itunes_compat (DAAPRecord *record)
}
}
-GInputStream *test_daap_record_read (DAAPRecord *record, GError **error)
+GInputStream *test_dmap_av_record_read (DmapAvRecord *record, GError **error)
{
GFile *file;
GInputStream *stream;
- file = g_file_new_for_uri (TEST_DAAP_RECORD (record)->priv->location);
+ file = g_file_new_for_uri (TEST_DMAP_AV_RECORD (record)->priv->location);
stream = G_INPUT_STREAM (g_file_read (file, NULL, error));
g_object_unref (file);
@@ -269,23 +269,23 @@ GInputStream *test_daap_record_read (DAAPRecord *record, GError **error)
}
static void
-test_daap_record_init (TestDAAPRecord *record)
+test_dmap_av_record_init (TestDmapAvRecord *record)
{
- record->priv = TEST_DAAP_RECORD_GET_PRIVATE (record);
+ record->priv = TEST_DMAP_AV_RECORD_GET_PRIVATE (record);
}
-static void test_daap_record_finalize (GObject *object);
+static void test_dmap_av_record_finalize (GObject *object);
static void
-test_daap_record_class_init (TestDAAPRecordClass *klass)
+test_dmap_av_record_class_init (TestDmapAvRecordClass *klass)
{
GObjectClass *gobject_class = G_OBJECT_CLASS (klass);
- g_type_class_add_private (klass, sizeof (TestDAAPRecordPrivate));
+ g_type_class_add_private (klass, sizeof (TestDmapAvRecordPrivate));
- gobject_class->set_property = test_daap_record_set_property;
- gobject_class->get_property = test_daap_record_get_property;
- gobject_class->finalize = test_daap_record_finalize;
+ gobject_class->set_property = test_dmap_av_record_set_property;
+ gobject_class->get_property = test_dmap_av_record_get_property;
+ gobject_class->finalize = test_dmap_av_record_finalize;
g_object_class_override_property (gobject_class, PROP_LOCATION, "location");
g_object_class_override_property (gobject_class, PROP_TITLE, "title");
@@ -318,32 +318,32 @@ test_daap_record_class_init (TestDAAPRecordClass *klass)
}
static void
-test_daap_record_daap_iface_init (gpointer iface, gpointer data)
+test_dmap_av_record_daap_iface_init (gpointer iface, gpointer data)
{
- DAAPRecordInterface *daap_record = iface;
+ DmapAvRecordInterface *dmap_av_record = iface;
- g_assert (G_TYPE_FROM_INTERFACE (daap_record) == DAAP_TYPE_RECORD);
+ g_assert (G_TYPE_FROM_INTERFACE (dmap_av_record) == DMAP_TYPE_AV_RECORD);
- daap_record->itunes_compat = test_daap_record_itunes_compat;
- daap_record->read = test_daap_record_read;
+ dmap_av_record->itunes_compat = test_dmap_av_record_itunes_compat;
+ dmap_av_record->read = test_dmap_av_record_read;
}
static void
-test_daap_record_dmap_iface_init (gpointer iface, gpointer data)
+test_dmap_av_record_dmap_iface_init (gpointer iface, gpointer data)
{
- DMAPRecordInterface *dmap_record = iface;
+ DmapRecordInterface *dmap_record = iface;
g_assert (G_TYPE_FROM_INTERFACE (dmap_record) == DMAP_TYPE_RECORD);
}
-G_DEFINE_TYPE_WITH_CODE (TestDAAPRecord, test_daap_record, G_TYPE_OBJECT,
- G_IMPLEMENT_INTERFACE (DAAP_TYPE_RECORD, test_daap_record_daap_iface_init)
- G_IMPLEMENT_INTERFACE (DMAP_TYPE_RECORD, test_daap_record_dmap_iface_init))
+G_DEFINE_TYPE_WITH_CODE (TestDmapAvRecord, test_dmap_av_record, G_TYPE_OBJECT,
+ G_IMPLEMENT_INTERFACE (DMAP_TYPE_AV_RECORD, test_dmap_av_record_daap_iface_init)
+ G_IMPLEMENT_INTERFACE (DMAP_TYPE_RECORD, test_dmap_av_record_dmap_iface_init))
static void
-test_daap_record_finalize (GObject *object)
+test_dmap_av_record_finalize (GObject *object)
{
- TestDAAPRecord *record = TEST_DAAP_RECORD (object);
+ TestDmapAvRecord *record = TEST_DMAP_AV_RECORD (object);
g_free (record->priv->location);
g_free (record->priv->title);
@@ -359,16 +359,16 @@ test_daap_record_finalize (GObject *object)
g_array_unref(record->priv->hash);
}
- G_OBJECT_CLASS (test_daap_record_parent_class)->finalize (object);
+ G_OBJECT_CLASS (test_dmap_av_record_parent_class)->finalize (object);
}
-TestDAAPRecord *test_daap_record_new (void)
+TestDmapAvRecord *test_dmap_av_record_new (void)
{
gchar *ext, *dir;
- TestDAAPRecord *record;
+ TestDmapAvRecord *record;
- record = TEST_DAAP_RECORD (g_object_new (TYPE_TEST_DAAP_RECORD, NULL));
+ record = TEST_DMAP_AV_RECORD (g_object_new (TYPE_TEST_DMAP_AV_RECORD, NULL));
dir = g_get_current_dir ();
record->priv->location = g_strdup_printf ("file://%s/media/test.mp3", dir);
diff --git a/libdmapsharing/test-dmap-av-record.h b/libdmapsharing/test-dmap-av-record.h
new file mode 100644
index 0000000..fca7dd1
--- /dev/null
+++ b/libdmapsharing/test-dmap-av-record.h
@@ -0,0 +1,64 @@
+/*
+ * Database record 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 __TEST_DMAP_AV_RECORD
+#define __TEST_DMAP_AV_RECORD
+
+#include <libdmapsharing/dmap.h>
+
+G_BEGIN_DECLS
+
+#define TYPE_TEST_DMAP_AV_RECORD (test_dmap_av_record_get_type ())
+#define TEST_DMAP_AV_RECORD(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), \
+ TYPE_TEST_DMAP_AV_RECORD, TestDmapAvRecord))
+#define TEST_DMAP_AV_RECORD_CLASS(k) (G_TYPE_CHECK_CLASS_CAST((k), \
+ TYPE_TEST_DMAP_AV_RECORD, \
+ TestDmapAvRecordClass))
+#define IS_TEST_DMAP_AV_RECORD(o) (G_TYPE_CHECK_INSTANCE_TYPE ((o), \
+ TYPE_TEST_DMAP_AV_RECORD))
+#define IS_TEST_DMAP_AV_RECORD_CLASS (k) (G_TYPE_CHECK_CLASS_TYPE ((k), \
+ TYPE_TEST_DMAP_AV_RECORD_CLASS))
+#define TEST_DMAP_AV_RECORD_GET_CLASS(o) (G_TYPE_INSTANCE_GET_CLASS ((o), \
+ TYPE_TEST_DMAP_AV_RECORD, \
+ TestDmapAvRecordClass))
+#define TEST_DMAP_AV_RECORD_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), \
+ TYPE_TEST_DMAP_AV_RECORD, \
+ TestDmapAvRecordPrivate))
+
+typedef struct TestDmapAvRecordPrivate TestDmapAvRecordPrivate;
+
+typedef struct {
+ GObject parent;
+ TestDmapAvRecordPrivate *priv;
+} TestDmapAvRecord;
+
+typedef struct {
+ GObjectClass parent;
+} TestDmapAvRecordClass;
+
+GType test_dmap_av_record_get_type (void);
+
+TestDmapAvRecord *test_dmap_av_record_new (void);
+
+GInputStream *test_dmap_av_record_read (DmapAvRecord *record, GError **err);
+
+#endif /* __TEST_DMAP_AV_RECORD */
+
+G_END_DECLS
diff --git a/libdmapsharing/test-dmap-container-db.c b/libdmapsharing/test-dmap-container-db.c
index 90a61f4..c351953 100644
--- a/libdmapsharing/test-dmap-container-db.c
+++ b/libdmapsharing/test-dmap-container-db.c
@@ -20,22 +20,22 @@
#include "test-dmap-container-db.h"
-/* This test implementation of the DMAPContainerDb interface allows for one
+/* This test implementation of the DmapContainerDb interface allows for one
* record. Normally, one would befine some data structure to contain
* multiple records.
*/
-static DMAPContainerRecord *record = NULL;
+static DmapContainerRecord *record = NULL;
-static DMAPContainerRecord *
-test_dmap_container_db_lookup_by_id (DMAPContainerDb *db, guint id)
+static DmapContainerRecord *
+test_dmap_container_db_lookup_by_id (DmapContainerDb *db, guint id)
{
/* In reality, lookup the proper record and return it. */
return g_object_ref (record);
}
static void
-test_dmap_container_db_foreach (DMAPContainerDb *db,
- DMAPIdContainerRecordFunc func,
+test_dmap_container_db_foreach (DmapContainerDb *db,
+ DmapIdContainerRecordFunc func,
gpointer data)
{
/* In reality, pull each record from the db and execute func on it. */
@@ -43,26 +43,26 @@ test_dmap_container_db_foreach (DMAPContainerDb *db,
}
static gint64
-test_dmap_container_db_count (DMAPContainerDb *db)
+test_dmap_container_db_count (DmapContainerDb *db)
{
/* In reality, return the record count. */
return 1;
}
static void
-test_dmap_container_db_init (TestDMAPContainerDb *db)
+test_dmap_container_db_init (TestDmapContainerDb *db)
{
}
static void
-test_dmap_container_db_class_init (TestDMAPContainerDbClass *klass)
+test_dmap_container_db_class_init (TestDmapContainerDbClass *klass)
{
}
static void
test_dmap_container_db_interface_init (gpointer iface, gpointer data)
{
- DMAPContainerDbInterface *dmap_container_db = iface;
+ DmapContainerDbInterface *dmap_container_db = iface;
g_assert (G_TYPE_FROM_INTERFACE (dmap_container_db) == DMAP_TYPE_CONTAINER_DB);
@@ -71,14 +71,14 @@ test_dmap_container_db_interface_init (gpointer iface, gpointer data)
dmap_container_db->count = test_dmap_container_db_count;
}
-G_DEFINE_TYPE_WITH_CODE (TestDMAPContainerDb, test_dmap_container_db, G_TYPE_OBJECT,
+G_DEFINE_TYPE_WITH_CODE (TestDmapContainerDb, test_dmap_container_db, G_TYPE_OBJECT,
G_IMPLEMENT_INTERFACE (DMAP_TYPE_CONTAINER_DB,
test_dmap_container_db_interface_init))
-TestDMAPContainerDb *
-test_dmap_container_db_new (DMAPContainerRecord *r)
+TestDmapContainerDb *
+test_dmap_container_db_new (DmapContainerRecord *r)
{
- TestDMAPContainerDb *db;
+ TestDmapContainerDb *db;
db = TEST_DMAP_CONTAINER_DB (g_object_new (TYPE_TEST_DMAP_CONTAINER_DB, NULL));
diff --git a/libdmapsharing/test-dmap-container-db.h b/libdmapsharing/test-dmap-container-db.h
index 6e9b275..e04fb7f 100644
--- a/libdmapsharing/test-dmap-container-db.h
+++ b/libdmapsharing/test-dmap-container-db.h
@@ -27,27 +27,27 @@ G_BEGIN_DECLS
#define TYPE_TEST_DMAP_CONTAINER_DB (test_dmap_container_db_get_type ())
#define TEST_DMAP_CONTAINER_DB(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), \
- TYPE_TEST_DMAP_CONTAINER_DB, TestDMAPContainerDb))
+ TYPE_TEST_DMAP_CONTAINER_DB, TestDmapContainerDb))
#define TEST_DMAP_CONTAINER_DB_CLASS(k) (G_TYPE_CHECK_CLASS_CAST((k), \
- TYPE_TEST_DMAP_CONTAINER_DB, TestDMAPContainerDbClass))
+ TYPE_TEST_DMAP_CONTAINER_DB, TestDmapContainerDbClass))
#define IS_TEST_DMAP_CONTAINER_DB(o) (G_TYPE_CHECK_INSTANCE_TYPE ((o), \
TYPE_TEST_DMAP_CONTAINER_DB))
#define IS_TEST_DMAP_CONTAINER_DB_CLASS (k) (G_TYPE_CHECK_CLASS_TYPE ((k), \
TYPE_TEST_DMAP_CONTAINER_DB_CLASS))
#define TEST_DMAP_CONTAINER_DB_GET_CLASS(o) (G_TYPE_INSTANCE_GET_CLASS ((o), \
- TYPE_TEST_DMAP_CONTAINER_DB, TestDMAPContainerDbClass))
+ TYPE_TEST_DMAP_CONTAINER_DB, TestDmapContainerDbClass))
-typedef struct TestDMAPContainerDbPrivate TestDMAPContainerDbPrivate;
+typedef struct TestDmapContainerDbPrivate TestDmapContainerDbPrivate;
typedef struct {
GObject parent;
-} TestDMAPContainerDb;
+} TestDmapContainerDb;
typedef struct {
GObjectClass parent;
-} TestDMAPContainerDbClass;
+} TestDmapContainerDbClass;
-TestDMAPContainerDb *test_dmap_container_db_new (DMAPContainerRecord *record);
+TestDmapContainerDb *test_dmap_container_db_new (DmapContainerRecord *record);
GType test_dmap_container_db_get_type (void);
diff --git a/libdmapsharing/test-dmap-container-record.c b/libdmapsharing/test-dmap-container-record.c
index 6879e4b..9425c7d 100644
--- a/libdmapsharing/test-dmap-container-record.c
+++ b/libdmapsharing/test-dmap-container-record.c
@@ -25,7 +25,7 @@ enum {
PROP_NAME
};
-static DMAPDb *entries = NULL;
+static DmapDb *entries = NULL;
static void
test_dmap_container_record_set_property (GObject *object,
@@ -61,38 +61,38 @@ test_dmap_container_record_get_property (GObject *object,
guint
-test_dmap_container_record_get_id (DMAPContainerRecord *record)
+test_dmap_container_record_get_id (DmapContainerRecord *record)
{
return 2;
}
void
-test_dmap_container_record_add_entry (DMAPContainerRecord *container_record,
- DMAPRecord *record,
+test_dmap_container_record_add_entry (DmapContainerRecord *container_record,
+ DmapRecord *record,
gint id)
{
}
guint64
-test_dmap_container_record_get_entry_count (DMAPContainerRecord *record)
+test_dmap_container_record_get_entry_count (DmapContainerRecord *record)
{
return 1;
}
-DMAPDb *
-test_dmap_container_record_get_entries (DMAPContainerRecord *record)
+DmapDb *
+test_dmap_container_record_get_entries (DmapContainerRecord *record)
{
return g_object_ref (entries);
}
static void
-test_dmap_container_record_init (TestDMAPContainerRecord *record)
+test_dmap_container_record_init (TestDmapContainerRecord *record)
{
entries = DMAP_DB (test_dmap_db_new ());
}
static void
-test_dmap_container_record_class_init (TestDMAPContainerRecordClass *klass)
+test_dmap_container_record_class_init (TestDmapContainerRecordClass *klass)
{
GObjectClass *gobject_class = G_OBJECT_CLASS (klass);
@@ -105,7 +105,7 @@ test_dmap_container_record_class_init (TestDMAPContainerRecordClass *klass)
static void
test_dmap_container_record_interface_init (gpointer iface, gpointer data)
{
- DMAPContainerRecordInterface *dmap_container_record = iface;
+ DmapContainerRecordInterface *dmap_container_record = iface;
g_assert (G_TYPE_FROM_INTERFACE (dmap_container_record) == DMAP_TYPE_CONTAINER_RECORD);
@@ -115,13 +115,13 @@ test_dmap_container_record_interface_init (gpointer iface, gpointer data)
dmap_container_record->get_entries = test_dmap_container_record_get_entries;
}
-G_DEFINE_TYPE_WITH_CODE (TestDMAPContainerRecord, test_dmap_container_record, G_TYPE_OBJECT,
+G_DEFINE_TYPE_WITH_CODE (TestDmapContainerRecord, test_dmap_container_record, G_TYPE_OBJECT,
G_IMPLEMENT_INTERFACE (DMAP_TYPE_CONTAINER_RECORD,
test_dmap_container_record_interface_init))
-TestDMAPContainerRecord *test_dmap_container_record_new (void)
+TestDmapContainerRecord *test_dmap_container_record_new (void)
{
- TestDMAPContainerRecord *record;
+ TestDmapContainerRecord *record;
record = TEST_DMAP_CONTAINER_RECORD (g_object_new (TYPE_TEST_DMAP_CONTAINER_RECORD, NULL));
diff --git a/libdmapsharing/test-dmap-container-record.h b/libdmapsharing/test-dmap-container-record.h
index 0d5094f..ecd9269 100644
--- a/libdmapsharing/test-dmap-container-record.h
+++ b/libdmapsharing/test-dmap-container-record.h
@@ -28,33 +28,33 @@ G_BEGIN_DECLS
#define TYPE_TEST_DMAP_CONTAINER_RECORD (test_dmap_container_record_get_type ())
#define TEST_DMAP_CONTAINER_RECORD(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), \
- TYPE_TEST_DMAP_CONTAINER_RECORD, TestDMAPContainerRecord))
+ TYPE_TEST_DMAP_CONTAINER_RECORD, TestDmapContainerRecord))
#define TEST_DMAP_CONTAINER_RECORD_CLASS(k) (G_TYPE_CHECK_CLASS_CAST((k), \
TYPE_TEST_DMAP_CONTAINER_RECORD, \
- TestDMAPContainerRecordClass))
+ TestDmapContainerRecordClass))
#define IS_TEST_DMAP_CONTAINER_RECORD(o) (G_TYPE_CHECK_INSTANCE_TYPE ((o), \
TYPE_TEST_DMAP_CONTAINER_RECORD))
#define IS_TEST_DMAP_CONTAINER_RECORD_CLASS (k) (G_TYPE_CHECK_CLASS_TYPE ((k), \
TYPE_TEST_DMAP_CONTAINER_RECORD_CLASS))
#define TEST_DMAP_CONTAINER_RECORD_GET_CLASS(o) (G_TYPE_INSTANCE_GET_CLASS ((o), \
TYPE_TEST_DMAP_CONTAINER_RECORD, \
- TestDMAPContainerRecordClass))
+ TestDmapContainerRecordClass))
-typedef struct TestDMAPContainerRecordPrivate TestDMAPContainerRecordPrivate;
+typedef struct TestDmapContainerRecordPrivate TestDmapContainerRecordPrivate;
typedef struct {
GObject parent;
-} TestDMAPContainerRecord;
+} TestDmapContainerRecord;
typedef struct {
GObjectClass parent;
-} TestDMAPContainerRecordClass;
+} TestDmapContainerRecordClass;
GType test_dmap_container_record_get_type (void);
-TestDMAPContainerRecord *test_dmap_container_record_new (void);
+TestDmapContainerRecord *test_dmap_container_record_new (void);
-guint test_dmap_container_record_get_id (DMAPContainerRecord *record);
+guint test_dmap_container_record_get_id (DmapContainerRecord *record);
#endif /* __TEST_DMAP_CONTAINER_RECORD */
diff --git a/libdmapsharing/test-dmap-db.c b/libdmapsharing/test-dmap-db.c
index 6ec9ba2..193d5d7 100644
--- a/libdmapsharing/test-dmap-db.c
+++ b/libdmapsharing/test-dmap-db.c
@@ -22,36 +22,36 @@
#include "test-dmap-db.h"
-struct TestDMAPDbPrivate {
+struct TestDmapDbPrivate {
GHashTable *db;
guint nextid;
};
-static DMAPRecord *
-test_dmap_db_lookup_by_id (const DMAPDb *db, guint id)
+static DmapRecord *
+test_dmap_db_lookup_by_id (const DmapDb *db, guint id)
{
- DMAPRecord *record;
+ DmapRecord *record;
record = g_hash_table_lookup (TEST_DMAP_DB (db)->priv->db, GUINT_TO_POINTER (id));
g_object_ref (record);
return record;
}
static void
-test_dmap_db_foreach (const DMAPDb *db,
- DMAPIdRecordFunc func,
+test_dmap_db_foreach (const DmapDb *db,
+ DmapIdRecordFunc func,
gpointer data)
{
g_hash_table_foreach (TEST_DMAP_DB (db)->priv->db, (GHFunc) func, data);
}
static gint64
-test_dmap_db_count (const DMAPDb *db)
+test_dmap_db_count (const DmapDb *db)
{
return g_hash_table_size (TEST_DMAP_DB (db)->priv->db);
}
guint
-test_dmap_db_add (DMAPDb *db, DMAPRecord *record)
+test_dmap_db_add (DmapDb *db, DmapRecord *record)
{
guint id;
id = TEST_DMAP_DB (db)->priv->nextid--;
@@ -61,7 +61,7 @@ test_dmap_db_add (DMAPDb *db, DMAPRecord *record)
}
static void
-test_dmap_db_init (TestDMAPDb *db)
+test_dmap_db_init (TestDmapDb *db)
{
db->priv = TEST_DMAP_DB_GET_PRIVATE (db);
db->priv->db = g_hash_table_new (g_direct_hash, g_direct_equal);
@@ -73,15 +73,15 @@ test_dmap_db_init (TestDMAPDb *db)
}
static void
-test_dmap_db_class_init (TestDMAPDbClass *klass)
+test_dmap_db_class_init (TestDmapDbClass *klass)
{
- g_type_class_add_private (klass, sizeof (TestDMAPDbPrivate));
+ g_type_class_add_private (klass, sizeof (TestDmapDbPrivate));
}
static void
test_dmap_db_interface_init (gpointer iface, gpointer data)
{
- DMAPDbInterface *dmap_db = iface;
+ DmapDbInterface *dmap_db = iface;
g_assert (G_TYPE_FROM_INTERFACE (dmap_db) == DMAP_TYPE_DB);
@@ -91,14 +91,14 @@ test_dmap_db_interface_init (gpointer iface, gpointer data)
dmap_db->count = test_dmap_db_count;
}
-G_DEFINE_TYPE_WITH_CODE (TestDMAPDb, test_dmap_db, G_TYPE_OBJECT,
+G_DEFINE_TYPE_WITH_CODE (TestDmapDb, test_dmap_db, G_TYPE_OBJECT,
G_IMPLEMENT_INTERFACE (DMAP_TYPE_DB,
test_dmap_db_interface_init))
-TestDMAPDb *
+TestDmapDb *
test_dmap_db_new (void)
{
- TestDMAPDb *db;
+ TestDmapDb *db;
db = TEST_DMAP_DB (g_object_new (TYPE_TEST_DMAP_DB, NULL));
diff --git a/libdmapsharing/test-dmap-db.h b/libdmapsharing/test-dmap-db.h
index 5871f47..eb30c74 100644
--- a/libdmapsharing/test-dmap-db.h
+++ b/libdmapsharing/test-dmap-db.h
@@ -27,31 +27,31 @@ G_BEGIN_DECLS
#define TYPE_TEST_DMAP_DB (test_dmap_db_get_type ())
#define TEST_DMAP_DB(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), \
- TYPE_TEST_DMAP_DB, TestDMAPDb))
+ TYPE_TEST_DMAP_DB, TestDmapDb))
#define TEST_DMAP_DB_CLASS(k) (G_TYPE_CHECK_CLASS_CAST((k), \
- TYPE_TEST_DMAP_DB, TestDMAPDbClass))
+ TYPE_TEST_DMAP_DB, TestDmapDbClass))
#define IS_TEST_DMAP_DB(o) (G_TYPE_CHECK_INSTANCE_TYPE ((o), \
TYPE_TEST_DMAP_DB))
#define IS_TEST_DMAP_DB_CLASS (k) (G_TYPE_CHECK_CLASS_TYPE ((k), \
TYPE_TEST_DMAP_DB_CLASS))
#define TEST_DMAP_DB_GET_CLASS(o) (G_TYPE_INSTANCE_GET_CLASS ((o), \
- TYPE_TEST_DMAP_DB, TestDMAPDbClass))
+ TYPE_TEST_DMAP_DB, TestDmapDbClass))
#define TEST_DMAP_DB_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), \
TYPE_TEST_DMAP_DB, \
- TestDMAPDbPrivate))
+ TestDmapDbPrivate))
-typedef struct TestDMAPDbPrivate TestDMAPDbPrivate;
+typedef struct TestDmapDbPrivate TestDmapDbPrivate;
typedef struct {
GObject parent;
- TestDMAPDbPrivate *priv;
-} TestDMAPDb;
+ TestDmapDbPrivate *priv;
+} TestDmapDb;
typedef struct {
GObjectClass parent;
-} TestDMAPDbClass;
+} TestDmapDbClass;
-TestDMAPDb *test_dmap_db_new (void);
+TestDmapDb *test_dmap_db_new (void);
GType test_dmap_db_get_type (void);
#endif /* __TEST_DMAP_DB */
diff --git a/libdmapsharing/test-daap-record-factory.c b/libdmapsharing/test-dmap-image-record-factory.c
similarity index 50%
rename from libdmapsharing/test-daap-record-factory.c
rename to libdmapsharing/test-dmap-image-record-factory.c
index ddc12b9..2171494 100644
--- a/libdmapsharing/test-daap-record-factory.c
+++ b/libdmapsharing/test-dmap-image-record-factory.c
@@ -1,5 +1,5 @@
/*
- * DAAPRecord factory class
+ * DmapImageRecord factory class
*
* Copyright (C) 2008 W. Michael Petullo <mike flyn org>
*
@@ -18,45 +18,45 @@
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
*/
-#include "test-daap-record-factory.h"
-#include "test-daap-record.h"
+#include "test-dmap-image-record-factory.h"
+#include "test-dmap-image-record.h"
-DMAPRecord *
-test_daap_record_factory_create (DMAPRecordFactory *factory, gpointer user_data)
+DmapRecord *
+test_dmap_image_record_factory_create (DmapRecordFactory *factory, gpointer user_data)
{
- return DMAP_RECORD (test_daap_record_new ());
+ return DMAP_RECORD (test_dmap_image_record_new ());
}
static void
-test_daap_record_factory_init (TestDAAPRecordFactory *factory)
+test_dmap_image_record_factory_init (TestDmapImageRecordFactory *factory)
{
}
static void
-test_daap_record_factory_class_init (TestDAAPRecordFactoryClass *klass)
+test_dmap_image_record_factory_class_init (TestDmapImageRecordFactoryClass *klass)
{
}
static void
-test_daap_record_factory_interface_init (gpointer iface, gpointer data)
+test_dmap_image_record_factory_interface_init (gpointer iface, gpointer data)
{
- DMAPRecordFactoryInterface *factory = iface;
+ DmapRecordFactoryInterface *factory = iface;
g_assert (G_TYPE_FROM_INTERFACE (factory) == DMAP_TYPE_RECORD_FACTORY);
- factory->create = test_daap_record_factory_create;
+ factory->create = test_dmap_image_record_factory_create;
}
-G_DEFINE_TYPE_WITH_CODE (TestDAAPRecordFactory, test_daap_record_factory, G_TYPE_OBJECT,
+G_DEFINE_TYPE_WITH_CODE (TestDmapImageRecordFactory, test_dmap_image_record_factory, G_TYPE_OBJECT,
G_IMPLEMENT_INTERFACE (DMAP_TYPE_RECORD_FACTORY,
- test_daap_record_factory_interface_init))
+ test_dmap_image_record_factory_interface_init))
-TestDAAPRecordFactory *
-test_daap_record_factory_new (void)
+TestDmapImageRecordFactory *
+test_dmap_image_record_factory_new (void)
{
- TestDAAPRecordFactory *factory;
+ TestDmapImageRecordFactory *factory;
- factory = TEST_DAAP_RECORD_FACTORY (g_object_new (TYPE_TEST_DAAP_RECORD_FACTORY, NULL));
+ factory = TEST_DMAP_IMAGE_RECORD_FACTORY (g_object_new (TYPE_TEST_DMAP_IMAGE_RECORD_FACTORY, NULL));
return factory;
}
diff --git a/libdmapsharing/test-dmap-image-record-factory.h b/libdmapsharing/test-dmap-image-record-factory.h
new file mode 100644
index 0000000..803a40a
--- /dev/null
+++ b/libdmapsharing/test-dmap-image-record-factory.h
@@ -0,0 +1,58 @@
+/*
+ * TestDmapImageRecord factory class
+ *
+ * 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 __TEST_DMAP_IMAGE_RECORD_FACTORY
+#define __TEST_DMAP_IMAGE_RECORD_FACTORY
+
+#include <libdmapsharing/dmap.h>
+
+G_BEGIN_DECLS
+
+#define TYPE_TEST_DMAP_IMAGE_RECORD_FACTORY (test_dmap_image_record_factory_get_type ())
+#define TEST_DMAP_IMAGE_RECORD_FACTORY(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), \
+ TYPE_TEST_DMAP_IMAGE_RECORD_FACTORY,
TestDmapImageRecordFactory))
+#define TEST_DMAP_IMAGE_RECORD_FACTORY_CLASS(k) (G_TYPE_CHECK_CLASS_CAST((k), \
+ TYPE_TEST_DMAP_IMAGE_RECORD_FACTORY,
TestDmapImageRecordFactoryClass))
+#define IS_TEST_DMAP_IMAGE_RECORD_FACTORY(o) (G_TYPE_CHECK_INSTANCE_TYPE ((o), \
+ TYPE_TEST_DMAP_IMAGE_RECORD_FACTORY))
+#define IS_TEST_DMAP_IMAGE_RECORD_FACTORY_CLASS(k) (G_TYPE_CHECK_CLASS_TYPE ((k), \
+ TYPE_TEST_DMAP_IMAGE_RECORD_FACTORY_CLASS))
+#define TEST_DMAP_IMAGE_RECORD_FACTORY_GET_CLASS(o) (G_TYPE_INSTANCE_GET_CLASS ((o), \
+ TYPE_TEST_DMAP_IMAGE_RECORD_FACTORY,
TestDmapImageRecordFactoryClass))
+
+typedef struct TestDmapImageRecordFactoryPrivate TestDmapImageRecordFactoryPrivate;
+
+typedef struct {
+ GObject parent;
+} TestDmapImageRecordFactory;
+
+typedef struct {
+ GObjectClass parent;
+} TestDmapImageRecordFactoryClass;
+
+GType test_dmap_image_record_factory_get_type (void);
+
+TestDmapImageRecordFactory *test_dmap_image_record_factory_new (void);
+
+DmapRecord *test_dmap_image_record_factory_create (DmapRecordFactory *factory, gpointer
user_data);
+
+#endif /* __TEST_DMAP_IMAGE_RECORD_FACTORY */
+
+G_END_DECLS
diff --git a/libdmapsharing/test-dpap-record.c b/libdmapsharing/test-dmap-image-record.c
similarity index 80%
rename from libdmapsharing/test-dpap-record.c
rename to libdmapsharing/test-dmap-image-record.c
index c0be007..e5091c0 100644
--- a/libdmapsharing/test-dpap-record.c
+++ b/libdmapsharing/test-dmap-image-record.c
@@ -18,9 +18,9 @@
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
*/
-#include "test-dpap-record.h"
+#include "test-dmap-image-record.h"
-struct TestDPAPRecordPrivate {
+struct TestDmapImageRecordPrivate {
gint largefilesize;
gint pixelheight;
gint pixelwidth;
@@ -50,12 +50,12 @@ enum {
};
static void
-test_dpap_record_set_property (GObject *object,
+test_dmap_image_record_set_property (GObject *object,
guint prop_id,
const GValue *value,
GParamSpec *pspec)
{
- TestDPAPRecord *record = TEST_DPAP_RECORD (object);
+ TestDmapImageRecord *record = TEST_DMAP_IMAGE_RECORD (object);
switch (prop_id) {
case PROP_LARGE_FILESIZE:
@@ -107,12 +107,12 @@ test_dpap_record_set_property (GObject *object,
}
static void
-test_dpap_record_get_property (GObject *object,
+test_dmap_image_record_get_property (GObject *object,
guint prop_id,
GValue *value,
GParamSpec *pspec)
{
- TestDPAPRecord *record = TEST_DPAP_RECORD (object);
+ TestDmapImageRecord *record = TEST_DMAP_IMAGE_RECORD (object);
switch (prop_id) {
case PROP_LARGE_FILESIZE:
@@ -155,12 +155,12 @@ test_dpap_record_get_property (GObject *object,
}
}
-GInputStream *test_dpap_record_read (DPAPRecord *record, GError **error)
+GInputStream *test_dmap_image_record_read (DmapImageRecord *record, GError **error)
{
GFile *file;
GInputStream *stream;
- file = g_file_new_for_uri (TEST_DPAP_RECORD (record)->priv->location);
+ file = g_file_new_for_uri (TEST_DMAP_IMAGE_RECORD (record)->priv->location);
stream = G_INPUT_STREAM (g_file_read (file, NULL, error));
g_object_unref (file);
@@ -171,23 +171,23 @@ GInputStream *test_dpap_record_read (DPAPRecord *record, GError **error)
static void
-test_dpap_record_init (TestDPAPRecord *record)
+test_dmap_image_record_init (TestDmapImageRecord *record)
{
- record->priv = TEST_DPAP_RECORD_GET_PRIVATE (record);
+ record->priv = TEST_DMAP_IMAGE_RECORD_GET_PRIVATE (record);
}
-static void test_dpap_record_finalize (GObject *object);
+static void test_dmap_image_record_finalize (GObject *object);
static void
-test_dpap_record_class_init (TestDPAPRecordClass *klass)
+test_dmap_image_record_class_init (TestDmapImageRecordClass *klass)
{
GObjectClass *gobject_class = G_OBJECT_CLASS (klass);
- g_type_class_add_private (klass, sizeof (TestDPAPRecordPrivate));
+ g_type_class_add_private (klass, sizeof (TestDmapImageRecordPrivate));
- gobject_class->set_property = test_dpap_record_set_property;
- gobject_class->get_property = test_dpap_record_get_property;
- gobject_class->finalize = test_dpap_record_finalize;
+ gobject_class->set_property = test_dmap_image_record_set_property;
+ gobject_class->get_property = test_dmap_image_record_get_property;
+ gobject_class->finalize = test_dmap_image_record_finalize;
g_object_class_override_property (gobject_class, PROP_LARGE_FILESIZE, "large-filesize");
g_object_class_override_property (gobject_class, PROP_CREATION_DATE, "creation-date");
@@ -203,31 +203,31 @@ test_dpap_record_class_init (TestDPAPRecordClass *klass)
}
static void
-test_dpap_record_dpap_iface_init (gpointer iface, gpointer data)
+test_dmap_image_record_dpap_iface_init (gpointer iface, gpointer data)
{
- DPAPRecordInterface *dpap_record = iface;
+ DmapImageRecordInterface *dmap_image_record = iface;
- g_assert (G_TYPE_FROM_INTERFACE (dpap_record) == DPAP_TYPE_RECORD);
+ g_assert (G_TYPE_FROM_INTERFACE (dmap_image_record) == DMAP_TYPE_IMAGE_RECORD);
- dpap_record->read = test_dpap_record_read;
+ dmap_image_record->read = test_dmap_image_record_read;
}
static void
-test_dpap_record_dmap_iface_init (gpointer iface, gpointer data)
+test_dmap_image_record_dmap_iface_init (gpointer iface, gpointer data)
{
- DMAPRecordInterface *dmap_record = iface;
+ DmapRecordInterface *dmap_record = iface;
g_assert (G_TYPE_FROM_INTERFACE (dmap_record) == DMAP_TYPE_RECORD);
}
-G_DEFINE_TYPE_WITH_CODE (TestDPAPRecord, test_dpap_record, G_TYPE_OBJECT,
- G_IMPLEMENT_INTERFACE (DPAP_TYPE_RECORD, test_dpap_record_dpap_iface_init)
- G_IMPLEMENT_INTERFACE (DMAP_TYPE_RECORD, test_dpap_record_dmap_iface_init))
+G_DEFINE_TYPE_WITH_CODE (TestDmapImageRecord, test_dmap_image_record, G_TYPE_OBJECT,
+ G_IMPLEMENT_INTERFACE (DMAP_TYPE_IMAGE_RECORD,
test_dmap_image_record_dpap_iface_init)
+ G_IMPLEMENT_INTERFACE (DMAP_TYPE_RECORD, test_dmap_image_record_dmap_iface_init))
static void
-test_dpap_record_finalize (GObject *object)
+test_dmap_image_record_finalize (GObject *object)
{
- TestDPAPRecord *record = TEST_DPAP_RECORD (object);
+ TestDmapImageRecord *record = TEST_DMAP_IMAGE_RECORD (object);
g_free (record->priv->location);
g_free (record->priv->aspectratio);
@@ -239,19 +239,19 @@ test_dpap_record_finalize (GObject *object)
g_array_unref (record->priv->thumbnail);
}
- G_OBJECT_CLASS (test_dpap_record_parent_class)->finalize (object);
+ G_OBJECT_CLASS (test_dmap_image_record_parent_class)->finalize (object);
}
-TestDPAPRecord *
-test_dpap_record_new (void)
+TestDmapImageRecord *
+test_dmap_image_record_new (void)
{
unsigned char *thumbnail;
GError *error;
gchar *path;
gsize size;
- TestDPAPRecord *record;
+ TestDmapImageRecord *record;
- record = TEST_DPAP_RECORD (g_object_new (TYPE_TEST_DPAP_RECORD, NULL));
+ record = TEST_DMAP_IMAGE_RECORD (g_object_new (TYPE_TEST_DMAP_IMAGE_RECORD, NULL));
/* Must be a URI. */
record->priv->location = g_strdup_printf ("file://%s/media/test.jpeg",
diff --git a/libdmapsharing/test-dmap-image-record.h b/libdmapsharing/test-dmap-image-record.h
new file mode 100644
index 0000000..bc941ca
--- /dev/null
+++ b/libdmapsharing/test-dmap-image-record.h
@@ -0,0 +1,65 @@
+/*
+ * 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 __TEST_DMAP_IMAGE_RECORD
+#define __TEST_DMAP_IMAGE_RECORD
+
+#include <libdmapsharing/dmap.h>
+
+G_BEGIN_DECLS
+
+#define TYPE_TEST_DMAP_IMAGE_RECORD (test_dmap_image_record_get_type ())
+#define TEST_DMAP_IMAGE_RECORD(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), \
+ TYPE_TEST_DMAP_IMAGE_RECORD, TestDmapImageRecord))
+#define TEST_DMAP_IMAGE_RECORD_CLASS(k) (G_TYPE_CHECK_CLASS_CAST((k), \
+ TYPE_TEST_DMAP_IMAGE_RECORD, \
+ TestDmapImageRecordClass))
+#define IS_TEST_DMAP_IMAGE_RECORD(o) (G_TYPE_CHECK_INSTANCE_TYPE ((o), \
+ TYPE_TEST_DMAP_IMAGE_RECORD))
+#define IS_TEST_DMAP_IMAGE_RECORD_CLASS (k) (G_TYPE_CHECK_CLASS_TYPE ((k), \
+ TYPE_TEST_DMAP_IMAGE_RECORD_CLASS))
+#define TEST_DMAP_IMAGE_RECORD_GET_CLASS(o) (G_TYPE_INSTANCE_GET_CLASS ((o), \
+ TYPE_TEST_DMAP_IMAGE_RECORD, \
+ TestDmapImageRecordClass))
+#define TEST_DMAP_IMAGE_RECORD_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), \
+ TYPE_TEST_DMAP_IMAGE_RECORD, \
+ TestDmapImageRecordPrivate))
+
+typedef struct TestDmapImageRecordPrivate TestDmapImageRecordPrivate;
+
+typedef struct {
+ GObject parent;
+ TestDmapImageRecordPrivate *priv;
+} TestDmapImageRecord;
+
+typedef struct {
+ GObjectClass parent;
+} TestDmapImageRecordClass;
+
+GType test_dmap_image_record_get_type (void);
+
+TestDmapImageRecord *test_dmap_image_record_new (void);
+
+GInputStream *test_dmap_image_record_read (DmapImageRecord *record,
+ GError **err);
+
+#endif /* __TEST_DMAP_IMAGE_RECORD */
+
+G_END_DECLS
diff --git a/tests/Makefile.am b/tests/Makefile.am
index 8b8478c..4226c94 100644
--- a/tests/Makefile.am
+++ b/tests/Makefile.am
@@ -78,7 +78,7 @@ dacplisten_LDADD = \
dpapview_VALASOURCES = \
dpapview.vala \
vala-dmap-db.vala \
- vala-dpap-record.vala
+ vala-image-record.vala
dpapview_VALABUILTSOURCES = $(dpapview_VALASOURCES:.vala=.c)
@@ -92,7 +92,7 @@ dpapview_LDADD = \
dmapcopy_VALASOURCES = \
dmapcopy.vala \
vala-dmap-db.vala \
- vala-dpap-record.vala
+ vala-image-record.vala
dmapcopy_VALABUILTSOURCES = $(dmapcopy_VALASOURCES:.vala=.c)
@@ -105,7 +105,7 @@ dmapcopy_LDADD = \
dmapserve_VALASOURCES = \
dmapserve.vala \
vala-dmap-db.vala \
- vala-dpap-record.vala \
+ vala-image-record.vala \
vala-dmap-container-db.vala
dmapserve_VALABUILTSOURCES = $(dmapserve_VALASOURCES:.vala=.c)
diff --git a/tests/dacplisten.c b/tests/dacplisten.c
index 4fa4a30..7549bd5 100644
--- a/tests/dacplisten.c
+++ b/tests/dacplisten.c
@@ -1,4 +1,4 @@
-/* dacplisten.c generated by valac 0.38.3, the Vala compiler
+/* dacplisten.c generated by valac 0.38.4, the Vala compiler
* generated from dacplisten.vala, do not modify */
/* FILE: dacplisten.vala -- Listen to DACP remotes
@@ -32,15 +32,15 @@
#define TYPE_VALA_DACP_PLAYER (vala_dacp_player_get_type ())
-#define VALA_DACP_PLAYER(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_VALA_DACP_PLAYER, ValaDACPPlayer))
-#define VALA_DACP_PLAYER_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_VALA_DACP_PLAYER,
ValaDACPPlayerClass))
+#define VALA_DACP_PLAYER(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_VALA_DACP_PLAYER, ValaDacpPlayer))
+#define VALA_DACP_PLAYER_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_VALA_DACP_PLAYER,
ValaDacpPlayerClass))
#define IS_VALA_DACP_PLAYER(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_VALA_DACP_PLAYER))
#define IS_VALA_DACP_PLAYER_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_VALA_DACP_PLAYER))
-#define VALA_DACP_PLAYER_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_VALA_DACP_PLAYER,
ValaDACPPlayerClass))
+#define VALA_DACP_PLAYER_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_VALA_DACP_PLAYER,
ValaDacpPlayerClass))
-typedef struct _ValaDACPPlayer ValaDACPPlayer;
-typedef struct _ValaDACPPlayerClass ValaDACPPlayerClass;
-typedef struct _ValaDACPPlayerPrivate ValaDACPPlayerPrivate;
+typedef struct _ValaDacpPlayer ValaDacpPlayer;
+typedef struct _ValaDacpPlayerClass ValaDacpPlayerClass;
+typedef struct _ValaDacpPlayerPrivate ValaDacpPlayerPrivate;
enum {
VALA_DACP_PLAYER_0_PROPERTY,
VALA_DACP_PLAYER_NUM_PROPERTIES
@@ -48,15 +48,15 @@ enum {
static GParamSpec* vala_dacp_player_properties[VALA_DACP_PLAYER_NUM_PROPERTIES];
#define TYPE_DACP_LISTENER (dacp_listener_get_type ())
-#define DACP_LISTENER(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_DACP_LISTENER, DACPListener))
-#define DACP_LISTENER_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_DACP_LISTENER, DACPListenerClass))
+#define DACP_LISTENER(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_DACP_LISTENER, DacpListener))
+#define DACP_LISTENER_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_DACP_LISTENER, DacpListenerClass))
#define IS_DACP_LISTENER(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_DACP_LISTENER))
#define IS_DACP_LISTENER_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_DACP_LISTENER))
-#define DACP_LISTENER_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_DACP_LISTENER,
DACPListenerClass))
+#define DACP_LISTENER_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_DACP_LISTENER,
DacpListenerClass))
-typedef struct _DACPListener DACPListener;
-typedef struct _DACPListenerClass DACPListenerClass;
-typedef struct _DACPListenerPrivate DACPListenerPrivate;
+typedef struct _DacpListener DacpListener;
+typedef struct _DacpListenerClass DacpListenerClass;
+typedef struct _DacpListenerPrivate DacpListenerPrivate;
enum {
DACP_LISTENER_0_PROPERTY,
DACP_LISTENER_NUM_PROPERTIES
@@ -65,90 +65,90 @@ static GParamSpec* dacp_listener_properties[DACP_LISTENER_NUM_PROPERTIES];
#define _g_object_unref0(var) ((var == NULL) ? NULL : (var = (g_object_unref (var), NULL)))
#define TYPE_VALA_DMAP_DB (vala_dmap_db_get_type ())
-#define VALA_DMAP_DB(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_VALA_DMAP_DB, ValaDMAPDb))
-#define VALA_DMAP_DB_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_VALA_DMAP_DB, ValaDMAPDbClass))
+#define VALA_DMAP_DB(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_VALA_DMAP_DB, ValaDmapDb))
+#define VALA_DMAP_DB_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_VALA_DMAP_DB, ValaDmapDbClass))
#define IS_VALA_DMAP_DB(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_VALA_DMAP_DB))
#define IS_VALA_DMAP_DB_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_VALA_DMAP_DB))
-#define VALA_DMAP_DB_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_VALA_DMAP_DB, ValaDMAPDbClass))
+#define VALA_DMAP_DB_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_VALA_DMAP_DB, ValaDmapDbClass))
-typedef struct _ValaDMAPDb ValaDMAPDb;
-typedef struct _ValaDMAPDbClass ValaDMAPDbClass;
+typedef struct _ValaDmapDb ValaDmapDb;
+typedef struct _ValaDmapDbClass ValaDmapDbClass;
#define TYPE_VALA_DMAP_CONTAINER_DB (vala_dmap_container_db_get_type ())
-#define VALA_DMAP_CONTAINER_DB(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_VALA_DMAP_CONTAINER_DB,
ValaDMAPContainerDb))
-#define VALA_DMAP_CONTAINER_DB_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_VALA_DMAP_CONTAINER_DB,
ValaDMAPContainerDbClass))
+#define VALA_DMAP_CONTAINER_DB(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_VALA_DMAP_CONTAINER_DB,
ValaDmapContainerDb))
+#define VALA_DMAP_CONTAINER_DB_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_VALA_DMAP_CONTAINER_DB,
ValaDmapContainerDbClass))
#define IS_VALA_DMAP_CONTAINER_DB(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_VALA_DMAP_CONTAINER_DB))
#define IS_VALA_DMAP_CONTAINER_DB_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass),
TYPE_VALA_DMAP_CONTAINER_DB))
-#define VALA_DMAP_CONTAINER_DB_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj),
TYPE_VALA_DMAP_CONTAINER_DB, ValaDMAPContainerDbClass))
+#define VALA_DMAP_CONTAINER_DB_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj),
TYPE_VALA_DMAP_CONTAINER_DB, ValaDmapContainerDbClass))
-typedef struct _ValaDMAPContainerDb ValaDMAPContainerDb;
-typedef struct _ValaDMAPContainerDbClass ValaDMAPContainerDbClass;
+typedef struct _ValaDmapContainerDb ValaDmapContainerDb;
+typedef struct _ValaDmapContainerDbClass ValaDmapContainerDbClass;
#define _g_main_loop_unref0(var) ((var == NULL) ? NULL : (var = (g_main_loop_unref (var), NULL)))
-struct _ValaDACPPlayer {
+struct _ValaDacpPlayer {
GObject parent_instance;
- ValaDACPPlayerPrivate * priv;
+ ValaDacpPlayerPrivate * priv;
};
-struct _ValaDACPPlayerClass {
+struct _ValaDacpPlayerClass {
GObjectClass parent_class;
};
-struct _DACPListener {
+struct _DacpListener {
GObject parent_instance;
- DACPListenerPrivate * priv;
+ DacpListenerPrivate * priv;
};
-struct _DACPListenerClass {
+struct _DacpListenerClass {
GObjectClass parent_class;
};
-struct _DACPListenerPrivate {
- DMAPDb* db;
- DMAPContainerDb* container_db;
- DACPPlayer* player;
- DACPShare* share;
+struct _DacpListenerPrivate {
+ DmapDb* db;
+ DmapContainerDb* container_db;
+ DmapControlPlayer* player;
+ DmapControlShare* share;
};
static gpointer vala_dacp_player_parent_class = NULL;
-static DACPPlayerInterface * vala_dacp_player_dacp_player_parent_iface = NULL;
+static DmapControlPlayerInterface * vala_dacp_player_dmap_control_player_parent_iface = NULL;
static gpointer dacp_listener_parent_class = NULL;
GType vala_dacp_player_get_type (void) G_GNUC_CONST;
-static DAAPRecord* vala_dacp_player_real_now_playing_record (DACPPlayer* base);
-static guchar* vala_dacp_player_real_now_playing_artwork (DACPPlayer* base, guint width, guint height, int*
result_length1);
-static void vala_dacp_player_real_play_pause (DACPPlayer* base);
-static void vala_dacp_player_real_pause (DACPPlayer* base);
-static void vala_dacp_player_real_next_item (DACPPlayer* base);
-static void vala_dacp_player_real_prev_item (DACPPlayer* base);
-static void vala_dacp_player_real_cue_clear (DACPPlayer* base);
-static void vala_dacp_player_real_cue_play (DACPPlayer* base, GList* records, guint index);
-ValaDACPPlayer* vala_dacp_player_new (void);
-ValaDACPPlayer* vala_dacp_player_construct (GType object_type);
+static DmapAvRecord* vala_dacp_player_real_now_playing_record (DmapControlPlayer* base);
+static guchar* vala_dacp_player_real_now_playing_artwork (DmapControlPlayer* base, guint width, guint
height, int* result_length1);
+static void vala_dacp_player_real_play_pause (DmapControlPlayer* base);
+static void vala_dacp_player_real_pause (DmapControlPlayer* base);
+static void vala_dacp_player_real_next_item (DmapControlPlayer* base);
+static void vala_dacp_player_real_prev_item (DmapControlPlayer* base);
+static void vala_dacp_player_real_cue_clear (DmapControlPlayer* base);
+static void vala_dacp_player_real_cue_play (DmapControlPlayer* base, GList* records, guint index);
+ValaDacpPlayer* vala_dacp_player_new (void);
+ValaDacpPlayer* vala_dacp_player_construct (GType object_type);
GType dacp_listener_get_type (void) G_GNUC_CONST;
-#define DACP_LISTENER_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), TYPE_DACP_LISTENER,
DACPListenerPrivate))
-DACPListener* dacp_listener_new (void);
-DACPListener* dacp_listener_construct (GType object_type);
-ValaDMAPDb* vala_dmap_db_new (void);
-ValaDMAPDb* vala_dmap_db_construct (GType object_type);
+#define DACP_LISTENER_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), TYPE_DACP_LISTENER,
DacpListenerPrivate))
+DacpListener* dacp_listener_new (void);
+DacpListener* dacp_listener_construct (GType object_type);
+ValaDmapDb* vala_dmap_db_new (void);
+ValaDmapDb* vala_dmap_db_construct (GType object_type);
GType vala_dmap_db_get_type (void) G_GNUC_CONST;
-ValaDMAPContainerDb* vala_dmap_container_db_new (void);
-ValaDMAPContainerDb* vala_dmap_container_db_construct (GType object_type);
+ValaDmapContainerDb* vala_dmap_container_db_new (void);
+ValaDmapContainerDb* vala_dmap_container_db_construct (GType object_type);
GType vala_dmap_container_db_get_type (void) G_GNUC_CONST;
-static void __lambda4_ (DACPListener* self, const gchar* service_name, const gchar* display_name);
-static void ___lambda4__dacp_share_remote_found (DACPShare* _sender, const gchar* service_name, const gchar*
remote_name, gpointer self);
-static void __lambda5_ (DACPListener* self, const gchar* guid);
-static void ___lambda5__dacp_share_add_guid (DACPShare* _sender, const gchar* guid, gpointer self);
+static void __lambda4_ (DacpListener* self, const gchar* service_name, const gchar* display_name);
+static void ___lambda4__dmap_control_share_remote_found (DmapControlShare* _sender, const gchar*
service_name, const gchar* remote_name, gpointer self);
+static void __lambda5_ (DacpListener* self, const gchar* guid);
+static void ___lambda5__dmap_control_share_add_guid (DmapControlShare* _sender, const gchar* guid, gpointer
self);
static void dacp_listener_finalize (GObject * obj);
gint _vala_main (gchar** args, int args_length1);
-static DAAPRecord* vala_dacp_player_real_now_playing_record (DACPPlayer* base) {
- ValaDACPPlayer * self;
- DAAPRecord* result = NULL;
+static DmapAvRecord* vala_dacp_player_real_now_playing_record (DmapControlPlayer* base) {
+ ValaDacpPlayer * self;
+ DmapAvRecord* result = NULL;
FILE* _tmp0_;
- self = (ValaDACPPlayer*) base;
+ self = (ValaDacpPlayer*) base;
_tmp0_ = stdout;
fprintf (_tmp0_, "Now playing record request received\n");
result = NULL;
@@ -156,13 +156,13 @@ static DAAPRecord* vala_dacp_player_real_now_playing_record (DACPPlayer* base) {
}
-static guchar* vala_dacp_player_real_now_playing_artwork (DACPPlayer* base, guint width, guint height, int*
result_length1) {
- ValaDACPPlayer * self;
+static guchar* vala_dacp_player_real_now_playing_artwork (DmapControlPlayer* base, guint width, guint
height, int* result_length1) {
+ ValaDacpPlayer * self;
guchar* result = NULL;
FILE* _tmp0_;
guchar* _tmp1_;
gint _tmp1__length1;
- self = (ValaDACPPlayer*) base;
+ self = (ValaDacpPlayer*) base;
_tmp0_ = stdout;
fprintf (_tmp0_, "Now playing artwork request received\n");
_tmp1_ = NULL;
@@ -175,109 +175,109 @@ static guchar* vala_dacp_player_real_now_playing_artwork (DACPPlayer* base, guin
}
-static void vala_dacp_player_real_play_pause (DACPPlayer* base) {
- ValaDACPPlayer * self;
+static void vala_dacp_player_real_play_pause (DmapControlPlayer* base) {
+ ValaDacpPlayer * self;
FILE* _tmp0_;
- self = (ValaDACPPlayer*) base;
+ self = (ValaDacpPlayer*) base;
_tmp0_ = stdout;
fprintf (_tmp0_, "Play/pause request received\n");
}
-static void vala_dacp_player_real_pause (DACPPlayer* base) {
- ValaDACPPlayer * self;
+static void vala_dacp_player_real_pause (DmapControlPlayer* base) {
+ ValaDacpPlayer * self;
FILE* _tmp0_;
- self = (ValaDACPPlayer*) base;
+ self = (ValaDacpPlayer*) base;
_tmp0_ = stdout;
fprintf (_tmp0_, "Pause request received\n");
}
-static void vala_dacp_player_real_next_item (DACPPlayer* base) {
- ValaDACPPlayer * self;
+static void vala_dacp_player_real_next_item (DmapControlPlayer* base) {
+ ValaDacpPlayer * self;
FILE* _tmp0_;
- self = (ValaDACPPlayer*) base;
+ self = (ValaDacpPlayer*) base;
_tmp0_ = stdout;
fprintf (_tmp0_, "Next item request received\n");
}
-static void vala_dacp_player_real_prev_item (DACPPlayer* base) {
- ValaDACPPlayer * self;
+static void vala_dacp_player_real_prev_item (DmapControlPlayer* base) {
+ ValaDacpPlayer * self;
FILE* _tmp0_;
- self = (ValaDACPPlayer*) base;
+ self = (ValaDacpPlayer*) base;
_tmp0_ = stdout;
fprintf (_tmp0_, "Previous item request received\n");
}
-static void vala_dacp_player_real_cue_clear (DACPPlayer* base) {
- ValaDACPPlayer * self;
+static void vala_dacp_player_real_cue_clear (DmapControlPlayer* base) {
+ ValaDacpPlayer * self;
FILE* _tmp0_;
- self = (ValaDACPPlayer*) base;
+ self = (ValaDacpPlayer*) base;
_tmp0_ = stdout;
fprintf (_tmp0_, "Cue clear request received\n");
}
-static void vala_dacp_player_real_cue_play (DACPPlayer* base, GList* records, guint index) {
- ValaDACPPlayer * self;
+static void vala_dacp_player_real_cue_play (DmapControlPlayer* base, GList* records, guint index) {
+ ValaDacpPlayer * self;
FILE* _tmp0_;
- self = (ValaDACPPlayer*) base;
+ self = (ValaDacpPlayer*) base;
_tmp0_ = stdout;
fprintf (_tmp0_, "Cue play request received\n");
}
-ValaDACPPlayer* vala_dacp_player_construct (GType object_type) {
- ValaDACPPlayer * self = NULL;
- self = (ValaDACPPlayer*) g_object_new (object_type, NULL);
+ValaDacpPlayer* vala_dacp_player_construct (GType object_type) {
+ ValaDacpPlayer * self = NULL;
+ self = (ValaDacpPlayer*) g_object_new (object_type, NULL);
return self;
}
-ValaDACPPlayer* vala_dacp_player_new (void) {
+ValaDacpPlayer* vala_dacp_player_new (void) {
return vala_dacp_player_construct (TYPE_VALA_DACP_PLAYER);
}
-static void vala_dacp_player_class_init (ValaDACPPlayerClass * klass) {
+static void vala_dacp_player_class_init (ValaDacpPlayerClass * klass) {
vala_dacp_player_parent_class = g_type_class_peek_parent (klass);
}
-static void vala_dacp_player_dacp_player_interface_init (DACPPlayerInterface * iface) {
- vala_dacp_player_dacp_player_parent_iface = g_type_interface_peek_parent (iface);
- iface->now_playing_record = (DAAPRecord* (*) (DACPPlayer *)) vala_dacp_player_real_now_playing_record;
- iface->now_playing_artwork = (guchar* (*) (DACPPlayer *, guint, guint, int*))
vala_dacp_player_real_now_playing_artwork;
- iface->play_pause = (void (*) (DACPPlayer *)) vala_dacp_player_real_play_pause;
- iface->pause = (void (*) (DACPPlayer *)) vala_dacp_player_real_pause;
- iface->next_item = (void (*) (DACPPlayer *)) vala_dacp_player_real_next_item;
- iface->prev_item = (void (*) (DACPPlayer *)) vala_dacp_player_real_prev_item;
- iface->cue_clear = (void (*) (DACPPlayer *)) vala_dacp_player_real_cue_clear;
- iface->cue_play = (void (*) (DACPPlayer *, GList*, guint)) vala_dacp_player_real_cue_play;
+static void vala_dacp_player_dmap_control_player_interface_init (DmapControlPlayerInterface * iface) {
+ vala_dacp_player_dmap_control_player_parent_iface = g_type_interface_peek_parent (iface);
+ iface->now_playing_record = (DmapAvRecord* (*) (DmapControlPlayer *))
vala_dacp_player_real_now_playing_record;
+ iface->now_playing_artwork = (guchar* (*) (DmapControlPlayer *, guint, guint, int*))
vala_dacp_player_real_now_playing_artwork;
+ iface->play_pause = (void (*) (DmapControlPlayer *)) vala_dacp_player_real_play_pause;
+ iface->pause = (void (*) (DmapControlPlayer *)) vala_dacp_player_real_pause;
+ iface->next_item = (void (*) (DmapControlPlayer *)) vala_dacp_player_real_next_item;
+ iface->prev_item = (void (*) (DmapControlPlayer *)) vala_dacp_player_real_prev_item;
+ iface->cue_clear = (void (*) (DmapControlPlayer *)) vala_dacp_player_real_cue_clear;
+ iface->cue_play = (void (*) (DmapControlPlayer *, GList*, guint)) vala_dacp_player_real_cue_play;
}
-static void vala_dacp_player_instance_init (ValaDACPPlayer * self) {
+static void vala_dacp_player_instance_init (ValaDacpPlayer * self) {
}
GType vala_dacp_player_get_type (void) {
static volatile gsize vala_dacp_player_type_id__volatile = 0;
if (g_once_init_enter (&vala_dacp_player_type_id__volatile)) {
- static const GTypeInfo g_define_type_info = { sizeof (ValaDACPPlayerClass), (GBaseInitFunc)
NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) vala_dacp_player_class_init, (GClassFinalizeFunc) NULL,
NULL, sizeof (ValaDACPPlayer), 0, (GInstanceInitFunc) vala_dacp_player_instance_init, NULL };
- static const GInterfaceInfo dacp_player_info = { (GInterfaceInitFunc)
vala_dacp_player_dacp_player_interface_init, (GInterfaceFinalizeFunc) NULL, NULL};
+ static const GTypeInfo g_define_type_info = { sizeof (ValaDacpPlayerClass), (GBaseInitFunc)
NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) vala_dacp_player_class_init, (GClassFinalizeFunc) NULL,
NULL, sizeof (ValaDacpPlayer), 0, (GInstanceInitFunc) vala_dacp_player_instance_init, NULL };
+ static const GInterfaceInfo dmap_control_player_info = { (GInterfaceInitFunc)
vala_dacp_player_dmap_control_player_interface_init, (GInterfaceFinalizeFunc) NULL, NULL};
GType vala_dacp_player_type_id;
- vala_dacp_player_type_id = g_type_register_static (G_TYPE_OBJECT, "ValaDACPPlayer",
&g_define_type_info, 0);
- g_type_add_interface_static (vala_dacp_player_type_id, DACP_TYPE_PLAYER, &dacp_player_info);
+ vala_dacp_player_type_id = g_type_register_static (G_TYPE_OBJECT, "ValaDacpPlayer",
&g_define_type_info, 0);
+ g_type_add_interface_static (vala_dacp_player_type_id, DMAP_TYPE_CONTROL_PLAYER,
&dmap_control_player_info);
g_once_init_leave (&vala_dacp_player_type_id__volatile, vala_dacp_player_type_id);
}
return vala_dacp_player_type_id__volatile;
}
-static void __lambda4_ (DACPListener* self, const gchar* service_name, const gchar* display_name) {
+static void __lambda4_ (DacpListener* self, const gchar* service_name, const gchar* display_name) {
FILE* _tmp0_;
const gchar* _tmp1_;
const gchar* _tmp2_;
@@ -290,12 +290,12 @@ static void __lambda4_ (DACPListener* self, const gchar* service_name, const gch
}
-static void ___lambda4__dacp_share_remote_found (DACPShare* _sender, const gchar* service_name, const gchar*
remote_name, gpointer self) {
- __lambda4_ ((DACPListener*) self, service_name, remote_name);
+static void ___lambda4__dmap_control_share_remote_found (DmapControlShare* _sender, const gchar*
service_name, const gchar* remote_name, gpointer self) {
+ __lambda4_ ((DacpListener*) self, service_name, remote_name);
}
-static void __lambda5_ (DACPListener* self, const gchar* guid) {
+static void __lambda5_ (DacpListener* self, const gchar* guid) {
FILE* _tmp0_;
g_return_if_fail (guid != NULL);
_tmp0_ = stdout;
@@ -303,69 +303,69 @@ static void __lambda5_ (DACPListener* self, const gchar* guid) {
}
-static void ___lambda5__dacp_share_add_guid (DACPShare* _sender, const gchar* guid, gpointer self) {
- __lambda5_ ((DACPListener*) self, guid);
+static void ___lambda5__dmap_control_share_add_guid (DmapControlShare* _sender, const gchar* guid, gpointer
self) {
+ __lambda5_ ((DacpListener*) self, guid);
}
-DACPListener* dacp_listener_construct (GType object_type) {
- DACPListener * self = NULL;
- ValaDMAPDb* _tmp0_;
- ValaDMAPContainerDb* _tmp1_;
- ValaDACPPlayer* _tmp2_;
- DACPPlayer* _tmp3_;
- DMAPDb* _tmp4_;
- DMAPContainerDb* _tmp5_;
- DACPShare* _tmp6_;
- DACPShare* _tmp7_;
- DACPShare* _tmp8_;
- DACPShare* _tmp9_;
- self = (DACPListener*) g_object_new (object_type, NULL);
+DacpListener* dacp_listener_construct (GType object_type) {
+ DacpListener * self = NULL;
+ ValaDmapDb* _tmp0_;
+ ValaDmapContainerDb* _tmp1_;
+ ValaDacpPlayer* _tmp2_;
+ DmapControlPlayer* _tmp3_;
+ DmapDb* _tmp4_;
+ DmapContainerDb* _tmp5_;
+ DmapControlShare* _tmp6_;
+ DmapControlShare* _tmp7_;
+ DmapControlShare* _tmp8_;
+ DmapControlShare* _tmp9_;
+ self = (DacpListener*) g_object_new (object_type, NULL);
_tmp0_ = vala_dmap_db_new ();
_g_object_unref0 (self->priv->db);
- self->priv->db = (DMAPDb*) _tmp0_;
+ self->priv->db = (DmapDb*) _tmp0_;
_tmp1_ = vala_dmap_container_db_new ();
_g_object_unref0 (self->priv->container_db);
- self->priv->container_db = (DMAPContainerDb*) _tmp1_;
+ self->priv->container_db = (DmapContainerDb*) _tmp1_;
_tmp2_ = vala_dacp_player_new ();
_g_object_unref0 (self->priv->player);
- self->priv->player = (DACPPlayer*) _tmp2_;
+ self->priv->player = (DmapControlPlayer*) _tmp2_;
_tmp3_ = self->priv->player;
_tmp4_ = self->priv->db;
_tmp5_ = self->priv->container_db;
- _tmp6_ = dacp_share_new ("dacplisten", _tmp3_, _tmp4_, _tmp5_);
+ _tmp6_ = dmap_control_share_new ("dacplisten", _tmp3_, _tmp4_, _tmp5_);
_g_object_unref0 (self->priv->share);
self->priv->share = _tmp6_;
_tmp7_ = self->priv->share;
- g_signal_connect_object (_tmp7_, "remote-found", (GCallback) ___lambda4__dacp_share_remote_found,
self, 0);
+ g_signal_connect_object (_tmp7_, "remote-found", (GCallback)
___lambda4__dmap_control_share_remote_found, self, 0);
_tmp8_ = self->priv->share;
- g_signal_connect_object (_tmp8_, "add-guid", (GCallback) ___lambda5__dacp_share_add_guid, self, 0);
+ g_signal_connect_object (_tmp8_, "add-guid", (GCallback) ___lambda5__dmap_control_share_add_guid,
self, 0);
_tmp9_ = self->priv->share;
- dacp_share_start_lookup (_tmp9_);
+ dmap_control_share_start_lookup (_tmp9_);
return self;
}
-DACPListener* dacp_listener_new (void) {
+DacpListener* dacp_listener_new (void) {
return dacp_listener_construct (TYPE_DACP_LISTENER);
}
-static void dacp_listener_class_init (DACPListenerClass * klass) {
+static void dacp_listener_class_init (DacpListenerClass * klass) {
dacp_listener_parent_class = g_type_class_peek_parent (klass);
- g_type_class_add_private (klass, sizeof (DACPListenerPrivate));
+ g_type_class_add_private (klass, sizeof (DacpListenerPrivate));
G_OBJECT_CLASS (klass)->finalize = dacp_listener_finalize;
}
-static void dacp_listener_instance_init (DACPListener * self) {
+static void dacp_listener_instance_init (DacpListener * self) {
self->priv = DACP_LISTENER_GET_PRIVATE (self);
}
static void dacp_listener_finalize (GObject * obj) {
- DACPListener * self;
- self = G_TYPE_CHECK_INSTANCE_CAST (obj, TYPE_DACP_LISTENER, DACPListener);
+ DacpListener * self;
+ self = G_TYPE_CHECK_INSTANCE_CAST (obj, TYPE_DACP_LISTENER, DacpListener);
_g_object_unref0 (self->priv->db);
_g_object_unref0 (self->priv->container_db);
_g_object_unref0 (self->priv->player);
@@ -377,9 +377,9 @@ static void dacp_listener_finalize (GObject * obj) {
GType dacp_listener_get_type (void) {
static volatile gsize dacp_listener_type_id__volatile = 0;
if (g_once_init_enter (&dacp_listener_type_id__volatile)) {
- static const GTypeInfo g_define_type_info = { sizeof (DACPListenerClass), (GBaseInitFunc)
NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) dacp_listener_class_init, (GClassFinalizeFunc) NULL, NULL,
sizeof (DACPListener), 0, (GInstanceInitFunc) dacp_listener_instance_init, NULL };
+ static const GTypeInfo g_define_type_info = { sizeof (DacpListenerClass), (GBaseInitFunc)
NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) dacp_listener_class_init, (GClassFinalizeFunc) NULL, NULL,
sizeof (DacpListener), 0, (GInstanceInitFunc) dacp_listener_instance_init, NULL };
GType dacp_listener_type_id;
- dacp_listener_type_id = g_type_register_static (G_TYPE_OBJECT, "DACPListener",
&g_define_type_info, 0);
+ dacp_listener_type_id = g_type_register_static (G_TYPE_OBJECT, "DacpListener",
&g_define_type_info, 0);
g_once_init_leave (&dacp_listener_type_id__volatile, dacp_listener_type_id);
}
return dacp_listener_type_id__volatile;
@@ -390,8 +390,8 @@ gint _vala_main (gchar** args, int args_length1) {
gint result = 0;
GMainLoop* loop = NULL;
GMainLoop* _tmp0_;
- DACPListener* dacplistener = NULL;
- DACPListener* _tmp1_;
+ DacpListener* dacplistener = NULL;
+ DacpListener* _tmp1_;
_tmp0_ = g_main_loop_new (NULL, FALSE);
loop = _tmp0_;
_tmp1_ = dacp_listener_new ();
diff --git a/tests/dacplisten.vala b/tests/dacplisten.vala
index 572e353..3007ae9 100644
--- a/tests/dacplisten.vala
+++ b/tests/dacplisten.vala
@@ -20,9 +20,9 @@
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
-private class ValaDACPPlayer : GLib.Object, DACP.Player {
+private class ValaDacpPlayer : GLib.Object, Dmap.ControlPlayer {
- unowned DAAP.Record now_playing_record () {
+ unowned Dmap.AvRecord now_playing_record () {
stdout.printf ("Now playing record request received\n");
return null;
}
@@ -57,17 +57,17 @@ private class ValaDACPPlayer : GLib.Object, DACP.Player {
}
}
-private class DACPListener : GLib.Object {
- private DMAP.Db db;
- private DMAP.ContainerDb container_db;
- private DACP.Player player;
- private DACP.Share share;
+private class DacpListener : GLib.Object {
+ private Dmap.Db db;
+ private Dmap.ContainerDb container_db;
+ private Dmap.ControlPlayer player;
+ private Dmap.ControlShare share;
- public DACPListener () {
- db = new ValaDMAPDb ();
- container_db = new ValaDMAPContainerDb ();
- player = new ValaDACPPlayer ();
- share = new DACP.Share ("dacplisten", player, db, container_db);
+ public DacpListener () {
+ db = new ValaDmapDb ();
+ container_db = new ValaDmapContainerDb ();
+ player = new ValaDacpPlayer ();
+ share = new Dmap.ControlShare ("dacplisten", player, db, container_db);
share.remote_found.connect ((service_name, display_name) => {
stdout.printf ("Found remote: %s, %s\n", service_name, display_name);
@@ -84,7 +84,7 @@ private class DACPListener : GLib.Object {
int main (string[] args) {
var loop = new GLib.MainLoop ();
- var dacplistener = new DACPListener ();
+ var dacplistener = new DacpListener ();
loop.run ();
diff --git a/tests/dmapcopy.c b/tests/dmapcopy.c
index 0c7bacb..e8d0873 100644
--- a/tests/dmapcopy.c
+++ b/tests/dmapcopy.c
@@ -1,4 +1,4 @@
-/* dmapcopy.c generated by valac 0.38.3, the Vala compiler
+/* dmapcopy.c generated by valac 0.38.4, the Vala compiler
* generated from dmapcopy.vala, do not modify */
/* FILE: dmapcopy.vala -- Copy files from a DMAP server
@@ -44,24 +44,24 @@ typedef struct _DPAPCopyClass DPAPCopyClass;
typedef struct _DPAPCopyPrivate DPAPCopyPrivate;
#define TYPE_VALA_DMAP_DB (vala_dmap_db_get_type ())
-#define VALA_DMAP_DB(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_VALA_DMAP_DB, ValaDMAPDb))
-#define VALA_DMAP_DB_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_VALA_DMAP_DB, ValaDMAPDbClass))
+#define VALA_DMAP_DB(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_VALA_DMAP_DB, ValaDmapDb))
+#define VALA_DMAP_DB_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_VALA_DMAP_DB, ValaDmapDbClass))
#define IS_VALA_DMAP_DB(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_VALA_DMAP_DB))
#define IS_VALA_DMAP_DB_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_VALA_DMAP_DB))
-#define VALA_DMAP_DB_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_VALA_DMAP_DB, ValaDMAPDbClass))
+#define VALA_DMAP_DB_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_VALA_DMAP_DB, ValaDmapDbClass))
-typedef struct _ValaDMAPDb ValaDMAPDb;
-typedef struct _ValaDMAPDbClass ValaDMAPDbClass;
+typedef struct _ValaDmapDb ValaDmapDb;
+typedef struct _ValaDmapDbClass ValaDmapDbClass;
-#define TYPE_VALA_DPAP_RECORD_FACTORY (vala_dpap_record_factory_get_type ())
-#define VALA_DPAP_RECORD_FACTORY(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_VALA_DPAP_RECORD_FACTORY,
ValaDPAPRecordFactory))
-#define VALA_DPAP_RECORD_FACTORY_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass),
TYPE_VALA_DPAP_RECORD_FACTORY, ValaDPAPRecordFactoryClass))
-#define IS_VALA_DPAP_RECORD_FACTORY(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_VALA_DPAP_RECORD_FACTORY))
-#define IS_VALA_DPAP_RECORD_FACTORY_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass),
TYPE_VALA_DPAP_RECORD_FACTORY))
-#define VALA_DPAP_RECORD_FACTORY_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj),
TYPE_VALA_DPAP_RECORD_FACTORY, ValaDPAPRecordFactoryClass))
+#define TYPE_VALA_IMAGE_RECORD_FACTORY (vala_image_record_factory_get_type ())
+#define VALA_IMAGE_RECORD_FACTORY(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_VALA_IMAGE_RECORD_FACTORY,
ValaImageRecordFactory))
+#define VALA_IMAGE_RECORD_FACTORY_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass),
TYPE_VALA_IMAGE_RECORD_FACTORY, ValaImageRecordFactoryClass))
+#define IS_VALA_IMAGE_RECORD_FACTORY(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj),
TYPE_VALA_IMAGE_RECORD_FACTORY))
+#define IS_VALA_IMAGE_RECORD_FACTORY_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass),
TYPE_VALA_IMAGE_RECORD_FACTORY))
+#define VALA_IMAGE_RECORD_FACTORY_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj),
TYPE_VALA_IMAGE_RECORD_FACTORY, ValaImageRecordFactoryClass))
-typedef struct _ValaDPAPRecordFactory ValaDPAPRecordFactory;
-typedef struct _ValaDPAPRecordFactoryClass ValaDPAPRecordFactoryClass;
+typedef struct _ValaImageRecordFactory ValaImageRecordFactory;
+typedef struct _ValaImageRecordFactoryClass ValaImageRecordFactoryClass;
enum {
DPAP_COPY_0_PROPERTY,
DPAP_COPY_NUM_PROPERTIES
@@ -69,15 +69,15 @@ enum {
static GParamSpec* dpap_copy_properties[DPAP_COPY_NUM_PROPERTIES];
#define _g_object_unref0(var) ((var == NULL) ? NULL : (var = (g_object_unref (var), NULL)))
-#define TYPE_VALA_DPAP_RECORD (vala_dpap_record_get_type ())
-#define VALA_DPAP_RECORD(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_VALA_DPAP_RECORD, ValaDPAPRecord))
-#define VALA_DPAP_RECORD_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_VALA_DPAP_RECORD,
ValaDPAPRecordClass))
-#define IS_VALA_DPAP_RECORD(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_VALA_DPAP_RECORD))
-#define IS_VALA_DPAP_RECORD_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_VALA_DPAP_RECORD))
-#define VALA_DPAP_RECORD_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_VALA_DPAP_RECORD,
ValaDPAPRecordClass))
+#define TYPE_VALA_IMAGE_RECORD (vala_image_record_get_type ())
+#define VALA_IMAGE_RECORD(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_VALA_IMAGE_RECORD, ValaImageRecord))
+#define VALA_IMAGE_RECORD_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_VALA_IMAGE_RECORD,
ValaImageRecordClass))
+#define IS_VALA_IMAGE_RECORD(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_VALA_IMAGE_RECORD))
+#define IS_VALA_IMAGE_RECORD_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_VALA_IMAGE_RECORD))
+#define VALA_IMAGE_RECORD_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_VALA_IMAGE_RECORD,
ValaImageRecordClass))
-typedef struct _ValaDPAPRecord ValaDPAPRecord;
-typedef struct _ValaDPAPRecordClass ValaDPAPRecordClass;
+typedef struct _ValaImageRecord ValaImageRecord;
+typedef struct _ValaImageRecordClass ValaImageRecordClass;
#define _g_free0(var) (var = (g_free (var), NULL))
#define _dpap_copy_unref0(var) ((var == NULL) ? NULL : (var = (dpap_copy_unref (var), NULL)))
typedef struct _ParamSpecDPAPCopy ParamSpecDPAPCopy;
@@ -95,10 +95,10 @@ struct _DPAPCopyClass {
};
struct _DPAPCopyPrivate {
- DMAPMdnsBrowser* browser;
- DMAPConnection* connection;
- ValaDMAPDb* db;
- ValaDPAPRecordFactory* factory;
+ DmapMdnsBrowser* browser;
+ DmapConnection* connection;
+ ValaDmapDb* db;
+ ValaImageRecordFactory* factory;
};
struct _ParamSpecDPAPCopy {
@@ -116,22 +116,22 @@ void value_take_dpap_copy (GValue* value, gpointer v_object);
gpointer value_get_dpap_copy (const GValue* value);
GType dpap_copy_get_type (void) G_GNUC_CONST;
GType vala_dmap_db_get_type (void) G_GNUC_CONST;
-GType vala_dpap_record_factory_get_type (void) G_GNUC_CONST;
+GType vala_image_record_factory_get_type (void) G_GNUC_CONST;
#define DPAP_COPY_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), TYPE_DPAP_COPY, DPAPCopyPrivate))
-static gboolean dpap_copy_connected_cb (DPAPCopy* self, DMAPConnection* connection, gboolean _result_, const
gchar* reason);
-static void __lambda4_ (DPAPCopy* self, guint k, DMAPRecord* v);
-GType vala_dpap_record_get_type (void) G_GNUC_CONST;
-const gchar* vala_dpap_record_get_location (ValaDPAPRecord* self);
-static void ___lambda4__dmap_id_record_func (guint id, DMAPRecord* record, gpointer self);
+static gboolean dpap_copy_connected_cb (DPAPCopy* self, DmapConnection* connection, gboolean _result_, const
gchar* reason);
+static void __lambda4_ (DPAPCopy* self, guint k, DmapRecord* v);
+GType vala_image_record_get_type (void) G_GNUC_CONST;
+const gchar* vala_image_record_get_location (ValaImageRecord* self);
+static void ___lambda4__dmap_id_record_func (guint id, DmapRecord* record, gpointer self);
DPAPCopy* dpap_copy_new (GError** error);
DPAPCopy* dpap_copy_construct (GType object_type, GError** error);
-ValaDMAPDb* vala_dmap_db_new (void);
-ValaDMAPDb* vala_dmap_db_construct (GType object_type);
-ValaDPAPRecordFactory* vala_dpap_record_factory_new (void);
-ValaDPAPRecordFactory* vala_dpap_record_factory_construct (GType object_type);
-static void __lambda5_ (DPAPCopy* self, DMAPMdnsBrowser* browser, DMAPMdnsService* service);
-static gboolean _dpap_copy_connected_cb_dmap_connection_func (DMAPConnection* connection, gboolean _result_,
const gchar* reason, gpointer self);
-static void ___lambda5__dmap_mdns_browser_service_added (DMAPMdnsBrowser* _sender, DMAPMdnsService* service,
gpointer self);
+ValaDmapDb* vala_dmap_db_new (void);
+ValaDmapDb* vala_dmap_db_construct (GType object_type);
+ValaImageRecordFactory* vala_image_record_factory_new (void);
+ValaImageRecordFactory* vala_image_record_factory_construct (GType object_type);
+static void __lambda5_ (DPAPCopy* self, DmapMdnsBrowser* browser, DmapMdnsService* service);
+static gboolean _dpap_copy_connected_cb_dmap_connection_func (DmapConnection* connection, gboolean _result_,
const gchar* reason, gpointer self);
+static void ___lambda5__dmap_mdns_browser_service_added (DmapMdnsBrowser* _sender, DmapMdnsService* service,
gpointer self);
static void dpap_copy_finalize (DPAPCopy * obj);
void debug_printf (const gchar* log_domain, GLogLevelFlags log_level, const gchar* message);
void debug_null (const gchar* log_domain, GLogLevelFlags log_level, const gchar* message);
@@ -139,65 +139,65 @@ gint _vala_main (gchar** args, int args_length1);
static void _debug_null_glog_func (const gchar* log_domain, GLogLevelFlags log_levels, const gchar* message,
gpointer self);
-static void __lambda4_ (DPAPCopy* self, guint k, DMAPRecord* v) {
+static void __lambda4_ (DPAPCopy* self, guint k, DmapRecord* v) {
FILE* _tmp0_;
- DMAPRecord* _tmp1_;
+ DmapRecord* _tmp1_;
const gchar* _tmp2_;
const gchar* _tmp3_;
g_return_if_fail (v != NULL);
_tmp0_ = stdout;
_tmp1_ = v;
- _tmp2_ = vala_dpap_record_get_location (G_TYPE_CHECK_INSTANCE_CAST (_tmp1_, TYPE_VALA_DPAP_RECORD,
ValaDPAPRecord));
+ _tmp2_ = vala_image_record_get_location (G_TYPE_CHECK_INSTANCE_CAST (_tmp1_, TYPE_VALA_IMAGE_RECORD,
ValaImageRecord));
_tmp3_ = _tmp2_;
fprintf (_tmp0_, "%s\n", _tmp3_);
}
-static void ___lambda4__dmap_id_record_func (guint id, DMAPRecord* record, gpointer self) {
+static void ___lambda4__dmap_id_record_func (guint id, DmapRecord* record, gpointer self) {
__lambda4_ ((DPAPCopy*) self, id, record);
}
-static gboolean dpap_copy_connected_cb (DPAPCopy* self, DMAPConnection* connection, gboolean _result_, const
gchar* reason) {
+static gboolean dpap_copy_connected_cb (DPAPCopy* self, DmapConnection* connection, gboolean _result_, const
gchar* reason) {
gboolean result = FALSE;
- ValaDMAPDb* _tmp0_;
+ ValaDmapDb* _tmp0_;
gint64 _tmp1_;
- ValaDMAPDb* _tmp2_;
+ ValaDmapDb* _tmp2_;
g_return_val_if_fail (self != NULL, FALSE);
g_return_val_if_fail (connection != NULL, FALSE);
_tmp0_ = self->priv->db;
- _tmp1_ = dmap_db_count ((DMAPDb*) _tmp0_);
+ _tmp1_ = dmap_db_count ((DmapDb*) _tmp0_);
g_debug ("%" G_GINT64_FORMAT " entries\n", _tmp1_);
_tmp2_ = self->priv->db;
- dmap_db_foreach ((DMAPDb*) _tmp2_, ___lambda4__dmap_id_record_func, self);
+ dmap_db_foreach ((DmapDb*) _tmp2_, ___lambda4__dmap_id_record_func, self);
result = TRUE;
return result;
}
-static gboolean _dpap_copy_connected_cb_dmap_connection_func (DMAPConnection* connection, gboolean _result_,
const gchar* reason, gpointer self) {
+static gboolean _dpap_copy_connected_cb_dmap_connection_func (DmapConnection* connection, gboolean _result_,
const gchar* reason, gpointer self) {
gboolean result;
result = dpap_copy_connected_cb ((DPAPCopy*) self, connection, _result_, reason);
return result;
}
-static void __lambda5_ (DPAPCopy* self, DMAPMdnsBrowser* browser, DMAPMdnsService* service) {
- DMAPMdnsService* _tmp0_;
+static void __lambda5_ (DPAPCopy* self, DmapMdnsBrowser* browser, DmapMdnsService* service) {
+ DmapMdnsService* _tmp0_;
gchar* _tmp1_;
gchar* _tmp2_;
gchar* _tmp3_;
- DMAPMdnsService* _tmp4_;
+ DmapMdnsService* _tmp4_;
gchar* _tmp5_;
gchar* _tmp6_;
gchar* _tmp7_;
- DMAPMdnsService* _tmp8_;
+ DmapMdnsService* _tmp8_;
guint _tmp9_;
guint _tmp10_;
- ValaDMAPDb* _tmp11_;
- ValaDPAPRecordFactory* _tmp12_;
- DPAPConnection* _tmp13_;
- DMAPConnection* _tmp14_;
+ ValaDmapDb* _tmp11_;
+ ValaImageRecordFactory* _tmp12_;
+ DmapImageConnection* _tmp13_;
+ DmapConnection* _tmp14_;
g_return_if_fail (browser != NULL);
g_return_if_fail (service != NULL);
_tmp0_ = service;
@@ -213,9 +213,9 @@ static void __lambda5_ (DPAPCopy* self, DMAPMdnsBrowser* browser, DMAPMdnsServic
_tmp10_ = _tmp9_;
_tmp11_ = self->priv->db;
_tmp12_ = self->priv->factory;
- _tmp13_ = dpap_connection_new (_tmp3_, _tmp7_, _tmp10_, (DMAPDb*) _tmp11_, (DMAPRecordFactory*)
_tmp12_);
+ _tmp13_ = dmap_image_connection_new (_tmp3_, _tmp7_, _tmp10_, (DmapDb*) _tmp11_, (DmapRecordFactory*)
_tmp12_);
_g_object_unref0 (self->priv->connection);
- self->priv->connection = G_TYPE_CHECK_INSTANCE_CAST (_tmp13_, DMAP_TYPE_CONNECTION, DMAPConnection);
+ self->priv->connection = G_TYPE_CHECK_INSTANCE_CAST (_tmp13_, DMAP_TYPE_CONNECTION, DmapConnection);
_g_free0 (_tmp7_);
_g_free0 (_tmp3_);
_tmp14_ = self->priv->connection;
@@ -223,24 +223,24 @@ static void __lambda5_ (DPAPCopy* self, DMAPMdnsBrowser* browser, DMAPMdnsServic
}
-static void ___lambda5__dmap_mdns_browser_service_added (DMAPMdnsBrowser* _sender, DMAPMdnsService* service,
gpointer self) {
+static void ___lambda5__dmap_mdns_browser_service_added (DmapMdnsBrowser* _sender, DmapMdnsService* service,
gpointer self) {
__lambda5_ ((DPAPCopy*) self, _sender, service);
}
DPAPCopy* dpap_copy_construct (GType object_type, GError** error) {
DPAPCopy* self = NULL;
- ValaDMAPDb* _tmp0_;
- ValaDPAPRecordFactory* _tmp1_;
- DMAPMdnsBrowser* _tmp2_;
- DMAPMdnsBrowser* _tmp3_;
- DMAPMdnsBrowser* _tmp4_;
+ ValaDmapDb* _tmp0_;
+ ValaImageRecordFactory* _tmp1_;
+ DmapMdnsBrowser* _tmp2_;
+ DmapMdnsBrowser* _tmp3_;
+ DmapMdnsBrowser* _tmp4_;
GError * _inner_error_ = NULL;
self = (DPAPCopy*) g_type_create_instance (object_type);
_tmp0_ = vala_dmap_db_new ();
_g_object_unref0 (self->priv->db);
self->priv->db = _tmp0_;
- _tmp1_ = vala_dpap_record_factory_new ();
+ _tmp1_ = vala_image_record_factory_new ();
_g_object_unref0 (self->priv->factory);
self->priv->factory = _tmp1_;
_tmp2_ = dmap_mdns_browser_new (DMAP_MDNS_SERVICE_TYPE_DPAP);
diff --git a/tests/dmapcopy.vala b/tests/dmapcopy.vala
index 449a74b..8a4902b 100644
--- a/tests/dmapcopy.vala
+++ b/tests/dmapcopy.vala
@@ -21,17 +21,17 @@
*/
private class DPAPCopy {
- private DMAP.MdnsBrowser browser;
- private DMAP.Connection connection;
- private ValaDMAPDb db;
- private ValaDPAPRecordFactory factory;
+ private Dmap.MdnsBrowser browser;
+ private Dmap.Connection connection;
+ private ValaDmapDb db;
+ private ValaImageRecordFactory factory;
- private bool connected_cb (DMAP.Connection connection, bool result, string? reason) {
+ private bool connected_cb (Dmap.Connection connection, bool result, string? reason) {
GLib.debug ("%" + int64.FORMAT + " entries\n", db.count ());
db.foreach ((k, v) => {
- stdout.printf ("%s\n", ((ValaDPAPRecord) v).location);
+ stdout.printf ("%s\n", ((ValaImageRecord) v).location);
/* Uncomment to copy the data:
var session = new Soup.SessionAsync ();
@@ -59,12 +59,12 @@ private class DPAPCopy {
}
public DPAPCopy () throws GLib.Error {
- db = new ValaDMAPDb ();
- factory = new ValaDPAPRecordFactory ();
+ db = new ValaDmapDb ();
+ factory = new ValaImageRecordFactory ();
- browser = new DMAP.MdnsBrowser (DMAP.MdnsServiceType.DPAP);
+ browser = new Dmap.MdnsBrowser (Dmap.MdnsServiceType.DPAP);
browser.service_added.connect ((browser, service) => {
- connection = (DMAP.Connection) new DPAP.Connection (service.service_name,
service.host, service.port, db, factory);
+ connection = (Dmap.Connection) new Dmap.ImageConnection (service.service_name,
service.host, service.port, db, factory);
connection.start (connected_cb);
});
browser.start ();
diff --git a/tests/dmapserve.c b/tests/dmapserve.c
index f1c93b0..9b27987 100644
--- a/tests/dmapserve.c
+++ b/tests/dmapserve.c
@@ -1,4 +1,4 @@
-/* dmapserve.c generated by valac 0.38.3, the Vala compiler
+/* dmapserve.c generated by valac 0.38.4, the Vala compiler
* generated from dmapserve.vala, do not modify */
/* FILE: dmapserve.vala -- Serve media using DMAP
@@ -43,35 +43,35 @@ typedef struct _DPAPServe DPAPServe;
typedef struct _DPAPServeClass DPAPServeClass;
typedef struct _DPAPServePrivate DPAPServePrivate;
-#define TYPE_VALA_DPAP_RECORD (vala_dpap_record_get_type ())
-#define VALA_DPAP_RECORD(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_VALA_DPAP_RECORD, ValaDPAPRecord))
-#define VALA_DPAP_RECORD_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_VALA_DPAP_RECORD,
ValaDPAPRecordClass))
-#define IS_VALA_DPAP_RECORD(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_VALA_DPAP_RECORD))
-#define IS_VALA_DPAP_RECORD_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_VALA_DPAP_RECORD))
-#define VALA_DPAP_RECORD_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_VALA_DPAP_RECORD,
ValaDPAPRecordClass))
+#define TYPE_VALA_IMAGE_RECORD (vala_image_record_get_type ())
+#define VALA_IMAGE_RECORD(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_VALA_IMAGE_RECORD, ValaImageRecord))
+#define VALA_IMAGE_RECORD_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_VALA_IMAGE_RECORD,
ValaImageRecordClass))
+#define IS_VALA_IMAGE_RECORD(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_VALA_IMAGE_RECORD))
+#define IS_VALA_IMAGE_RECORD_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_VALA_IMAGE_RECORD))
+#define VALA_IMAGE_RECORD_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_VALA_IMAGE_RECORD,
ValaImageRecordClass))
-typedef struct _ValaDPAPRecord ValaDPAPRecord;
-typedef struct _ValaDPAPRecordClass ValaDPAPRecordClass;
+typedef struct _ValaImageRecord ValaImageRecord;
+typedef struct _ValaImageRecordClass ValaImageRecordClass;
#define TYPE_VALA_DMAP_DB (vala_dmap_db_get_type ())
-#define VALA_DMAP_DB(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_VALA_DMAP_DB, ValaDMAPDb))
-#define VALA_DMAP_DB_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_VALA_DMAP_DB, ValaDMAPDbClass))
+#define VALA_DMAP_DB(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_VALA_DMAP_DB, ValaDmapDb))
+#define VALA_DMAP_DB_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_VALA_DMAP_DB, ValaDmapDbClass))
#define IS_VALA_DMAP_DB(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_VALA_DMAP_DB))
#define IS_VALA_DMAP_DB_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_VALA_DMAP_DB))
-#define VALA_DMAP_DB_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_VALA_DMAP_DB, ValaDMAPDbClass))
+#define VALA_DMAP_DB_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_VALA_DMAP_DB, ValaDmapDbClass))
-typedef struct _ValaDMAPDb ValaDMAPDb;
-typedef struct _ValaDMAPDbClass ValaDMAPDbClass;
+typedef struct _ValaDmapDb ValaDmapDb;
+typedef struct _ValaDmapDbClass ValaDmapDbClass;
#define TYPE_VALA_DMAP_CONTAINER_DB (vala_dmap_container_db_get_type ())
-#define VALA_DMAP_CONTAINER_DB(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_VALA_DMAP_CONTAINER_DB,
ValaDMAPContainerDb))
-#define VALA_DMAP_CONTAINER_DB_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_VALA_DMAP_CONTAINER_DB,
ValaDMAPContainerDbClass))
+#define VALA_DMAP_CONTAINER_DB(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_VALA_DMAP_CONTAINER_DB,
ValaDmapContainerDb))
+#define VALA_DMAP_CONTAINER_DB_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_VALA_DMAP_CONTAINER_DB,
ValaDmapContainerDbClass))
#define IS_VALA_DMAP_CONTAINER_DB(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_VALA_DMAP_CONTAINER_DB))
#define IS_VALA_DMAP_CONTAINER_DB_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass),
TYPE_VALA_DMAP_CONTAINER_DB))
-#define VALA_DMAP_CONTAINER_DB_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj),
TYPE_VALA_DMAP_CONTAINER_DB, ValaDMAPContainerDbClass))
+#define VALA_DMAP_CONTAINER_DB_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj),
TYPE_VALA_DMAP_CONTAINER_DB, ValaDmapContainerDbClass))
-typedef struct _ValaDMAPContainerDb ValaDMAPContainerDb;
-typedef struct _ValaDMAPContainerDbClass ValaDMAPContainerDbClass;
+typedef struct _ValaDmapContainerDb ValaDmapContainerDb;
+typedef struct _ValaDmapContainerDbClass ValaDmapContainerDbClass;
enum {
DPAP_SERVE_0_PROPERTY,
DPAP_SERVE_NUM_PROPERTIES
@@ -94,10 +94,10 @@ struct _DPAPServeClass {
};
struct _DPAPServePrivate {
- ValaDPAPRecord* record;
- ValaDMAPDb* db;
- ValaDMAPContainerDb* container_db;
- DPAPShare* share;
+ ValaImageRecord* record;
+ ValaDmapDb* db;
+ ValaDmapContainerDb* container_db;
+ DmapImageShare* share;
};
struct _ParamSpecDPAPServe {
@@ -114,18 +114,18 @@ void value_set_dpap_serve (GValue* value, gpointer v_object);
void value_take_dpap_serve (GValue* value, gpointer v_object);
gpointer value_get_dpap_serve (const GValue* value);
GType dpap_serve_get_type (void) G_GNUC_CONST;
-GType vala_dpap_record_get_type (void) G_GNUC_CONST;
+GType vala_image_record_get_type (void) G_GNUC_CONST;
GType vala_dmap_db_get_type (void) G_GNUC_CONST;
GType vala_dmap_container_db_get_type (void) G_GNUC_CONST;
#define DPAP_SERVE_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), TYPE_DPAP_SERVE, DPAPServePrivate))
DPAPServe* dpap_serve_new (GError** error);
DPAPServe* dpap_serve_construct (GType object_type, GError** error);
-ValaDPAPRecord* vala_dpap_record_new (void);
-ValaDPAPRecord* vala_dpap_record_construct (GType object_type);
-ValaDMAPDb* vala_dmap_db_new (void);
-ValaDMAPDb* vala_dmap_db_construct (GType object_type);
-ValaDMAPContainerDb* vala_dmap_container_db_new (void);
-ValaDMAPContainerDb* vala_dmap_container_db_construct (GType object_type);
+ValaImageRecord* vala_image_record_new (void);
+ValaImageRecord* vala_image_record_construct (GType object_type);
+ValaDmapDb* vala_dmap_db_new (void);
+ValaDmapDb* vala_dmap_db_construct (GType object_type);
+ValaDmapContainerDb* vala_dmap_container_db_new (void);
+ValaDmapContainerDb* vala_dmap_container_db_construct (GType object_type);
static void dpap_serve_finalize (DPAPServe * obj);
void debug_printf (const gchar* log_domain, GLogLevelFlags log_level, const gchar* message);
void debug_null (const gchar* log_domain, GLogLevelFlags log_level, const gchar* message);
@@ -135,16 +135,16 @@ static void _debug_printf_glog_func (const gchar* log_domain, GLogLevelFlags log
DPAPServe* dpap_serve_construct (GType object_type, GError** error) {
DPAPServe* self = NULL;
- ValaDPAPRecord* _tmp0_;
- ValaDMAPDb* _tmp1_;
- ValaDMAPDb* _tmp2_;
- ValaDPAPRecord* _tmp3_;
- ValaDMAPContainerDb* _tmp4_;
- ValaDMAPDb* _tmp5_;
- ValaDMAPContainerDb* _tmp6_;
- DPAPShare* _tmp7_;
+ ValaImageRecord* _tmp0_;
+ ValaDmapDb* _tmp1_;
+ ValaDmapDb* _tmp2_;
+ ValaImageRecord* _tmp3_;
+ ValaDmapContainerDb* _tmp4_;
+ ValaDmapDb* _tmp5_;
+ ValaDmapContainerDb* _tmp6_;
+ DmapImageShare* _tmp7_;
self = (DPAPServe*) g_type_create_instance (object_type);
- _tmp0_ = vala_dpap_record_new ();
+ _tmp0_ = vala_image_record_new ();
_g_object_unref0 (self->priv->record);
self->priv->record = _tmp0_;
_tmp1_ = vala_dmap_db_new ();
@@ -152,13 +152,13 @@ DPAPServe* dpap_serve_construct (GType object_type, GError** error) {
self->priv->db = _tmp1_;
_tmp2_ = self->priv->db;
_tmp3_ = self->priv->record;
- dmap_db_add ((DMAPDb*) _tmp2_, (DMAPRecord*) _tmp3_);
+ dmap_db_add ((DmapDb*) _tmp2_, (DmapRecord*) _tmp3_);
_tmp4_ = vala_dmap_container_db_new ();
_g_object_unref0 (self->priv->container_db);
self->priv->container_db = _tmp4_;
_tmp5_ = self->priv->db;
_tmp6_ = self->priv->container_db;
- _tmp7_ = dpap_share_new ("dmapserve", NULL, _tmp5_, _tmp6_, NULL);
+ _tmp7_ = dmap_image_share_new ("dmapserve", NULL, _tmp5_, _tmp6_, NULL);
_g_object_unref0 (self->priv->share);
self->priv->share = _tmp7_;
return self;
diff --git a/tests/dmapserve.vala b/tests/dmapserve.vala
index 5f5b260..82bd5a0 100644
--- a/tests/dmapserve.vala
+++ b/tests/dmapserve.vala
@@ -21,17 +21,17 @@
*/
private class DPAPServe {
- ValaDPAPRecord record;
- ValaDMAPDb db;
- ValaDMAPContainerDb container_db;
- DPAP.Share share;
+ ValaImageRecord record;
+ ValaDmapDb db;
+ ValaDmapContainerDb container_db;
+ Dmap.ImageShare share;
public DPAPServe () throws GLib.Error {
- record = new ValaDPAPRecord ();
- db = new ValaDMAPDb ();
+ record = new ValaImageRecord ();
+ db = new ValaDmapDb ();
db.add (record);
- container_db = new ValaDMAPContainerDb ();
- share = new DPAP.Share ("dmapserve", null, db, container_db, null);
+ container_db = new ValaDmapContainerDb ();
+ share = new Dmap.ImageShare ("dmapserve", null, db, container_db, null);
}
}
diff --git a/tests/dpapview.vala b/tests/dpapview.vala
index cf42a9e..fc8d692 100644
--- a/tests/dpapview.vala
+++ b/tests/dpapview.vala
@@ -20,22 +20,22 @@
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
-private class DPAPViewer {
- private DMAP.MdnsBrowser browser;
- private DMAP.Connection connection;
+private class DpapViewer {
+ private Dmap.MdnsBrowser browser;
+ private Dmap.Connection connection;
private Gtk.ListStore liststore;
- private ValaDMAPDb db;
- private ValaDPAPRecordFactory factory;
+ private ValaDmapDb db;
+ private ValaImageRecordFactory factory;
- private bool connected_cb (DMAP.Connection connection, bool result, string? reason) {
+ private bool connected_cb (Dmap.Connection connection, bool result, string? reason) {
GLib.debug ("%" + int64.FORMAT + " entries\n", db.count ());
db.foreach ((k, v) => {
Gdk.Pixbuf pixbuf = null;
- if (((ValaDPAPRecord) v).thumbnail != null) {
+ if (((ValaImageRecord) v).thumbnail != null) {
string path;
int fd = GLib.FileUtils.open_tmp ("dpapview.XXXXXX", out path);
- GLib.FileUtils.set_data (path, (uint8[]) ((ValaDPAPRecord) v).thumbnail.data);
+ GLib.FileUtils.set_data (path, (uint8[]) ((ValaImageRecord)
v).thumbnail.data);
GLib.FileUtils.close (fd);
pixbuf = new Gdk.Pixbuf.from_file (path);
GLib.FileUtils.unlink (path);
@@ -43,29 +43,29 @@ private class DPAPViewer {
Gtk.TreeIter iter;
liststore.append (out iter);
- liststore.set (iter, 0, pixbuf, 1, ((ValaDPAPRecord) v).filename);
+ liststore.set (iter, 0, pixbuf, 1, ((ValaImageRecord) v).filename);
});
return true;
}
- public DPAPViewer (Gtk.Builder builder) throws GLib.Error {
+ public DpapViewer (Gtk.Builder builder) throws GLib.Error {
builder.connect_signals (this);
Gtk.Widget widget = builder.get_object ("window") as Gtk.Widget;
Gtk.IconView iconview = builder.get_object ("iconview") as Gtk.IconView;
liststore = builder.get_object ("liststore") as Gtk.ListStore;
- db = new ValaDMAPDb ();
- factory = new ValaDPAPRecordFactory ();
+ db = new ValaDmapDb ();
+ factory = new ValaImageRecordFactory ();
iconview.set_pixbuf_column (0);
iconview.set_text_column (1);
widget.show_all ();
- browser = new DMAP.MdnsBrowser (DMAP.MdnsServiceType.DPAP);
+ browser = new Dmap.MdnsBrowser (Dmap.MdnsServiceType.DPAP);
browser.service_added.connect ((browser, service) => {
- connection = (DMAP.Connection) new DPAP.Connection (service.service_name,
service.host, service.port, db, factory);
+ connection = (Dmap.Connection) new Dmap.ImageConnection (service.service_name,
service.host, service.port, db, factory);
connection.start (connected_cb);
});
browser.start ();
@@ -79,7 +79,7 @@ int main (string[] args) {
var builder = new Gtk.Builder ();
builder.add_from_file ("tests/dpapview.ui");
- var dpapviewer = new DPAPViewer (builder);
+ var dpapviewer = new DpapViewer (builder);
Gtk.main ();
diff --git a/tests/test-dmap-client.c b/tests/test-dmap-client.c
index 9a33258..de61fc2 100644
--- a/tests/test-dmap-client.c
+++ b/tests/test-dmap-client.c
@@ -23,8 +23,8 @@
#include <string.h>
#include <libdmapsharing/dmap.h>
-#include <libdmapsharing/test-daap-record-factory.h>
-#include <libdmapsharing/test-dpap-record-factory.h>
+#include <libdmapsharing/test-dmap-av-record-factory.h>
+#include <libdmapsharing/test-dmap-image-record-factory.h>
#include <libdmapsharing/test-dmap-db.h>
enum {
@@ -36,7 +36,7 @@ static GMainLoop *loop;
static guint conn_type = DAAP;
static void
-print_record (guint id, DMAPRecord *record, gpointer user_data)
+print_record (guint id, DmapRecord *record, gpointer user_data)
{
gboolean has_video;
gchar *artist, *title;
@@ -54,18 +54,18 @@ print_record (guint id, DMAPRecord *record, gpointer user_data)
}
static void
-connected_cb (DMAPConnection *connection,
- gboolean result,
- const char *reason,
- DMAPDb *db)
+connected_cb (DmapConnection *connection,
+ gboolean result,
+ const char *reason,
+ DmapDb *db)
{
g_print ("Connection cb., DB has %lu entries\n", dmap_db_count (db));
- dmap_db_foreach (db, (DMAPIdRecordFunc) print_record, NULL);
+ dmap_db_foreach (db, (DmapIdRecordFunc) print_record, NULL);
}
static void
-authenticate_cb (DMAPConnection *connection,
+authenticate_cb (DmapConnection *connection,
const char *name,
SoupSession *session,
SoupMessage *msg,
@@ -86,13 +86,13 @@ authenticate_cb (DMAPConnection *connection,
}
static void
-service_added_cb (DMAPMdnsBrowser *browser,
- DMAPMdnsService *service,
+service_added_cb (DmapMdnsBrowser *browser,
+ DmapMdnsService *service,
gpointer user_data)
{
- DMAPRecordFactory *factory;
- DMAPConnection *conn;
- DMAPDb *db;
+ DmapRecordFactory *factory;
+ DmapConnection *conn;
+ DmapDb *db;
guint port;
gchar *service_name, *name, *host;
@@ -113,20 +113,20 @@ service_added_cb (DMAPMdnsBrowser *browser,
}
if (conn_type == DAAP) {
- factory = DMAP_RECORD_FACTORY (test_daap_record_factory_new ());
+ factory = DMAP_RECORD_FACTORY (test_dmap_av_record_factory_new ());
if (factory == NULL) {
g_error ("Error creating record factory");
}
- conn = DMAP_CONNECTION (daap_connection_new (name, host, port, db, factory));
+ conn = DMAP_CONNECTION (dmap_av_connection_new (name, host, port, db, factory));
} else {
- factory = DMAP_RECORD_FACTORY (test_dpap_record_factory_new ());
+ factory = DMAP_RECORD_FACTORY (test_dmap_image_record_factory_new ());
if (factory == NULL) {
g_error ("Error creating record factory");
}
- conn = DMAP_CONNECTION (dpap_connection_new (name, host, port, db, factory));
+ conn = DMAP_CONNECTION (dmap_image_connection_new (name, host, port, db, factory));
}
g_signal_connect (DMAP_CONNECTION (conn), "authenticate", G_CALLBACK(authenticate_cb), NULL);
- dmap_connection_start (DMAP_CONNECTION (conn), (DMAPConnectionFunc) connected_cb, db);
+ dmap_connection_start (DMAP_CONNECTION (conn), (DmapConnectionFunc) connected_cb, db);
g_free(service_name);
g_free(name);
@@ -135,7 +135,7 @@ service_added_cb (DMAPMdnsBrowser *browser,
int main(int argc, char **argv)
{
- DMAPMdnsBrowser *browser;
+ DmapMdnsBrowser *browser;
GError *error = NULL;
if (argc == 2)
diff --git a/tests/test-dmap-server.c b/tests/test-dmap-server.c
index a90a83d..8d35e1c 100644
--- a/tests/test-dmap-server.c
+++ b/tests/test-dmap-server.c
@@ -24,10 +24,10 @@
#include <glib.h>
#include <libdmapsharing/dmap.h>
-#include <libdmapsharing/test-daap-record.h>
-#include <libdmapsharing/test-dpap-record.h>
-#include <libdmapsharing/test-daap-record-factory.h>
-#include <libdmapsharing/test-dpap-record-factory.h>
+#include <libdmapsharing/test-dmap-av-record.h>
+#include <libdmapsharing/test-dmap-image-record.h>
+#include <libdmapsharing/test-dmap-av-record-factory.h>
+#include <libdmapsharing/test-dmap-image-record-factory.h>
#include <libdmapsharing/test-dmap-db.h>
#include <libdmapsharing/test-dmap-container-record.h>
#include <libdmapsharing/test-dmap-container-db.h>
@@ -55,21 +55,21 @@ static void
create_share (guint conn_type)
{
char *name = dmap_sharing_default_share_name ();
- DMAPContainerRecord *dmap_container_record = \
+ DmapContainerRecord *dmap_container_record = \
DMAP_CONTAINER_RECORD (test_dmap_container_record_new ());
- DMAPContainerDb *dmap_container_db = \
+ DmapContainerDb *dmap_container_db = \
DMAP_CONTAINER_DB (test_dmap_container_db_new
(dmap_container_record));
- DMAPRecordFactory *factory;
- DMAPRecord *record;
- DMAPShare *share = NULL;
- DMAPDb *db;
+ DmapRecordFactory *factory;
+ DmapRecord *record;
+ DmapShare *share = NULL;
+ DmapDb *db;
if (conn_type == DAAP) {
- factory = DMAP_RECORD_FACTORY (test_daap_record_factory_new ());
+ factory = DMAP_RECORD_FACTORY (test_dmap_av_record_factory_new ());
} else {
- factory = DMAP_RECORD_FACTORY (test_dpap_record_factory_new ());
+ factory = DMAP_RECORD_FACTORY (test_dmap_image_record_factory_new ());
}
record = DMAP_RECORD (dmap_record_factory_create (factory, NULL));
@@ -80,17 +80,17 @@ create_share (guint conn_type)
g_warning ("initialize DAAP sharing");
if (conn_type == DAAP) {
- share = DMAP_SHARE (daap_share_new (name,
- NULL,
- db,
- dmap_container_db,
- NULL));
+ share = DMAP_SHARE (dmap_av_share_new (name,
+ NULL,
+ db,
+ dmap_container_db,
+NULL));
} else {
- share = DMAP_SHARE (dpap_share_new (name,
- NULL,
- db,
- dmap_container_db,
- NULL));
+ share = DMAP_SHARE (dmap_image_share_new (name,
+ NULL,
+ db,
+ dmap_container_db,
+ NULL));
}
g_assert (NULL != share);
diff --git a/tests/vala-dmap-container-db.c b/tests/vala-dmap-container-db.c
index 4642be8..1b33805 100644
--- a/tests/vala-dmap-container-db.c
+++ b/tests/vala-dmap-container-db.c
@@ -1,7 +1,7 @@
-/* vala-dmap-container-db.c generated by valac 0.38.3, the Vala compiler
+/* vala-dmap-container-db.c generated by valac 0.38.4, the Vala compiler
* generated from vala-dmap-container-db.vala, do not modify */
-/* FILE: vala-dmap-db.vala -- A DMAPContainerDb implementation in Vala
+/* FILE: vala-dmap-db.vala -- A DmapContainerDb implementation in Vala
* AUTHOR: W. Michael Petullo <mike flyn org>
* DATE: 21 December 2010
*
@@ -30,15 +30,15 @@
#define TYPE_VALA_DMAP_CONTAINER_DB (vala_dmap_container_db_get_type ())
-#define VALA_DMAP_CONTAINER_DB(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_VALA_DMAP_CONTAINER_DB,
ValaDMAPContainerDb))
-#define VALA_DMAP_CONTAINER_DB_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_VALA_DMAP_CONTAINER_DB,
ValaDMAPContainerDbClass))
+#define VALA_DMAP_CONTAINER_DB(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_VALA_DMAP_CONTAINER_DB,
ValaDmapContainerDb))
+#define VALA_DMAP_CONTAINER_DB_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_VALA_DMAP_CONTAINER_DB,
ValaDmapContainerDbClass))
#define IS_VALA_DMAP_CONTAINER_DB(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_VALA_DMAP_CONTAINER_DB))
#define IS_VALA_DMAP_CONTAINER_DB_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass),
TYPE_VALA_DMAP_CONTAINER_DB))
-#define VALA_DMAP_CONTAINER_DB_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj),
TYPE_VALA_DMAP_CONTAINER_DB, ValaDMAPContainerDbClass))
+#define VALA_DMAP_CONTAINER_DB_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj),
TYPE_VALA_DMAP_CONTAINER_DB, ValaDmapContainerDbClass))
-typedef struct _ValaDMAPContainerDb ValaDMAPContainerDb;
-typedef struct _ValaDMAPContainerDbClass ValaDMAPContainerDbClass;
-typedef struct _ValaDMAPContainerDbPrivate ValaDMAPContainerDbPrivate;
+typedef struct _ValaDmapContainerDb ValaDmapContainerDb;
+typedef struct _ValaDmapContainerDbClass ValaDmapContainerDbClass;
+typedef struct _ValaDmapContainerDbPrivate ValaDmapContainerDbPrivate;
enum {
VALA_DMAP_CONTAINER_DB_0_PROPERTY,
VALA_DMAP_CONTAINER_DB_NUM_PROPERTIES
@@ -46,41 +46,41 @@ enum {
static GParamSpec* vala_dmap_container_db_properties[VALA_DMAP_CONTAINER_DB_NUM_PROPERTIES];
#define _g_object_unref0(var) ((var == NULL) ? NULL : (var = (g_object_unref (var), NULL)))
-struct _ValaDMAPContainerDb {
+struct _ValaDmapContainerDb {
GObject parent_instance;
- ValaDMAPContainerDbPrivate * priv;
+ ValaDmapContainerDbPrivate * priv;
};
-struct _ValaDMAPContainerDbClass {
+struct _ValaDmapContainerDbClass {
GObjectClass parent_class;
};
-struct _ValaDMAPContainerDbPrivate {
+struct _ValaDmapContainerDbPrivate {
GeeArrayList* db;
};
static gpointer vala_dmap_container_db_parent_class = NULL;
-static DMAPContainerDbInterface * vala_dmap_container_db_dmap_container_db_parent_iface = NULL;
+static DmapContainerDbInterface * vala_dmap_container_db_dmap_container_db_parent_iface = NULL;
GType vala_dmap_container_db_get_type (void) G_GNUC_CONST;
-#define VALA_DMAP_CONTAINER_DB_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o),
TYPE_VALA_DMAP_CONTAINER_DB, ValaDMAPContainerDbPrivate))
-static gint64 vala_dmap_container_db_real_count (DMAPContainerDb* base);
-static void vala_dmap_container_db_real_foreach (DMAPContainerDb* base, GHFunc func, void* func_target);
-static DMAPContainerRecord* vala_dmap_container_db_real_lookup_by_id (DMAPContainerDb* base, guint id);
-static void vala_dmap_container_db_real_add (DMAPContainerDb* base, DMAPContainerRecord* record);
-ValaDMAPContainerDb* vala_dmap_container_db_new (void);
-ValaDMAPContainerDb* vala_dmap_container_db_construct (GType object_type);
+#define VALA_DMAP_CONTAINER_DB_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o),
TYPE_VALA_DMAP_CONTAINER_DB, ValaDmapContainerDbPrivate))
+static gint64 vala_dmap_container_db_real_count (DmapContainerDb* base);
+static void vala_dmap_container_db_real_foreach (DmapContainerDb* base, GHFunc func, void* func_target);
+static DmapContainerRecord* vala_dmap_container_db_real_lookup_by_id (DmapContainerDb* base, guint id);
+static void vala_dmap_container_db_real_add (DmapContainerDb* base, DmapContainerRecord* record);
+ValaDmapContainerDb* vala_dmap_container_db_new (void);
+ValaDmapContainerDb* vala_dmap_container_db_construct (GType object_type);
static void vala_dmap_container_db_finalize (GObject * obj);
-static gint64 vala_dmap_container_db_real_count (DMAPContainerDb* base) {
- ValaDMAPContainerDb * self;
+static gint64 vala_dmap_container_db_real_count (DmapContainerDb* base) {
+ ValaDmapContainerDb * self;
gint64 result = 0LL;
GeeArrayList* _tmp0_;
gint _tmp1_;
gint _tmp2_;
- self = (ValaDMAPContainerDb*) base;
+ self = (ValaDmapContainerDb*) base;
_tmp0_ = self->priv->db;
_tmp1_ = gee_abstract_collection_get_size ((GeeAbstractCollection*) _tmp0_);
_tmp2_ = _tmp1_;
@@ -89,10 +89,10 @@ static gint64 vala_dmap_container_db_real_count (DMAPContainerDb* base) {
}
-static void vala_dmap_container_db_real_foreach (DMAPContainerDb* base, GHFunc func, void* func_target) {
- ValaDMAPContainerDb * self;
+static void vala_dmap_container_db_real_foreach (DmapContainerDb* base, GHFunc func, void* func_target) {
+ ValaDmapContainerDb * self;
gint i = 0;
- self = (ValaDMAPContainerDb*) base;
+ self = (ValaDmapContainerDb*) base;
{
gboolean _tmp0_ = FALSE;
i = 0;
@@ -129,58 +129,58 @@ static void vala_dmap_container_db_real_foreach (DMAPContainerDb* base, GHFunc f
_tmp9_ = self->priv->db;
_tmp10_ = i;
_tmp11_ = gee_abstract_list_get ((GeeAbstractList*) _tmp9_, _tmp10_);
- _tmp6_ (_tmp8_, (DMAPRecord*) _tmp11_, _tmp6__target);
+ _tmp6_ (_tmp8_, (DmapRecord*) _tmp11_, _tmp6__target);
}
}
}
-static DMAPContainerRecord* vala_dmap_container_db_real_lookup_by_id (DMAPContainerDb* base, guint id) {
- ValaDMAPContainerDb * self;
- DMAPContainerRecord* result = NULL;
- self = (ValaDMAPContainerDb*) base;
+static DmapContainerRecord* vala_dmap_container_db_real_lookup_by_id (DmapContainerDb* base, guint id) {
+ ValaDmapContainerDb * self;
+ DmapContainerRecord* result = NULL;
+ self = (ValaDmapContainerDb*) base;
g_error ("vala-dmap-container-db.vala:41: lookup_by_id not implemented");
return result;
}
-static void vala_dmap_container_db_real_add (DMAPContainerDb* base, DMAPContainerRecord* record) {
- ValaDMAPContainerDb * self;
- self = (ValaDMAPContainerDb*) base;
+static void vala_dmap_container_db_real_add (DmapContainerDb* base, DmapContainerRecord* record) {
+ ValaDmapContainerDb * self;
+ self = (ValaDmapContainerDb*) base;
g_return_if_fail (record != NULL);
g_error ("vala-dmap-container-db.vala:45: add not implemented");
}
-ValaDMAPContainerDb* vala_dmap_container_db_construct (GType object_type) {
- ValaDMAPContainerDb * self = NULL;
- self = (ValaDMAPContainerDb*) g_object_new (object_type, NULL);
+ValaDmapContainerDb* vala_dmap_container_db_construct (GType object_type) {
+ ValaDmapContainerDb * self = NULL;
+ self = (ValaDmapContainerDb*) g_object_new (object_type, NULL);
return self;
}
-ValaDMAPContainerDb* vala_dmap_container_db_new (void) {
+ValaDmapContainerDb* vala_dmap_container_db_new (void) {
return vala_dmap_container_db_construct (TYPE_VALA_DMAP_CONTAINER_DB);
}
-static void vala_dmap_container_db_class_init (ValaDMAPContainerDbClass * klass) {
+static void vala_dmap_container_db_class_init (ValaDmapContainerDbClass * klass) {
vala_dmap_container_db_parent_class = g_type_class_peek_parent (klass);
- g_type_class_add_private (klass, sizeof (ValaDMAPContainerDbPrivate));
+ g_type_class_add_private (klass, sizeof (ValaDmapContainerDbPrivate));
G_OBJECT_CLASS (klass)->finalize = vala_dmap_container_db_finalize;
}
-static void vala_dmap_container_db_dmap_container_db_interface_init (DMAPContainerDbInterface * iface) {
+static void vala_dmap_container_db_dmap_container_db_interface_init (DmapContainerDbInterface * iface) {
vala_dmap_container_db_dmap_container_db_parent_iface = g_type_interface_peek_parent (iface);
- iface->count = (gint64 (*) (DMAPContainerDb *)) vala_dmap_container_db_real_count;
- iface->foreach = (void (*) (DMAPContainerDb *, DMAPIdContainerRecordFunc, void*))
vala_dmap_container_db_real_foreach;
- iface->lookup_by_id = (DMAPContainerRecord* (*) (DMAPContainerDb *, guint))
vala_dmap_container_db_real_lookup_by_id;
- iface->add = (void (*) (DMAPContainerDb *, DMAPContainerRecord*)) vala_dmap_container_db_real_add;
+ iface->count = (gint64 (*) (DmapContainerDb *)) vala_dmap_container_db_real_count;
+ iface->foreach = (void (*) (DmapContainerDb *, DmapIdContainerRecordFunc, void*))
vala_dmap_container_db_real_foreach;
+ iface->lookup_by_id = (DmapContainerRecord* (*) (DmapContainerDb *, guint))
vala_dmap_container_db_real_lookup_by_id;
+ iface->add = (void (*) (DmapContainerDb *, DmapContainerRecord*)) vala_dmap_container_db_real_add;
}
-static void vala_dmap_container_db_instance_init (ValaDMAPContainerDb * self) {
+static void vala_dmap_container_db_instance_init (ValaDmapContainerDb * self) {
GeeArrayList* _tmp0_;
self->priv = VALA_DMAP_CONTAINER_DB_GET_PRIVATE (self);
_tmp0_ = gee_array_list_new (DMAP_TYPE_RECORD, (GBoxedCopyFunc) g_object_ref, (GDestroyNotify)
g_object_unref, NULL, NULL, NULL);
@@ -189,8 +189,8 @@ static void vala_dmap_container_db_instance_init (ValaDMAPContainerDb * self) {
static void vala_dmap_container_db_finalize (GObject * obj) {
- ValaDMAPContainerDb * self;
- self = G_TYPE_CHECK_INSTANCE_CAST (obj, TYPE_VALA_DMAP_CONTAINER_DB, ValaDMAPContainerDb);
+ ValaDmapContainerDb * self;
+ self = G_TYPE_CHECK_INSTANCE_CAST (obj, TYPE_VALA_DMAP_CONTAINER_DB, ValaDmapContainerDb);
_g_object_unref0 (self->priv->db);
G_OBJECT_CLASS (vala_dmap_container_db_parent_class)->finalize (obj);
}
@@ -199,10 +199,10 @@ static void vala_dmap_container_db_finalize (GObject * obj) {
GType vala_dmap_container_db_get_type (void) {
static volatile gsize vala_dmap_container_db_type_id__volatile = 0;
if (g_once_init_enter (&vala_dmap_container_db_type_id__volatile)) {
- static const GTypeInfo g_define_type_info = { sizeof (ValaDMAPContainerDbClass),
(GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) vala_dmap_container_db_class_init,
(GClassFinalizeFunc) NULL, NULL, sizeof (ValaDMAPContainerDb), 0, (GInstanceInitFunc)
vala_dmap_container_db_instance_init, NULL };
+ static const GTypeInfo g_define_type_info = { sizeof (ValaDmapContainerDbClass),
(GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) vala_dmap_container_db_class_init,
(GClassFinalizeFunc) NULL, NULL, sizeof (ValaDmapContainerDb), 0, (GInstanceInitFunc)
vala_dmap_container_db_instance_init, NULL };
static const GInterfaceInfo dmap_container_db_info = { (GInterfaceInitFunc)
vala_dmap_container_db_dmap_container_db_interface_init, (GInterfaceFinalizeFunc) NULL, NULL};
GType vala_dmap_container_db_type_id;
- vala_dmap_container_db_type_id = g_type_register_static (G_TYPE_OBJECT,
"ValaDMAPContainerDb", &g_define_type_info, 0);
+ vala_dmap_container_db_type_id = g_type_register_static (G_TYPE_OBJECT,
"ValaDmapContainerDb", &g_define_type_info, 0);
g_type_add_interface_static (vala_dmap_container_db_type_id, DMAP_TYPE_CONTAINER_DB,
&dmap_container_db_info);
g_once_init_leave (&vala_dmap_container_db_type_id__volatile, vala_dmap_container_db_type_id);
}
diff --git a/tests/vala-dmap-container-db.vala b/tests/vala-dmap-container-db.vala
index 7571e39..ab304a2 100644
--- a/tests/vala-dmap-container-db.vala
+++ b/tests/vala-dmap-container-db.vala
@@ -1,4 +1,4 @@
-/* FILE: vala-dmap-db.vala -- A DMAPContainerDb implementation in Vala
+/* FILE: vala-dmap-db.vala -- A DmapContainerDb implementation in Vala
* AUTHOR: W. Michael Petullo <mike flyn org>
* DATE: 21 December 2010
*
@@ -20,11 +20,11 @@
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
-private class ValaDMAPContainerDb : GLib.Object, DMAP.ContainerDb {
+private class ValaDmapContainerDb : GLib.Object, Dmap.ContainerDb {
// A dumb database that stores everything in an array
/* FIXME: What is with this unowned? */
- private Gee.ArrayList<unowned DMAP.Record> db = new Gee.ArrayList<DMAP.Record> ();
+ private Gee.ArrayList<unowned Dmap.Record> db = new Gee.ArrayList<Dmap.Record> ();
public int64 count () {
return db.size;
@@ -37,11 +37,11 @@ private class ValaDMAPContainerDb : GLib.Object, DMAP.ContainerDb {
}
}
- public unowned DMAP.ContainerRecord lookup_by_id (uint id) {
+ public unowned Dmap.ContainerRecord lookup_by_id (uint id) {
GLib.error ("lookup_by_id not implemented");
}
- public void add (DMAP.ContainerRecord record) {
+ public void add (Dmap.ContainerRecord record) {
GLib.error ("add not implemented");
}
}
diff --git a/tests/vala-dmap-db.vala b/tests/vala-dmap-db.vala
index 2d6ef0a..97736ee 100644
--- a/tests/vala-dmap-db.vala
+++ b/tests/vala-dmap-db.vala
@@ -1,4 +1,4 @@
-/* FILE: vala-dmap-db.vala -- A DMAPDb implementation in Vala
+/* FILE: vala-dmap-db.vala -- A DmapDb implementation in Vala
* AUTHOR: W. Michael Petullo <mike flyn org>
* DATE: 21 December 2010
*
@@ -20,14 +20,14 @@
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
-private class ValaDMAPDb : GLib.Object, DMAP.Db {
+private class ValaDmapDb : GLib.Object, Dmap.Db {
// A dumb database that stores everything in an array
/* FIXME: What is with this unowned? */
- private Gee.ArrayList<unowned DMAP.Record> db = new Gee.ArrayList<DMAP.Record> ();
+ private Gee.ArrayList<unowned Dmap.Record> db = new Gee.ArrayList<Dmap.Record> ();
- public uint add (DMAP.Record record) {
- db.add (((DMAP.Record) record));
+ public uint add (Dmap.Record record) {
+ db.add (((Dmap.Record) record));
return db.size;
}
@@ -35,7 +35,7 @@ private class ValaDMAPDb : GLib.Object, DMAP.Db {
GLib.error ("add_path not implemented");
}
- public uint add_with_id (DMAP.Record record, uint id) {
+ public uint add_with_id (Dmap.Record record, uint id) {
GLib.error ("add_with_id not implemented");
}
@@ -52,7 +52,7 @@ private class ValaDMAPDb : GLib.Object, DMAP.Db {
}
}
- public unowned DMAP.Record lookup_by_id (uint id) {
+ public unowned Dmap.Record lookup_by_id (uint id) {
// NOTE: iPhoto does not like a record ID of 0,
// so we pretend to start with 1
return db.get ((int) id - 1);
diff --git a/tests/vala-dpap-record.vala b/tests/vala-image-record.vala
similarity index 90%
rename from tests/vala-dpap-record.vala
rename to tests/vala-image-record.vala
index b545deb..cde5353 100644
--- a/tests/vala-dpap-record.vala
+++ b/tests/vala-image-record.vala
@@ -1,4 +1,4 @@
-/* FILE: vala-dpap-record.vala -- A DPAPRecord implementation in Vala
+/* FILE: vala-dmap-image-record.vala -- A DMAP.ImageRecord implementation in Vala
* AUTHOR: W. Michael Petullo <mike flyn org>
* DATE: 21 December 2010
*
@@ -20,7 +20,7 @@
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
-private class ValaDPAPRecord : GLib.Object, DMAP.Record, DPAP.Record {
+private class ValaImageRecord : GLib.Object, Dmap.Record, Dmap.ImageRecord {
private string _location;
private string _filename;
private string _aspect_ratio;
@@ -103,7 +103,7 @@ private class ValaDPAPRecord : GLib.Object, DMAP.Record, DPAP.Record {
GLib.error ("to_blob not implemented");
}
- public ValaDPAPRecord () {
+ public ValaImageRecord () {
_location = "file://" + GLib.Environment.get_current_dir () + "/media/test.jpeg";
_aspect_ratio = "1.333";
_filename = GLib.Path.get_basename (_location);
@@ -123,8 +123,8 @@ private class ValaDPAPRecord : GLib.Object, DMAP.Record, DPAP.Record {
}
}
-private class ValaDPAPRecordFactory : GLib.Object, DMAP.RecordFactory {
- public DMAP.Record create (void* user_data) {
- return new ValaDPAPRecord ();
+private class ValaImageRecordFactory : GLib.Object, Dmap.RecordFactory {
+ public Dmap.Record create (void* user_data) {
+ return new ValaImageRecord ();
}
}
diff --git a/vala/Makefile.am b/vala/Makefile.am
index 44c71c1..d08c6c6 100644
--- a/vala/Makefile.am
+++ b/vala/Makefile.am
@@ -1,53 +1,11 @@
if BUILD_VAPI
-libdmapsharing-@API_VERSION@-daap/libdmapsharing-@API_VERSION@.gi:
libdmapsharing-@API_VERSION@-daap/libdmapsharing-@API_VERSION@-uninstalled.files
libdmapsharing-@API_VERSION@-daap/libdmapsharing-@API_VERSION@-uninstalled.namespace
- PKG_CONFIG_PATH=$(top_builddir):${PKG_CONFIG_PATH} $(VALA_GEN_INTROSPECT)
libdmapsharing-@API_VERSION@-uninstalled libdmapsharing-@API_VERSION@-daap
- @mv libdmapsharing-@API_VERSION@-daap/libdmapsharing-@API_VERSION -uninstalled gi
libdmapsharing-@API_VERSION@-daap/libdmapsharing-@API_VERSION@.gi
+libdmapsharing-@API_VERSION@.gi: libdmapsharing-@API_VERSION@-uninstalled.files
libdmapsharing-@API_VERSION@-uninstalled.namespace
+ PKG_CONFIG_PATH=$(top_builddir):${PKG_CONFIG_PATH} $(VALA_GEN_INTROSPECT)
libdmapsharing-@API_VERSION@-uninstalled .
+ @mv libdmapsharing-@API_VERSION -uninstalled gi libdmapsharing-@API_VERSION@.gi
-libdmapsharing-@API_VERSION@-dacp/libdmapsharing-@API_VERSION@.gi:
libdmapsharing-@API_VERSION@-dacp/libdmapsharing-@API_VERSION@-uninstalled.files
libdmapsharing-@API_VERSION@-dacp/libdmapsharing-@API_VERSION@-uninstalled.namespace
- PKG_CONFIG_PATH=$(top_builddir):${PKG_CONFIG_PATH} $(VALA_GEN_INTROSPECT)
libdmapsharing-@API_VERSION@-uninstalled libdmapsharing-@API_VERSION@-dacp
- @mv libdmapsharing-@API_VERSION@-dacp/libdmapsharing-@API_VERSION -uninstalled gi
libdmapsharing-@API_VERSION@-dacp/libdmapsharing-@API_VERSION@.gi
+libdmapsharing-@API_VERSION@.vapi: libdmapsharing-@API_VERSION@.gi libdmapsharing-@API_VERSION@.metadata
+ $(VAPIGEN) --pkg=avahi-gobject --pkg=libsoup-2.4 --pkg=glib-2.0 --pkg=gio-2.0 --pkg=gstreamer-1.0
--library libdmapsharing-@API_VERSION@ libdmapsharing-@API_VERSION@.gi
-libdmapsharing-@API_VERSION@-dmap/libdmapsharing-@API_VERSION@.gi:
libdmapsharing-@API_VERSION@-dmap/libdmapsharing-@API_VERSION@-uninstalled.files
libdmapsharing-@API_VERSION@-dmap/libdmapsharing-@API_VERSION@-uninstalled.namespace
- PKG_CONFIG_PATH=$(top_builddir):${PKG_CONFIG_PATH} $(VALA_GEN_INTROSPECT)
libdmapsharing-@API_VERSION@-uninstalled libdmapsharing-@API_VERSION@-dmap
- @mv libdmapsharing-@API_VERSION@-dmap/libdmapsharing-@API_VERSION -uninstalled gi
libdmapsharing-@API_VERSION@-dmap/libdmapsharing-@API_VERSION@.gi
-
-libdmapsharing-@API_VERSION@-dpap/libdmapsharing-@API_VERSION@.gi:
libdmapsharing-@API_VERSION@-dpap/libdmapsharing-@API_VERSION@-uninstalled.files
libdmapsharing-@API_VERSION@-dpap/libdmapsharing-@API_VERSION@-uninstalled.namespace
- PKG_CONFIG_PATH=$(top_builddir):${PKG_CONFIG_PATH} $(VALA_GEN_INTROSPECT)
libdmapsharing-@API_VERSION@-uninstalled libdmapsharing-@API_VERSION@-dpap
- @mv libdmapsharing-@API_VERSION@-dpap/libdmapsharing-@API_VERSION -uninstalled gi
libdmapsharing-@API_VERSION@-dpap/libdmapsharing-@API_VERSION@.gi
-
-libdmapsharing-@API_VERSION -daap vapi: libdmapsharing-@API_VERSION@-daap/libdmapsharing-@API_VERSION@.gi
libdmapsharing-@API_VERSION@-daap/libdmapsharing-@API_VERSION@.metadata
- $(VAPIGEN) --pkg=avahi-gobject --pkg=libsoup-2.4 --pkg=glib-2.0 --pkg=gio-2.0 --pkg=gstreamer-1.0
--library libdmapsharing-@API_VERSION@-daap libdmapsharing-@API_VERSION@-daap/libdmapsharing-@API_VERSION@.gi
-
-libdmapsharing-@API_VERSION -dacp vapi: libdmapsharing-@API_VERSION@-dacp/libdmapsharing-@API_VERSION@.gi
libdmapsharing-@API_VERSION@-dacp/libdmapsharing-@API_VERSION@.metadata
- $(VAPIGEN) --pkg=avahi-gobject --pkg=libsoup-2.4 --pkg=glib-2.0 --pkg=gio-2.0 --pkg=gstreamer-1.0
--library libdmapsharing-@API_VERSION@-dacp libdmapsharing-@API_VERSION@-dacp/libdmapsharing-@API_VERSION@.gi
-
-libdmapsharing-@API_VERSION -dmap vapi: libdmapsharing-@API_VERSION@-dmap/libdmapsharing-@API_VERSION@.gi
libdmapsharing-@API_VERSION@-dmap/libdmapsharing-@API_VERSION@.metadata
- $(VAPIGEN) --pkg=avahi-gobject --pkg=libsoup-2.4 --pkg=glib-2.0 --pkg=gio-2.0 --pkg=gstreamer-1.0
--library libdmapsharing-@API_VERSION@-dmap libdmapsharing-@API_VERSION@-dmap/libdmapsharing-@API_VERSION@.gi
-
-libdmapsharing-@API_VERSION -dpap vapi: libdmapsharing-@API_VERSION@-dpap/libdmapsharing-@API_VERSION@.gi
libdmapsharing-@API_VERSION@-dpap/libdmapsharing-@API_VERSION@.metadata
- $(VAPIGEN) --pkg=avahi-gobject --pkg=libsoup-2.4 --pkg=glib-2.0 --pkg=gio-2.0 --pkg=gstreamer-1.0
--library libdmapsharing-@API_VERSION@-dpap libdmapsharing-@API_VERSION@-dpap/libdmapsharing-@API_VERSION@.gi
-
-# NOTE: Sed is used to fix a problem I don't know how to handle in
-# vapigen. I have several namespaces (DMAP, DAAP, ...) in libdmapsharing. In
-# order to support this, I generate four Vala API files and then concatenate
-# them. But, each has its own definition of DMAP.Db, DAAP.DMAPDb, etc. The
-# use of sed fixes this:
-libdmapsharing-@API_VERSION@.vapi: libdmapsharing-@API_VERSION -daap vapi libdmapsharing-@API_VERSION -dacp
vapi libdmapsharing-@API_VERSION -dmap vapi libdmapsharing-@API_VERSION -dpap vapi
- cat libdmapsharing-@API_VERSION -daap vapi libdmapsharing-@API_VERSION -dacp vapi
libdmapsharing-@API_VERSION -dmap vapi libdmapsharing-@API_VERSION -dpap vapi >
libdmapsharing-@API_VERSION@.vapi
- cat libdmapsharing-@API_VERSION@.vapi | \
- sed 's/DAAP\.DMAPDb/DMAP.Db/g' | \
- sed 's/DPAP\.DMAPDb/DMAP.Db/g' | \
- sed 's/DACP\.DMAPDb/DMAP.Db/g' | \
- sed 's/DAAP\.DMAPContainerDb/DMAP.ContainerDb/g' | \
- sed 's/DPAP\.DMAPContainerDb/DMAP.ContainerDb/g' | \
- sed 's/DACP\.DMAPContainerDb/DMAP.ContainerDb/g' | \
- sed 's/DAAP\.DMAPRecordFactory/DMAP.RecordFactory/g' | \
- sed 's/DPAP\.DMAPRecordFactory/DMAP.RecordFactory/g' | \
- sed 's/DACP\.DAAPRecord/DAAP.Record/g' | \
- cat > libdmapsharing-@API_VERSION vapi tmp
- mv libdmapsharing-@API_VERSION vapi tmp libdmapsharing-@API_VERSION@.vapi
- rm -f libdmapsharing-@API_VERSION -daap vapi libdmapsharing-@API_VERSION -dacp vapi
libdmapsharing-@API_VERSION -dmap vapi libdmapsharing-@API_VERSION -dpap vapi
-
all: libdmapsharing-@API_VERSION@.vapi
endif
@@ -58,38 +16,17 @@ dist_vapi_DATA = \
EXTRA_DIST = \
libdmapsharing-@API_VERSION@.vapi \
- libdmapsharing-@API_VERSION@-daap/libdmapsharing-@API_VERSION@-uninstalled.excludes \
- libdmapsharing-@API_VERSION@-daap/libdmapsharing-@API_VERSION@-uninstalled.files \
- libdmapsharing-@API_VERSION@-daap/libdmapsharing-@API_VERSION@.metadata \
- libdmapsharing-@API_VERSION@-daap/libdmapsharing-@API_VERSION@-uninstalled.namespace \
- libdmapsharing-@API_VERSION@-dacp/libdmapsharing-@API_VERSION@-uninstalled.excludes \
- libdmapsharing-@API_VERSION@-dacp/libdmapsharing-@API_VERSION@-uninstalled.files \
- libdmapsharing-@API_VERSION@-dacp/libdmapsharing-@API_VERSION@.metadata \
- libdmapsharing-@API_VERSION@-dacp/libdmapsharing-@API_VERSION@-uninstalled.namespace \
- libdmapsharing-@API_VERSION@-dmap/libdmapsharing-@API_VERSION@-uninstalled.excludes \
- libdmapsharing-@API_VERSION@-dmap/libdmapsharing-@API_VERSION@-uninstalled.files \
- libdmapsharing-@API_VERSION@-dmap/libdmapsharing-@API_VERSION@.metadata \
- libdmapsharing-@API_VERSION@-dmap/libdmapsharing-@API_VERSION@-uninstalled.namespace \
- libdmapsharing-@API_VERSION@-dpap/libdmapsharing-@API_VERSION@-uninstalled.excludes \
- libdmapsharing-@API_VERSION@-dpap/libdmapsharing-@API_VERSION@-uninstalled.files \
- libdmapsharing-@API_VERSION@-dpap/libdmapsharing-@API_VERSION@.metadata \
- libdmapsharing-@API_VERSION@-dpap/libdmapsharing-@API_VERSION@-uninstalled.namespace
+ libdmapsharing-@API_VERSION@-uninstalled.excludes \
+ libdmapsharing-@API_VERSION@-uninstalled.files \
+ libdmapsharing-@API_VERSION@.metadata \
+ libdmapsharing-@API_VERSION@-uninstalled.namespace
CLEANFILES = \
- libdmapsharing-@API_VERSION@-daap/libdmapsharing-@API_VERSION@.gi \
- libdmapsharing-@API_VERSION@-dacp/libdmapsharing-@API_VERSION@.gi \
- libdmapsharing-@API_VERSION@-dmap/libdmapsharing-@API_VERSION@.gi \
- libdmapsharing-@API_VERSION@-dpap/libdmapsharing-@API_VERSION@.gi \
- libdmapsharing-@API_VERSION -daap vapi \
- libdmapsharing-@API_VERSION -dacp vapi \
- libdmapsharing-@API_VERSION -dmap vapi \
- libdmapsharing-@API_VERSION -dpap vapi
+ libdmapsharing-@API_VERSION@.gi \
+ libdmapsharing-@API_VERSION@.vapi
DISTCLEANFILES = \
- libdmapsharing-@API_VERSION@-daap/libdmapsharing-@API_VERSION@-uninstalled.files \
- libdmapsharing-@API_VERSION@-dacp/libdmapsharing-@API_VERSION@-uninstalled.files \
- libdmapsharing-@API_VERSION@-dmap/libdmapsharing-@API_VERSION@-uninstalled.files \
- libdmapsharing-@API_VERSION@-dpap/libdmapsharing-@API_VERSION@-uninstalled.files
+ libdmapsharing-@API_VERSION@-uninstalled.files
if BUILD_VAPI
CLEANFILES += \
diff --git a/vala/libdmapsharing-4.0-uninstalled.excludes b/vala/libdmapsharing-4.0-uninstalled.excludes
new file mode 100644
index 0000000..ebb0ef1
--- /dev/null
+++ b/vala/libdmapsharing-4.0-uninstalled.excludes
@@ -0,0 +1 @@
+test-*
diff --git a/vala/libdmapsharing-4.0-daap/libdmapsharing-4.0-uninstalled.files.in
b/vala/libdmapsharing-4.0-uninstalled.files.in
similarity index 100%
rename from vala/libdmapsharing-4.0-daap/libdmapsharing-4.0-uninstalled.files.in
rename to vala/libdmapsharing-4.0-uninstalled.files.in
diff --git a/vala/libdmapsharing-4.0-uninstalled.namespace b/vala/libdmapsharing-4.0-uninstalled.namespace
new file mode 100644
index 0000000..d80a1ba
--- /dev/null
+++ b/vala/libdmapsharing-4.0-uninstalled.namespace
@@ -0,0 +1 @@
+Dmap
diff --git a/vala/libdmapsharing-4.0-dmap/libdmapsharing-4.0.metadata b/vala/libdmapsharing-4.0.metadata
similarity index 50%
rename from vala/libdmapsharing-4.0-dmap/libdmapsharing-4.0.metadata
rename to vala/libdmapsharing-4.0.metadata
index c04bb7a..efa0666 100644
--- a/vala/libdmapsharing-4.0-dmap/libdmapsharing-4.0.metadata
+++ b/vala/libdmapsharing-4.0.metadata
@@ -1,12 +1,14 @@
-DMAP cheader_filename="libdmapsharing/dmap.h"
+Dmap cheader_filename="libdmapsharing/dmap.h"
dmap_container_db_foreach.data hidden="1"
dmap_db_foreach.data hidden="1"
dmap_record_factory_create transfer_ownership="1"
-DACPPlayState common_prefix="DACP_PLAY_" rename_to="DACPPlayState"
-DACPRepeatState common_prefix="DACP_REPEAT_" rename_to="DACPRepeatState"
-DMAPDb type_cname="DMAPDbInterface"
-DMAPContainerDb type_cname="DMAPContainerDbInterface"
-DMAPRecord type_cname="DMAPRecordInterface"
-DMAPRecordFactory type_cname="DMAPRecordFactoryInterface"
AvahiClient name="Client" namespace="Avahi"
AvahiEntryGroup name="EntryGroup" namespace="Avahi"
+DACPPlayState common_prefix="DACP_PLAY_" rename_to="DACPPlayState"
+DACPRepeatState common_prefix="DACP_REPEAT_" rename_to="DACPRepeatState"
+DmapContainerDb type_cname="DmapContainerDbInterface"
+DmapControlPlayer type_cname="DmapControlPlayerInterface"
+DmapDb type_cname="DmapDbInterface"
+DmapImageRecord type_cname="DmapImageRecordInterface"
+DmapRecordFactory type_cname="DmapRecordFactoryInterface"
+DmapRecord type_cname="DmapRecordInterface"
diff --git a/vala/libdmapsharing-4.0.vapi b/vala/libdmapsharing-4.0.vapi
index e15dcdd..45c792f 100644
--- a/vala/libdmapsharing-4.0.vapi
+++ b/vala/libdmapsharing-4.0.vapi
@@ -1,6 +1,16 @@
-/* libdmapsharing-4.0-daap.vapi generated by vapigen, do not modify. */
+/* libdmapsharing-4.0.vapi generated by vapigen, do not modify. */
-namespace DAAP {
+namespace Dmap {
+ [CCode (cheader_filename = "libdmapsharing/dmap.h")]
+ public class AvConnection : Dmap.Connection {
+ [CCode (has_construct_function = false)]
+ public AvConnection (string name, string host, uint port, Dmap.Db db, Dmap.RecordFactory
factory);
+ }
+ [CCode (cheader_filename = "libdmapsharing/dmap.h")]
+ public class AvShare : Dmap.Share {
+ [CCode (has_construct_function = false)]
+ public AvShare (string name, string password, Dmap.Db db, Dmap.ContainerDb container_db,
string transcode_mimetype);
+ }
[CCode (cheader_filename = "libdmapsharing/dmap.h")]
[Compact]
public class ChunkData {
@@ -9,48 +19,34 @@ namespace DAAP {
public weak GLib.InputStream stream;
}
[CCode (cheader_filename = "libdmapsharing/dmap.h")]
- public class Connection : DAAP.DMAPConnection {
- [CCode (has_construct_function = false)]
- public Connection (string name, string host, uint port, DMAP.Db db, DMAP.RecordFactory
factory);
- }
- [CCode (cheader_filename = "libdmapsharing/dmap.h")]
- public class DMAPConnection : GLib.Object {
+ public class Connection : GLib.Object {
[CCode (has_construct_function = false)]
- protected DMAPConnection ();
- [CCode (cname = "dmap_connection_authenticate_message")]
- public static void authenticate_message (DAAP.DMAPConnection connection, Soup.Session
session, Soup.Message message, Soup.Auth auth, string password);
- [CCode (cname = "dmap_connection_build_message")]
- public virtual unowned Soup.Message build_message (DAAP.DMAPConnection connection, string
path, bool need_hash, double version, int req_id, bool send_close);
- [CCode (cname = "dmap_connection_disconnect")]
- public static void disconnect (DAAP.DMAPConnection connection, DAAP.DMAPConnectionFunc
callback);
- [CCode (cname = "dmap_connection_get")]
- public bool @get (string path, bool need_hash, DAAP.DMAPResponseHandler handler);
- [CCode (cname = "dmap_connection_get_headers")]
- public static unowned Soup.MessageHeaders get_headers (DAAP.DMAPConnection connection, string
uri);
- [CCode (cname = "dmap_connection_get_playlists")]
- public static unowned GLib.SList get_playlists (DAAP.DMAPConnection connection);
+ protected Connection ();
+ public void authenticate_message (Soup.Session session, Soup.Message message, Soup.Auth auth,
string password);
+ public virtual unowned Soup.Message build_message (string path, bool need_hash, double
version, int req_id, bool send_close);
+ public void disconnect (Dmap.ConnectionFunc callback);
+ public bool @get (string path, bool need_hash, Dmap.ResponseHandler handler);
+ public unowned Soup.MessageHeaders get_headers (string uri);
+ public unowned GLib.SList get_playlists ();
[NoWrapper]
- public virtual DAAP.DMAPContentCode get_protocol_version_cc (DAAP.DMAPConnection connection);
+ public virtual Dmap.ContentCode get_protocol_version_cc ();
[NoWrapper]
- public virtual unowned string get_query_metadata (DAAP.DMAPConnection connection);
+ public virtual unowned string get_query_metadata ();
[NoWrapper]
- public virtual unowned DAAP.DMAPRecord handle_mlcl (DAAP.DMAPConnection connection,
DMAP.RecordFactory factory, GLib.Node mlcl, int item_id);
- [CCode (cname = "dmap_connection_is_connected")]
- public static bool is_connected (DAAP.DMAPConnection connection);
- [CCode (cname = "dmap_connection_setup")]
- public static void setup (DAAP.DMAPConnection connection);
- [CCode (cname = "dmap_connection_start")]
- public static void start (DAAP.DMAPConnection connection, DAAP.DMAPConnectionFunc callback);
+ public virtual unowned Dmap.Record handle_mlcl (Dmap.RecordFactory factory, GLib.Node mlcl,
int item_id);
+ public bool is_connected ();
+ public void setup ();
+ public void start (Dmap.ConnectionFunc callback);
[NoAccessorMethod]
public Soup.URI base_uri { owned get; set; }
[NoAccessorMethod]
public int database_id { get; set; }
[NoAccessorMethod]
- public DMAP.Db db { owned get; construct; }
+ public Dmap.Db db { owned get; construct; }
[NoAccessorMethod]
public double dmap_version { get; set; }
[NoAccessorMethod]
- public DMAP.RecordFactory factory { owned get; construct; }
+ public Dmap.RecordFactory factory { owned get; construct; }
[NoAccessorMethod]
public string host { owned get; construct; }
[NoAccessorMethod]
@@ -73,744 +69,69 @@ namespace DAAP {
}
[CCode (cheader_filename = "libdmapsharing/dmap.h")]
[Compact]
- public class DMAPContentCodeDefinition {
- public DAAP.DMAPContentCode code;
+ public class ContentCodeDefinition {
+ public Dmap.ContentCode code;
public int32 int_code;
public weak string name;
[CCode (cname = "string")]
public weak string str;
- public DAAP.DMAPType type;
- }
- [CCode (cheader_filename = "libdmapsharing/dmap.h")]
- [Compact]
- public class DMAPDbFilterDefinition {
- public weak string key;
- public bool negate;
- public weak string value;
- }
- [CCode (cheader_filename = "libdmapsharing/dmap.h")]
- public class DMAPGstInputStream : GLib.InputStream, GLib.Seekable {
- [CCode (cname = "dmap_gst_input_stream_new", has_construct_function = false, type =
"GInputStream*")]
- public DMAPGstInputStream (string transcode_mimetype, GLib.InputStream src_stream);
- [NoWrapper]
- public virtual void kill_pipeline (DAAP.DMAPGstInputStream p1);
- }
- [CCode (cheader_filename = "libdmapsharing/dmap.h")]
- public class DMAPGstMP3InputStream : DAAP.DMAPGstInputStream, GLib.Seekable {
- [CCode (cname = "dmap_gst_mp3_input_stream_new", has_construct_function = false, type =
"GInputStream*")]
- public DMAPGstMP3InputStream (GLib.InputStream stream);
- }
- [CCode (cheader_filename = "libdmapsharing/dmap.h")]
- public class DMAPGstQtInputStream : DAAP.DMAPGstInputStream, GLib.Seekable {
- [CCode (cname = "dmap_gst_qt_input_stream_new", has_construct_function = false, type =
"GInputStream*")]
- public DMAPGstQtInputStream (GLib.InputStream stream);
- }
- [CCode (cheader_filename = "libdmapsharing/dmap.h")]
- public class DMAPGstWAVInputStream : DAAP.DMAPGstInputStream, GLib.Seekable {
- [CCode (cname = "dmap_gst_wav_input_stream_new", has_construct_function = false, type =
"GInputStream*")]
- public DMAPGstWAVInputStream (GLib.InputStream stream);
- }
- [CCode (cheader_filename = "libdmapsharing/dmap.h")]
- [Compact]
- public class DMAPHashContext {
- [CCode (array_length = false)]
- public weak uint32[] bits;
- [CCode (array_length = false)]
- public weak uint32[] buf;
- [CCode (array_length = false)]
- public weak uint[] @in;
- public int version;
- }
- [CCode (cheader_filename = "libdmapsharing/dmap.h")]
- public class DMAPMdnsBrowser : GLib.Object {
- [CCode (cname = "dmap_mdns_browser_new", has_construct_function = false, type =
"DMAPMdnsBrowser*")]
- public DMAPMdnsBrowser (DAAP.DMAPMdnsServiceType type);
- [CCode (cname = "dmap_mdns_browser_error_quark")]
- public static GLib.Quark error_quark ();
- [CCode (cname = "dmap_mdns_browser_get_service_type")]
- public static DAAP.DMAPMdnsServiceType get_service_type (DAAP.DMAPMdnsBrowser browser);
- [CCode (cname = "dmap_mdns_browser_get_services")]
- public static unowned GLib.SList get_services (DAAP.DMAPMdnsBrowser browser);
- [CCode (cname = "dmap_mdns_browser_start")]
- public static bool start (DAAP.DMAPMdnsBrowser browser) throws GLib.Error;
- [CCode (cname = "dmap_mdns_browser_stop")]
- public static bool stop (DAAP.DMAPMdnsBrowser browser) throws GLib.Error;
- public virtual signal void service_added (DAAP.DMAPMdnsService service);
- public virtual signal void service_removed (string service);
- }
- [CCode (cheader_filename = "libdmapsharing/dmap.h")]
- public class DMAPMdnsPublisher : GLib.Object {
- [CCode (cname = "dmap_mdns_publisher_new", has_construct_function = false, type =
"DMAPMdnsPublisher*")]
- public DMAPMdnsPublisher ();
- [CCode (cname = "dmap_mdns_publisher_error_quark")]
- public static GLib.Quark error_quark ();
- [CCode (cname = "dmap_mdns_publisher_publish")]
- public static bool publish (DAAP.DMAPMdnsPublisher publisher, string name, uint port, string
type_of_service, bool password_required, string txt_records) throws GLib.Error;
- [CCode (cname = "dmap_mdns_publisher_rename_at_port")]
- public static bool rename_at_port (DAAP.DMAPMdnsPublisher publisher, uint port, string name)
throws GLib.Error;
- [CCode (cname = "dmap_mdns_publisher_withdraw")]
- public static bool withdraw (DAAP.DMAPMdnsPublisher publisher, uint port) throws GLib.Error;
- public virtual signal void name_collision (string name);
- public virtual signal void published (string name);
- }
- [CCode (cheader_filename = "libdmapsharing/dmap.h")]
- public class DMAPMdnsService : GLib.Object {
- [CCode (has_construct_function = false)]
- protected DMAPMdnsService ();
- [NoAccessorMethod]
- public string host { owned get; set; }
- [NoAccessorMethod]
- public string name { owned get; set; }
- [NoAccessorMethod]
- public string pair { owned get; set; }
- [NoAccessorMethod]
- public bool password_protected { get; set; }
- [NoAccessorMethod]
- public uint port { get; set; }
- [NoAccessorMethod]
- public string service_name { owned get; set; }
- [NoAccessorMethod]
- public uint transport_protocol { get; set; }
- }
- [CCode (cheader_filename = "libdmapsharing/dmap.h")]
- [Compact]
- public class DMAPMdnsServiceService {
- }
- [CCode (cheader_filename = "libdmapsharing/dmap.h")]
- [Compact]
- public class DMAPMetaDataMap {
- public uint md;
- public weak string tag;
- }
- [CCode (cheader_filename = "libdmapsharing/dmap.h")]
- [Compact]
- public class DMAPPlaylist {
- public int id;
- public weak string name;
- public weak GLib.List uris;
- }
- [CCode (cheader_filename = "libdmapsharing/dmap.h")]
- public class DMAPShare : GLib.Object {
- [CCode (has_construct_function = false)]
- protected DMAPShare ();
- [NoWrapper]
- public virtual void add_entry_to_mlcl (uint id, DAAP.DMAPRecord record, void* mb);
- [NoWrapper]
- public virtual void content_codes (DAAP.DMAPShare share, Soup.Server server, Soup.Message
message, string path, GLib.HashTable query, Soup.ClientContext ctx);
- [NoWrapper]
- public virtual void ctrl_int (DAAP.DMAPShare share, Soup.Server server, Soup.Message message,
string path, GLib.HashTable query, Soup.ClientContext ctx);
- [NoWrapper]
- public virtual void databases (DAAP.DMAPShare share, Soup.Server server, Soup.Message
message, string path, GLib.HashTable query, Soup.ClientContext context);
- [NoWrapper]
- public virtual void databases_browse_xxx (DAAP.DMAPShare share, Soup.Server server,
Soup.Message msg, string path, GLib.HashTable query, Soup.ClientContext context);
- [NoWrapper]
- public virtual void databases_items_xxx (DAAP.DMAPShare share, Soup.Server server,
Soup.Message msg, string path, GLib.HashTable query, Soup.ClientContext context);
- [CCode (cname = "dmap_share_free_filter")]
- public static void free_filter (GLib.SList filter);
- [NoWrapper]
- public virtual uint get_desired_port (DAAP.DMAPShare share);
- [NoWrapper]
- public virtual void* get_meta_data_map (DAAP.DMAPShare share);
- [NoWrapper]
- public virtual unowned string get_type_of_service (DAAP.DMAPShare share);
- [NoWrapper]
- public virtual void login (DAAP.DMAPShare share, Soup.Server server, Soup.Message message,
string path, GLib.HashTable query, Soup.ClientContext ctx);
- [NoWrapper]
- public virtual void logout (DAAP.DMAPShare share, Soup.Server server, Soup.Message message,
string path, GLib.HashTable query, Soup.ClientContext ctx);
- [NoWrapper]
- public virtual void message_add_standard_headers (DAAP.DMAPShare share, Soup.Message msg);
- [NoWrapper]
- public virtual void name_collision (DAAP.DMAPShare share, DAAP.DMAPMdnsPublisher publisher,
string name);
- [NoWrapper]
- public virtual void published (DAAP.DMAPShare share, DAAP.DMAPMdnsPublisher publisher, string
name);
- [NoWrapper]
- public virtual void server_info (DAAP.DMAPShare share, Soup.Server server, Soup.Message
message, string path, GLib.HashTable query, Soup.ClientContext ctx);
- [NoWrapper]
- public virtual void update (DAAP.DMAPShare share, Soup.Server server, Soup.Message message,
string path, GLib.HashTable query, Soup.ClientContext ctx);
- [NoAccessorMethod]
- public uint auth_method { get; set; }
- [NoAccessorMethod]
- public DMAP.ContainerDb container_db { owned get; construct; }
- [NoAccessorMethod]
- public DMAP.Db db { owned get; construct; }
- [NoAccessorMethod]
- public string name { owned get; set; }
- [NoAccessorMethod]
- public string password { owned get; set; }
- [NoAccessorMethod]
- public uint revision_number { get; set; }
- [NoAccessorMethod]
- public Soup.Server server { owned get; }
- [NoAccessorMethod]
- public string transcode_mimetype { owned get; construct; }
- [CCode (array_length = false, array_null_terminated = true)]
- [NoAccessorMethod]
- public string[] txt_records { owned get; set; }
- }
- [CCode (cheader_filename = "libdmapsharing/dmap.h")]
- [Compact]
- public class DMAPStructureItem {
- public GLib.Value content;
- public DAAP.DMAPContentCode content_code;
- public uint32 size;
- }
- [CCode (cheader_filename = "libdmapsharing/dmap.h")]
- public class Share : DAAP.DMAPShare {
- [CCode (has_construct_function = false)]
- public Share (string name, string password, DMAP.Db db, DMAP.ContainerDb container_db, string
transcode_mimetype);
- }
- [CCode (cheader_filename = "libdmapsharing/dmap.h")]
- [Compact]
- public class bitwise {
- }
- [CCode (cheader_filename = "libdmapsharing/dmap.h")]
- public interface DMAPContainerDb : GLib.Object {
- [CCode (cname = "dmap_container_db_add")]
- public abstract void add (DMAP.ContainerDb db, DAAP.DMAPContainerRecord record);
- [CCode (cname = "dmap_container_db_count")]
- public abstract int64 count (DMAP.ContainerDb db);
- [CCode (cname = "dmap_container_db_foreach")]
- public abstract void @foreach (DMAP.ContainerDb db, DAAP.DMAPIdContainerRecordFunc func,
void* data);
- [CCode (cname = "dmap_container_db_lookup_by_id")]
- public abstract unowned DAAP.DMAPContainerRecord lookup_by_id (DMAP.ContainerDb db, uint id);
- }
- [CCode (cheader_filename = "libdmapsharing/dmap.h")]
- public interface DMAPContainerRecord : GLib.Object {
- [CCode (cname = "dmap_container_record_add_entry")]
- public abstract void add_entry (DAAP.DMAPContainerRecord container_record, DAAP.DMAPRecord
record, int id);
- [CCode (cname = "dmap_container_record_get_entries")]
- public abstract unowned DMAP.Db get_entries (DAAP.DMAPContainerRecord record);
- [CCode (cname = "dmap_container_record_get_entry_count")]
- public abstract uint64 get_entry_count (DAAP.DMAPContainerRecord record);
- [CCode (cname = "dmap_container_record_get_id")]
- public abstract uint get_id (DAAP.DMAPContainerRecord record);
- [NoAccessorMethod]
- public string name { owned get; set; }
- }
- [CCode (cheader_filename = "libdmapsharing/dmap.h")]
- public interface DMAPDb : GLib.Object {
- [CCode (cname = "dmap_db_add")]
- public abstract uint add (DMAP.Db db, DAAP.DMAPRecord record);
- [CCode (cname = "dmap_db_add_path")]
- public abstract uint add_path (DMAP.Db db, string path);
- [CCode (cname = "dmap_db_add_with_id")]
- public abstract uint add_with_id (DMAP.Db db, DAAP.DMAPRecord record, uint id);
- [CCode (cname = "dmap_db_apply_filter")]
- public static unowned GLib.HashTable apply_filter (DMAP.Db db, GLib.SList filter_def);
- [CCode (cname = "dmap_db_count")]
- public abstract int64 count (DMAP.Db db);
- [CCode (cname = "dmap_db_foreach")]
- public abstract void @foreach (DMAP.Db db, DAAP.DMAPIdRecordFunc func, void* data);
- [CCode (cname = "dmap_db_lookup_by_id")]
- public abstract unowned DAAP.DMAPRecord lookup_by_id (DMAP.Db db, uint id);
- [CCode (cname = "dmap_db_lookup_id_by_location")]
- public abstract uint lookup_id_by_location (DMAP.Db db, string location);
- }
- [CCode (cheader_filename = "libdmapsharing/dmap.h")]
- public interface DMAPRecord : GLib.Object {
- [CCode (cname = "dmap_record_set_from_blob")]
- public abstract bool set_from_blob (DAAP.DMAPRecord record, GLib.Array blob);
- [CCode (cname = "dmap_record_to_blob")]
- public abstract unowned GLib.Array to_blob (DAAP.DMAPRecord record);
- }
- [CCode (cheader_filename = "libdmapsharing/dmap.h")]
- public interface DMAPRecordFactory : GLib.Object {
- [CCode (cname = "dmap_record_factory_create")]
- public abstract unowned DAAP.DMAPRecord create (DMAP.RecordFactory factory);
- }
- [CCode (cheader_filename = "libdmapsharing/dmap.h")]
- public interface Record : GLib.Object {
- public static int cmp_by_album (void* a, void* b, DMAP.Db db);
- public abstract bool itunes_compat ();
- public abstract unowned GLib.InputStream read () throws GLib.Error;
- [NoAccessorMethod]
- public int bitrate { get; set; }
- [NoAccessorMethod]
- public int disc { get; set; }
- [NoAccessorMethod]
- public int duration { get; set; }
- [NoAccessorMethod]
- public uint64 filesize { get; set; }
- [NoAccessorMethod]
- public int firstseen { get; set; }
- [NoAccessorMethod]
- public string format { owned get; set; }
- [NoAccessorMethod]
- public bool has_video { get; set; }
- [NoAccessorMethod]
- public GLib.Array hash { owned get; set; }
- [NoAccessorMethod]
- public string location { owned get; set; }
- [NoAccessorMethod]
- public DAAP.DMAPMediaKind mediakind { get; set; }
- [NoAccessorMethod]
- public int mtime { get; set; }
- [NoAccessorMethod]
- public int rating { get; set; }
- [NoAccessorMethod]
- public string songalbum { owned get; set; }
- [NoAccessorMethod]
- public int64 songalbumid { get; set; }
- [NoAccessorMethod]
- public string songartist { owned get; set; }
- [NoAccessorMethod]
- public string songgenre { owned get; set; }
- [NoAccessorMethod]
- public string sort_album { owned get; set; }
- [NoAccessorMethod]
- public string sort_artist { owned get; set; }
- [NoAccessorMethod]
- public string title { owned get; set; }
- [NoAccessorMethod]
- public int track { get; set; }
- [NoAccessorMethod]
- public int year { get; set; }
- }
- [CCode (cheader_filename = "libdmapsharing/dmap.h", cprefix = "DACP_PLAY_")]
- public enum DACPPlayState {
- STOPPED,
- PAUSED,
- PLAYING
- }
- [CCode (cheader_filename = "libdmapsharing/dmap.h", cprefix = "DACP_REPEAT_")]
- public enum DACPRepeatState {
- NONE,
- SINGLE,
- ALL
- }
- [CCode (cheader_filename = "libdmapsharing/dmap.h", cprefix = "DMAP_")]
- public enum DMAPConnectionState {
- GET_INFO,
- LOGIN,
- GET_REVISION_NUMBER,
- GET_DB_INFO,
- GET_SONGS,
- GET_PLAYLISTS,
- GET_PLAYLIST_ENTRIES,
- LOGOUT,
- DONE
- }
- [CCode (cheader_filename = "libdmapsharing/dmap.h", cprefix = "DMAP_", has_type_id = false)]
- public enum DMAPContentCode {
- CC_INVALID,
- RAW,
- CC_MDCL,
- CC_MSTT,
- CC_MIID,
- CC_MINM,
- CC_MIKD,
- CC_MPER,
- CC_MCON,
- CC_MCTI,
- CC_MPCO,
- CC_MSTS,
- CC_MIMC,
- CC_MCTC,
- CC_MRCO,
- CC_MTCO,
- CC_MLCL,
- CC_MLIT,
- CC_MBCL,
- CC_MSRV,
- CC_MSAU,
- CC_MSLR,
- CC_MPRO,
- CC_MSAL,
- CC_MSUP,
- CC_MSPI,
- CC_MSEX,
- CC_MSBR,
- CC_MSQY,
- CC_MSIX,
- CC_MSRS,
- CC_MSTM,
- CC_MSDC,
- CC_MCCR,
- CC_MCNM,
- CC_MCNA,
- CC_MCTY,
- CC_MLOG,
- CC_MLID,
- CC_MUPD,
- CC_MUSR,
- CC_MUTY,
- CC_MUDL,
- CC_MSMA,
- CC_FQUESCH,
- CC_APRO,
- CC_AVDB,
- CC_ABRO,
- CC_ABAL,
- CC_ABAR,
- CC_ABCP,
- CC_ABGN,
- CC_ADBS,
- CC_ASAL,
- CC_ASAI,
- CC_ASAA,
- CC_ASAR,
- CC_ASBT,
- CC_ASBR,
- CC_ASCM,
- CC_ASCO,
- CC_ASDA,
- CC_ASDM,
- CC_ASDC,
- CC_ASDN,
- CC_ASDB,
- CC_ASEQ,
- CC_ASFM,
- CC_ASGN,
- CC_ASDT,
- CC_ASRV,
- CC_ASSR,
- CC_ASSZ,
- CC_ASST,
- CC_ASSP,
- CC_ASTM,
- CC_ASTC,
- CC_ASTN,
- CC_ASUR,
- CC_ASYR,
- CC_ASDK,
- CC_ASUL,
- CC_ASSU,
- CC_ASSA,
- CC_APLY,
- CC_ABPL,
- CC_APSO,
- CC_PRSV,
- CC_ARIF,
- CC_MSAS,
- CC_AGRP,
- CC_AGAL,
- CC_ASCP,
- CC_PPRO,
- CC_PASP,
- CC_PFDT,
- CC_PICD,
- CC_PIMF,
- CC_PFMT,
- CC_PIFS,
- CC_PLSZ,
- CC_PHGT,
- CC_PWTH,
- CC_PRAT,
- CC_PCMT,
- CC_PRET,
- CC_AESV,
- CC_AEHV,
- CC_AESP,
- CC_AEPP,
- CC_AEPS,
- CC_AESG,
- CC_AEMK,
- CC_AEFP,
- CC_CMPA,
- CC_CMNM,
- CC_CMTY,
- CC_CMPG,
- CC_CACI,
- CC_CAPS,
- CC_CASH,
- CC_CARP,
- CC_CAAS,
- CC_CAAR,
- CC_CAIA,
- CC_CANP,
- CC_CANN,
- CC_CANA,
- CC_CANL,
- CC_CANG,
- CC_CANT,
- CC_CASP,
- CC_CASS,
- CC_CAST,
- CC_CASU,
- CC_CASG,
- CC_CACR,
- CC_CMCP,
- CC_CMGT,
- CC_CMIK,
- CC_CMSP,
- CC_CMST,
- CC_CMSV,
- CC_CMSR,
- CC_CMMK,
- CC_CMVO,
- CC_CMPR,
- CC_CAPR,
- CC_AEFR,
- CC_CAOV,
- CC_CMRL,
- CC_CAHP,
- CC_CAIV,
- CC_CAVC
- }
- [CCode (cheader_filename = "libdmapsharing/dmap.h", cprefix = "DMAP_MDNS_BROWSER_ERROR_")]
- public enum DMAPMdnsBrowserError {
- NOT_RUNNING,
- FAILED
- }
- [CCode (cheader_filename = "libdmapsharing/dmap.h", cprefix = "DMAP_MDNS_PUBLISHER_ERROR_")]
- public enum DMAPMdnsPublisherError {
- NOT_RUNNING,
- FAILED
- }
- [CCode (cheader_filename = "libdmapsharing/dmap.h", cprefix =
"DMAP_MDNS_SERVICE_TRANSPORT_PROTOCOL_")]
- public enum DMAPMdnsServiceTransportProtocol {
- TCP,
- UDP,
- LAST
- }
- [CCode (cheader_filename = "libdmapsharing/dmap.h", cprefix = "DMAP_MDNS_SERVICE_TYPE_")]
- public enum DMAPMdnsServiceType {
- INVALID,
- DAAP,
- DPAP,
- DACP,
- RAOP,
- LAST
- }
- [CCode (cheader_filename = "libdmapsharing/dmap.h", cprefix = "DMAP_MEDIA_KIND_")]
- public enum DMAPMediaKind {
- MUSIC,
- MOVIE,
- PODCAST,
- TV_SHOW
- }
- [CCode (cheader_filename = "libdmapsharing/dmap.h", cprefix = "DMAP_SHARE_AUTH_METHOD_")]
- public enum DMAPShareAuthMethod {
- NONE,
- NAME_AND_PASSWORD,
- PASSWORD
- }
- [CCode (cheader_filename = "libdmapsharing/dmap.h", cprefix = "DMAP_TYPE_")]
- public enum DMAPType {
- BYTE,
- SIGNED_INT,
- SHORT,
- INT,
- INT64,
- STRING,
- DATE,
- VERSION,
- CONTAINER,
- POINTER,
- INVALID
+ public Dmap.Type type;
}
[CCode (cheader_filename = "libdmapsharing/dmap.h")]
- public delegate bool DMAPConnectionFunc (DAAP.DMAPConnection connection, bool result, string reason);
- [CCode (cheader_filename = "libdmapsharing/dmap.h")]
- public delegate void DMAPIdContainerRecordFunc (uint id, DAAP.DMAPContainerRecord record);
- [CCode (cheader_filename = "libdmapsharing/dmap.h")]
- public delegate void DMAPIdRecordFunc (uint id, DAAP.DMAPRecord record);
- [CCode (cheader_filename = "libdmapsharing/dmap.h")]
- public delegate void DMAPResponseHandler (DAAP.DMAPConnection connection, uint status, GLib.Node
structure);
- [CCode (cheader_filename = "libdmapsharing/dmap.h")]
- public const int DMAP_HASH_SIZE;
- [CCode (cheader_filename = "libdmapsharing/dmap.h")]
- public const int DMAP_HAVE_UNALIGNED_ACCESS;
- [CCode (cheader_filename = "libdmapsharing/dmap.h")]
- public const int DMAP_SHARE_CHUNK_SIZE;
- [CCode (cheader_filename = "libdmapsharing/dmap.h")]
- public const int DMAP_STATUS_OK;
- [CCode (cheader_filename = "libdmapsharing/dmap.h", cname = "dmap_chunked_message_finished")]
- public static void dmap_chunked_message_finished (Soup.Message message, DAAP.ChunkData cd);
- [CCode (cheader_filename = "libdmapsharing/dmap.h", cname = "dmap_content_code_dmap_type")]
- public static DAAP.DMAPType dmap_content_code_dmap_type (DAAP.DMAPContentCode code);
- [CCode (cheader_filename = "libdmapsharing/dmap.h", cname = "dmap_content_code_name")]
- public static unowned string dmap_content_code_name (DAAP.DMAPContentCode code);
- [CCode (cheader_filename = "libdmapsharing/dmap.h", cname = "dmap_content_code_read_from_buffer")]
- public static DAAP.DMAPContentCode dmap_content_code_read_from_buffer (string buf);
- [CCode (cheader_filename = "libdmapsharing/dmap.h", cname = "dmap_content_code_string")]
- public static unowned string dmap_content_code_string (DAAP.DMAPContentCode code);
- [CCode (cheader_filename = "libdmapsharing/dmap.h", cname = "dmap_content_code_string_as_int32")]
- public static int32 dmap_content_code_string_as_int32 (string str);
- [CCode (cheader_filename = "libdmapsharing/dmap.h", cname = "dmap_content_codes")]
- public static unowned DAAP.DMAPContentCodeDefinition dmap_content_codes (uint number);
- [CCode (cheader_filename = "libdmapsharing/dmap.h", cname = "dmap_hash_generate")]
- public static void dmap_hash_generate (short version_major, uchar[] url, uchar hash_select, uchar[]
@out, int request_id);
- [CCode (cheader_filename = "libdmapsharing/dmap.h", cname = "dmap_hash_progressive_final")]
- public static void dmap_hash_progressive_final (DAAP.DMAPHashContext context, uint[] digest);
- [CCode (cheader_filename = "libdmapsharing/dmap.h", cname = "dmap_hash_progressive_init")]
- public static void dmap_hash_progressive_init (DAAP.DMAPHashContext context);
- [CCode (cheader_filename = "libdmapsharing/dmap.h", cname = "dmap_hash_progressive_to_string")]
- public static void dmap_hash_progressive_to_string (uint digest, string str);
- [CCode (cheader_filename = "libdmapsharing/dmap.h", cname = "dmap_hash_progressive_update")]
- public static void dmap_hash_progressive_update (DAAP.DMAPHashContext context, uint buffer, uint
length);
- [CCode (cheader_filename = "libdmapsharing/dmap.h", cname = "dmap_marshal_generated_BOOLEAN__STRING")]
- public static void dmap_marshal_generated_BOOLEAN__STRING (GLib.Closure closure, GLib.Value
return_value, uint n_param_values, GLib.Value param_values, void* invocation_hint, void* marshal_data);
- [CCode (cheader_filename = "libdmapsharing/dmap.h", cname = "dmap_marshal_generated_STRING__STRING")]
- public static void dmap_marshal_generated_STRING__STRING (GLib.Closure closure, GLib.Value
return_value, uint n_param_values, GLib.Value param_values, void* invocation_hint, void* marshal_data);
- [CCode (cheader_filename = "libdmapsharing/dmap.h", cname =
"dmap_marshal_generated_STRING__ULONG_ULONG")]
- public static void dmap_marshal_generated_STRING__ULONG_ULONG (GLib.Closure closure, GLib.Value
return_value, uint n_param_values, GLib.Value param_values, void* invocation_hint, void* marshal_data);
- [CCode (cheader_filename = "libdmapsharing/dmap.h", cname = "dmap_marshal_generated_ULONG__VOID")]
- public static void dmap_marshal_generated_ULONG__VOID (GLib.Closure closure, GLib.Value return_value,
uint n_param_values, GLib.Value param_values, void* invocation_hint, void* marshal_data);
- [CCode (cheader_filename = "libdmapsharing/dmap.h", cname =
"dmap_marshal_generated_VOID__STRING_BOOLEAN")]
- public static void dmap_marshal_generated_VOID__STRING_BOOLEAN (GLib.Closure closure, GLib.Value
return_value, uint n_param_values, GLib.Value param_values, void* invocation_hint, void* marshal_data);
- [CCode (cheader_filename = "libdmapsharing/dmap.h", cname =
"dmap_marshal_generated_VOID__STRING_POINTER_POINTER_POINTER_BOOLEAN")]
- public static void dmap_marshal_generated_VOID__STRING_POINTER_POINTER_POINTER_BOOLEAN (GLib.Closure
closure, GLib.Value return_value, uint n_param_values, GLib.Value param_values, void* invocation_hint, void*
marshal_data);
- [CCode (cheader_filename = "libdmapsharing/dmap.h", cname =
"dmap_marshal_generated_VOID__STRING_STRING")]
- public static void dmap_marshal_generated_VOID__STRING_STRING (GLib.Closure closure, GLib.Value
return_value, uint n_param_values, GLib.Value param_values, void* invocation_hint, void* marshal_data);
- [CCode (cheader_filename = "libdmapsharing/dmap.h", cname =
"dmap_marshal_generated_VOID__ULONG_FLOAT")]
- public static void dmap_marshal_generated_VOID__ULONG_FLOAT (GLib.Closure closure, GLib.Value
return_value, uint n_param_values, GLib.Value param_values, void* invocation_hint, void* marshal_data);
- [CCode (cheader_filename = "libdmapsharing/dmap.h", cname = "dmap_mdns_avahi_get_client")]
- public static unowned Avahi.Client dmap_mdns_avahi_get_client ();
- [CCode (cheader_filename = "libdmapsharing/dmap.h", cname = "dmap_mdns_avahi_set_entry_group")]
- public static void dmap_mdns_avahi_set_entry_group (Avahi.EntryGroup group);
- [CCode (cheader_filename = "libdmapsharing/dmap.h", cname = "dmap_structure_add")]
- public static unowned GLib.Node dmap_structure_add (GLib.Node parent, DAAP.DMAPContentCode cc);
- [CCode (cheader_filename = "libdmapsharing/dmap.h", cname = "dmap_structure_destroy")]
- public static void dmap_structure_destroy (GLib.Node structure);
- [CCode (cheader_filename = "libdmapsharing/dmap.h", cname = "dmap_structure_find_item")]
- public static unowned DAAP.DMAPStructureItem dmap_structure_find_item (GLib.Node structure,
DAAP.DMAPContentCode code);
- [CCode (cheader_filename = "libdmapsharing/dmap.h", cname = "dmap_structure_find_node")]
- public static unowned GLib.Node dmap_structure_find_node (GLib.Node structure, DAAP.DMAPContentCode
code);
- [CCode (cheader_filename = "libdmapsharing/dmap.h", cname = "dmap_structure_get_size")]
- public static uint dmap_structure_get_size (GLib.Node structure);
- [CCode (cheader_filename = "libdmapsharing/dmap.h", cname =
"dmap_structure_increase_by_predicted_size")]
- public static void dmap_structure_increase_by_predicted_size (GLib.Node structure, uint size);
- [CCode (cheader_filename = "libdmapsharing/dmap.h", cname = "dmap_structure_parse")]
- public static unowned GLib.Node dmap_structure_parse (string buf, int buf_length);
- [CCode (cheader_filename = "libdmapsharing/dmap.h", cname = "dmap_structure_print")]
- public static void dmap_structure_print (GLib.Node structure);
- [CCode (cheader_filename = "libdmapsharing/dmap.h", cname = "dmap_structure_serialize")]
- public static unowned string dmap_structure_serialize (GLib.Node structure, uint length);
- [CCode (cheader_filename = "libdmapsharing/dmap.h", cname = "dmap_utils_mime_to_format")]
- public static unowned string dmap_utils_mime_to_format (string transcode_mimetype);
- [CCode (cheader_filename = "libdmapsharing/dmap.h", cname = "dmap_write_next_chunk")]
- public static void dmap_write_next_chunk (Soup.Message message, DAAP.ChunkData cd);
- [CCode (cheader_filename = "libdmapsharing/dmap.h", cname =
"dmapd_input_stream_strdup_format_extension")]
- public static unowned string dmapd_input_stream_strdup_format_extension (int format_code);
- [CCode (cheader_filename = "libdmapsharing/dmap.h", cname = "pads_compatible")]
- public static bool pads_compatible (Gst.Pad pad1, Gst.Pad pad2);
-}
-/* libdmapsharing-4.0-dacp.vapi generated by vapigen, do not modify. */
-
-namespace DACP {
- [CCode (cheader_filename = "libdmapsharing/dmap.h")]
- [Compact]
- public class ChunkData {
- public weak GLib.InputStream original_stream;
- public weak Soup.Server server;
- public weak GLib.InputStream stream;
- }
- [CCode (cheader_filename = "libdmapsharing/dmap.h")]
- public class Connection : DACP.DMAPConnection {
+ public class ControlConnection : Dmap.Connection {
[CCode (has_construct_function = false)]
- public Connection (string name, string host, uint port, DMAP.Db db, DACP.DMAPRecordFactory
factory);
+ public ControlConnection (string name, string host, uint port, Dmap.Db db, Dmap.RecordFactory
factory);
}
[CCode (cheader_filename = "libdmapsharing/dmap.h")]
- public class DAAPConnection : DACP.DMAPConnection {
- [CCode (cname = "daap_connection_new", has_construct_function = false, type =
"DAAPConnection*")]
- public DAAPConnection (string name, string host, uint port, DMAP.Db db,
DACP.DMAPRecordFactory factory);
- }
- [CCode (cheader_filename = "libdmapsharing/dmap.h")]
- public class DAAPShare : DACP.DMAPShare {
- [CCode (cname = "daap_share_new", has_construct_function = false, type = "DAAPShare*")]
- public DAAPShare (string name, string password, DMAP.Db db, DMAP.ContainerDb container_db,
string transcode_mimetype);
- }
- [CCode (cheader_filename = "libdmapsharing/dmap.h")]
- public class DMAPConnection : GLib.Object {
+ public class ControlShare : Dmap.Share {
[CCode (has_construct_function = false)]
- protected DMAPConnection ();
- [CCode (cname = "dmap_connection_authenticate_message")]
- public static void authenticate_message (DACP.DMAPConnection connection, Soup.Session
session, Soup.Message message, Soup.Auth auth, string password);
- [CCode (cname = "dmap_connection_build_message")]
- public virtual unowned Soup.Message build_message (DACP.DMAPConnection connection, string
path, bool need_hash, double version, int req_id, bool send_close);
- [CCode (cname = "dmap_connection_disconnect")]
- public static void disconnect (DACP.DMAPConnection connection, DACP.DMAPConnectionFunc
callback);
- [CCode (cname = "dmap_connection_get")]
- public bool @get (string path, bool need_hash, DACP.DMAPResponseHandler handler);
- [CCode (cname = "dmap_connection_get_headers")]
- public static unowned Soup.MessageHeaders get_headers (DACP.DMAPConnection connection, string
uri);
- [CCode (cname = "dmap_connection_get_playlists")]
- public static unowned GLib.SList get_playlists (DACP.DMAPConnection connection);
- [NoWrapper]
- public virtual DACP.DMAPContentCode get_protocol_version_cc (DACP.DMAPConnection connection);
- [NoWrapper]
- public virtual unowned string get_query_metadata (DACP.DMAPConnection connection);
- [NoWrapper]
- public virtual unowned DACP.DMAPRecord handle_mlcl (DACP.DMAPConnection connection,
DACP.DMAPRecordFactory factory, GLib.Node mlcl, int item_id);
- [CCode (cname = "dmap_connection_is_connected")]
- public static bool is_connected (DACP.DMAPConnection connection);
- [CCode (cname = "dmap_connection_setup")]
- public static void setup (DACP.DMAPConnection connection);
- [CCode (cname = "dmap_connection_start")]
- public static void start (DACP.DMAPConnection connection, DACP.DMAPConnectionFunc callback);
- [NoAccessorMethod]
- public Soup.URI base_uri { owned get; set; }
- [NoAccessorMethod]
- public int database_id { get; set; }
- [NoAccessorMethod]
- public DMAP.Db db { owned get; construct; }
- [NoAccessorMethod]
- public double dmap_version { get; set; }
- [NoAccessorMethod]
- public DACP.DMAPRecordFactory factory { owned get; construct; }
- [NoAccessorMethod]
- public string host { owned get; construct; }
- [NoAccessorMethod]
- public string name { owned get; construct; }
- [NoAccessorMethod]
- public string password { set; }
- [NoAccessorMethod]
- public uint port { get; construct; }
- [NoAccessorMethod]
- public int revision_number { get; set; }
+ public ControlShare (string library_name, Dmap.ControlPlayer player, Dmap.Db db,
Dmap.ContainerDb container_db);
+ public void pair (string service_name, char[] passcode);
+ public void player_updated ();
+ public void start_lookup ();
+ public void stop_lookup ();
[NoAccessorMethod]
- public int session_id { get; set; }
+ public string library_name { owned get; set; }
[NoAccessorMethod]
- public string username { owned get; construct; }
- public virtual signal void authenticate (string name, Soup.Session p1, Soup.Message p2,
Soup.Auth p3, bool p4);
- public virtual signal void connected ();
- public virtual signal void connecting (ulong state, float progress);
- public virtual signal void disconnected ();
- public virtual signal void operation_done ();
- }
- [CCode (cheader_filename = "libdmapsharing/dmap.h")]
- [Compact]
- public class DMAPContentCodeDefinition {
- public DACP.DMAPContentCode code;
- public int32 int_code;
- public weak string name;
- [CCode (cname = "string")]
- public weak string str;
- public DACP.DMAPType type;
+ public GLib.Object player { owned get; construct; }
+ public virtual signal void add_guid (string guid);
+ public virtual signal bool lookup_guid (string guid);
+ public virtual signal void remote_found (string service_name, string remote_name);
+ public virtual signal void remote_lost (string service_name);
+ public virtual signal void remote_paired (string service_name, bool connected);
}
[CCode (cheader_filename = "libdmapsharing/dmap.h")]
[Compact]
- public class DMAPDbFilterDefinition {
+ public class DbFilterDefinition {
public weak string key;
public bool negate;
public weak string value;
}
[CCode (cheader_filename = "libdmapsharing/dmap.h")]
- public class DMAPGstInputStream : GLib.InputStream, GLib.Seekable {
- [CCode (cname = "dmap_gst_input_stream_new", has_construct_function = false, type =
"GInputStream*")]
- public DMAPGstInputStream (string transcode_mimetype, GLib.InputStream src_stream);
+ public class GstInputStream : GLib.InputStream, GLib.Seekable {
+ [CCode (has_construct_function = false, type = "GInputStream*")]
+ public GstInputStream (string transcode_mimetype, GLib.InputStream src_stream);
[NoWrapper]
- public virtual void kill_pipeline (DACP.DMAPGstInputStream p1);
+ public virtual void kill_pipeline ();
}
[CCode (cheader_filename = "libdmapsharing/dmap.h")]
- public class DMAPGstMP3InputStream : DACP.DMAPGstInputStream, GLib.Seekable {
- [CCode (cname = "dmap_gst_mp3_input_stream_new", has_construct_function = false, type =
"GInputStream*")]
- public DMAPGstMP3InputStream (GLib.InputStream stream);
+ public class GstMP3InputStream : Dmap.GstInputStream, GLib.Seekable {
+ [CCode (has_construct_function = false, type = "GInputStream*")]
+ public GstMP3InputStream (GLib.InputStream stream);
}
[CCode (cheader_filename = "libdmapsharing/dmap.h")]
- public class DMAPGstQtInputStream : DACP.DMAPGstInputStream, GLib.Seekable {
- [CCode (cname = "dmap_gst_qt_input_stream_new", has_construct_function = false, type =
"GInputStream*")]
- public DMAPGstQtInputStream (GLib.InputStream stream);
+ public class GstQtInputStream : Dmap.GstInputStream, GLib.Seekable {
+ [CCode (has_construct_function = false, type = "GInputStream*")]
+ public GstQtInputStream (GLib.InputStream stream);
}
[CCode (cheader_filename = "libdmapsharing/dmap.h")]
- public class DMAPGstWAVInputStream : DACP.DMAPGstInputStream, GLib.Seekable {
- [CCode (cname = "dmap_gst_wav_input_stream_new", has_construct_function = false, type =
"GInputStream*")]
- public DMAPGstWAVInputStream (GLib.InputStream stream);
+ public class GstWavInputStream : Dmap.GstInputStream, GLib.Seekable {
+ [CCode (has_construct_function = false, type = "GInputStream*")]
+ public GstWavInputStream (GLib.InputStream stream);
}
[CCode (cheader_filename = "libdmapsharing/dmap.h")]
[Compact]
- public class DMAPHashContext {
+ public class HashContext {
[CCode (array_length = false)]
public weak uint32[] bits;
[CCode (array_length = false)]
@@ -820,41 +141,42 @@ namespace DACP {
public int version;
}
[CCode (cheader_filename = "libdmapsharing/dmap.h")]
- public class DMAPMdnsBrowser : GLib.Object {
- [CCode (cname = "dmap_mdns_browser_new", has_construct_function = false, type =
"DMAPMdnsBrowser*")]
- public DMAPMdnsBrowser (DACP.DMAPMdnsServiceType type);
- [CCode (cname = "dmap_mdns_browser_error_quark")]
+ public class ImageConnection : Dmap.Connection {
+ [CCode (has_construct_function = false)]
+ public ImageConnection (string name, string host, uint port, Dmap.Db db, Dmap.RecordFactory
factory);
+ }
+ [CCode (cheader_filename = "libdmapsharing/dmap.h")]
+ public class ImageShare : Dmap.Share {
+ [CCode (has_construct_function = false)]
+ public ImageShare (string name, string password, void* db, void* container_db, string
transcode_mimetype);
+ }
+ [CCode (cheader_filename = "libdmapsharing/dmap.h")]
+ public class MdnsBrowser : GLib.Object {
+ [CCode (has_construct_function = false)]
+ public MdnsBrowser (Dmap.MdnsServiceType type);
public static GLib.Quark error_quark ();
- [CCode (cname = "dmap_mdns_browser_get_service_type")]
- public static DACP.DMAPMdnsServiceType get_service_type (DACP.DMAPMdnsBrowser browser);
- [CCode (cname = "dmap_mdns_browser_get_services")]
- public static unowned GLib.SList get_services (DACP.DMAPMdnsBrowser browser);
- [CCode (cname = "dmap_mdns_browser_start")]
- public static bool start (DACP.DMAPMdnsBrowser browser) throws GLib.Error;
- [CCode (cname = "dmap_mdns_browser_stop")]
- public static bool stop (DACP.DMAPMdnsBrowser browser) throws GLib.Error;
- public virtual signal void service_added (DACP.DMAPMdnsService service);
+ public Dmap.MdnsServiceType get_service_type ();
+ public unowned GLib.SList get_services ();
+ public bool start () throws GLib.Error;
+ public bool stop () throws GLib.Error;
+ public virtual signal void service_added (Dmap.MdnsService service);
public virtual signal void service_removed (string service);
}
[CCode (cheader_filename = "libdmapsharing/dmap.h")]
- public class DMAPMdnsPublisher : GLib.Object {
- [CCode (cname = "dmap_mdns_publisher_new", has_construct_function = false, type =
"DMAPMdnsPublisher*")]
- public DMAPMdnsPublisher ();
- [CCode (cname = "dmap_mdns_publisher_error_quark")]
+ public class MdnsPublisher : GLib.Object {
+ [CCode (has_construct_function = false)]
+ public MdnsPublisher ();
public static GLib.Quark error_quark ();
- [CCode (cname = "dmap_mdns_publisher_publish")]
- public static bool publish (DACP.DMAPMdnsPublisher publisher, string name, uint port, string
type_of_service, bool password_required, string txt_records) throws GLib.Error;
- [CCode (cname = "dmap_mdns_publisher_rename_at_port")]
- public static bool rename_at_port (DACP.DMAPMdnsPublisher publisher, uint port, string name)
throws GLib.Error;
- [CCode (cname = "dmap_mdns_publisher_withdraw")]
- public static bool withdraw (DACP.DMAPMdnsPublisher publisher, uint port) throws GLib.Error;
+ public bool publish (string name, uint port, string type_of_service, bool password_required,
string txt_records) throws GLib.Error;
+ public bool rename_at_port (uint port, string name) throws GLib.Error;
+ public bool withdraw (uint port) throws GLib.Error;
public virtual signal void name_collision (string name);
public virtual signal void published (string name);
}
[CCode (cheader_filename = "libdmapsharing/dmap.h")]
- public class DMAPMdnsService : GLib.Object {
+ public class MdnsService : GLib.Object {
[CCode (has_construct_function = false)]
- protected DMAPMdnsService ();
+ protected MdnsService ();
[NoAccessorMethod]
public string host { owned get; set; }
[NoAccessorMethod]
@@ -872,65 +194,64 @@ namespace DACP {
}
[CCode (cheader_filename = "libdmapsharing/dmap.h")]
[Compact]
- public class DMAPMdnsServiceService {
+ public class MdnsServiceService {
}
[CCode (cheader_filename = "libdmapsharing/dmap.h")]
[Compact]
- public class DMAPMetaDataMap {
+ public class MetaDataMap {
public uint md;
public weak string tag;
}
[CCode (cheader_filename = "libdmapsharing/dmap.h")]
[Compact]
- public class DMAPPlaylist {
+ public class Playlist {
public int id;
public weak string name;
public weak GLib.List uris;
}
[CCode (cheader_filename = "libdmapsharing/dmap.h")]
- public class DMAPShare : GLib.Object {
+ public class Share : GLib.Object {
[CCode (has_construct_function = false)]
- protected DMAPShare ();
+ protected Share ();
[NoWrapper]
- public virtual void add_entry_to_mlcl (uint id, DACP.DMAPRecord record, void* mb);
+ public virtual void add_entry_to_mlcl (uint id, Dmap.Record record, void* mb);
[NoWrapper]
- public virtual void content_codes (DACP.DMAPShare share, Soup.Server server, Soup.Message
message, string path, GLib.HashTable query, Soup.ClientContext ctx);
+ public virtual void content_codes (Soup.Server server, Soup.Message message, string path,
GLib.HashTable query, Soup.ClientContext ctx);
[NoWrapper]
- public virtual void ctrl_int (DACP.DMAPShare share, Soup.Server server, Soup.Message message,
string path, GLib.HashTable query, Soup.ClientContext ctx);
+ public virtual void ctrl_int (Soup.Server server, Soup.Message message, string path,
GLib.HashTable query, Soup.ClientContext ctx);
[NoWrapper]
- public virtual void databases (DACP.DMAPShare share, Soup.Server server, Soup.Message
message, string path, GLib.HashTable query, Soup.ClientContext context);
+ public virtual void databases (Soup.Server server, Soup.Message message, string path,
GLib.HashTable query, Soup.ClientContext context);
[NoWrapper]
- public virtual void databases_browse_xxx (DACP.DMAPShare share, Soup.Server server,
Soup.Message msg, string path, GLib.HashTable query, Soup.ClientContext context);
+ public virtual void databases_browse_xxx (Soup.Server server, Soup.Message msg, string path,
GLib.HashTable query, Soup.ClientContext context);
[NoWrapper]
- public virtual void databases_items_xxx (DACP.DMAPShare share, Soup.Server server,
Soup.Message msg, string path, GLib.HashTable query, Soup.ClientContext context);
- [CCode (cname = "dmap_share_free_filter")]
+ public virtual void databases_items_xxx (Soup.Server server, Soup.Message msg, string path,
GLib.HashTable query, Soup.ClientContext context);
public static void free_filter (GLib.SList filter);
[NoWrapper]
- public virtual uint get_desired_port (DACP.DMAPShare share);
+ public virtual uint get_desired_port ();
[NoWrapper]
- public virtual void* get_meta_data_map (DACP.DMAPShare share);
+ public virtual void* get_meta_data_map ();
[NoWrapper]
- public virtual unowned string get_type_of_service (DACP.DMAPShare share);
+ public virtual unowned string get_type_of_service ();
[NoWrapper]
- public virtual void login (DACP.DMAPShare share, Soup.Server server, Soup.Message message,
string path, GLib.HashTable query, Soup.ClientContext ctx);
+ public virtual void login (Soup.Server server, Soup.Message message, string path,
GLib.HashTable query, Soup.ClientContext ctx);
[NoWrapper]
- public virtual void logout (DACP.DMAPShare share, Soup.Server server, Soup.Message message,
string path, GLib.HashTable query, Soup.ClientContext ctx);
+ public virtual void logout (Soup.Server server, Soup.Message message, string path,
GLib.HashTable query, Soup.ClientContext ctx);
[NoWrapper]
- public virtual void message_add_standard_headers (DACP.DMAPShare share, Soup.Message msg);
+ public virtual void message_add_standard_headers (Soup.Message msg);
[NoWrapper]
- public virtual void name_collision (DACP.DMAPShare share, DACP.DMAPMdnsPublisher publisher,
string name);
+ public virtual void name_collision (Dmap.MdnsPublisher publisher, string name);
[NoWrapper]
- public virtual void published (DACP.DMAPShare share, DACP.DMAPMdnsPublisher publisher, string
name);
+ public virtual void published (Dmap.MdnsPublisher publisher, string name);
[NoWrapper]
- public virtual void server_info (DACP.DMAPShare share, Soup.Server server, Soup.Message
message, string path, GLib.HashTable query, Soup.ClientContext ctx);
+ public virtual void server_info (Soup.Server server, Soup.Message message, string path,
GLib.HashTable query, Soup.ClientContext ctx);
[NoWrapper]
- public virtual void update (DACP.DMAPShare share, Soup.Server server, Soup.Message message,
string path, GLib.HashTable query, Soup.ClientContext ctx);
+ public virtual void update (Soup.Server server, Soup.Message message, string path,
GLib.HashTable query, Soup.ClientContext ctx);
[NoAccessorMethod]
public uint auth_method { get; set; }
[NoAccessorMethod]
- public DMAP.ContainerDb container_db { owned get; construct; }
+ public Dmap.ContainerDb container_db { owned get; construct; }
[NoAccessorMethod]
- public DMAP.Db db { owned get; construct; }
+ public Dmap.Db db { owned get; construct; }
[NoAccessorMethod]
public string name { owned get; set; }
[NoAccessorMethod]
@@ -947,41 +268,20 @@ namespace DACP {
}
[CCode (cheader_filename = "libdmapsharing/dmap.h")]
[Compact]
- public class DMAPStructureItem {
+ public class StructureItem {
public GLib.Value content;
- public DACP.DMAPContentCode content_code;
+ public Dmap.ContentCode content_code;
public uint32 size;
}
[CCode (cheader_filename = "libdmapsharing/dmap.h")]
- public class Share : DACP.DAAPShare {
- [CCode (has_construct_function = false)]
- public Share (string library_name, DACP.Player player, DMAP.Db db, DMAP.ContainerDb
container_db);
- public void pair (string service_name, char[] passcode);
- public void player_updated ();
- public void start_lookup ();
- public void stop_lookup ();
- [NoAccessorMethod]
- public string library_name { owned get; set; }
- [NoAccessorMethod]
- public GLib.Object player { owned get; construct; }
- public virtual signal void add_guid (string guid);
- public virtual signal bool lookup_guid (string guid);
- public virtual signal void remote_found (string service_name, string remote_name);
- public virtual signal void remote_lost (string service_name);
- public virtual signal void remote_paired (string service_name, bool connected);
- }
- [CCode (cheader_filename = "libdmapsharing/dmap.h")]
[Compact]
public class bitwise {
}
[CCode (cheader_filename = "libdmapsharing/dmap.h")]
- public interface DAAPRecord : GLib.Object {
- [CCode (cname = "daap_record_cmp_by_album")]
- public static int cmp_by_album (void* a, void* b, DMAP.Db db);
- [CCode (cname = "daap_record_itunes_compat")]
- public abstract bool itunes_compat (DAAP.Record record);
- [CCode (cname = "daap_record_read")]
- public abstract unowned GLib.InputStream read (DAAP.Record record) throws GLib.Error;
+ public interface AvRecord : GLib.Object {
+ public static int cmp_by_album (void* a, void* b, Dmap.Db db);
+ public abstract bool itunes_compat ();
+ public abstract unowned GLib.InputStream read () throws GLib.Error;
[NoAccessorMethod]
public int bitrate { get; set; }
[NoAccessorMethod]
@@ -1001,7 +301,7 @@ namespace DACP {
[NoAccessorMethod]
public string location { owned get; set; }
[NoAccessorMethod]
- public DACP.DMAPMediaKind mediakind { get; set; }
+ public Dmap.MediaKind mediakind { get; set; }
[NoAccessorMethod]
public int mtime { get; set; }
[NoAccessorMethod]
@@ -1025,673 +325,90 @@ namespace DACP {
[NoAccessorMethod]
public int year { get; set; }
}
- [CCode (cheader_filename = "libdmapsharing/dmap.h")]
- public interface DMAPContainerDb : GLib.Object {
- [CCode (cname = "dmap_container_db_add")]
- public abstract void add (DMAP.ContainerDb db, DACP.DMAPContainerRecord record);
- [CCode (cname = "dmap_container_db_count")]
- public abstract int64 count (DMAP.ContainerDb db);
- [CCode (cname = "dmap_container_db_foreach")]
- public abstract void @foreach (DMAP.ContainerDb db, DACP.DMAPIdContainerRecordFunc func,
void* data);
- [CCode (cname = "dmap_container_db_lookup_by_id")]
- public abstract unowned DACP.DMAPContainerRecord lookup_by_id (DMAP.ContainerDb db, uint id);
+ [CCode (cheader_filename = "libdmapsharing/dmap.h", type_cname = "DmapContainerDbInterface")]
+ public interface ContainerDb : GLib.Object {
+ public abstract void add (Dmap.ContainerRecord record);
+ public abstract int64 count ();
+ public abstract void @foreach (Dmap.IdContainerRecordFunc func);
+ public abstract unowned Dmap.ContainerRecord lookup_by_id (uint id);
}
[CCode (cheader_filename = "libdmapsharing/dmap.h")]
- public interface DMAPContainerRecord : GLib.Object {
- [CCode (cname = "dmap_container_record_add_entry")]
- public abstract void add_entry (DACP.DMAPContainerRecord container_record, DACP.DMAPRecord
record, int id);
- [CCode (cname = "dmap_container_record_get_entries")]
- public abstract unowned DMAP.Db get_entries (DACP.DMAPContainerRecord record);
- [CCode (cname = "dmap_container_record_get_entry_count")]
- public abstract uint64 get_entry_count (DACP.DMAPContainerRecord record);
- [CCode (cname = "dmap_container_record_get_id")]
- public abstract uint get_id (DACP.DMAPContainerRecord record);
+ public interface ContainerRecord : GLib.Object {
+ public abstract void add_entry (Dmap.Record record, int id);
+ public abstract unowned Dmap.Db get_entries ();
+ public abstract uint64 get_entry_count ();
+ public abstract uint get_id ();
[NoAccessorMethod]
public string name { owned get; set; }
}
- [CCode (cheader_filename = "libdmapsharing/dmap.h")]
- public interface DMAPDb : GLib.Object {
- [CCode (cname = "dmap_db_add")]
- public abstract uint add (DMAP.Db db, DACP.DMAPRecord record);
- [CCode (cname = "dmap_db_add_path")]
- public abstract uint add_path (DMAP.Db db, string path);
- [CCode (cname = "dmap_db_add_with_id")]
- public abstract uint add_with_id (DMAP.Db db, DACP.DMAPRecord record, uint id);
- [CCode (cname = "dmap_db_apply_filter")]
- public static unowned GLib.HashTable apply_filter (DMAP.Db db, GLib.SList filter_def);
- [CCode (cname = "dmap_db_count")]
- public abstract int64 count (DMAP.Db db);
- [CCode (cname = "dmap_db_foreach")]
- public abstract void @foreach (DMAP.Db db, DACP.DMAPIdRecordFunc func, void* data);
- [CCode (cname = "dmap_db_lookup_by_id")]
- public abstract unowned DACP.DMAPRecord lookup_by_id (DMAP.Db db, uint id);
- [CCode (cname = "dmap_db_lookup_id_by_location")]
- public abstract uint lookup_id_by_location (DMAP.Db db, string location);
- }
- [CCode (cheader_filename = "libdmapsharing/dmap.h")]
- public interface DMAPRecord : GLib.Object {
- [CCode (cname = "dmap_record_set_from_blob")]
- public abstract bool set_from_blob (DACP.DMAPRecord record, GLib.Array blob);
- [CCode (cname = "dmap_record_to_blob")]
- public abstract unowned GLib.Array to_blob (DACP.DMAPRecord record);
- }
- [CCode (cheader_filename = "libdmapsharing/dmap.h")]
- public interface DMAPRecordFactory : GLib.Object {
- [CCode (cname = "dmap_record_factory_create")]
- public abstract unowned DACP.DMAPRecord create (DACP.DMAPRecordFactory factory);
- }
- [CCode (cheader_filename = "libdmapsharing/dmap.h", type_cname = "DACPPlayerInterface")]
- public interface Player : GLib.Object {
+ [CCode (cheader_filename = "libdmapsharing/dmap.h", type_cname = "DmapControlPlayerInterface")]
+ public interface ControlPlayer : GLib.Object {
public abstract void cue_clear ();
public abstract void cue_play (GLib.List records, uint index);
public abstract void next_item ();
public abstract unowned uchar[] now_playing_artwork (uint width, uint height);
- public abstract unowned DAAP.Record now_playing_record ();
+ public abstract unowned Dmap.AvRecord now_playing_record ();
public abstract void pause ();
public abstract void play_pause ();
public abstract void prev_item ();
[NoAccessorMethod]
- public DACP.PlayState play_state { get; set; }
+ public Dmap.DACPPlayState play_state { get; set; }
[NoAccessorMethod]
public ulong playing_time { get; set; }
[NoAccessorMethod]
- public DACP.RepeatState repeat_state { get; set; }
+ public Dmap.DACPRepeatState repeat_state { get; set; }
[NoAccessorMethod]
public bool shuffle_state { get; set; }
[NoAccessorMethod]
public ulong volume { get; set; }
}
- [CCode (cheader_filename = "libdmapsharing/dmap.h", cprefix = "DMAP_")]
- public enum DMAPConnectionState {
- GET_INFO,
- LOGIN,
- GET_REVISION_NUMBER,
- GET_DB_INFO,
- GET_SONGS,
- GET_PLAYLISTS,
- GET_PLAYLIST_ENTRIES,
- LOGOUT,
- DONE
- }
- [CCode (cheader_filename = "libdmapsharing/dmap.h", cprefix = "DMAP_", has_type_id = false)]
- public enum DMAPContentCode {
- CC_INVALID,
- RAW,
- CC_MDCL,
- CC_MSTT,
- CC_MIID,
- CC_MINM,
- CC_MIKD,
- CC_MPER,
- CC_MCON,
- CC_MCTI,
- CC_MPCO,
- CC_MSTS,
- CC_MIMC,
- CC_MCTC,
- CC_MRCO,
- CC_MTCO,
- CC_MLCL,
- CC_MLIT,
- CC_MBCL,
- CC_MSRV,
- CC_MSAU,
- CC_MSLR,
- CC_MPRO,
- CC_MSAL,
- CC_MSUP,
- CC_MSPI,
- CC_MSEX,
- CC_MSBR,
- CC_MSQY,
- CC_MSIX,
- CC_MSRS,
- CC_MSTM,
- CC_MSDC,
- CC_MCCR,
- CC_MCNM,
- CC_MCNA,
- CC_MCTY,
- CC_MLOG,
- CC_MLID,
- CC_MUPD,
- CC_MUSR,
- CC_MUTY,
- CC_MUDL,
- CC_MSMA,
- CC_FQUESCH,
- CC_APRO,
- CC_AVDB,
- CC_ABRO,
- CC_ABAL,
- CC_ABAR,
- CC_ABCP,
- CC_ABGN,
- CC_ADBS,
- CC_ASAL,
- CC_ASAI,
- CC_ASAA,
- CC_ASAR,
- CC_ASBT,
- CC_ASBR,
- CC_ASCM,
- CC_ASCO,
- CC_ASDA,
- CC_ASDM,
- CC_ASDC,
- CC_ASDN,
- CC_ASDB,
- CC_ASEQ,
- CC_ASFM,
- CC_ASGN,
- CC_ASDT,
- CC_ASRV,
- CC_ASSR,
- CC_ASSZ,
- CC_ASST,
- CC_ASSP,
- CC_ASTM,
- CC_ASTC,
- CC_ASTN,
- CC_ASUR,
- CC_ASYR,
- CC_ASDK,
- CC_ASUL,
- CC_ASSU,
- CC_ASSA,
- CC_APLY,
- CC_ABPL,
- CC_APSO,
- CC_PRSV,
- CC_ARIF,
- CC_MSAS,
- CC_AGRP,
- CC_AGAL,
- CC_ASCP,
- CC_PPRO,
- CC_PASP,
- CC_PFDT,
- CC_PICD,
- CC_PIMF,
- CC_PFMT,
- CC_PIFS,
- CC_PLSZ,
- CC_PHGT,
- CC_PWTH,
- CC_PRAT,
- CC_PCMT,
- CC_PRET,
- CC_AESV,
- CC_AEHV,
- CC_AESP,
- CC_AEPP,
- CC_AEPS,
- CC_AESG,
- CC_AEMK,
- CC_AEFP,
- CC_CMPA,
- CC_CMNM,
- CC_CMTY,
- CC_CMPG,
- CC_CACI,
- CC_CAPS,
- CC_CASH,
- CC_CARP,
- CC_CAAS,
- CC_CAAR,
- CC_CAIA,
- CC_CANP,
- CC_CANN,
- CC_CANA,
- CC_CANL,
- CC_CANG,
- CC_CANT,
- CC_CASP,
- CC_CASS,
- CC_CAST,
- CC_CASU,
- CC_CASG,
- CC_CACR,
- CC_CMCP,
- CC_CMGT,
- CC_CMIK,
- CC_CMSP,
- CC_CMST,
- CC_CMSV,
- CC_CMSR,
- CC_CMMK,
- CC_CMVO,
- CC_CMPR,
- CC_CAPR,
- CC_AEFR,
- CC_CAOV,
- CC_CMRL,
- CC_CAHP,
- CC_CAIV,
- CC_CAVC
- }
- [CCode (cheader_filename = "libdmapsharing/dmap.h", cprefix = "DMAP_MDNS_BROWSER_ERROR_")]
- public enum DMAPMdnsBrowserError {
- NOT_RUNNING,
- FAILED
- }
- [CCode (cheader_filename = "libdmapsharing/dmap.h", cprefix = "DMAP_MDNS_PUBLISHER_ERROR_")]
- public enum DMAPMdnsPublisherError {
- NOT_RUNNING,
- FAILED
- }
- [CCode (cheader_filename = "libdmapsharing/dmap.h", cprefix =
"DMAP_MDNS_SERVICE_TRANSPORT_PROTOCOL_")]
- public enum DMAPMdnsServiceTransportProtocol {
- TCP,
- UDP,
- LAST
- }
- [CCode (cheader_filename = "libdmapsharing/dmap.h", cprefix = "DMAP_MDNS_SERVICE_TYPE_")]
- public enum DMAPMdnsServiceType {
- INVALID,
- DAAP,
- DPAP,
- DACP,
- RAOP,
- LAST
- }
- [CCode (cheader_filename = "libdmapsharing/dmap.h", cprefix = "DMAP_MEDIA_KIND_")]
- public enum DMAPMediaKind {
- MUSIC,
- MOVIE,
- PODCAST,
- TV_SHOW
- }
- [CCode (cheader_filename = "libdmapsharing/dmap.h", cprefix = "DMAP_SHARE_AUTH_METHOD_")]
- public enum DMAPShareAuthMethod {
- NONE,
- NAME_AND_PASSWORD,
- PASSWORD
- }
- [CCode (cheader_filename = "libdmapsharing/dmap.h", cprefix = "DMAP_TYPE_")]
- public enum DMAPType {
- BYTE,
- SIGNED_INT,
- SHORT,
- INT,
- INT64,
- STRING,
- DATE,
- VERSION,
- CONTAINER,
- POINTER,
- INVALID
- }
- [CCode (cheader_filename = "libdmapsharing/dmap.h", cprefix = "DACP_PLAY_")]
- public enum PlayState {
- STOPPED,
- PAUSED,
- PLAYING
- }
- [CCode (cheader_filename = "libdmapsharing/dmap.h", cprefix = "DACP_REPEAT_")]
- public enum RepeatState {
- NONE,
- SINGLE,
- ALL
- }
- [CCode (cheader_filename = "libdmapsharing/dmap.h")]
- public delegate bool DMAPConnectionFunc (DACP.DMAPConnection connection, bool result, string reason);
- [CCode (cheader_filename = "libdmapsharing/dmap.h")]
- public delegate void DMAPIdContainerRecordFunc (uint id, DACP.DMAPContainerRecord record);
- [CCode (cheader_filename = "libdmapsharing/dmap.h")]
- public delegate void DMAPIdRecordFunc (uint id, DACP.DMAPRecord record);
- [CCode (cheader_filename = "libdmapsharing/dmap.h")]
- public delegate void DMAPResponseHandler (DACP.DMAPConnection connection, uint status, GLib.Node
structure);
- [CCode (cheader_filename = "libdmapsharing/dmap.h")]
- public const int DMAP_HASH_SIZE;
- [CCode (cheader_filename = "libdmapsharing/dmap.h")]
- public const int DMAP_HAVE_UNALIGNED_ACCESS;
- [CCode (cheader_filename = "libdmapsharing/dmap.h")]
- public const int DMAP_SHARE_CHUNK_SIZE;
- [CCode (cheader_filename = "libdmapsharing/dmap.h")]
- public const int DMAP_STATUS_OK;
- [CCode (cheader_filename = "libdmapsharing/dmap.h", cname = "dmap_chunked_message_finished")]
- public static void dmap_chunked_message_finished (Soup.Message message, DACP.ChunkData cd);
- [CCode (cheader_filename = "libdmapsharing/dmap.h", cname = "dmap_content_code_dmap_type")]
- public static DACP.DMAPType dmap_content_code_dmap_type (DACP.DMAPContentCode code);
- [CCode (cheader_filename = "libdmapsharing/dmap.h", cname = "dmap_content_code_name")]
- public static unowned string dmap_content_code_name (DACP.DMAPContentCode code);
- [CCode (cheader_filename = "libdmapsharing/dmap.h", cname = "dmap_content_code_read_from_buffer")]
- public static DACP.DMAPContentCode dmap_content_code_read_from_buffer (string buf);
- [CCode (cheader_filename = "libdmapsharing/dmap.h", cname = "dmap_content_code_string")]
- public static unowned string dmap_content_code_string (DACP.DMAPContentCode code);
- [CCode (cheader_filename = "libdmapsharing/dmap.h", cname = "dmap_content_code_string_as_int32")]
- public static int32 dmap_content_code_string_as_int32 (string str);
- [CCode (cheader_filename = "libdmapsharing/dmap.h", cname = "dmap_content_codes")]
- public static unowned DACP.DMAPContentCodeDefinition dmap_content_codes (uint number);
- [CCode (cheader_filename = "libdmapsharing/dmap.h", cname = "dmap_hash_generate")]
- public static void dmap_hash_generate (short version_major, uchar[] url, uchar hash_select, uchar[]
@out, int request_id);
- [CCode (cheader_filename = "libdmapsharing/dmap.h", cname = "dmap_hash_progressive_final")]
- public static void dmap_hash_progressive_final (DACP.DMAPHashContext context, uint[] digest);
- [CCode (cheader_filename = "libdmapsharing/dmap.h", cname = "dmap_hash_progressive_init")]
- public static void dmap_hash_progressive_init (DACP.DMAPHashContext context);
- [CCode (cheader_filename = "libdmapsharing/dmap.h", cname = "dmap_hash_progressive_to_string")]
- public static void dmap_hash_progressive_to_string (uint digest, string str);
- [CCode (cheader_filename = "libdmapsharing/dmap.h", cname = "dmap_hash_progressive_update")]
- public static void dmap_hash_progressive_update (DACP.DMAPHashContext context, uint buffer, uint
length);
- [CCode (cheader_filename = "libdmapsharing/dmap.h", cname = "dmap_marshal_generated_BOOLEAN__STRING")]
- public static void dmap_marshal_generated_BOOLEAN__STRING (GLib.Closure closure, GLib.Value
return_value, uint n_param_values, GLib.Value param_values, void* invocation_hint, void* marshal_data);
- [CCode (cheader_filename = "libdmapsharing/dmap.h", cname = "dmap_marshal_generated_STRING__STRING")]
- public static void dmap_marshal_generated_STRING__STRING (GLib.Closure closure, GLib.Value
return_value, uint n_param_values, GLib.Value param_values, void* invocation_hint, void* marshal_data);
- [CCode (cheader_filename = "libdmapsharing/dmap.h", cname =
"dmap_marshal_generated_STRING__ULONG_ULONG")]
- public static void dmap_marshal_generated_STRING__ULONG_ULONG (GLib.Closure closure, GLib.Value
return_value, uint n_param_values, GLib.Value param_values, void* invocation_hint, void* marshal_data);
- [CCode (cheader_filename = "libdmapsharing/dmap.h", cname = "dmap_marshal_generated_ULONG__VOID")]
- public static void dmap_marshal_generated_ULONG__VOID (GLib.Closure closure, GLib.Value return_value,
uint n_param_values, GLib.Value param_values, void* invocation_hint, void* marshal_data);
- [CCode (cheader_filename = "libdmapsharing/dmap.h", cname =
"dmap_marshal_generated_VOID__STRING_BOOLEAN")]
- public static void dmap_marshal_generated_VOID__STRING_BOOLEAN (GLib.Closure closure, GLib.Value
return_value, uint n_param_values, GLib.Value param_values, void* invocation_hint, void* marshal_data);
- [CCode (cheader_filename = "libdmapsharing/dmap.h", cname =
"dmap_marshal_generated_VOID__STRING_POINTER_POINTER_POINTER_BOOLEAN")]
- public static void dmap_marshal_generated_VOID__STRING_POINTER_POINTER_POINTER_BOOLEAN (GLib.Closure
closure, GLib.Value return_value, uint n_param_values, GLib.Value param_values, void* invocation_hint, void*
marshal_data);
- [CCode (cheader_filename = "libdmapsharing/dmap.h", cname =
"dmap_marshal_generated_VOID__STRING_STRING")]
- public static void dmap_marshal_generated_VOID__STRING_STRING (GLib.Closure closure, GLib.Value
return_value, uint n_param_values, GLib.Value param_values, void* invocation_hint, void* marshal_data);
- [CCode (cheader_filename = "libdmapsharing/dmap.h", cname =
"dmap_marshal_generated_VOID__ULONG_FLOAT")]
- public static void dmap_marshal_generated_VOID__ULONG_FLOAT (GLib.Closure closure, GLib.Value
return_value, uint n_param_values, GLib.Value param_values, void* invocation_hint, void* marshal_data);
- [CCode (cheader_filename = "libdmapsharing/dmap.h", cname = "dmap_mdns_avahi_get_client")]
- public static unowned Avahi.Client dmap_mdns_avahi_get_client ();
- [CCode (cheader_filename = "libdmapsharing/dmap.h", cname = "dmap_mdns_avahi_set_entry_group")]
- public static void dmap_mdns_avahi_set_entry_group (Avahi.EntryGroup group);
- [CCode (cheader_filename = "libdmapsharing/dmap.h", cname = "dmap_structure_add")]
- public static unowned GLib.Node dmap_structure_add (GLib.Node parent, DACP.DMAPContentCode cc);
- [CCode (cheader_filename = "libdmapsharing/dmap.h", cname = "dmap_structure_destroy")]
- public static void dmap_structure_destroy (GLib.Node structure);
- [CCode (cheader_filename = "libdmapsharing/dmap.h", cname = "dmap_structure_find_item")]
- public static unowned DACP.DMAPStructureItem dmap_structure_find_item (GLib.Node structure,
DACP.DMAPContentCode code);
- [CCode (cheader_filename = "libdmapsharing/dmap.h", cname = "dmap_structure_find_node")]
- public static unowned GLib.Node dmap_structure_find_node (GLib.Node structure, DACP.DMAPContentCode
code);
- [CCode (cheader_filename = "libdmapsharing/dmap.h", cname = "dmap_structure_get_size")]
- public static uint dmap_structure_get_size (GLib.Node structure);
- [CCode (cheader_filename = "libdmapsharing/dmap.h", cname =
"dmap_structure_increase_by_predicted_size")]
- public static void dmap_structure_increase_by_predicted_size (GLib.Node structure, uint size);
- [CCode (cheader_filename = "libdmapsharing/dmap.h", cname = "dmap_structure_parse")]
- public static unowned GLib.Node dmap_structure_parse (string buf, int buf_length);
- [CCode (cheader_filename = "libdmapsharing/dmap.h", cname = "dmap_structure_print")]
- public static void dmap_structure_print (GLib.Node structure);
- [CCode (cheader_filename = "libdmapsharing/dmap.h", cname = "dmap_structure_serialize")]
- public static unowned string dmap_structure_serialize (GLib.Node structure, uint length);
- [CCode (cheader_filename = "libdmapsharing/dmap.h", cname = "dmap_utils_mime_to_format")]
- public static unowned string dmap_utils_mime_to_format (string transcode_mimetype);
- [CCode (cheader_filename = "libdmapsharing/dmap.h", cname = "dmap_write_next_chunk")]
- public static void dmap_write_next_chunk (Soup.Message message, DACP.ChunkData cd);
- [CCode (cheader_filename = "libdmapsharing/dmap.h", cname =
"dmapd_input_stream_strdup_format_extension")]
- public static unowned string dmapd_input_stream_strdup_format_extension (int format_code);
- [CCode (cheader_filename = "libdmapsharing/dmap.h", cname = "pads_compatible")]
- public static bool pads_compatible (Gst.Pad pad1, Gst.Pad pad2);
-}
-/* libdmapsharing-4.0-dmap.vapi generated by vapigen, do not modify. */
-
-namespace DMAP {
- [CCode (cheader_filename = "libdmapsharing/dmap.h")]
- [Compact]
- public class ChunkData {
- public weak GLib.InputStream original_stream;
- public weak Soup.Server server;
- public weak GLib.InputStream stream;
- }
- [CCode (cheader_filename = "libdmapsharing/dmap.h")]
- public class Connection : GLib.Object {
- [CCode (has_construct_function = false)]
- protected Connection ();
- public void authenticate_message (Soup.Session session, Soup.Message message, Soup.Auth auth,
string password);
- public virtual unowned Soup.Message build_message (string path, bool need_hash, double
version, int req_id, bool send_close);
- public void disconnect (DMAP.ConnectionFunc callback);
- public bool @get (string path, bool need_hash, DMAP.ResponseHandler handler);
- public unowned Soup.MessageHeaders get_headers (string uri);
- public unowned GLib.SList get_playlists ();
- [NoWrapper]
- public virtual DMAP.ContentCode get_protocol_version_cc ();
- [NoWrapper]
- public virtual unowned string get_query_metadata ();
- [NoWrapper]
- public virtual unowned DMAP.Record handle_mlcl (DMAP.RecordFactory factory, GLib.Node mlcl,
int item_id);
- public bool is_connected ();
- public void setup ();
- public void start (DMAP.ConnectionFunc callback);
- [NoAccessorMethod]
- public Soup.URI base_uri { owned get; set; }
- [NoAccessorMethod]
- public int database_id { get; set; }
- [NoAccessorMethod]
- public DMAP.Db db { owned get; construct; }
- [NoAccessorMethod]
- public double dmap_version { get; set; }
- [NoAccessorMethod]
- public DMAP.RecordFactory factory { owned get; construct; }
- [NoAccessorMethod]
- public string host { owned get; construct; }
- [NoAccessorMethod]
- public string name { owned get; construct; }
- [NoAccessorMethod]
- public string password { set; }
- [NoAccessorMethod]
- public uint port { get; construct; }
- [NoAccessorMethod]
- public int revision_number { get; set; }
- [NoAccessorMethod]
- public int session_id { get; set; }
- [NoAccessorMethod]
- public string username { owned get; construct; }
- public virtual signal void authenticate (string name, Soup.Session p1, Soup.Message p2,
Soup.Auth p3, bool p4);
- public virtual signal void connected ();
- public virtual signal void connecting (ulong state, float progress);
- public virtual signal void disconnected ();
- public virtual signal void operation_done ();
- }
- [CCode (cheader_filename = "libdmapsharing/dmap.h")]
- [Compact]
- public class ContentCodeDefinition {
- public DMAP.ContentCode code;
- public int32 int_code;
- public weak string name;
- [CCode (cname = "string")]
- public weak string str;
- public DMAP.Type type;
- }
- [CCode (cheader_filename = "libdmapsharing/dmap.h")]
- [Compact]
- public class DbFilterDefinition {
- public weak string key;
- public bool negate;
- public weak string value;
- }
- [CCode (cheader_filename = "libdmapsharing/dmap.h")]
- public class GstInputStream : GLib.InputStream, GLib.Seekable {
- [CCode (has_construct_function = false, type = "GInputStream*")]
- public GstInputStream (string transcode_mimetype, GLib.InputStream src_stream);
- [NoWrapper]
- public virtual void kill_pipeline ();
- }
- [CCode (cheader_filename = "libdmapsharing/dmap.h")]
- public class GstMP3InputStream : DMAP.GstInputStream, GLib.Seekable {
- [CCode (has_construct_function = false, type = "GInputStream*")]
- public GstMP3InputStream (GLib.InputStream stream);
- }
- [CCode (cheader_filename = "libdmapsharing/dmap.h")]
- public class GstQtInputStream : DMAP.GstInputStream, GLib.Seekable {
- [CCode (has_construct_function = false, type = "GInputStream*")]
- public GstQtInputStream (GLib.InputStream stream);
- }
- [CCode (cheader_filename = "libdmapsharing/dmap.h")]
- public class GstWAVInputStream : DMAP.GstInputStream, GLib.Seekable {
- [CCode (has_construct_function = false, type = "GInputStream*")]
- public GstWAVInputStream (GLib.InputStream stream);
- }
- [CCode (cheader_filename = "libdmapsharing/dmap.h")]
- [Compact]
- public class HashContext {
- [CCode (array_length = false)]
- public weak uint32[] bits;
- [CCode (array_length = false)]
- public weak uint32[] buf;
- [CCode (array_length = false)]
- public weak uint[] @in;
- public int version;
- }
- [CCode (cheader_filename = "libdmapsharing/dmap.h")]
- public class MdnsBrowser : GLib.Object {
- [CCode (has_construct_function = false)]
- public MdnsBrowser (DMAP.MdnsServiceType type);
- public static GLib.Quark error_quark ();
- public DMAP.MdnsServiceType get_service_type ();
- public unowned GLib.SList get_services ();
- public bool start () throws GLib.Error;
- public bool stop () throws GLib.Error;
- public virtual signal void service_added (DMAP.MdnsService service);
- public virtual signal void service_removed (string service);
- }
- [CCode (cheader_filename = "libdmapsharing/dmap.h")]
- public class MdnsPublisher : GLib.Object {
- [CCode (has_construct_function = false)]
- public MdnsPublisher ();
- public static GLib.Quark error_quark ();
- public bool publish (string name, uint port, string type_of_service, bool password_required,
string txt_records) throws GLib.Error;
- public bool rename_at_port (uint port, string name) throws GLib.Error;
- public bool withdraw (uint port) throws GLib.Error;
- public virtual signal void name_collision (string name);
- public virtual signal void published (string name);
+ [CCode (cheader_filename = "libdmapsharing/dmap.h", type_cname = "DmapDbInterface")]
+ public interface Db : GLib.Object {
+ public abstract uint add (Dmap.Record record);
+ public abstract uint add_path (string path);
+ public abstract uint add_with_id (Dmap.Record record, uint id);
+ public unowned GLib.HashTable apply_filter (GLib.SList filter_def);
+ public abstract int64 count ();
+ public abstract void @foreach (Dmap.IdRecordFunc func);
+ public abstract unowned Dmap.Record lookup_by_id (uint id);
+ public abstract uint lookup_id_by_location (string location);
}
- [CCode (cheader_filename = "libdmapsharing/dmap.h")]
- public class MdnsService : GLib.Object {
- [CCode (has_construct_function = false)]
- protected MdnsService ();
- [NoAccessorMethod]
- public string host { owned get; set; }
- [NoAccessorMethod]
- public string name { owned get; set; }
- [NoAccessorMethod]
- public string pair { owned get; set; }
- [NoAccessorMethod]
- public bool password_protected { get; set; }
- [NoAccessorMethod]
- public uint port { get; set; }
+ [CCode (cheader_filename = "libdmapsharing/dmap.h", type_cname = "DmapImageRecordInterface")]
+ public interface ImageRecord : GLib.Object {
+ public abstract unowned GLib.InputStream read () throws GLib.Error;
[NoAccessorMethod]
- public string service_name { owned get; set; }
+ public string aspect_ratio { owned get; set; }
[NoAccessorMethod]
- public uint transport_protocol { get; set; }
- }
- [CCode (cheader_filename = "libdmapsharing/dmap.h")]
- [Compact]
- public class MdnsServiceService {
- }
- [CCode (cheader_filename = "libdmapsharing/dmap.h")]
- [Compact]
- public class MetaDataMap {
- public uint md;
- public weak string tag;
- }
- [CCode (cheader_filename = "libdmapsharing/dmap.h")]
- [Compact]
- public class Playlist {
- public int id;
- public weak string name;
- public weak GLib.List uris;
- }
- [CCode (cheader_filename = "libdmapsharing/dmap.h")]
- public class Share : GLib.Object {
- [CCode (has_construct_function = false)]
- protected Share ();
- [NoWrapper]
- public virtual void add_entry_to_mlcl (uint id, DMAP.Record record, void* mb);
- [NoWrapper]
- public virtual void content_codes (Soup.Server server, Soup.Message message, string path,
GLib.HashTable query, Soup.ClientContext ctx);
- [NoWrapper]
- public virtual void ctrl_int (Soup.Server server, Soup.Message message, string path,
GLib.HashTable query, Soup.ClientContext ctx);
- [NoWrapper]
- public virtual void databases (Soup.Server server, Soup.Message message, string path,
GLib.HashTable query, Soup.ClientContext context);
- [NoWrapper]
- public virtual void databases_browse_xxx (Soup.Server server, Soup.Message msg, string path,
GLib.HashTable query, Soup.ClientContext context);
- [NoWrapper]
- public virtual void databases_items_xxx (Soup.Server server, Soup.Message msg, string path,
GLib.HashTable query, Soup.ClientContext context);
- public static void free_filter (GLib.SList filter);
- [NoWrapper]
- public virtual uint get_desired_port ();
- [NoWrapper]
- public virtual void* get_meta_data_map ();
- [NoWrapper]
- public virtual unowned string get_type_of_service ();
- [NoWrapper]
- public virtual void login (Soup.Server server, Soup.Message message, string path,
GLib.HashTable query, Soup.ClientContext ctx);
- [NoWrapper]
- public virtual void logout (Soup.Server server, Soup.Message message, string path,
GLib.HashTable query, Soup.ClientContext ctx);
- [NoWrapper]
- public virtual void message_add_standard_headers (Soup.Message msg);
- [NoWrapper]
- public virtual void name_collision (DMAP.MdnsPublisher publisher, string name);
- [NoWrapper]
- public virtual void published (DMAP.MdnsPublisher publisher, string name);
- [NoWrapper]
- public virtual void server_info (Soup.Server server, Soup.Message message, string path,
GLib.HashTable query, Soup.ClientContext ctx);
- [NoWrapper]
- public virtual void update (Soup.Server server, Soup.Message message, string path,
GLib.HashTable query, Soup.ClientContext ctx);
+ public string comments { owned get; set; }
[NoAccessorMethod]
- public uint auth_method { get; set; }
+ public int creation_date { get; set; }
[NoAccessorMethod]
- public DMAP.ContainerDb container_db { owned get; construct; }
+ public string filename { owned get; set; }
[NoAccessorMethod]
- public DMAP.Db db { owned get; construct; }
+ public string format { owned get; set; }
[NoAccessorMethod]
- public string name { owned get; set; }
+ public GLib.Array hash { owned get; set; }
[NoAccessorMethod]
- public string password { owned get; set; }
+ public int large_filesize { get; set; }
[NoAccessorMethod]
- public uint revision_number { get; set; }
+ public string location { owned get; set; }
[NoAccessorMethod]
- public Soup.Server server { owned get; }
+ public int pixel_height { get; set; }
[NoAccessorMethod]
- public string transcode_mimetype { owned get; construct; }
- [CCode (array_length = false, array_null_terminated = true)]
+ public int pixel_width { get; set; }
[NoAccessorMethod]
- public string[] txt_records { owned get; set; }
- }
- [CCode (cheader_filename = "libdmapsharing/dmap.h")]
- [Compact]
- public class StructureItem {
- public GLib.Value content;
- public DMAP.ContentCode content_code;
- public uint32 size;
- }
- [CCode (cheader_filename = "libdmapsharing/dmap.h")]
- [Compact]
- public class bitwise {
- }
- [CCode (cheader_filename = "libdmapsharing/dmap.h", type_cname = "DMAPContainerDbInterface")]
- public interface ContainerDb : GLib.Object {
- public abstract void add (DMAP.ContainerRecord record);
- public abstract int64 count ();
- public abstract void @foreach (DMAP.IdContainerRecordFunc func);
- public abstract unowned DMAP.ContainerRecord lookup_by_id (uint id);
- }
- [CCode (cheader_filename = "libdmapsharing/dmap.h")]
- public interface ContainerRecord : GLib.Object {
- public abstract void add_entry (DMAP.Record record, int id);
- public abstract unowned DMAP.Db get_entries ();
- public abstract uint64 get_entry_count ();
- public abstract uint get_id ();
+ public int rating { get; set; }
[NoAccessorMethod]
- public string name { owned get; set; }
- }
- [CCode (cheader_filename = "libdmapsharing/dmap.h", type_cname = "DMAPDbInterface")]
- public interface Db : GLib.Object {
- public abstract uint add (DMAP.Record record);
- public abstract uint add_path (string path);
- public abstract uint add_with_id (DMAP.Record record, uint id);
- public unowned GLib.HashTable apply_filter (GLib.SList filter_def);
- public abstract int64 count ();
- public abstract void @foreach (DMAP.IdRecordFunc func);
- public abstract unowned DMAP.Record lookup_by_id (uint id);
- public abstract uint lookup_id_by_location (string location);
+ public GLib.Array thumbnail { owned get; set; }
}
- [CCode (cheader_filename = "libdmapsharing/dmap.h", type_cname = "DMAPRecordInterface")]
+ [CCode (cheader_filename = "libdmapsharing/dmap.h", type_cname = "DmapRecordInterface")]
public interface Record : GLib.Object {
public abstract bool set_from_blob (GLib.Array blob);
public abstract unowned GLib.Array to_blob ();
}
- [CCode (cheader_filename = "libdmapsharing/dmap.h", type_cname = "DMAPRecordFactoryInterface")]
+ [CCode (cheader_filename = "libdmapsharing/dmap.h", type_cname = "DmapRecordFactoryInterface")]
public interface RecordFactory : GLib.Object {
- public abstract DMAP.Record create (void* user_data);
+ public abstract Dmap.Record create (void* user_data);
}
[CCode (cheader_filename = "libdmapsharing/dmap.h", cprefix = "DMAP_")]
public enum ConnectionState {
@@ -1927,13 +644,13 @@ namespace DMAP {
INVALID
}
[CCode (cheader_filename = "libdmapsharing/dmap.h")]
- public delegate bool ConnectionFunc (DMAP.Connection connection, bool result, string reason);
+ public delegate bool ConnectionFunc (Dmap.Connection connection, bool result, string reason);
[CCode (cheader_filename = "libdmapsharing/dmap.h")]
- public delegate void IdContainerRecordFunc (uint id, DMAP.ContainerRecord record);
+ public delegate void IdContainerRecordFunc (uint id, Dmap.ContainerRecord record);
[CCode (cheader_filename = "libdmapsharing/dmap.h")]
- public delegate void IdRecordFunc (uint id, DMAP.Record record);
+ public delegate void IdRecordFunc (uint id, Dmap.Record record);
[CCode (cheader_filename = "libdmapsharing/dmap.h")]
- public delegate void ResponseHandler (DMAP.Connection connection, uint status, GLib.Node structure);
+ public delegate void ResponseHandler (Dmap.Connection connection, uint status, GLib.Node structure);
[CCode (cheader_filename = "libdmapsharing/dmap.h")]
public const int HASH_SIZE;
[CCode (cheader_filename = "libdmapsharing/dmap.h")]
@@ -1943,31 +660,31 @@ namespace DMAP {
[CCode (cheader_filename = "libdmapsharing/dmap.h")]
public const int STATUS_OK;
[CCode (cheader_filename = "libdmapsharing/dmap.h")]
- public static void chunked_message_finished (Soup.Message message, DMAP.ChunkData cd);
+ public static void chunked_message_finished (Soup.Message message, Dmap.ChunkData cd);
[CCode (cheader_filename = "libdmapsharing/dmap.h")]
- public static DMAP.Type content_code_dmap_type (DMAP.ContentCode code);
+ public static Dmap.Type content_code_dmap_type (Dmap.ContentCode code);
[CCode (cheader_filename = "libdmapsharing/dmap.h")]
- public static unowned string content_code_name (DMAP.ContentCode code);
+ public static unowned string content_code_name (Dmap.ContentCode code);
[CCode (cheader_filename = "libdmapsharing/dmap.h")]
- public static DMAP.ContentCode content_code_read_from_buffer (string buf);
+ public static Dmap.ContentCode content_code_read_from_buffer (string buf);
[CCode (cheader_filename = "libdmapsharing/dmap.h")]
- public static unowned string content_code_string (DMAP.ContentCode code);
+ public static unowned string content_code_string (Dmap.ContentCode code);
[CCode (cheader_filename = "libdmapsharing/dmap.h")]
public static int32 content_code_string_as_int32 (string str);
[CCode (cheader_filename = "libdmapsharing/dmap.h")]
- public static unowned DMAP.ContentCodeDefinition content_codes (uint number);
+ public static unowned Dmap.ContentCodeDefinition content_codes (uint number);
[CCode (cheader_filename = "libdmapsharing/dmap.h", cname =
"dmapd_input_stream_strdup_format_extension")]
public static unowned string dmapd_input_stream_strdup_format_extension (int format_code);
[CCode (cheader_filename = "libdmapsharing/dmap.h")]
public static void hash_generate (short version_major, uchar[] url, uchar hash_select, uchar[] @out,
int request_id);
[CCode (cheader_filename = "libdmapsharing/dmap.h")]
- public static void hash_progressive_final (DMAP.HashContext context, uint[] digest);
+ public static void hash_progressive_final (Dmap.HashContext context, uint[] digest);
[CCode (cheader_filename = "libdmapsharing/dmap.h")]
- public static void hash_progressive_init (DMAP.HashContext context);
+ public static void hash_progressive_init (Dmap.HashContext context);
[CCode (cheader_filename = "libdmapsharing/dmap.h")]
public static void hash_progressive_to_string (uint digest, string str);
[CCode (cheader_filename = "libdmapsharing/dmap.h")]
- public static void hash_progressive_update (DMAP.HashContext context, uint buffer, uint length);
+ public static void hash_progressive_update (Dmap.HashContext context, uint buffer, uint length);
[CCode (cheader_filename = "libdmapsharing/dmap.h")]
public static void marshal_generated_BOOLEAN__STRING (GLib.Closure closure, GLib.Value return_value,
uint n_param_values, GLib.Value param_values, void* invocation_hint, void* marshal_data);
[CCode (cheader_filename = "libdmapsharing/dmap.h")]
@@ -1991,13 +708,13 @@ namespace DMAP {
[CCode (cheader_filename = "libdmapsharing/dmap.h", cname = "pads_compatible")]
public static bool pads_compatible (Gst.Pad pad1, Gst.Pad pad2);
[CCode (cheader_filename = "libdmapsharing/dmap.h")]
- public static unowned GLib.Node structure_add (GLib.Node parent, DMAP.ContentCode cc);
+ public static unowned GLib.Node structure_add (GLib.Node parent, Dmap.ContentCode cc);
[CCode (cheader_filename = "libdmapsharing/dmap.h")]
public static void structure_destroy (GLib.Node structure);
[CCode (cheader_filename = "libdmapsharing/dmap.h")]
- public static unowned DMAP.StructureItem structure_find_item (GLib.Node structure, DMAP.ContentCode
code);
+ public static unowned Dmap.StructureItem structure_find_item (GLib.Node structure, Dmap.ContentCode
code);
[CCode (cheader_filename = "libdmapsharing/dmap.h")]
- public static unowned GLib.Node structure_find_node (GLib.Node structure, DMAP.ContentCode code);
+ public static unowned GLib.Node structure_find_node (GLib.Node structure, Dmap.ContentCode code);
[CCode (cheader_filename = "libdmapsharing/dmap.h")]
public static uint structure_get_size (GLib.Node structure);
[CCode (cheader_filename = "libdmapsharing/dmap.h")]
@@ -2011,673 +728,5 @@ namespace DMAP {
[CCode (cheader_filename = "libdmapsharing/dmap.h")]
public static unowned string utils_mime_to_format (string transcode_mimetype);
[CCode (cheader_filename = "libdmapsharing/dmap.h")]
- public static void write_next_chunk (Soup.Message message, DMAP.ChunkData cd);
-}
-/* libdmapsharing-4.0-dpap.vapi generated by vapigen, do not modify. */
-
-namespace DPAP {
- [CCode (cheader_filename = "libdmapsharing/dmap.h")]
- [Compact]
- public class ChunkData {
- public weak GLib.InputStream original_stream;
- public weak Soup.Server server;
- public weak GLib.InputStream stream;
- }
- [CCode (cheader_filename = "libdmapsharing/dmap.h")]
- public class Connection : DPAP.DMAPConnection {
- [CCode (has_construct_function = false)]
- public Connection (string name, string host, uint port, DMAP.Db db, DMAP.RecordFactory
factory);
- }
- [CCode (cheader_filename = "libdmapsharing/dmap.h")]
- public class DMAPConnection : GLib.Object {
- [CCode (has_construct_function = false)]
- protected DMAPConnection ();
- [CCode (cname = "dmap_connection_authenticate_message")]
- public static void authenticate_message (DPAP.DMAPConnection connection, Soup.Session
session, Soup.Message message, Soup.Auth auth, string password);
- [CCode (cname = "dmap_connection_build_message")]
- public virtual unowned Soup.Message build_message (DPAP.DMAPConnection connection, string
path, bool need_hash, double version, int req_id, bool send_close);
- [CCode (cname = "dmap_connection_disconnect")]
- public static void disconnect (DPAP.DMAPConnection connection, DPAP.DMAPConnectionFunc
callback);
- [CCode (cname = "dmap_connection_get")]
- public bool @get (string path, bool need_hash, DPAP.DMAPResponseHandler handler);
- [CCode (cname = "dmap_connection_get_headers")]
- public static unowned Soup.MessageHeaders get_headers (DPAP.DMAPConnection connection, string
uri);
- [CCode (cname = "dmap_connection_get_playlists")]
- public static unowned GLib.SList get_playlists (DPAP.DMAPConnection connection);
- [NoWrapper]
- public virtual DPAP.DMAPContentCode get_protocol_version_cc (DPAP.DMAPConnection connection);
- [NoWrapper]
- public virtual unowned string get_query_metadata (DPAP.DMAPConnection connection);
- [NoWrapper]
- public virtual unowned DPAP.DMAPRecord handle_mlcl (DPAP.DMAPConnection connection,
DMAP.RecordFactory factory, GLib.Node mlcl, int item_id);
- [CCode (cname = "dmap_connection_is_connected")]
- public static bool is_connected (DPAP.DMAPConnection connection);
- [CCode (cname = "dmap_connection_setup")]
- public static void setup (DPAP.DMAPConnection connection);
- [CCode (cname = "dmap_connection_start")]
- public static void start (DPAP.DMAPConnection connection, DPAP.DMAPConnectionFunc callback);
- [NoAccessorMethod]
- public Soup.URI base_uri { owned get; set; }
- [NoAccessorMethod]
- public int database_id { get; set; }
- [NoAccessorMethod]
- public DMAP.Db db { owned get; construct; }
- [NoAccessorMethod]
- public double dmap_version { get; set; }
- [NoAccessorMethod]
- public DMAP.RecordFactory factory { owned get; construct; }
- [NoAccessorMethod]
- public string host { owned get; construct; }
- [NoAccessorMethod]
- public string name { owned get; construct; }
- [NoAccessorMethod]
- public string password { set; }
- [NoAccessorMethod]
- public uint port { get; construct; }
- [NoAccessorMethod]
- public int revision_number { get; set; }
- [NoAccessorMethod]
- public int session_id { get; set; }
- [NoAccessorMethod]
- public string username { owned get; construct; }
- public virtual signal void authenticate (string name, Soup.Session p1, Soup.Message p2,
Soup.Auth p3, bool p4);
- public virtual signal void connected ();
- public virtual signal void connecting (ulong state, float progress);
- public virtual signal void disconnected ();
- public virtual signal void operation_done ();
- }
- [CCode (cheader_filename = "libdmapsharing/dmap.h")]
- [Compact]
- public class DMAPContentCodeDefinition {
- public DPAP.DMAPContentCode code;
- public int32 int_code;
- public weak string name;
- [CCode (cname = "string")]
- public weak string str;
- public DPAP.DMAPType type;
- }
- [CCode (cheader_filename = "libdmapsharing/dmap.h")]
- [Compact]
- public class DMAPDbFilterDefinition {
- public weak string key;
- public bool negate;
- public weak string value;
- }
- [CCode (cheader_filename = "libdmapsharing/dmap.h")]
- public class DMAPGstInputStream : GLib.InputStream, GLib.Seekable {
- [CCode (cname = "dmap_gst_input_stream_new", has_construct_function = false, type =
"GInputStream*")]
- public DMAPGstInputStream (string transcode_mimetype, GLib.InputStream src_stream);
- [NoWrapper]
- public virtual void kill_pipeline (DPAP.DMAPGstInputStream p1);
- }
- [CCode (cheader_filename = "libdmapsharing/dmap.h")]
- public class DMAPGstMP3InputStream : DPAP.DMAPGstInputStream, GLib.Seekable {
- [CCode (cname = "dmap_gst_mp3_input_stream_new", has_construct_function = false, type =
"GInputStream*")]
- public DMAPGstMP3InputStream (GLib.InputStream stream);
- }
- [CCode (cheader_filename = "libdmapsharing/dmap.h")]
- public class DMAPGstQtInputStream : DPAP.DMAPGstInputStream, GLib.Seekable {
- [CCode (cname = "dmap_gst_qt_input_stream_new", has_construct_function = false, type =
"GInputStream*")]
- public DMAPGstQtInputStream (GLib.InputStream stream);
- }
- [CCode (cheader_filename = "libdmapsharing/dmap.h")]
- public class DMAPGstWAVInputStream : DPAP.DMAPGstInputStream, GLib.Seekable {
- [CCode (cname = "dmap_gst_wav_input_stream_new", has_construct_function = false, type =
"GInputStream*")]
- public DMAPGstWAVInputStream (GLib.InputStream stream);
- }
- [CCode (cheader_filename = "libdmapsharing/dmap.h")]
- [Compact]
- public class DMAPHashContext {
- [CCode (array_length = false)]
- public weak uint32[] bits;
- [CCode (array_length = false)]
- public weak uint32[] buf;
- [CCode (array_length = false)]
- public weak uint[] @in;
- public int version;
- }
- [CCode (cheader_filename = "libdmapsharing/dmap.h")]
- public class DMAPMdnsBrowser : GLib.Object {
- [CCode (cname = "dmap_mdns_browser_new", has_construct_function = false, type =
"DMAPMdnsBrowser*")]
- public DMAPMdnsBrowser (DPAP.DMAPMdnsServiceType type);
- [CCode (cname = "dmap_mdns_browser_error_quark")]
- public static GLib.Quark error_quark ();
- [CCode (cname = "dmap_mdns_browser_get_service_type")]
- public static DPAP.DMAPMdnsServiceType get_service_type (DPAP.DMAPMdnsBrowser browser);
- [CCode (cname = "dmap_mdns_browser_get_services")]
- public static unowned GLib.SList get_services (DPAP.DMAPMdnsBrowser browser);
- [CCode (cname = "dmap_mdns_browser_start")]
- public static bool start (DPAP.DMAPMdnsBrowser browser) throws GLib.Error;
- [CCode (cname = "dmap_mdns_browser_stop")]
- public static bool stop (DPAP.DMAPMdnsBrowser browser) throws GLib.Error;
- public virtual signal void service_added (DPAP.DMAPMdnsService service);
- public virtual signal void service_removed (string service);
- }
- [CCode (cheader_filename = "libdmapsharing/dmap.h")]
- public class DMAPMdnsPublisher : GLib.Object {
- [CCode (cname = "dmap_mdns_publisher_new", has_construct_function = false, type =
"DMAPMdnsPublisher*")]
- public DMAPMdnsPublisher ();
- [CCode (cname = "dmap_mdns_publisher_error_quark")]
- public static GLib.Quark error_quark ();
- [CCode (cname = "dmap_mdns_publisher_publish")]
- public static bool publish (DPAP.DMAPMdnsPublisher publisher, string name, uint port, string
type_of_service, bool password_required, string txt_records) throws GLib.Error;
- [CCode (cname = "dmap_mdns_publisher_rename_at_port")]
- public static bool rename_at_port (DPAP.DMAPMdnsPublisher publisher, uint port, string name)
throws GLib.Error;
- [CCode (cname = "dmap_mdns_publisher_withdraw")]
- public static bool withdraw (DPAP.DMAPMdnsPublisher publisher, uint port) throws GLib.Error;
- public virtual signal void name_collision (string name);
- public virtual signal void published (string name);
- }
- [CCode (cheader_filename = "libdmapsharing/dmap.h")]
- public class DMAPMdnsService : GLib.Object {
- [CCode (has_construct_function = false)]
- protected DMAPMdnsService ();
- [NoAccessorMethod]
- public string host { owned get; set; }
- [NoAccessorMethod]
- public string name { owned get; set; }
- [NoAccessorMethod]
- public string pair { owned get; set; }
- [NoAccessorMethod]
- public bool password_protected { get; set; }
- [NoAccessorMethod]
- public uint port { get; set; }
- [NoAccessorMethod]
- public string service_name { owned get; set; }
- [NoAccessorMethod]
- public uint transport_protocol { get; set; }
- }
- [CCode (cheader_filename = "libdmapsharing/dmap.h")]
- [Compact]
- public class DMAPMdnsServiceService {
- }
- [CCode (cheader_filename = "libdmapsharing/dmap.h")]
- [Compact]
- public class DMAPMetaDataMap {
- public uint md;
- public weak string tag;
- }
- [CCode (cheader_filename = "libdmapsharing/dmap.h")]
- [Compact]
- public class DMAPPlaylist {
- public int id;
- public weak string name;
- public weak GLib.List uris;
- }
- [CCode (cheader_filename = "libdmapsharing/dmap.h")]
- public class DMAPShare : GLib.Object {
- [CCode (has_construct_function = false)]
- protected DMAPShare ();
- [NoWrapper]
- public virtual void add_entry_to_mlcl (uint id, DPAP.DMAPRecord record, void* mb);
- [NoWrapper]
- public virtual void content_codes (DPAP.DMAPShare share, Soup.Server server, Soup.Message
message, string path, GLib.HashTable query, Soup.ClientContext ctx);
- [NoWrapper]
- public virtual void ctrl_int (DPAP.DMAPShare share, Soup.Server server, Soup.Message message,
string path, GLib.HashTable query, Soup.ClientContext ctx);
- [NoWrapper]
- public virtual void databases (DPAP.DMAPShare share, Soup.Server server, Soup.Message
message, string path, GLib.HashTable query, Soup.ClientContext context);
- [NoWrapper]
- public virtual void databases_browse_xxx (DPAP.DMAPShare share, Soup.Server server,
Soup.Message msg, string path, GLib.HashTable query, Soup.ClientContext context);
- [NoWrapper]
- public virtual void databases_items_xxx (DPAP.DMAPShare share, Soup.Server server,
Soup.Message msg, string path, GLib.HashTable query, Soup.ClientContext context);
- [CCode (cname = "dmap_share_free_filter")]
- public static void free_filter (GLib.SList filter);
- [NoWrapper]
- public virtual uint get_desired_port (DPAP.DMAPShare share);
- [NoWrapper]
- public virtual void* get_meta_data_map (DPAP.DMAPShare share);
- [NoWrapper]
- public virtual unowned string get_type_of_service (DPAP.DMAPShare share);
- [NoWrapper]
- public virtual void login (DPAP.DMAPShare share, Soup.Server server, Soup.Message message,
string path, GLib.HashTable query, Soup.ClientContext ctx);
- [NoWrapper]
- public virtual void logout (DPAP.DMAPShare share, Soup.Server server, Soup.Message message,
string path, GLib.HashTable query, Soup.ClientContext ctx);
- [NoWrapper]
- public virtual void message_add_standard_headers (DPAP.DMAPShare share, Soup.Message msg);
- [NoWrapper]
- public virtual void name_collision (DPAP.DMAPShare share, DPAP.DMAPMdnsPublisher publisher,
string name);
- [NoWrapper]
- public virtual void published (DPAP.DMAPShare share, DPAP.DMAPMdnsPublisher publisher, string
name);
- [NoWrapper]
- public virtual void server_info (DPAP.DMAPShare share, Soup.Server server, Soup.Message
message, string path, GLib.HashTable query, Soup.ClientContext ctx);
- [NoWrapper]
- public virtual void update (DPAP.DMAPShare share, Soup.Server server, Soup.Message message,
string path, GLib.HashTable query, Soup.ClientContext ctx);
- [NoAccessorMethod]
- public uint auth_method { get; set; }
- [NoAccessorMethod]
- public DMAP.ContainerDb container_db { owned get; construct; }
- [NoAccessorMethod]
- public DMAP.Db db { owned get; construct; }
- [NoAccessorMethod]
- public string name { owned get; set; }
- [NoAccessorMethod]
- public string password { owned get; set; }
- [NoAccessorMethod]
- public uint revision_number { get; set; }
- [NoAccessorMethod]
- public Soup.Server server { owned get; }
- [NoAccessorMethod]
- public string transcode_mimetype { owned get; construct; }
- [CCode (array_length = false, array_null_terminated = true)]
- [NoAccessorMethod]
- public string[] txt_records { owned get; set; }
- }
- [CCode (cheader_filename = "libdmapsharing/dmap.h")]
- [Compact]
- public class DMAPStructureItem {
- public GLib.Value content;
- public DPAP.DMAPContentCode content_code;
- public uint32 size;
- }
- [CCode (cheader_filename = "libdmapsharing/dmap.h")]
- public class Share : DPAP.DMAPShare {
- [CCode (has_construct_function = false)]
- public Share (string name, string password, void* db, void* container_db, string
transcode_mimetype);
- }
- [CCode (cheader_filename = "libdmapsharing/dmap.h")]
- [Compact]
- public class bitwise {
- }
- [CCode (cheader_filename = "libdmapsharing/dmap.h")]
- public interface DMAPContainerDb : GLib.Object {
- [CCode (cname = "dmap_container_db_add")]
- public abstract void add (DMAP.ContainerDb db, DPAP.DMAPContainerRecord record);
- [CCode (cname = "dmap_container_db_count")]
- public abstract int64 count (DMAP.ContainerDb db);
- [CCode (cname = "dmap_container_db_foreach")]
- public abstract void @foreach (DMAP.ContainerDb db, DPAP.DMAPIdContainerRecordFunc func,
void* data);
- [CCode (cname = "dmap_container_db_lookup_by_id")]
- public abstract unowned DPAP.DMAPContainerRecord lookup_by_id (DMAP.ContainerDb db, uint id);
- }
- [CCode (cheader_filename = "libdmapsharing/dmap.h")]
- public interface DMAPContainerRecord : GLib.Object {
- [CCode (cname = "dmap_container_record_add_entry")]
- public abstract void add_entry (DPAP.DMAPContainerRecord container_record, DPAP.DMAPRecord
record, int id);
- [CCode (cname = "dmap_container_record_get_entries")]
- public abstract unowned DMAP.Db get_entries (DPAP.DMAPContainerRecord record);
- [CCode (cname = "dmap_container_record_get_entry_count")]
- public abstract uint64 get_entry_count (DPAP.DMAPContainerRecord record);
- [CCode (cname = "dmap_container_record_get_id")]
- public abstract uint get_id (DPAP.DMAPContainerRecord record);
- [NoAccessorMethod]
- public string name { owned get; set; }
- }
- [CCode (cheader_filename = "libdmapsharing/dmap.h")]
- public interface DMAPDb : GLib.Object {
- [CCode (cname = "dmap_db_add")]
- public abstract uint add (DMAP.Db db, DPAP.DMAPRecord record);
- [CCode (cname = "dmap_db_add_path")]
- public abstract uint add_path (DMAP.Db db, string path);
- [CCode (cname = "dmap_db_add_with_id")]
- public abstract uint add_with_id (DMAP.Db db, DPAP.DMAPRecord record, uint id);
- [CCode (cname = "dmap_db_apply_filter")]
- public static unowned GLib.HashTable apply_filter (DMAP.Db db, GLib.SList filter_def);
- [CCode (cname = "dmap_db_count")]
- public abstract int64 count (DMAP.Db db);
- [CCode (cname = "dmap_db_foreach")]
- public abstract void @foreach (DMAP.Db db, DPAP.DMAPIdRecordFunc func, void* data);
- [CCode (cname = "dmap_db_lookup_by_id")]
- public abstract unowned DPAP.DMAPRecord lookup_by_id (DMAP.Db db, uint id);
- [CCode (cname = "dmap_db_lookup_id_by_location")]
- public abstract uint lookup_id_by_location (DMAP.Db db, string location);
- }
- [CCode (cheader_filename = "libdmapsharing/dmap.h")]
- public interface DMAPRecord : GLib.Object {
- [CCode (cname = "dmap_record_set_from_blob")]
- public abstract bool set_from_blob (DPAP.DMAPRecord record, GLib.Array blob);
- [CCode (cname = "dmap_record_to_blob")]
- public abstract unowned GLib.Array to_blob (DPAP.DMAPRecord record);
- }
- [CCode (cheader_filename = "libdmapsharing/dmap.h")]
- public interface DMAPRecordFactory : GLib.Object {
- [CCode (cname = "dmap_record_factory_create")]
- public abstract unowned DPAP.DMAPRecord create (DMAP.RecordFactory factory);
- }
- [CCode (cheader_filename = "libdmapsharing/dmap.h", type_cname = "DPAPRecordInterface")]
- public interface Record : GLib.Object {
- public abstract unowned GLib.InputStream read () throws GLib.Error;
- [NoAccessorMethod]
- public string aspect_ratio { owned get; set; }
- [NoAccessorMethod]
- public string comments { owned get; set; }
- [NoAccessorMethod]
- public int creation_date { get; set; }
- [NoAccessorMethod]
- public string filename { owned get; set; }
- [NoAccessorMethod]
- public string format { owned get; set; }
- [NoAccessorMethod]
- public GLib.Array hash { owned get; set; }
- [NoAccessorMethod]
- public int large_filesize { get; set; }
- [NoAccessorMethod]
- public string location { owned get; set; }
- [NoAccessorMethod]
- public int pixel_height { get; set; }
- [NoAccessorMethod]
- public int pixel_width { get; set; }
- [NoAccessorMethod]
- public int rating { get; set; }
- [NoAccessorMethod]
- public GLib.Array thumbnail { owned get; set; }
- }
- [CCode (cheader_filename = "libdmapsharing/dmap.h", cprefix = "DACP_PLAY_")]
- public enum DACPPlayState {
- STOPPED,
- PAUSED,
- PLAYING
- }
- [CCode (cheader_filename = "libdmapsharing/dmap.h", cprefix = "DACP_REPEAT_")]
- public enum DACPRepeatState {
- NONE,
- SINGLE,
- ALL
- }
- [CCode (cheader_filename = "libdmapsharing/dmap.h", cprefix = "DMAP_")]
- public enum DMAPConnectionState {
- GET_INFO,
- LOGIN,
- GET_REVISION_NUMBER,
- GET_DB_INFO,
- GET_SONGS,
- GET_PLAYLISTS,
- GET_PLAYLIST_ENTRIES,
- LOGOUT,
- DONE
- }
- [CCode (cheader_filename = "libdmapsharing/dmap.h", cprefix = "DMAP_", has_type_id = false)]
- public enum DMAPContentCode {
- CC_INVALID,
- RAW,
- CC_MDCL,
- CC_MSTT,
- CC_MIID,
- CC_MINM,
- CC_MIKD,
- CC_MPER,
- CC_MCON,
- CC_MCTI,
- CC_MPCO,
- CC_MSTS,
- CC_MIMC,
- CC_MCTC,
- CC_MRCO,
- CC_MTCO,
- CC_MLCL,
- CC_MLIT,
- CC_MBCL,
- CC_MSRV,
- CC_MSAU,
- CC_MSLR,
- CC_MPRO,
- CC_MSAL,
- CC_MSUP,
- CC_MSPI,
- CC_MSEX,
- CC_MSBR,
- CC_MSQY,
- CC_MSIX,
- CC_MSRS,
- CC_MSTM,
- CC_MSDC,
- CC_MCCR,
- CC_MCNM,
- CC_MCNA,
- CC_MCTY,
- CC_MLOG,
- CC_MLID,
- CC_MUPD,
- CC_MUSR,
- CC_MUTY,
- CC_MUDL,
- CC_MSMA,
- CC_FQUESCH,
- CC_APRO,
- CC_AVDB,
- CC_ABRO,
- CC_ABAL,
- CC_ABAR,
- CC_ABCP,
- CC_ABGN,
- CC_ADBS,
- CC_ASAL,
- CC_ASAI,
- CC_ASAA,
- CC_ASAR,
- CC_ASBT,
- CC_ASBR,
- CC_ASCM,
- CC_ASCO,
- CC_ASDA,
- CC_ASDM,
- CC_ASDC,
- CC_ASDN,
- CC_ASDB,
- CC_ASEQ,
- CC_ASFM,
- CC_ASGN,
- CC_ASDT,
- CC_ASRV,
- CC_ASSR,
- CC_ASSZ,
- CC_ASST,
- CC_ASSP,
- CC_ASTM,
- CC_ASTC,
- CC_ASTN,
- CC_ASUR,
- CC_ASYR,
- CC_ASDK,
- CC_ASUL,
- CC_ASSU,
- CC_ASSA,
- CC_APLY,
- CC_ABPL,
- CC_APSO,
- CC_PRSV,
- CC_ARIF,
- CC_MSAS,
- CC_AGRP,
- CC_AGAL,
- CC_ASCP,
- CC_PPRO,
- CC_PASP,
- CC_PFDT,
- CC_PICD,
- CC_PIMF,
- CC_PFMT,
- CC_PIFS,
- CC_PLSZ,
- CC_PHGT,
- CC_PWTH,
- CC_PRAT,
- CC_PCMT,
- CC_PRET,
- CC_AESV,
- CC_AEHV,
- CC_AESP,
- CC_AEPP,
- CC_AEPS,
- CC_AESG,
- CC_AEMK,
- CC_AEFP,
- CC_CMPA,
- CC_CMNM,
- CC_CMTY,
- CC_CMPG,
- CC_CACI,
- CC_CAPS,
- CC_CASH,
- CC_CARP,
- CC_CAAS,
- CC_CAAR,
- CC_CAIA,
- CC_CANP,
- CC_CANN,
- CC_CANA,
- CC_CANL,
- CC_CANG,
- CC_CANT,
- CC_CASP,
- CC_CASS,
- CC_CAST,
- CC_CASU,
- CC_CASG,
- CC_CACR,
- CC_CMCP,
- CC_CMGT,
- CC_CMIK,
- CC_CMSP,
- CC_CMST,
- CC_CMSV,
- CC_CMSR,
- CC_CMMK,
- CC_CMVO,
- CC_CMPR,
- CC_CAPR,
- CC_AEFR,
- CC_CAOV,
- CC_CMRL,
- CC_CAHP,
- CC_CAIV,
- CC_CAVC
- }
- [CCode (cheader_filename = "libdmapsharing/dmap.h", cprefix = "DMAP_MDNS_BROWSER_ERROR_")]
- public enum DMAPMdnsBrowserError {
- NOT_RUNNING,
- FAILED
- }
- [CCode (cheader_filename = "libdmapsharing/dmap.h", cprefix = "DMAP_MDNS_PUBLISHER_ERROR_")]
- public enum DMAPMdnsPublisherError {
- NOT_RUNNING,
- FAILED
- }
- [CCode (cheader_filename = "libdmapsharing/dmap.h", cprefix =
"DMAP_MDNS_SERVICE_TRANSPORT_PROTOCOL_")]
- public enum DMAPMdnsServiceTransportProtocol {
- TCP,
- UDP,
- LAST
- }
- [CCode (cheader_filename = "libdmapsharing/dmap.h", cprefix = "DMAP_MDNS_SERVICE_TYPE_")]
- public enum DMAPMdnsServiceType {
- INVALID,
- DAAP,
- DPAP,
- DACP,
- RAOP,
- LAST
- }
- [CCode (cheader_filename = "libdmapsharing/dmap.h", cprefix = "DMAP_MEDIA_KIND_")]
- public enum DMAPMediaKind {
- MUSIC,
- MOVIE,
- PODCAST,
- TV_SHOW
- }
- [CCode (cheader_filename = "libdmapsharing/dmap.h", cprefix = "DMAP_SHARE_AUTH_METHOD_")]
- public enum DMAPShareAuthMethod {
- NONE,
- NAME_AND_PASSWORD,
- PASSWORD
- }
- [CCode (cheader_filename = "libdmapsharing/dmap.h", cprefix = "DMAP_TYPE_")]
- public enum DMAPType {
- BYTE,
- SIGNED_INT,
- SHORT,
- INT,
- INT64,
- STRING,
- DATE,
- VERSION,
- CONTAINER,
- POINTER,
- INVALID
- }
- [CCode (cheader_filename = "libdmapsharing/dmap.h")]
- public delegate bool DMAPConnectionFunc (DPAP.DMAPConnection connection, bool result, string reason);
- [CCode (cheader_filename = "libdmapsharing/dmap.h")]
- public delegate void DMAPIdContainerRecordFunc (uint id, DPAP.DMAPContainerRecord record);
- [CCode (cheader_filename = "libdmapsharing/dmap.h")]
- public delegate void DMAPIdRecordFunc (uint id, DPAP.DMAPRecord record);
- [CCode (cheader_filename = "libdmapsharing/dmap.h")]
- public delegate void DMAPResponseHandler (DPAP.DMAPConnection connection, uint status, GLib.Node
structure);
- [CCode (cheader_filename = "libdmapsharing/dmap.h")]
- public const int DMAP_HASH_SIZE;
- [CCode (cheader_filename = "libdmapsharing/dmap.h")]
- public const int DMAP_HAVE_UNALIGNED_ACCESS;
- [CCode (cheader_filename = "libdmapsharing/dmap.h")]
- public const int DMAP_SHARE_CHUNK_SIZE;
- [CCode (cheader_filename = "libdmapsharing/dmap.h")]
- public const int DMAP_STATUS_OK;
- [CCode (cheader_filename = "libdmapsharing/dmap.h", cname = "dmap_chunked_message_finished")]
- public static void dmap_chunked_message_finished (Soup.Message message, DPAP.ChunkData cd);
- [CCode (cheader_filename = "libdmapsharing/dmap.h", cname = "dmap_content_code_dmap_type")]
- public static DPAP.DMAPType dmap_content_code_dmap_type (DPAP.DMAPContentCode code);
- [CCode (cheader_filename = "libdmapsharing/dmap.h", cname = "dmap_content_code_name")]
- public static unowned string dmap_content_code_name (DPAP.DMAPContentCode code);
- [CCode (cheader_filename = "libdmapsharing/dmap.h", cname = "dmap_content_code_read_from_buffer")]
- public static DPAP.DMAPContentCode dmap_content_code_read_from_buffer (string buf);
- [CCode (cheader_filename = "libdmapsharing/dmap.h", cname = "dmap_content_code_string")]
- public static unowned string dmap_content_code_string (DPAP.DMAPContentCode code);
- [CCode (cheader_filename = "libdmapsharing/dmap.h", cname = "dmap_content_code_string_as_int32")]
- public static int32 dmap_content_code_string_as_int32 (string str);
- [CCode (cheader_filename = "libdmapsharing/dmap.h", cname = "dmap_content_codes")]
- public static unowned DPAP.DMAPContentCodeDefinition dmap_content_codes (uint number);
- [CCode (cheader_filename = "libdmapsharing/dmap.h", cname = "dmap_hash_generate")]
- public static void dmap_hash_generate (short version_major, uchar[] url, uchar hash_select, uchar[]
@out, int request_id);
- [CCode (cheader_filename = "libdmapsharing/dmap.h", cname = "dmap_hash_progressive_final")]
- public static void dmap_hash_progressive_final (DPAP.DMAPHashContext context, uint[] digest);
- [CCode (cheader_filename = "libdmapsharing/dmap.h", cname = "dmap_hash_progressive_init")]
- public static void dmap_hash_progressive_init (DPAP.DMAPHashContext context);
- [CCode (cheader_filename = "libdmapsharing/dmap.h", cname = "dmap_hash_progressive_to_string")]
- public static void dmap_hash_progressive_to_string (uint digest, string str);
- [CCode (cheader_filename = "libdmapsharing/dmap.h", cname = "dmap_hash_progressive_update")]
- public static void dmap_hash_progressive_update (DPAP.DMAPHashContext context, uint buffer, uint
length);
- [CCode (cheader_filename = "libdmapsharing/dmap.h", cname = "dmap_marshal_generated_BOOLEAN__STRING")]
- public static void dmap_marshal_generated_BOOLEAN__STRING (GLib.Closure closure, GLib.Value
return_value, uint n_param_values, GLib.Value param_values, void* invocation_hint, void* marshal_data);
- [CCode (cheader_filename = "libdmapsharing/dmap.h", cname = "dmap_marshal_generated_STRING__STRING")]
- public static void dmap_marshal_generated_STRING__STRING (GLib.Closure closure, GLib.Value
return_value, uint n_param_values, GLib.Value param_values, void* invocation_hint, void* marshal_data);
- [CCode (cheader_filename = "libdmapsharing/dmap.h", cname =
"dmap_marshal_generated_STRING__ULONG_ULONG")]
- public static void dmap_marshal_generated_STRING__ULONG_ULONG (GLib.Closure closure, GLib.Value
return_value, uint n_param_values, GLib.Value param_values, void* invocation_hint, void* marshal_data);
- [CCode (cheader_filename = "libdmapsharing/dmap.h", cname = "dmap_marshal_generated_ULONG__VOID")]
- public static void dmap_marshal_generated_ULONG__VOID (GLib.Closure closure, GLib.Value return_value,
uint n_param_values, GLib.Value param_values, void* invocation_hint, void* marshal_data);
- [CCode (cheader_filename = "libdmapsharing/dmap.h", cname =
"dmap_marshal_generated_VOID__STRING_BOOLEAN")]
- public static void dmap_marshal_generated_VOID__STRING_BOOLEAN (GLib.Closure closure, GLib.Value
return_value, uint n_param_values, GLib.Value param_values, void* invocation_hint, void* marshal_data);
- [CCode (cheader_filename = "libdmapsharing/dmap.h", cname =
"dmap_marshal_generated_VOID__STRING_POINTER_POINTER_POINTER_BOOLEAN")]
- public static void dmap_marshal_generated_VOID__STRING_POINTER_POINTER_POINTER_BOOLEAN (GLib.Closure
closure, GLib.Value return_value, uint n_param_values, GLib.Value param_values, void* invocation_hint, void*
marshal_data);
- [CCode (cheader_filename = "libdmapsharing/dmap.h", cname =
"dmap_marshal_generated_VOID__STRING_STRING")]
- public static void dmap_marshal_generated_VOID__STRING_STRING (GLib.Closure closure, GLib.Value
return_value, uint n_param_values, GLib.Value param_values, void* invocation_hint, void* marshal_data);
- [CCode (cheader_filename = "libdmapsharing/dmap.h", cname =
"dmap_marshal_generated_VOID__ULONG_FLOAT")]
- public static void dmap_marshal_generated_VOID__ULONG_FLOAT (GLib.Closure closure, GLib.Value
return_value, uint n_param_values, GLib.Value param_values, void* invocation_hint, void* marshal_data);
- [CCode (cheader_filename = "libdmapsharing/dmap.h", cname = "dmap_mdns_avahi_get_client")]
- public static unowned Avahi.Client dmap_mdns_avahi_get_client ();
- [CCode (cheader_filename = "libdmapsharing/dmap.h", cname = "dmap_mdns_avahi_set_entry_group")]
- public static void dmap_mdns_avahi_set_entry_group (Avahi.EntryGroup group);
- [CCode (cheader_filename = "libdmapsharing/dmap.h", cname = "dmap_structure_add")]
- public static unowned GLib.Node dmap_structure_add (GLib.Node parent, DPAP.DMAPContentCode cc);
- [CCode (cheader_filename = "libdmapsharing/dmap.h", cname = "dmap_structure_destroy")]
- public static void dmap_structure_destroy (GLib.Node structure);
- [CCode (cheader_filename = "libdmapsharing/dmap.h", cname = "dmap_structure_find_item")]
- public static unowned DPAP.DMAPStructureItem dmap_structure_find_item (GLib.Node structure,
DPAP.DMAPContentCode code);
- [CCode (cheader_filename = "libdmapsharing/dmap.h", cname = "dmap_structure_find_node")]
- public static unowned GLib.Node dmap_structure_find_node (GLib.Node structure, DPAP.DMAPContentCode
code);
- [CCode (cheader_filename = "libdmapsharing/dmap.h", cname = "dmap_structure_get_size")]
- public static uint dmap_structure_get_size (GLib.Node structure);
- [CCode (cheader_filename = "libdmapsharing/dmap.h", cname =
"dmap_structure_increase_by_predicted_size")]
- public static void dmap_structure_increase_by_predicted_size (GLib.Node structure, uint size);
- [CCode (cheader_filename = "libdmapsharing/dmap.h", cname = "dmap_structure_parse")]
- public static unowned GLib.Node dmap_structure_parse (string buf, int buf_length);
- [CCode (cheader_filename = "libdmapsharing/dmap.h", cname = "dmap_structure_print")]
- public static void dmap_structure_print (GLib.Node structure);
- [CCode (cheader_filename = "libdmapsharing/dmap.h", cname = "dmap_structure_serialize")]
- public static unowned string dmap_structure_serialize (GLib.Node structure, uint length);
- [CCode (cheader_filename = "libdmapsharing/dmap.h", cname = "dmap_utils_mime_to_format")]
- public static unowned string dmap_utils_mime_to_format (string transcode_mimetype);
- [CCode (cheader_filename = "libdmapsharing/dmap.h", cname = "dmap_write_next_chunk")]
- public static void dmap_write_next_chunk (Soup.Message message, DPAP.ChunkData cd);
- [CCode (cheader_filename = "libdmapsharing/dmap.h", cname =
"dmapd_input_stream_strdup_format_extension")]
- public static unowned string dmapd_input_stream_strdup_format_extension (int format_code);
- [CCode (cheader_filename = "libdmapsharing/dmap.h", cname = "pads_compatible")]
- public static bool pads_compatible (Gst.Pad pad1, Gst.Pad pad2);
+ public static void write_next_chunk (Soup.Message message, Dmap.ChunkData cd);
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]