[libdmapsharing] Fix some memory bugs



commit 41bf9abef62ee3b60922d1a4b999b9e33e6897da
Author: W. Michael Petullo <mike flyn org>
Date:   Sat Nov 18 17:34:38 2017 -0500

    Fix some memory bugs
    
    Signed-off-by: W. Michael Petullo <mike flyn org>

 libdmapsharing/daap-connection.c    |  113 +++++++++++++---------------------
 libdmapsharing/daap-share.c         |   50 ++++++++-------
 libdmapsharing/dacp-share.c         |    9 ++-
 libdmapsharing/dmap-connection.c    |    3 +
 libdmapsharing/dmap-private-utils.c |    5 ++
 libdmapsharing/dmap-private-utils.h |    1 +
 libdmapsharing/dmap-record.c        |    4 +-
 libdmapsharing/dmap-record.h        |    8 +-
 libdmapsharing/dpap-connection.c    |    8 +++
 libdmapsharing/dpap-share.c         |   17 ++++--
 vala/libdmapsharing-3.2.vapi        |   36 ++++++------
 11 files changed, 129 insertions(+), 125 deletions(-)
---
diff --git a/libdmapsharing/daap-connection.c b/libdmapsharing/daap-connection.c
index 0958b6e..35f905e 100644
--- a/libdmapsharing/daap-connection.c
+++ b/libdmapsharing/daap-connection.c
@@ -128,6 +128,14 @@ _handle_mlcl (DMAPConnection * connection, DMAPRecordFactory * factory,
                goto _return;
        }
 
+       /*
+        * We do not free the dynamically-allocated properties
+        * here. dmap-connection.c's actual_http_response_handler calls
+        * dmap_structure_destroy to free the structure containing the
+        * elements processed here.
+        *
+        * TODO: This could probably be made more clear.
+        */
        g_object_set (record,
                      "year", year,
                      "has-video", has_video,
@@ -258,54 +266,8 @@ START_TEST(daap_connection_new_test)
 }
 END_TEST
 
-static void
-_append_str_test(GNode *parent, int code, char *value)
-{
-       DMAPStructureItem *item;
-       GNode *child;
-
-       item = g_new0(DMAPStructureItem, 1);
-       item->content_code = code;
-       item->size = strlen(value);
-       g_value_init(&(item->content), G_TYPE_STRING);
-       g_value_take_string (&(item->content), value);
-       child = g_node_new(item);
-       g_node_append(parent, child);
-}
-
-static void
-_append_boolean_test(GNode *parent, int code, const gboolean value)
-{
-       DMAPStructureItem *item;
-       GNode *child;
-
-       item = g_new0(DMAPStructureItem, 1);
-       item->content_code = code;
-       item->size = 1;
-       g_value_init(&(item->content), G_TYPE_CHAR);
-       g_value_set_schar(&(item->content), value);
-       child = g_node_new(item);
-       g_node_append(parent, child);
-}
-
-static void
-_append_int_test(GNode *parent, int code, const int value)
-{
-       DMAPStructureItem *item;
-       GNode *child;
-
-       item = g_new0(DMAPStructureItem, 1);
-       item->content_code = code;
-       item->size = 4;
-       g_value_init(&(item->content), G_TYPE_INT);
-       g_value_set_int(&(item->content), value);
-       child = g_node_new(item);
-       g_node_append(parent, child);
-}
-
 START_TEST(_handle_mlcl_test)
 {
-       DMAPStructureItem *item;
        TestDAAPRecordFactory *factory;
        GNode *parent;
        DMAPRecord *record;
@@ -325,25 +287,23 @@ START_TEST(_handle_mlcl_test)
        gint  expected_bitrate      =  60, bitrate                = 0;
        gint  expected_item_id      =  70, item_id                = 0;
 
-       item = g_new0(DMAPStructureItem, 1);
-       item->content_code = 0;
-       parent = g_node_new(item);
-
-       _append_int_test(parent, DMAP_CC_MIID, expected_item_id);
-       _append_str_test(parent, DMAP_CC_MINM, expected_title);
-       _append_str_test(parent, DMAP_CC_ASAL, expected_album);
-       _append_str_test(parent, DMAP_CC_ASAR, expected_artist);
-       _append_str_test(parent, DMAP_CC_ASFM, expected_format);
-       _append_str_test(parent, DMAP_CC_ASGN, expected_genre);
-       _append_str_test(parent, DMAP_CC_ASSA, expected_sort_artist);
-       _append_str_test(parent, DMAP_CC_ASSU, expected_sort_album);
-       _append_boolean_test(parent, DMAP_CC_AEHV, expected_has_video);
-       _append_int_test(parent, DMAP_CC_ASTM, expected_length);
-       _append_int_test(parent, DMAP_CC_ASTN, expected_track);
-       _append_int_test(parent, DMAP_CC_ASDN, expected_disc);
-       _append_int_test(parent, DMAP_CC_ASYR, expected_year);
-       _append_int_test(parent, DMAP_CC_ASSZ, expected_size);
-       _append_int_test(parent, DMAP_CC_ASBR, expected_bitrate);
+       parent = dmap_structure_add(NULL, DMAP_CC_MLCL);
+
+       dmap_structure_add(parent, DMAP_CC_MIID, expected_item_id);
+       dmap_structure_add(parent, DMAP_CC_MINM, expected_title);
+       dmap_structure_add(parent, DMAP_CC_ASAL, expected_album);
+       dmap_structure_add(parent, DMAP_CC_ASAR, expected_artist);
+       dmap_structure_add(parent, DMAP_CC_ASFM, expected_format);
+       dmap_structure_add(parent, DMAP_CC_ASGN, expected_genre);
+       dmap_structure_add(parent, DMAP_CC_ASSA, expected_sort_artist);
+       dmap_structure_add(parent, DMAP_CC_ASSU, expected_sort_album);
+       dmap_structure_add(parent, DMAP_CC_AEHV, expected_has_video);
+       dmap_structure_add(parent, DMAP_CC_ASTM, expected_length);
+       dmap_structure_add(parent, DMAP_CC_ASTN, expected_track);
+       dmap_structure_add(parent, DMAP_CC_ASDN, expected_disc);
+       dmap_structure_add(parent, DMAP_CC_ASYR, expected_year);
+       dmap_structure_add(parent, DMAP_CC_ASSZ, expected_size);
+       dmap_structure_add(parent, DMAP_CC_ASBR, expected_bitrate);
 
        factory = test_daap_record_factory_new();
        record  = _handle_mlcl(NULL, DMAP_RECORD_FACTORY(factory), parent, &item_id);
@@ -398,6 +358,10 @@ START_TEST(_handle_mlcl_test)
 
        g_object_get(record, "bitrate", &bitrate, NULL);
        ck_assert_int_eq(expected_bitrate, bitrate);
+
+       g_object_unref(record);
+
+       dmap_structure_destroy(parent);
 }
 END_TEST
 
@@ -406,18 +370,25 @@ START_TEST(_handle_mlcl_bad_code_test)
 {
        DMAPStructureItem *item;
        TestDAAPRecordFactory *factory;
-       GNode *parent;
+       GNode *parent, *child;
        DMAPRecord *record;
        int item_id;
        char *set_value      = "value";
        char *expected_title = "title", *title = NULL;
 
+       parent = dmap_structure_add(NULL, DMAP_CC_MLCL);
+
+       /* A node with a bad content code. */
        item = g_new0(DMAPStructureItem, 1);
-       item->content_code = 0;
-       parent = g_node_new(item);
+       item->content_code = ~0;
+       item->size = strlen(set_value);
+       g_value_init(&(item->content), G_TYPE_STRING);
+       g_value_set_string (&(item->content), set_value);
+       child = g_node_new(item);
+       g_node_append(parent, child);
 
-       _append_str_test(parent, ~0, set_value);
-       _append_str_test(parent, DMAP_CC_MINM, expected_title);
+       /* A well-formed node. */
+       dmap_structure_add(parent, DMAP_CC_MINM, expected_title);
 
        factory = test_daap_record_factory_new();
        record  = _handle_mlcl(NULL, DMAP_RECORD_FACTORY(factory), parent, &item_id);
@@ -425,6 +396,8 @@ START_TEST(_handle_mlcl_bad_code_test)
        g_object_get(record, "title", &title, NULL);
        ck_assert_str_eq(expected_title, title);
        g_free(title);
+
+       dmap_structure_destroy(parent);
 }
 END_TEST
 
diff --git a/libdmapsharing/daap-share.c b/libdmapsharing/daap-share.c
index 97ae2ce..064fa22 100644
--- a/libdmapsharing/daap-share.c
+++ b/libdmapsharing/daap-share.c
@@ -339,6 +339,8 @@ static gboolean should_transcode (const gchar *format, const gboolean has_video,
 done:
        g_debug ("    Should%s transcode %s to %s", fnval ? "" : " not", format, format2 ? format2 : "[no 
target format]");
 
+       g_free(format2);
+
        return fnval;
 }
 
@@ -353,13 +355,14 @@ send_chunked_file (SoupServer * server, SoupMessage * message,
        gboolean has_video;
        GError *error = NULL;
        ChunkData *cd = NULL;
+       gboolean teardown = TRUE;
 
        cd = g_new0 (ChunkData, 1);
 
        g_object_get (record, "location", &location, "has-video", &has_video, NULL);
        if (NULL == location) {
                g_warning ("Error getting location from record\n");
-               goto _error;
+               goto done;
        }
 
        /* FIXME: This crashes on powerpc-440fp-linux-gnu:
@@ -371,37 +374,40 @@ send_chunked_file (SoupServer * server, SoupMessage * message,
        stream = G_INPUT_STREAM (daap_record_read (record, &error));
        if (error != NULL) {
                g_warning ("Couldn't open %s: %s.", location, error->message);
-               goto _error;
+               goto done;
        }
 
        g_object_get (record, "format", &format, NULL);
        if (NULL == format) {
                g_warning ("Error getting format from record\n");
-               goto _error;
+               goto done;
        }
 
        // Not presently transcoding videos (see also same comments elsewhere).
        if (should_transcode (format, has_video, transcode_mimetype)) {
 #ifdef HAVE_GSTREAMERAPP
+               cd->original_stream = stream;
                cd->stream = dmap_gst_input_stream_new (transcode_mimetype, stream);
 #else
                g_warning ("Transcode format %s not supported", transcode_mimetype);
+               cd->original_stream = NULL;
                cd->stream = stream;
 #endif /* HAVE_GSTREAMERAPP */
        } else {
                g_debug ("Not transcoding %s", location);
+               cd->original_stream = NULL;
                cd->stream = stream;
        }
 
        if (cd->stream == NULL) {
                g_warning ("Could not set up input stream");
-               goto _error;
+               goto done;
        }
 
        if (offset != 0) {
                if (g_seekable_seek (G_SEEKABLE (cd->stream), offset, G_SEEK_SET, NULL, &error) == FALSE) {
                        g_warning ("Error seeking: %s.", error->message);
-                       goto _error;
+                       goto done;
                }
                filesize -= offset;
        }
@@ -448,34 +454,31 @@ send_chunked_file (SoupServer * server, SoupMessage * message,
                          G_CALLBACK (dmap_chunked_message_finished), cd);
        /* NOTE: cd g_free'd by chunked_message_finished(). */
 
-       return;
-_error:
-       soup_message_set_status (message, SOUP_STATUS_INTERNAL_SERVER_ERROR);
+       teardown = FALSE;
+
+done:
+       if (teardown) {
+               soup_message_set_status (message, SOUP_STATUS_INTERNAL_SERVER_ERROR);
 
-       if (NULL != cd) {
-               if (NULL != cd->stream) {
+               if (NULL != cd && NULL != cd->stream) {
                        g_input_stream_close (cd->stream, NULL, NULL);
                }
 
+               if (NULL != stream) {
+                       g_input_stream_close (stream, NULL, NULL);
+               }
+
                g_free (cd);
        }
 
-       if (NULL != format) {
-               g_free (format);
-       }
 
-       if (NULL != location) {
-               g_free (location);
-       }
+       g_free (location);
+       g_free (format);
 
        if (NULL != error) {
                g_error_free (error);
        }
 
-       if (NULL != stream) {
-               g_input_stream_close (stream, NULL, NULL);
-       }
-
        return;
 }
 
@@ -585,8 +588,7 @@ add_entry_to_mlcl (guint id, DMAPRecord * record, gpointer _mb)
                              &transcode_mimetype, NULL);
                // Not presently transcoding videos (see also same comments elsewhere).
                if (! has_video && transcode_mimetype) {
-                       format = g_strdup (dmap_utils_mime_to_format
-                                          (transcode_mimetype));
+                       format = dmap_utils_mime_to_format (transcode_mimetype);
                        g_free (transcode_mimetype);
                } else {
                        g_object_get (record, "format", &format, NULL);
@@ -821,7 +823,7 @@ databases_items_xxx (DMAPShare * share,
                     GHashTable * query, SoupClientContext * context)
 {
        DMAPDb *db;
-       const gchar *transcode_mimetype;
+       gchar *transcode_mimetype = NULL;
        const gchar *rest_of_path;
        const gchar *id_str;
        guint id;
@@ -875,6 +877,8 @@ databases_items_xxx (DMAPShare * share,
                           transcode_mimetype);
 
        g_object_unref (record);
+       g_object_unref (db);
+       g_free(transcode_mimetype);
 }
 
 static struct DMAPMetaDataMap *
diff --git a/libdmapsharing/dacp-share.c b/libdmapsharing/dacp-share.c
index 140b822..83e6031 100644
--- a/libdmapsharing/dacp-share.c
+++ b/libdmapsharing/dacp-share.c
@@ -418,6 +418,10 @@ mdns_remote_added (DMAPMdnsBrowser * browser,
        g_signal_emit (share,
                       signals[REMOTE_FOUND],
                       0, service_name, name);
+
+       g_free(name);
+       g_free(host);
+       g_free(pair);
 }
 
 void
@@ -436,9 +440,6 @@ dacp_share_new (const gchar * library_name,
 {
        DACPShare *share;
 
-       g_object_ref (db);
-       g_object_ref (container_db);
-
        share = DACP_SHARE (g_object_new (DACP_TYPE_SHARE,
                                          "name", get_dbid (),
                                          "library-name", library_name,
@@ -962,6 +963,7 @@ dacp_share_ctrl_int (DMAPShare * share,
                        _dmap_share_message_set_from_dmap_structure (share,
                                                                     message,
                                                                     cacr);
+                       g_object_unref(db);
                        dmap_structure_destroy (cacr);
                } else {
                        g_warning ("Unhandled cue command: %s", command);
@@ -1110,5 +1112,6 @@ dacp_share_pair (DACPShare * share, gchar * service_name, gchar passcode[4])
        dmap_connection_get (remote_info->connection, path, FALSE,
                             connection_handler_cb, share);
 
+       g_free (name);
        g_free (path);
 }
diff --git a/libdmapsharing/dmap-connection.c b/libdmapsharing/dmap-connection.c
index 7accf37..59112c3 100644
--- a/libdmapsharing/dmap-connection.c
+++ b/libdmapsharing/dmap-connection.c
@@ -545,6 +545,7 @@ dmap_connection_build_message (DMAPConnection * connection,
        soup_message_headers_append (message->request_headers,
                                     "Connection", "close");
 
+       soup_uri_free (base_uri);
        soup_uri_free (uri);
        g_free (uri_str);
 
@@ -1603,6 +1604,8 @@ dmap_connection_authenticate_message (DMAPConnection * connection, SoupSession *
 
        soup_auth_authenticate (auth, username, password);
        soup_session_unpause_message (session, message);
+
+       g_free(username);
 }
 
 void
diff --git a/libdmapsharing/dmap-private-utils.c b/libdmapsharing/dmap-private-utils.c
index 30144a4..02bade1 100644
--- a/libdmapsharing/dmap-private-utils.c
+++ b/libdmapsharing/dmap-private-utils.c
@@ -57,5 +57,10 @@ dmap_chunked_message_finished (SoupMessage * message, ChunkData * cd)
 {
        g_debug ("Finished sending chunked file.");
        g_input_stream_close (cd->stream, NULL, NULL);
+
+       if (cd->original_stream) {
+               g_input_stream_close (cd->original_stream, NULL, NULL);
+       }
+
        g_free (cd);
 }
diff --git a/libdmapsharing/dmap-private-utils.h b/libdmapsharing/dmap-private-utils.h
index b0a6acc..3a4dcd3 100644
--- a/libdmapsharing/dmap-private-utils.h
+++ b/libdmapsharing/dmap-private-utils.h
@@ -59,6 +59,7 @@ G_BEGIN_DECLS
 {
        SoupServer *server;
        GInputStream *stream;
+       GInputStream *original_stream;
 } ChunkData;
 
 void   dmap_write_next_chunk (SoupMessage * message, ChunkData * cd);
diff --git a/libdmapsharing/dmap-record.c b/libdmapsharing/dmap-record.c
index 3dad698..fdaf665 100644
--- a/libdmapsharing/dmap-record.c
+++ b/libdmapsharing/dmap-record.c
@@ -27,14 +27,14 @@ dmap_record_default_init (DMAPRecordInterface * iface)
 
 G_DEFINE_INTERFACE(DMAPRecord, dmap_record, G_TYPE_OBJECT)
 
-GByteArray *
+GArray *
 dmap_record_to_blob (DMAPRecord * record)
 {
        return DMAP_RECORD_GET_INTERFACE (record)->to_blob (record);
 }
 
 gboolean
-dmap_record_set_from_blob (DMAPRecord * record, GByteArray * 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 3308f81..5444ce7 100644
--- a/libdmapsharing/dmap-record.h
+++ b/libdmapsharing/dmap-record.h
@@ -65,8 +65,8 @@ struct _DMAPRecordInterface
 {
        GTypeInterface parent;
 
-       GByteArray *(*to_blob) (DMAPRecord * record);
-       gboolean   (*set_from_blob) (DMAPRecord * record, GByteArray * blob);
+       GArray *(*to_blob) (DMAPRecord * record);
+       gboolean   (*set_from_blob) (DMAPRecord * record, GArray * blob);
 };
 
 typedef unsigned long long bitwise;
@@ -87,7 +87,7 @@ GType dmap_record_get_type (void);
  *
  * Returns: A byte array representation of the record.
  */
-GByteArray *dmap_record_to_blob (DMAPRecord * record);
+GArray *dmap_record_to_blob (DMAPRecord * record);
 
 /**
  * dmap_record_from_blob:
@@ -97,7 +97,7 @@ GByteArray *dmap_record_to_blob (DMAPRecord * record);
  * Returns: True on success, else false.
  */
 gboolean dmap_record_set_from_blob (DMAPRecord * record,
-                                    GByteArray * blob);
+                                    GArray * blob);
 
 #endif /* __DMAP_RECORD_H */
 
diff --git a/libdmapsharing/dpap-connection.c b/libdmapsharing/dpap-connection.c
index 35e0f06..d68b826 100644
--- a/libdmapsharing/dpap-connection.c
+++ b/libdmapsharing/dpap-connection.c
@@ -124,6 +124,14 @@ handle_mlcl (DMAPConnection * connection, DMAPRecordFactory * factory,
                ptr = g_array_sized_new (FALSE, FALSE, 1, 0);
        }
 
+       /*
+        * We do not free the dynamically-allocated properties
+        * here. dmap-connection.c's actual_http_response_handler calls
+        * dmap_structure_destroy to free the structure containing the
+        * elements processed here.
+        *
+        * TODO: This could probably be made more clear.
+        */
        g_object_set (record,
                      "filename", filename,
                      "aspect-ratio", aspect_ratio,
diff --git a/libdmapsharing/dpap-share.c b/libdmapsharing/dpap-share.c
index a014983..3db0493 100644
--- a/libdmapsharing/dpap-share.c
+++ b/libdmapsharing/dpap-share.c
@@ -410,8 +410,12 @@ add_entry_to_mlcl (guint id, DMAPRecord * record, gpointer _mb)
                GArray *thumbnail = NULL;
 
                g_object_get (record, "thumbnail", &thumbnail, NULL);
-               dmap_structure_add (mlit, DMAP_CC_PIFS,
-                                   thumbnail ? thumbnail->len : 0);
+               if (thumbnail) {
+                       dmap_structure_add (mlit, DMAP_CC_PIFS, thumbnail->len);
+                       g_array_unref(thumbnail);
+               } else {
+                       dmap_structure_add (mlit, DMAP_CC_PIFS, 0);
+               }
        }
        if (_dmap_share_client_requested (mb->bits, PHOTO_IMAGELARGEFILESIZE)) {
                gint large_filesize = 0;
@@ -505,7 +509,7 @@ send_chunked_file (SoupServer * server, SoupMessage * message,
                   DPAPRecord * record, guint64 filesize)
 {
        GInputStream *stream;
-       const char *location;
+       char *location = NULL;
        GError *error = NULL;
        ChunkData *cd = g_new0 (ChunkData, 1);
 
@@ -521,7 +525,7 @@ send_chunked_file (SoupServer * server, SoupMessage * message,
                soup_message_set_status (message,
                                         SOUP_STATUS_INTERNAL_SERVER_ERROR);
                g_free (cd);
-               return;
+               goto done;
        }
 
        cd->stream = stream;
@@ -529,7 +533,7 @@ send_chunked_file (SoupServer * server, SoupMessage * message,
        if (cd->stream == NULL) {
                g_warning ("Could not set up input stream");
                g_free (cd);
-               return;
+               goto done;
        }
 
        soup_message_headers_set_encoding (message->response_headers,
@@ -550,6 +554,9 @@ send_chunked_file (SoupServer * server, SoupMessage * message,
        g_signal_connect (message, "finished",
                          G_CALLBACK (dmap_chunked_message_finished), cd);
        /* NOTE: cd g_free'd by chunked_message_finished(). */
+
+done:
+       g_free(location);
 }
 
 static void
diff --git a/vala/libdmapsharing-3.2.vapi b/vala/libdmapsharing-3.2.vapi
index bbc8bb4..1e82a7b 100644
--- a/vala/libdmapsharing-3.2.vapi
+++ b/vala/libdmapsharing-3.2.vapi
@@ -41,7 +41,7 @@ namespace DAAP {
                [CCode (cname = "dmap_connection_start")]
                public static void start (DAAP.DMAPConnection connection, DAAP.DMAPConnectionFunc callback);
                [NoAccessorMethod]
-               public void* base_uri { get; set; }
+               public Soup.URI base_uri { owned get; set; }
                [NoAccessorMethod]
                public int database_id { get; set; }
                [NoAccessorMethod]
@@ -49,7 +49,7 @@ namespace DAAP {
                [NoAccessorMethod]
                public double dmap_version { get; set; }
                [NoAccessorMethod]
-               public GLib.Object factory { owned get; construct; }
+               public DMAP.RecordFactory factory { owned get; construct; }
                [NoAccessorMethod]
                public string host { owned get; construct; }
                [NoAccessorMethod]
@@ -229,9 +229,9 @@ namespace DAAP {
                [NoAccessorMethod]
                public uint auth_method { get; set; }
                [NoAccessorMethod]
-               public void* container_db { get; construct; }
+               public DMAP.ContainerDb container_db { owned get; construct; }
                [NoAccessorMethod]
-               public void* db { get; construct; }
+               public DMAP.Db db { owned get; construct; }
                [NoAccessorMethod]
                public string name { owned get; set; }
                [NoAccessorMethod]
@@ -729,7 +729,7 @@ namespace DACP {
                [CCode (cname = "dmap_connection_start")]
                public static void start (DACP.DMAPConnection connection, DACP.DMAPConnectionFunc callback);
                [NoAccessorMethod]
-               public void* base_uri { get; set; }
+               public Soup.URI base_uri { owned get; set; }
                [NoAccessorMethod]
                public int database_id { get; set; }
                [NoAccessorMethod]
@@ -737,7 +737,7 @@ namespace DACP {
                [NoAccessorMethod]
                public double dmap_version { get; set; }
                [NoAccessorMethod]
-               public GLib.Object factory { owned get; construct; }
+               public DACP.DMAPRecordFactory factory { owned get; construct; }
                [NoAccessorMethod]
                public string host { owned get; construct; }
                [NoAccessorMethod]
@@ -917,9 +917,9 @@ namespace DACP {
                [NoAccessorMethod]
                public uint auth_method { get; set; }
                [NoAccessorMethod]
-               public void* container_db { get; construct; }
+               public DMAP.ContainerDb container_db { owned get; construct; }
                [NoAccessorMethod]
-               public void* db { get; construct; }
+               public DMAP.Db db { owned get; construct; }
                [NoAccessorMethod]
                public string name { owned get; set; }
                [NoAccessorMethod]
@@ -1430,7 +1430,7 @@ namespace DMAP {
                public void setup ();
                public void start (DMAP.ConnectionFunc callback);
                [NoAccessorMethod]
-               public void* base_uri { get; set; }
+               public Soup.URI base_uri { owned get; set; }
                [NoAccessorMethod]
                public int database_id { get; set; }
                [NoAccessorMethod]
@@ -1438,7 +1438,7 @@ namespace DMAP {
                [NoAccessorMethod]
                public double dmap_version { get; set; }
                [NoAccessorMethod]
-               public GLib.Object factory { owned get; construct; }
+               public DMAP.RecordFactory factory { owned get; construct; }
                [NoAccessorMethod]
                public string host { owned get; construct; }
                [NoAccessorMethod]
@@ -1608,9 +1608,9 @@ namespace DMAP {
                [NoAccessorMethod]
                public uint auth_method { get; set; }
                [NoAccessorMethod]
-               public void* container_db { get; construct; }
+               public DMAP.ContainerDb container_db { owned get; construct; }
                [NoAccessorMethod]
-               public void* db { get; construct; }
+               public DMAP.Db db { owned get; construct; }
                [NoAccessorMethod]
                public string name { owned get; set; }
                [NoAccessorMethod]
@@ -2026,7 +2026,7 @@ namespace DPAP {
                [CCode (cname = "dmap_connection_start")]
                public static void start (DPAP.DMAPConnection connection, DPAP.DMAPConnectionFunc callback);
                [NoAccessorMethod]
-               public void* base_uri { get; set; }
+               public Soup.URI base_uri { owned get; set; }
                [NoAccessorMethod]
                public int database_id { get; set; }
                [NoAccessorMethod]
@@ -2034,7 +2034,7 @@ namespace DPAP {
                [NoAccessorMethod]
                public double dmap_version { get; set; }
                [NoAccessorMethod]
-               public GLib.Object factory { owned get; construct; }
+               public DMAP.RecordFactory factory { owned get; construct; }
                [NoAccessorMethod]
                public string host { owned get; construct; }
                [NoAccessorMethod]
@@ -2214,9 +2214,9 @@ namespace DPAP {
                [NoAccessorMethod]
                public uint auth_method { get; set; }
                [NoAccessorMethod]
-               public void* container_db { get; construct; }
+               public DMAP.ContainerDb container_db { owned get; construct; }
                [NoAccessorMethod]
-               public void* db { get; construct; }
+               public DMAP.Db db { owned get; construct; }
                [NoAccessorMethod]
                public string name { owned get; set; }
                [NoAccessorMethod]
@@ -2316,7 +2316,7 @@ namespace DPAP {
                [NoAccessorMethod]
                public string format { owned get; set; }
                [NoAccessorMethod]
-               public void* hash { get; set; }
+               public GLib.Array hash { owned get; set; }
                [NoAccessorMethod]
                public int large_filesize { get; set; }
                [NoAccessorMethod]
@@ -2328,7 +2328,7 @@ namespace DPAP {
                [NoAccessorMethod]
                public int rating { get; set; }
                [NoAccessorMethod]
-               public void* thumbnail { get; set; }
+               public GLib.Array thumbnail { owned get; set; }
        }
        [CCode (cheader_filename = "libdmapsharing/dmap.h", cprefix = "DACP_PLAY_")]
        public enum DACPPlayState {


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]