[libdmapsharing] Replace use of deprecated g_type_class_add_private()
- From: W. Michael Petullo <wmpetullo src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [libdmapsharing] Replace use of deprecated g_type_class_add_private()
- Date: Fri, 14 Dec 2018 23:36:39 +0000 (UTC)
commit 5c4cdf8c0eb9f644c8ab6e3b907f3bbb018802c1
Author: W. Michael Petullo <mike flyn org>
Date: Fri Dec 14 18:36:28 2018 -0500
Replace use of deprecated g_type_class_add_private()
Signed-off-by: W. Michael Petullo <mike flyn org>
libdmapsharing/dmap-connection.c | 12 +++++++-----
libdmapsharing/dmap-control-connection.c | 9 ---------
libdmapsharing/dmap-control-share.c | 7 ++++---
libdmapsharing/dmap-gst-input-stream.c | 5 ++---
libdmapsharing/dmap-gst-mp3-input-stream.c | 9 ++++-----
libdmapsharing/dmap-gst-qt-input-stream.c | 9 ++++-----
libdmapsharing/dmap-gst-wav-input-stream.c | 9 ++++-----
libdmapsharing/dmap-image-connection.c | 12 ------------
libdmapsharing/dmap-image-share.c | 7 ++++---
libdmapsharing/dmap-mdns-browser-avahi.c | 7 ++++---
libdmapsharing/dmap-mdns-browser-dnssd.c | 7 ++++---
libdmapsharing/dmap-mdns-browser-howl.c | 7 ++++---
libdmapsharing/dmap-mdns-publisher-avahi.c | 7 ++++---
libdmapsharing/dmap-mdns-publisher-dnssd.c | 7 ++++---
libdmapsharing/dmap-mdns-service.c | 7 ++++---
libdmapsharing/dmap-share.c | 7 ++++---
libdmapsharing/test-dmap-av-record.c | 7 +++----
libdmapsharing/test-dmap-db.c | 6 +++---
libdmapsharing/test-dmap-image-record.c | 7 +++----
19 files changed, 66 insertions(+), 82 deletions(-)
---
diff --git a/libdmapsharing/dmap-connection.c b/libdmapsharing/dmap-connection.c
index 682849c..9661d3f 100644
--- a/libdmapsharing/dmap-connection.c
+++ b/libdmapsharing/dmap-connection.c
@@ -43,9 +43,6 @@
static gboolean _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))
-
struct DmapConnectionPrivate
{
char *name;
@@ -86,6 +83,13 @@ struct DmapConnectionPrivate
char *last_error_message;
};
+G_DEFINE_TYPE_WITH_CODE (DmapConnection,
+ dmap_connection,
+ G_TYPE_OBJECT,
+ G_ADD_PRIVATE (DmapConnection));
+
+#define DMAP_CONNECTION_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), DMAP_TYPE_CONNECTION,
DmapConnectionPrivate))
+
enum
{
PROP_0,
@@ -329,8 +333,6 @@ dmap_connection_class_init (DmapConnectionClass * klass)
object_class->set_property = _set_property;
object_class->get_property = _get_property;
- g_type_class_add_private (klass, sizeof (DmapConnectionPrivate));
-
g_object_class_install_property (object_class,
PROP_DB,
g_param_spec_object ("db",
diff --git a/libdmapsharing/dmap-control-connection.c b/libdmapsharing/dmap-control-connection.c
index 875768c..d290299 100644
--- a/libdmapsharing/dmap-control-connection.c
+++ b/libdmapsharing/dmap-control-connection.c
@@ -25,11 +25,6 @@
#define DMAP_CONTROL_CONNECTION_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), DACP_TYPE_CONNECTION,
DmapControlConnectionPrivate))
-/* FIXME:
-struct DmapControlConnectionPrivate {
-};
-*/
-
static DmapContentCode
_get_protocol_version_cc (DmapConnection * connection)
{
@@ -65,10 +60,6 @@ dmap_control_connection_class_init (DmapControlConnectionClass * klass)
parent_class->get_protocol_version_cc = _get_protocol_version_cc;
parent_class->get_query_metadata = _get_query_metadata;
parent_class->handle_mlcl = _handle_mlcl;
-
- /* FIXME:
- * g_type_class_add_private (klass, sizeof (DmapControlConnectionPrivate));
- */
}
DmapControlConnection *
diff --git a/libdmapsharing/dmap-control-share.c b/libdmapsharing/dmap-control-share.c
index 950c942..5668f90 100644
--- a/libdmapsharing/dmap-control-share.c
+++ b/libdmapsharing/dmap-control-share.c
@@ -107,7 +107,10 @@ enum {
static guint _signals[LAST_SIGNAL] = { 0, };
-G_DEFINE_TYPE (DmapControlShare, dmap_control_share, DMAP_TYPE_SHARE);
+G_DEFINE_TYPE_WITH_CODE (DmapControlShare,
+ dmap_control_share,
+ DMAP_TYPE_SHARE,
+ G_ADD_PRIVATE (DmapControlShare));
static gchar *
_get_dbid (void)
@@ -365,8 +368,6 @@ dmap_control_share_class_init (DmapControlShareClass * klass)
NULL,
g_cclosure_marshal_VOID__STRING,
G_TYPE_NONE, 1, G_TYPE_STRING);
-
- g_type_class_add_private (klass, sizeof (DmapControlSharePrivate));
}
static void
diff --git a/libdmapsharing/dmap-gst-input-stream.c b/libdmapsharing/dmap-gst-input-stream.c
index 187b73f..3cc74f2 100644
--- a/libdmapsharing/dmap-gst-input-stream.c
+++ b/libdmapsharing/dmap-gst-input-stream.c
@@ -418,8 +418,6 @@ dmap_gst_input_stream_class_init (DmapGstInputStreamClass * klass)
{
GInputStreamClass *istream_class;
- g_type_class_add_private (klass, sizeof (DmapGstInputStreamPrivate));
-
istream_class = G_INPUT_STREAM_CLASS (klass);
istream_class->read_fn = _read;
istream_class->skip = _skip;
@@ -453,4 +451,5 @@ dmap_gst_input_stream_init (DmapGstInputStream * stream)
G_DEFINE_TYPE_WITH_CODE (DmapGstInputStream, dmap_gst_input_stream,
G_TYPE_INPUT_STREAM,
G_IMPLEMENT_INTERFACE (G_TYPE_SEEKABLE,
- _seekable_iface_init));
+ _seekable_iface_init)
+ G_ADD_PRIVATE (DmapGstInputStream));
diff --git a/libdmapsharing/dmap-gst-mp3-input-stream.c b/libdmapsharing/dmap-gst-mp3-input-stream.c
index 86e3897..cc58bfa 100644
--- a/libdmapsharing/dmap-gst-mp3-input-stream.c
+++ b/libdmapsharing/dmap-gst-mp3-input-stream.c
@@ -204,8 +204,10 @@ _kill_pipeline (DmapGstInputStream * stream)
gst_object_unref (GST_OBJECT (mp3_stream->priv->pipeline));
}
-G_DEFINE_TYPE (DmapGstMP3InputStream, dmap_gst_mp3_input_stream,
- DMAP_TYPE_GST_INPUT_STREAM);
+G_DEFINE_TYPE_WITH_CODE (DmapGstMP3InputStream,
+ dmap_gst_mp3_input_stream,
+ DMAP_TYPE_GST_INPUT_STREAM,
+ G_ADD_PRIVATE (DmapGstMP3InputStream));
static void
dmap_gst_mp3_input_stream_class_init (DmapGstMP3InputStreamClass * klass)
@@ -213,9 +215,6 @@ dmap_gst_mp3_input_stream_class_init (DmapGstMP3InputStreamClass * klass)
DmapGstInputStreamClass *parent_class =
DMAP_GST_INPUT_STREAM_CLASS (klass);
- g_type_class_add_private (klass,
- sizeof (DmapGstMP3InputStreamPrivate));
-
parent_class->kill_pipeline = _kill_pipeline;
}
diff --git a/libdmapsharing/dmap-gst-qt-input-stream.c b/libdmapsharing/dmap-gst-qt-input-stream.c
index f5950c2..b2e605e 100644
--- a/libdmapsharing/dmap-gst-qt-input-stream.c
+++ b/libdmapsharing/dmap-gst-qt-input-stream.c
@@ -215,8 +215,10 @@ _kill_pipeline (DmapGstInputStream * stream)
gst_object_unref (GST_OBJECT (qt_stream->priv->pipeline));
}
-G_DEFINE_TYPE (DmapGstQtInputStream, dmap_gst_qt_input_stream,
- DMAP_TYPE_GST_INPUT_STREAM);
+G_DEFINE_TYPE_WITH_CODE (DmapGstQtInputStream,
+ dmap_gst_qt_input_stream,
+ DMAP_TYPE_GST_INPUT_STREAM,
+ G_ADD_PRIVATE (DmapGstQtInputStream));
static void
dmap_gst_qt_input_stream_class_init (DmapGstQtInputStreamClass * klass)
@@ -224,9 +226,6 @@ dmap_gst_qt_input_stream_class_init (DmapGstQtInputStreamClass * klass)
DmapGstInputStreamClass *parent_class =
DMAP_GST_INPUT_STREAM_CLASS (klass);
- g_type_class_add_private (klass,
- sizeof (DmapGstQtInputStreamPrivate));
-
parent_class->kill_pipeline = _kill_pipeline;
}
diff --git a/libdmapsharing/dmap-gst-wav-input-stream.c b/libdmapsharing/dmap-gst-wav-input-stream.c
index 930f466..5a6a321 100644
--- a/libdmapsharing/dmap-gst-wav-input-stream.c
+++ b/libdmapsharing/dmap-gst-wav-input-stream.c
@@ -220,8 +220,10 @@ _kill_pipeline (DmapGstInputStream * stream)
gst_object_unref (GST_OBJECT (wav_stream->priv->pipeline));
}
-G_DEFINE_TYPE (DmapGstWavInputStream, dmap_gst_wav_input_stream,
- DMAP_TYPE_GST_INPUT_STREAM)
+G_DEFINE_TYPE_WITH_CODE (DmapGstWavInputStream,
+ dmap_gst_wav_input_stream,
+ DMAP_TYPE_GST_INPUT_STREAM,
+ G_ADD_PRIVATE (DmapGstWavInputStream))
static void
dmap_gst_wav_input_stream_class_init (DmapGstWavInputStreamClass
@@ -230,9 +232,6 @@ G_DEFINE_TYPE (DmapGstWavInputStream, dmap_gst_wav_input_stream,
DmapGstInputStreamClass *parent_class =
DMAP_GST_INPUT_STREAM_CLASS (klass);
- g_type_class_add_private (klass,
- sizeof (DmapGstWavInputStreamPrivate));
-
parent_class->kill_pipeline = _kill_pipeline;
}
diff --git a/libdmapsharing/dmap-image-connection.c b/libdmapsharing/dmap-image-connection.c
index 935d0ff..048dc4e 100644
--- a/libdmapsharing/dmap-image-connection.c
+++ b/libdmapsharing/dmap-image-connection.c
@@ -25,11 +25,6 @@
#define DMAP_IMAGE_CONNECTION_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), DMAP_TYPE_IMAGE_CONNECTION,
DmapImageConnectionPrivate))
-/* FIXME:
-struct DmapImageConnectionPrivate {
-};
-*/
-
static DmapContentCode
_get_protocol_version_cc (DmapConnection * connection)
{
@@ -164,10 +159,6 @@ dmap_image_connection_class_init (DmapImageConnectionClass * klass)
parent_class->get_protocol_version_cc = _get_protocol_version_cc;
parent_class->get_query_metadata = _get_query_metadata;
parent_class->handle_mlcl = _handle_mlcl;
-
- /* FIXME:
- * g_type_class_add_private (klass, sizeof (DmapImageConnectionPrivate));
- */
}
DmapImageConnection *
@@ -190,9 +181,6 @@ dmap_image_connection_new (const char *name,
static void
dmap_image_connection_init (DmapImageConnection * connection)
{
- /* FIXME:
- * connection->priv = DMAP_IMAGE_CONNECTION_GET_PRIVATE (connection);
- */
}
G_DEFINE_TYPE (DmapImageConnection, dmap_image_connection, DMAP_TYPE_CONNECTION);
diff --git a/libdmapsharing/dmap-image-share.c b/libdmapsharing/dmap-image-share.c
index 883ce9e..df3d440 100644
--- a/libdmapsharing/dmap-image-share.c
+++ b/libdmapsharing/dmap-image-share.c
@@ -115,7 +115,10 @@ static GMappedFile *_mapped_file = NULL;
#define DMAP_IMAGE_SHARE_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), DMAP_TYPE_IMAGE_SHARE,
DmapImageSharePrivate))
-G_DEFINE_TYPE (DmapImageShare, dmap_image_share, DMAP_TYPE_SHARE);
+G_DEFINE_TYPE_WITH_CODE (DmapImageShare,
+ dmap_image_share,
+ DMAP_TYPE_SHARE,
+ G_ADD_PRIVATE (DmapImageShare));
static void
_set_property (GObject * object,
@@ -477,8 +480,6 @@ dmap_image_share_class_init (DmapImageShareClass * klass)
parent_class->databases_browse_xxx = _databases_browse_xxx;
parent_class->databases_items_xxx = _databases_items_xxx;
parent_class->server_info = dmap_image_share_server_info;
-
- g_type_class_add_private (klass, sizeof (DmapImageSharePrivate));
}
static void
diff --git a/libdmapsharing/dmap-mdns-browser-avahi.c b/libdmapsharing/dmap-mdns-browser-avahi.c
index 6c0223b..f124262 100644
--- a/libdmapsharing/dmap-mdns-browser-avahi.c
+++ b/libdmapsharing/dmap-mdns-browser-avahi.c
@@ -105,7 +105,10 @@ static void _browse_cb (AvahiServiceBrowser * service_browser,
static guint _signals[LAST_SIGNAL] = { 0, };
-G_DEFINE_TYPE (DmapMdnsBrowser, dmap_mdns_browser, G_TYPE_OBJECT);
+G_DEFINE_TYPE_WITH_CODE (DmapMdnsBrowser,
+ dmap_mdns_browser,
+ G_TYPE_OBJECT,
+ G_ADD_PRIVATE (DmapMdnsBrowser));
GQuark
dmap_mdns_browser_error_quark (void)
@@ -129,8 +132,6 @@ dmap_mdns_browser_class_init (DmapMdnsBrowserClass * klass)
object_class->dispose = _dispose;
object_class->finalize = _finalize;
- g_type_class_add_private (klass, sizeof (DmapMdnsBrowserPrivate));
-
_signals[SERVICE_ADDED] =
g_signal_new ("service-added",
G_TYPE_FROM_CLASS (object_class),
diff --git a/libdmapsharing/dmap-mdns-browser-dnssd.c b/libdmapsharing/dmap-mdns-browser-dnssd.c
index f633edf..746aeca 100644
--- a/libdmapsharing/dmap-mdns-browser-dnssd.c
+++ b/libdmapsharing/dmap-mdns-browser-dnssd.c
@@ -60,7 +60,10 @@ enum
static guint _signals[LAST_SIGNAL] = { 0, };
-G_DEFINE_TYPE (DmapMdnsBrowser, dmap_mdns_browser, G_TYPE_OBJECT);
+G_DEFINE_TYPE_WITH_CODE (DmapMdnsBrowser,
+ dmap_mdns_browser,
+ G_TYPE_OBJECT,
+ G_ADD_PRIVATE (DmapMdnsBrowser));
static void
dmap_mdns_browser_init (DmapMdnsBrowser * browser)
@@ -490,8 +493,6 @@ dmap_mdns_browser_class_init (DmapMdnsBrowserClass * klass)
object_class->dispose = _dispose;
object_class->finalize = _finalize;
- g_type_class_add_private (klass, sizeof (DmapMdnsBrowserPrivate));
-
// Signal makeup
_signals[SERVICE_ADDED] =
g_signal_new ("service-added",
diff --git a/libdmapsharing/dmap-mdns-browser-howl.c b/libdmapsharing/dmap-mdns-browser-howl.c
index 6cc59d5..8c32395 100644
--- a/libdmapsharing/dmap-mdns-browser-howl.c
+++ b/libdmapsharing/dmap-mdns-browser-howl.c
@@ -81,7 +81,10 @@ static void dmap_mdns_browser_finalize (GObject * object);
static guint signals[LAST_SIGNAL] = { 0, };
-G_DEFINE_TYPE (DmapMdnsBrowser, dmap_mdns_browser, G_TYPE_OBJECT);
+G_DEFINE_TYPE_WITH_CODE (DmapMdnsBrowser,
+ dmap_mdns_browser,
+ G_TYPE_OBJECT,
+ G_ADD_PRIVATE (DmapMdnsBrowser));
GQuark
dmap_mdns_browser_error_quark (void)
@@ -452,8 +455,6 @@ dmap_mdns_browser_class_init (DmapMdnsBrowserClass * klass)
service_removed), NULL, NULL,
g_cclosure_marshal_VOID__STRING, G_TYPE_NONE, 1,
G_TYPE_STRING);
-
- g_type_class_add_private (klass, sizeof (DmapMdnsBrowserPrivate));
}
static void
diff --git a/libdmapsharing/dmap-mdns-publisher-avahi.c b/libdmapsharing/dmap-mdns-publisher-avahi.c
index 6fc3af3..80f82f8 100644
--- a/libdmapsharing/dmap-mdns-publisher-avahi.c
+++ b/libdmapsharing/dmap-mdns-publisher-avahi.c
@@ -69,7 +69,10 @@ enum
static guint _signals[LAST_SIGNAL] = { 0, };
-G_DEFINE_TYPE (DmapMdnsPublisher, dmap_mdns_publisher, G_TYPE_OBJECT);
+G_DEFINE_TYPE_WITH_CODE (DmapMdnsPublisher,
+ dmap_mdns_publisher,
+ G_TYPE_OBJECT,
+ G_ADD_PRIVATE (DmapMdnsPublisher));
static gpointer _publisher_object = NULL;
@@ -444,8 +447,6 @@ dmap_mdns_publisher_class_init (DmapMdnsPublisherClass * klass)
name_collision), NULL, NULL,
g_cclosure_marshal_VOID__STRING, G_TYPE_NONE, 1,
G_TYPE_STRING);
-
- g_type_class_add_private (klass, sizeof (DmapMdnsPublisherPrivate));
}
static void
diff --git a/libdmapsharing/dmap-mdns-publisher-dnssd.c b/libdmapsharing/dmap-mdns-publisher-dnssd.c
index f3f10fe..98ff68f 100644
--- a/libdmapsharing/dmap-mdns-publisher-dnssd.c
+++ b/libdmapsharing/dmap-mdns-publisher-dnssd.c
@@ -41,7 +41,10 @@ enum {
static guint _signals[LAST_SIGNAL] = { 0, };
-G_DEFINE_TYPE (DmapMdnsPublisher, dmap_mdns_publisher, G_TYPE_OBJECT)
+G_DEFINE_TYPE_WITH_CODE (DmapMdnsPublisher,
+ dmap_mdns_publisher,
+ G_TYPE_OBJECT,
+ G_ADD_PRIVATE (DmapMdnsPublisher))
static gpointer _publisher_object = NULL;
@@ -241,8 +244,6 @@ dmap_mdns_publisher_class_init (DmapMdnsPublisherClass *klass)
g_cclosure_marshal_VOID__STRING,
G_TYPE_NONE,
1, G_TYPE_STRING);
-
- g_type_class_add_private (klass, sizeof (DmapMdnsPublisherPrivate));
}
static void
diff --git a/libdmapsharing/dmap-mdns-service.c b/libdmapsharing/dmap-mdns-service.c
index 4552472..3db1746 100644
--- a/libdmapsharing/dmap-mdns-service.c
+++ b/libdmapsharing/dmap-mdns-service.c
@@ -136,15 +136,16 @@ static void _finalize (GObject * object);
#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_WITH_CODE (DmapMdnsService,
+ dmap_mdns_service,
+ G_TYPE_OBJECT,
+ G_ADD_PRIVATE (DmapMdnsService));
static void
dmap_mdns_service_class_init (DmapMdnsServiceClass * klass)
{
GObjectClass *object_class = G_OBJECT_CLASS (klass);
- g_type_class_add_private (klass, sizeof (DmapMdnsServicePrivate));
-
object_class->dispose = _dispose;
object_class->finalize = _finalize;
object_class->set_property = _set_property;
diff --git a/libdmapsharing/dmap-share.c b/libdmapsharing/dmap-share.c
index ad98a58..8055184 100644
--- a/libdmapsharing/dmap-share.c
+++ b/libdmapsharing/dmap-share.c
@@ -116,7 +116,10 @@ struct share_bitwise_t
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_WITH_CODE (DmapShare,
+ dmap_share,
+ G_TYPE_OBJECT,
+ G_ADD_PRIVATE (DmapShare))
#define DMAP_SHARE_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), \
DMAP_TYPE_SHARE, DmapSharePrivate));
@@ -704,8 +707,6 @@ dmap_share_class_init (DmapShareClass * klass)
G_TYPE_STRV,
G_PARAM_READWRITE));
- g_type_class_add_private (klass, sizeof (DmapSharePrivate));
-
_signals[ERROR] =
g_signal_new ("error",
G_TYPE_FROM_CLASS (object_class),
diff --git a/libdmapsharing/test-dmap-av-record.c b/libdmapsharing/test-dmap-av-record.c
index 07e2e02..856019a 100644
--- a/libdmapsharing/test-dmap-av-record.c
+++ b/libdmapsharing/test-dmap-av-record.c
@@ -281,8 +281,6 @@ test_dmap_av_record_class_init (TestDmapAvRecordClass *klass)
{
GObjectClass *gobject_class = G_OBJECT_CLASS (klass);
- g_type_class_add_private (klass, sizeof (TestDmapAvRecordPrivate));
-
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;
@@ -337,8 +335,9 @@ _dmap_record_iface_init (gpointer iface, gpointer data)
}
G_DEFINE_TYPE_WITH_CODE (TestDmapAvRecord, test_dmap_av_record, G_TYPE_OBJECT,
- G_IMPLEMENT_INTERFACE (DMAP_TYPE_AV_RECORD, _dmap_av_record_iface_init)
- G_IMPLEMENT_INTERFACE (DMAP_TYPE_RECORD, _dmap_record_iface_init))
+ G_IMPLEMENT_INTERFACE (DMAP_TYPE_AV_RECORD, _dmap_av_record_iface_init)
+ G_IMPLEMENT_INTERFACE (DMAP_TYPE_RECORD, _dmap_record_iface_init)
+ G_ADD_PRIVATE (TestDmapAvRecord))
static void
test_dmap_av_record_finalize (GObject *object)
diff --git a/libdmapsharing/test-dmap-db.c b/libdmapsharing/test-dmap-db.c
index e8640fd..07fe760 100644
--- a/libdmapsharing/test-dmap-db.c
+++ b/libdmapsharing/test-dmap-db.c
@@ -75,7 +75,6 @@ test_dmap_db_init (TestDmapDb *db)
static void
test_dmap_db_class_init (TestDmapDbClass *klass)
{
- g_type_class_add_private (klass, sizeof (TestDmapDbPrivate));
}
static void
@@ -92,8 +91,9 @@ _dmap_db_iface_init (gpointer iface, gpointer data)
}
G_DEFINE_TYPE_WITH_CODE (TestDmapDb, test_dmap_db, G_TYPE_OBJECT,
- G_IMPLEMENT_INTERFACE (DMAP_TYPE_DB,
- _dmap_db_iface_init))
+ G_IMPLEMENT_INTERFACE (DMAP_TYPE_DB,
+ _dmap_db_iface_init)
+ G_ADD_PRIVATE (TestDmapDb))
TestDmapDb *
test_dmap_db_new (void)
diff --git a/libdmapsharing/test-dmap-image-record.c b/libdmapsharing/test-dmap-image-record.c
index d511c93..3b71ec3 100644
--- a/libdmapsharing/test-dmap-image-record.c
+++ b/libdmapsharing/test-dmap-image-record.c
@@ -197,8 +197,6 @@ test_dmap_image_record_class_init (TestDmapImageRecordClass *klass)
{
GObjectClass *gobject_class = G_OBJECT_CLASS (klass);
- g_type_class_add_private (klass, sizeof (TestDmapImageRecordPrivate));
-
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;
@@ -236,8 +234,9 @@ _dmap_record_iface_init (gpointer iface, gpointer data)
}
G_DEFINE_TYPE_WITH_CODE (TestDmapImageRecord, test_dmap_image_record, G_TYPE_OBJECT,
- G_IMPLEMENT_INTERFACE (DMAP_TYPE_IMAGE_RECORD, _dmap_image_record_iface_init)
- G_IMPLEMENT_INTERFACE (DMAP_TYPE_RECORD, _dmap_record_iface_init))
+ G_IMPLEMENT_INTERFACE (DMAP_TYPE_IMAGE_RECORD, _dmap_image_record_iface_init)
+ G_IMPLEMENT_INTERFACE (DMAP_TYPE_RECORD, _dmap_record_iface_init)
+ G_ADD_PRIVATE (TestDmapImageRecord))
static void
test_dmap_image_record_finalize (GObject *object)
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]