[libdmapsharing] .*_connection_new now takes a guint port instead of an int port Signed-off-by: W. Michael Petullo <m
- From: W. Michael Petullo <wmpetullo src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [libdmapsharing] .*_connection_new now takes a guint port instead of an int port Signed-off-by: W. Michael Petullo <m
- Date: Thu, 23 Dec 2010 04:13:59 +0000 (UTC)
commit 59782ef83066d19398d73e778403498ad958e058
Author: W. Michael Petullo <mike flyn org>
Date: Wed Dec 22 22:13:08 2010 -0600
.*_connection_new now takes a guint port instead of an int port
Signed-off-by: W. Michael Petullo <mike flyn org>
TODO | 3 ---
libdmapsharing/daap-connection.c | 2 +-
libdmapsharing/daap-connection.h | 2 +-
libdmapsharing/dmap-connection.c | 2 +-
libdmapsharing/dmap-connection.h | 10 +++++-----
libdmapsharing/dpap-connection.c | 2 +-
libdmapsharing/dpap-connection.h | 2 +-
tests/dmapcopy.vala | 7 ++-----
tests/dpapview.vala | 7 ++-----
9 files changed, 14 insertions(+), 23 deletions(-)
---
diff --git a/TODO b/TODO
index 526b58c..4ee9868 100644
--- a/TODO
+++ b/TODO
@@ -1,9 +1,6 @@
Realtime transcode: must g_input_stream_close what is returned from
daap_record_read, unless I change API (see also dmapd.c)
-service-added callback takes a void *, not nice with Vala see also
-dpapview.vala.
-
Reduce memory needed to send entire listing to client:
get bdb dmapd backend working well
review changes
diff --git a/libdmapsharing/daap-connection.c b/libdmapsharing/daap-connection.c
index 10fa6f2..2c24adf 100644
--- a/libdmapsharing/daap-connection.c
+++ b/libdmapsharing/daap-connection.c
@@ -165,7 +165,7 @@ daap_connection_class_init (DAAPConnectionClass *klass)
DAAPConnection *
daap_connection_new (const char *name,
const char *host,
- int port,
+ guint port,
gboolean password_protected,
DMAPDb *db,
DMAPRecordFactory *factory)
diff --git a/libdmapsharing/daap-connection.h b/libdmapsharing/daap-connection.h
index a7745f6..0c1fd93 100644
--- a/libdmapsharing/daap-connection.h
+++ b/libdmapsharing/daap-connection.h
@@ -87,7 +87,7 @@ GType daap_connection_get_type (void);
DAAPConnection * daap_connection_new (const char *name,
const char *host,
- int port,
+ guint port,
gboolean password_protected,
DMAPDb *db,
DMAPRecordFactory *factory);
diff --git a/libdmapsharing/dmap-connection.c b/libdmapsharing/dmap-connection.c
index 1ed98ca..13c9928 100644
--- a/libdmapsharing/dmap-connection.c
+++ b/libdmapsharing/dmap-connection.c
@@ -1128,7 +1128,7 @@ handle_logout (DMAPConnection *connection,
DMAPConnection *
dmap_connection_new (const char *name,
const char *host,
- int port,
+ guint port,
gboolean password_protected,
DMAPDb *db,
DMAPRecordFactory *factory)
diff --git a/libdmapsharing/dmap-connection.h b/libdmapsharing/dmap-connection.h
index 148f7f6..740a90d 100644
--- a/libdmapsharing/dmap-connection.h
+++ b/libdmapsharing/dmap-connection.h
@@ -147,11 +147,11 @@ typedef void (* DMAPResponseHandler) (DMAPConnection *connection,
GType dmap_connection_get_type (void);
DMAPConnection * dmap_connection_new (const char *name,
- const char *host,
- int port,
- gboolean password_protected,
- DMAPDb *db,
- DMAPRecordFactory *factory);
+ const char *host,
+ guint port,
+ gboolean password_protected,
+ DMAPDb *db,
+ DMAPRecordFactory *factory);
gboolean dmap_connection_is_connected (DMAPConnection *connection);
void dmap_connection_setup (DMAPConnection *connection);
diff --git a/libdmapsharing/dpap-connection.c b/libdmapsharing/dpap-connection.c
index abefe8a..8028297 100644
--- a/libdmapsharing/dpap-connection.c
+++ b/libdmapsharing/dpap-connection.c
@@ -153,7 +153,7 @@ dpap_connection_class_init (DPAPConnectionClass *klass)
DPAPConnection *
dpap_connection_new (const char *name,
const char *host,
- int port,
+ guint port,
gboolean password_protected,
DMAPDb *db,
DMAPRecordFactory *factory)
diff --git a/libdmapsharing/dpap-connection.h b/libdmapsharing/dpap-connection.h
index 8941e4d..0af223d 100644
--- a/libdmapsharing/dpap-connection.h
+++ b/libdmapsharing/dpap-connection.h
@@ -87,7 +87,7 @@ GType dpap_connection_get_type (void);
DPAPConnection * dpap_connection_new (const char *name,
const char *host,
- int port,
+ guint port,
gboolean password_protected,
DMAPDb *db,
DMAPRecordFactory *factory);
diff --git a/tests/dmapcopy.vala b/tests/dmapcopy.vala
index 0711551..db1249a 100644
--- a/tests/dmapcopy.vala
+++ b/tests/dmapcopy.vala
@@ -58,11 +58,8 @@ private class DPAPCopy {
return true;
}
- private void service_added_cb (void *service) {
- /* FIXME: fix void * argument, see libdmapsharing TODO: */
- DMAP.MdnsBrowserService *FIXME = service;
- /* FIXME: fix int cast: should not be requried: */
- connection = (DMAP.Connection) new DPAP.Connection (FIXME->service_name, FIXME->host, (int) FIXME->port, false, db, factory);
+ private void service_added_cb (DMAP.MdnsBrowserService *service) {
+ connection = (DMAP.Connection) new DPAP.Connection (service->service_name, service->host, service->port, false, db, factory);
connection.connect (connected_cb);
}
diff --git a/tests/dpapview.vala b/tests/dpapview.vala
index 8173021..eb1e3b6 100644
--- a/tests/dpapview.vala
+++ b/tests/dpapview.vala
@@ -49,11 +49,8 @@ private class DPAPViewer {
return true;
}
- private void service_added_cb (void *service) {
- /* FIXME: fix void * argument, see libdmapsharing TODO: */
- DMAP.MdnsBrowserService *FIXME = service;
- /* FIXME: fix int cast: should not be requried: */
- connection = (DMAP.Connection) new DPAP.Connection (FIXME->service_name, FIXME->host, (int) FIXME->port, false, db, factory);
+ private void service_added_cb (DMAP.MdnsBrowserService *service) {
+ connection = (DMAP.Connection) new DPAP.Connection (service->service_name, service->host, service->port, false, db, factory);
connection.connect (connected_cb);
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]