[libdmapsharing] Fix Vala after moving from Iface to Interface due to use of G_DEFINE_INTERFACE



commit c00711a0115f8e9fe38bdc378d758fe0ab3c96c3
Author: W. Michael Petullo <mike flyn org>
Date:   Sun Nov 12 19:56:49 2017 -0500

    Fix Vala after moving from Iface to Interface due to use of G_DEFINE_INTERFACE
    
    Signed-off-by: W. Michael Petullo <mike flyn org>

 tests/dacplisten.c                                 |    4 +-
 tests/test-dmap-container-db.c                     |    2 +-
 tests/test-dmap-container-record.c                 |    2 +-
 tests/test-dmap-db.c                               |    2 +-
 tests/vala-dmap-container-db.c                     |    4 +-
 .../libdmapsharing-3.2.metadata                    |    1 +
 .../libdmapsharing-3.2.metadata                    |    4 +
 .../libdmapsharing-3.2.metadata                    |    1 +
 vala/libdmapsharing-3.2.vapi                       |  150 +++++++++++++++++---
 9 files changed, 146 insertions(+), 24 deletions(-)
---
diff --git a/tests/dacplisten.c b/tests/dacplisten.c
index 7142027..3412f7c 100644
--- a/tests/dacplisten.c
+++ b/tests/dacplisten.c
@@ -102,7 +102,7 @@ struct _DACPListenerPrivate {
 
 
 static gpointer vala_dacp_player_parent_class = NULL;
-static DACPPlayerIface * vala_dacp_player_dacp_player_parent_iface = NULL;
+static DACPPlayerInterface * vala_dacp_player_dacp_player_parent_iface = NULL;
 static gpointer dacp_listener_parent_class = NULL;
 
 GType vala_dacp_player_get_type (void) G_GNUC_CONST;
@@ -242,7 +242,7 @@ static void vala_dacp_player_class_init (ValaDACPPlayerClass * klass) {
 }
 
 
-static void vala_dacp_player_dacp_player_interface_init (DACPPlayerIface * iface) {
+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;
diff --git a/tests/test-dmap-container-db.c b/tests/test-dmap-container-db.c
index e65279d..c4e6ffe 100644
--- a/tests/test-dmap-container-db.c
+++ b/tests/test-dmap-container-db.c
@@ -62,7 +62,7 @@ test_dmap_container_db_class_init (TestDMAPContainerDbClass *klass)
 static void
 test_dmap_container_db_interface_init (gpointer iface, gpointer data)
 {
-       DMAPContainerDbIface *dmap_container_db = iface;
+       DMAPContainerDbInterface *dmap_container_db = iface;
 
        g_assert (G_TYPE_FROM_INTERFACE (dmap_container_db) == DMAP_TYPE_CONTAINER_DB);
 
diff --git a/tests/test-dmap-container-record.c b/tests/test-dmap-container-record.c
index ab49422..6879e4b 100644
--- a/tests/test-dmap-container-record.c
+++ b/tests/test-dmap-container-record.c
@@ -105,7 +105,7 @@ test_dmap_container_record_class_init (TestDMAPContainerRecordClass *klass)
 static void
 test_dmap_container_record_interface_init (gpointer iface, gpointer data)
 {
-       DMAPContainerRecordIface *dmap_container_record = iface;
+       DMAPContainerRecordInterface *dmap_container_record = iface;
 
        g_assert (G_TYPE_FROM_INTERFACE (dmap_container_record) == DMAP_TYPE_CONTAINER_RECORD);
 
diff --git a/tests/test-dmap-db.c b/tests/test-dmap-db.c
index 6955b6b..c8d354c 100644
--- a/tests/test-dmap-db.c
+++ b/tests/test-dmap-db.c
@@ -81,7 +81,7 @@ test_dmap_db_class_init (TestDMAPDbClass *klass)
 static void
 test_dmap_db_interface_init (gpointer iface, gpointer data)
 {
-       DMAPDbIface *dmap_db = iface;
+       DMAPDbInterface *dmap_db = iface;
 
        g_assert (G_TYPE_FROM_INTERFACE (dmap_db) == DMAP_TYPE_DB);
 
diff --git a/tests/vala-dmap-container-db.c b/tests/vala-dmap-container-db.c
index d808964..5185885 100644
--- a/tests/vala-dmap-container-db.c
+++ b/tests/vala-dmap-container-db.c
@@ -56,7 +56,7 @@ struct _ValaDMAPContainerDbPrivate {
 
 
 static gpointer vala_dmap_container_db_parent_class = NULL;
-static DMAPContainerDbIface * 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))
@@ -169,7 +169,7 @@ static void vala_dmap_container_db_class_init (ValaDMAPContainerDbClass * klass)
 }
 
 
-static void vala_dmap_container_db_dmap_container_db_interface_init (DMAPContainerDbIface * 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;
diff --git a/vala/libdmapsharing-3.2-dacp/libdmapsharing-3.2.metadata 
b/vala/libdmapsharing-3.2-dacp/libdmapsharing-3.2.metadata
index cad4981..1208c1e 100644
--- a/vala/libdmapsharing-3.2-dacp/libdmapsharing-3.2.metadata
+++ b/vala/libdmapsharing-3.2-dacp/libdmapsharing-3.2.metadata
@@ -1,3 +1,4 @@
 DACP cheader_filename="libdmapsharing/dmap.h"
+DACPPlayer type_cname="DACPPlayerInterface"
 AvahiClient name="Client" namespace="Avahi"
 AvahiEntryGroup name="EntryGroup" namespace="Avahi"
diff --git a/vala/libdmapsharing-3.2-dmap/libdmapsharing-3.2.metadata 
b/vala/libdmapsharing-3.2-dmap/libdmapsharing-3.2.metadata
index 4d548dd..c04bb7a 100644
--- a/vala/libdmapsharing-3.2-dmap/libdmapsharing-3.2.metadata
+++ b/vala/libdmapsharing-3.2-dmap/libdmapsharing-3.2.metadata
@@ -4,5 +4,9 @@ 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"
diff --git a/vala/libdmapsharing-3.2-dpap/libdmapsharing-3.2.metadata 
b/vala/libdmapsharing-3.2-dpap/libdmapsharing-3.2.metadata
index ae92246..f51f4ae 100644
--- a/vala/libdmapsharing-3.2-dpap/libdmapsharing-3.2.metadata
+++ b/vala/libdmapsharing-3.2-dpap/libdmapsharing-3.2.metadata
@@ -1,5 +1,6 @@
 DPAP cheader_filename="libdmapsharing/dmap.h"
 DACPPlayState common_prefix="DACP_PLAY_" rename_to="DACPPlayState"
 DACPRepeatState common_prefix="DACP_REPEAT_" rename_to="DACPRepeatState"
+DPAPRecord type_cname="DPAPRecordInterface"
 AvahiClient name="Client" namespace="Avahi"
 AvahiEntryGroup name="EntryGroup" namespace="Avahi"
diff --git a/vala/libdmapsharing-3.2.vapi b/vala/libdmapsharing-3.2.vapi
index ffbc637..aa6cd21 100644
--- a/vala/libdmapsharing-3.2.vapi
+++ b/vala/libdmapsharing-3.2.vapi
@@ -274,7 +274,7 @@ namespace DAAP {
                public abstract unowned DAAP.DMAPContainerRecord lookup_by_id (DMAP.ContainerDb db, uint id);
        }
        [CCode (cheader_filename = "libdmapsharing/dmap.h")]
-       public interface DMAPContainerRecord {
+       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")]
@@ -283,6 +283,8 @@ namespace DAAP {
                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 {
@@ -311,15 +313,57 @@ namespace DAAP {
                public abstract unowned GLib.ByteArray to_blob (DAAP.DMAPRecord record);
        }
        [CCode (cheader_filename = "libdmapsharing/dmap.h")]
-       public interface DMAPRecordFactory {
+       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 {
+       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 void* hash { 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 {
@@ -920,13 +964,55 @@ namespace DACP {
        public class bitwise {
        }
        [CCode (cheader_filename = "libdmapsharing/dmap.h")]
-       public interface DAAPRecord {
+       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;
+               [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 void* hash { get; set; }
+               [NoAccessorMethod]
+               public string location { owned get; set; }
+               [NoAccessorMethod]
+               public DACP.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")]
        public interface DMAPContainerDb : GLib.Object {
@@ -940,7 +1026,7 @@ namespace DACP {
                public abstract unowned DACP.DMAPContainerRecord lookup_by_id (DMAP.ContainerDb db, uint id);
        }
        [CCode (cheader_filename = "libdmapsharing/dmap.h")]
-       public interface DMAPContainerRecord {
+       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")]
@@ -949,6 +1035,8 @@ namespace DACP {
                public abstract uint64 get_entry_count (DACP.DMAPContainerRecord record);
                [CCode (cname = "dmap_container_record_get_id")]
                public abstract uint get_id (DACP.DMAPContainerRecord record);
+               [NoAccessorMethod]
+               public string name { owned get; set; }
        }
        [CCode (cheader_filename = "libdmapsharing/dmap.h")]
        public interface DMAPDb : GLib.Object {
@@ -977,11 +1065,11 @@ namespace DACP {
                public abstract unowned GLib.ByteArray to_blob (DACP.DMAPRecord record);
        }
        [CCode (cheader_filename = "libdmapsharing/dmap.h")]
-       public interface DMAPRecordFactory {
+       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")]
+       [CCode (cheader_filename = "libdmapsharing/dmap.h", type_cname = "DACPPlayerInterface")]
        public interface Player : GLib.Object {
                public abstract void cue_clear ();
                public abstract void cue_play (GLib.List records, uint index);
@@ -1548,7 +1636,7 @@ namespace DMAP {
        [Compact]
        public class bitwise {
        }
-       [CCode (cheader_filename = "libdmapsharing/dmap.h")]
+       [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 ();
@@ -1556,13 +1644,15 @@ namespace DMAP {
                public abstract unowned DMAP.ContainerRecord lookup_by_id (uint id);
        }
        [CCode (cheader_filename = "libdmapsharing/dmap.h")]
-       public interface ContainerRecord {
+       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")]
+       [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);
@@ -1573,13 +1663,13 @@ namespace DMAP {
                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")]
+       [CCode (cheader_filename = "libdmapsharing/dmap.h", type_cname = "DMAPRecordInterface")]
        public interface Record : GLib.Object {
                public abstract bool set_from_blob (GLib.ByteArray blob);
                public abstract unowned GLib.ByteArray to_blob ();
        }
-       [CCode (cheader_filename = "libdmapsharing/dmap.h")]
-       public interface RecordFactory {
+       [CCode (cheader_filename = "libdmapsharing/dmap.h", type_cname = "DMAPRecordFactoryInterface")]
+       public interface RecordFactory : GLib.Object {
                public abstract DMAP.Record create (void* user_data);
        }
        [CCode (cheader_filename = "libdmapsharing/dmap.h", cprefix = "DMAP_")]
@@ -2169,7 +2259,7 @@ namespace DPAP {
                public abstract unowned DPAP.DMAPContainerRecord lookup_by_id (DMAP.ContainerDb db, uint id);
        }
        [CCode (cheader_filename = "libdmapsharing/dmap.h")]
-       public interface DMAPContainerRecord {
+       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")]
@@ -2178,6 +2268,8 @@ namespace DPAP {
                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 {
@@ -2206,13 +2298,37 @@ namespace DPAP {
                public abstract unowned GLib.ByteArray to_blob (DPAP.DMAPRecord record);
        }
        [CCode (cheader_filename = "libdmapsharing/dmap.h")]
-       public interface DMAPRecordFactory {
+       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")]
-       public interface Record {
+       [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 void* hash { 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 void* thumbnail { 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]