[libgdata/libgdata-0-18: 2/6] drop usage of deprecated gobject functions
- From: Philip Withnall <pwithnall src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [libgdata/libgdata-0-18: 2/6] drop usage of deprecated gobject functions
- Date: Thu, 17 Jun 2021 12:31:56 +0000 (UTC)
commit c56ac0784baa495655d7058486c244ddad027491
Author: Daniel Kolesa <dkolesa igalia com>
Date: Tue Mar 16 18:43:05 2021 +0100
drop usage of deprecated gobject functions
gdata/app/gdata-app-categories.c | 6 ++----
gdata/atom/gdata-author.c | 5 ++---
gdata/atom/gdata-category.c | 5 ++---
gdata/atom/gdata-generator.c | 5 ++---
gdata/atom/gdata-link.c | 5 ++---
gdata/exif/gdata-exif-tags.c | 6 ++----
gdata/gcontact/gdata-gcontact-calendar.c | 5 ++---
gdata/gcontact/gdata-gcontact-event.c | 6 ++----
gdata/gcontact/gdata-gcontact-external-id.c | 5 ++---
gdata/gcontact/gdata-gcontact-jot.c | 6 ++----
gdata/gcontact/gdata-gcontact-language.c | 5 ++---
gdata/gcontact/gdata-gcontact-relation.c | 6 ++----
gdata/gcontact/gdata-gcontact-website.c | 5 ++---
gdata/gd/gdata-gd-email-address.c | 5 ++---
gdata/gd/gdata-gd-feed-link.c | 6 ++----
gdata/gd/gdata-gd-im-address.c | 5 ++---
gdata/gd/gdata-gd-name.c | 5 ++---
gdata/gd/gdata-gd-organization.c | 5 ++---
gdata/gd/gdata-gd-phone-number.c | 5 ++---
gdata/gd/gdata-gd-postal-address.c | 5 ++---
gdata/gd/gdata-gd-reminder.c | 5 ++---
gdata/gd/gdata-gd-when.c | 5 ++---
gdata/gd/gdata-gd-where.c | 5 ++---
gdata/gd/gdata-gd-who.c | 5 ++---
gdata/gdata-access-rule.c | 6 ++----
gdata/gdata-authorization-domain.c | 6 ++----
gdata/gdata-batch-operation.c | 15 ++++++---------
gdata/gdata-client-login-authorizer.c | 5 ++---
gdata/gdata-download-stream.c | 5 ++---
gdata/gdata-entry.c | 6 ++----
gdata/gdata-feed.c | 6 ++----
gdata/gdata-goa-authorizer.c | 5 ++---
gdata/gdata-oauth1-authorizer.c | 5 ++---
gdata/gdata-oauth2-authorizer.c | 7 ++-----
gdata/gdata-parsable.c | 6 ++----
gdata/gdata-query.c | 6 ++----
gdata/gdata-service.c | 6 ++----
gdata/gdata-upload-stream.c | 6 ++----
gdata/georss/gdata-georss-where.c | 6 ++----
gdata/media/gdata-media-category.c | 6 ++----
gdata/media/gdata-media-content.c | 6 ++----
gdata/media/gdata-media-credit.c | 6 ++----
gdata/media/gdata-media-group.c | 6 ++----
gdata/media/gdata-media-thumbnail.c | 6 ++----
gdata/services/calendar/gdata-calendar-calendar.c | 5 ++---
gdata/services/calendar/gdata-calendar-event.c | 6 ++----
gdata/services/calendar/gdata-calendar-query.c | 6 ++----
gdata/services/contacts/gdata-contacts-contact.c | 6 ++----
gdata/services/contacts/gdata-contacts-group.c | 6 ++----
gdata/services/contacts/gdata-contacts-query.c | 6 ++----
gdata/services/documents/gdata-documents-document.c | 6 ++----
gdata/services/documents/gdata-documents-entry.c | 5 ++---
gdata/services/documents/gdata-documents-metadata.c | 6 ++----
gdata/services/documents/gdata-documents-property.c | 7 +++----
gdata/services/documents/gdata-documents-query.c | 6 ++----
gdata/services/documents/gdata-documents-upload-query.c | 6 ++----
gdata/services/picasaweb/gdata-picasaweb-album.c | 6 ++----
gdata/services/picasaweb/gdata-picasaweb-file.c | 5 ++---
gdata/services/picasaweb/gdata-picasaweb-query.c | 6 ++----
gdata/services/picasaweb/gdata-picasaweb-user.c | 6 ++----
gdata/services/tasks/gdata-tasks-query.c | 6 ++----
gdata/services/tasks/gdata-tasks-task.c | 6 ++----
gdata/services/youtube/gdata-youtube-category.c | 6 ++----
gdata/services/youtube/gdata-youtube-comment.c | 6 ++----
gdata/services/youtube/gdata-youtube-query.c | 6 ++----
gdata/services/youtube/gdata-youtube-service.c | 5 ++---
gdata/services/youtube/gdata-youtube-state.c | 6 ++----
gdata/services/youtube/gdata-youtube-video.c | 5 ++---
gdata/tests/gdata-dummy-authorizer.c | 7 ++-----
69 files changed, 143 insertions(+), 256 deletions(-)
---
diff --git a/gdata/app/gdata-app-categories.c b/gdata/app/gdata-app-categories.c
index 4a526e32..37207eb6 100644
--- a/gdata/app/gdata-app-categories.c
+++ b/gdata/app/gdata-app-categories.c
@@ -58,7 +58,7 @@ enum {
PROP_IS_FIXED = 1
};
-G_DEFINE_TYPE (GDataAPPCategories, gdata_app_categories, GDATA_TYPE_PARSABLE)
+G_DEFINE_TYPE_WITH_PRIVATE (GDataAPPCategories, gdata_app_categories, GDATA_TYPE_PARSABLE)
static void
gdata_app_categories_class_init (GDataAPPCategoriesClass *klass)
@@ -66,8 +66,6 @@ gdata_app_categories_class_init (GDataAPPCategoriesClass *klass)
GObjectClass *gobject_class = G_OBJECT_CLASS (klass);
GDataParsableClass *parsable_class = GDATA_PARSABLE_CLASS (klass);
- g_type_class_add_private (klass, sizeof (GDataAPPCategoriesPrivate));
-
gobject_class->get_property = gdata_app_categories_get_property;
gobject_class->dispose = gdata_app_categories_dispose;
gobject_class->finalize = gdata_app_categories_finalize;
@@ -98,7 +96,7 @@ gdata_app_categories_class_init (GDataAPPCategoriesClass *klass)
static void
gdata_app_categories_init (GDataAPPCategories *self)
{
- self->priv = G_TYPE_INSTANCE_GET_PRIVATE (self, GDATA_TYPE_APP_CATEGORIES, GDataAPPCategoriesPrivate);
+ self->priv = gdata_app_categories_get_instance_private (self);
}
static void
diff --git a/gdata/atom/gdata-author.c b/gdata/atom/gdata-author.c
index 09bf03fc..3819e4e6 100644
--- a/gdata/atom/gdata-author.c
+++ b/gdata/atom/gdata-author.c
@@ -58,6 +58,7 @@ enum {
};
G_DEFINE_TYPE_WITH_CODE (GDataAuthor, gdata_author, GDATA_TYPE_PARSABLE,
+ G_ADD_PRIVATE (GDataAuthor)
G_IMPLEMENT_INTERFACE (GDATA_TYPE_COMPARABLE, gdata_author_comparable_init))
static void
@@ -66,8 +67,6 @@ gdata_author_class_init (GDataAuthorClass *klass)
GObjectClass *gobject_class = G_OBJECT_CLASS (klass);
GDataParsableClass *parsable_class = GDATA_PARSABLE_CLASS (klass);
- g_type_class_add_private (klass, sizeof (GDataAuthorPrivate));
-
gobject_class->set_property = gdata_author_set_property;
gobject_class->get_property = gdata_author_get_property;
gobject_class->finalize = gdata_author_finalize;
@@ -141,7 +140,7 @@ gdata_author_comparable_init (GDataComparableIface *iface)
static void
gdata_author_init (GDataAuthor *self)
{
- self->priv = G_TYPE_INSTANCE_GET_PRIVATE (self, GDATA_TYPE_AUTHOR, GDataAuthorPrivate);
+ self->priv = gdata_author_get_instance_private (self);
}
static void
diff --git a/gdata/atom/gdata-category.c b/gdata/atom/gdata-category.c
index c02771ce..dcb60102 100644
--- a/gdata/atom/gdata-category.c
+++ b/gdata/atom/gdata-category.c
@@ -57,6 +57,7 @@ enum {
};
G_DEFINE_TYPE_WITH_CODE (GDataCategory, gdata_category, GDATA_TYPE_PARSABLE,
+ G_ADD_PRIVATE (GDataCategory)
G_IMPLEMENT_INTERFACE (GDATA_TYPE_COMPARABLE, gdata_category_comparable_init))
static void
@@ -65,8 +66,6 @@ gdata_category_class_init (GDataCategoryClass *klass)
GObjectClass *gobject_class = G_OBJECT_CLASS (klass);
GDataParsableClass *parsable_class = GDATA_PARSABLE_CLASS (klass);
- g_type_class_add_private (klass, sizeof (GDataCategoryPrivate));
-
gobject_class->set_property = gdata_category_set_property;
gobject_class->get_property = gdata_category_get_property;
gobject_class->finalize = gdata_category_finalize;
@@ -142,7 +141,7 @@ gdata_category_comparable_init (GDataComparableIface *iface)
static void
gdata_category_init (GDataCategory *self)
{
- self->priv = G_TYPE_INSTANCE_GET_PRIVATE (self, GDATA_TYPE_CATEGORY, GDataCategoryPrivate);
+ self->priv = gdata_category_get_instance_private (self);
}
static void
diff --git a/gdata/atom/gdata-generator.c b/gdata/atom/gdata-generator.c
index 69a17d25..72a2d562 100644
--- a/gdata/atom/gdata-generator.c
+++ b/gdata/atom/gdata-generator.c
@@ -54,6 +54,7 @@ enum {
};
G_DEFINE_TYPE_WITH_CODE (GDataGenerator, gdata_generator, GDATA_TYPE_PARSABLE,
+ G_ADD_PRIVATE (GDataGenerator)
G_IMPLEMENT_INTERFACE (GDATA_TYPE_COMPARABLE, gdata_generator_comparable_init))
static void
@@ -62,8 +63,6 @@ gdata_generator_class_init (GDataGeneratorClass *klass)
GObjectClass *gobject_class = G_OBJECT_CLASS (klass);
GDataParsableClass *parsable_class = GDATA_PARSABLE_CLASS (klass);
- g_type_class_add_private (klass, sizeof (GDataGeneratorPrivate));
-
gobject_class->get_property = gdata_generator_get_property;
gobject_class->finalize = gdata_generator_finalize;
@@ -138,7 +137,7 @@ gdata_generator_comparable_init (GDataComparableIface *iface)
static void
gdata_generator_init (GDataGenerator *self)
{
- self->priv = G_TYPE_INSTANCE_GET_PRIVATE (self, GDATA_TYPE_GENERATOR, GDataGeneratorPrivate);
+ self->priv = gdata_generator_get_instance_private (self);
}
static void
diff --git a/gdata/atom/gdata-link.c b/gdata/atom/gdata-link.c
index f9754810..c58d4dc1 100644
--- a/gdata/atom/gdata-link.c
+++ b/gdata/atom/gdata-link.c
@@ -64,6 +64,7 @@ enum {
};
G_DEFINE_TYPE_WITH_CODE (GDataLink, gdata_link, GDATA_TYPE_PARSABLE,
+ G_ADD_PRIVATE (GDataLink)
G_IMPLEMENT_INTERFACE (GDATA_TYPE_COMPARABLE, gdata_link_comparable_init))
static void
@@ -72,8 +73,6 @@ gdata_link_class_init (GDataLinkClass *klass)
GObjectClass *gobject_class = G_OBJECT_CLASS (klass);
GDataParsableClass *parsable_class = GDATA_PARSABLE_CLASS (klass);
- g_type_class_add_private (klass, sizeof (GDataLinkPrivate));
-
gobject_class->set_property = gdata_link_set_property;
gobject_class->get_property = gdata_link_get_property;
gobject_class->finalize = gdata_link_finalize;
@@ -199,7 +198,7 @@ gdata_link_comparable_init (GDataComparableIface *iface)
static void
gdata_link_init (GDataLink *self)
{
- self->priv = G_TYPE_INSTANCE_GET_PRIVATE (self, GDATA_TYPE_LINK, GDataLinkPrivate);
+ self->priv = gdata_link_get_instance_private (self);
self->priv->length = -1;
self->priv->relation_type = g_strdup (GDATA_LINK_ALTERNATE);
}
diff --git a/gdata/exif/gdata-exif-tags.c b/gdata/exif/gdata-exif-tags.c
index 0a456cf2..4a071c3b 100644
--- a/gdata/exif/gdata-exif-tags.c
+++ b/gdata/exif/gdata-exif-tags.c
@@ -65,7 +65,7 @@ struct _GDataExifTagsPrivate {
gint64 _time; /* in milliseconds! */
};
-G_DEFINE_TYPE (GDataExifTags, gdata_exif_tags, GDATA_TYPE_PARSABLE)
+G_DEFINE_TYPE_WITH_PRIVATE (GDataExifTags, gdata_exif_tags, GDATA_TYPE_PARSABLE)
static void
gdata_exif_tags_class_init (GDataExifTagsClass *klass)
@@ -73,8 +73,6 @@ gdata_exif_tags_class_init (GDataExifTagsClass *klass)
GObjectClass *gobject_class = G_OBJECT_CLASS (klass);
GDataParsableClass *parsable_class = GDATA_PARSABLE_CLASS (klass);
- g_type_class_add_private (klass, sizeof (GDataExifTagsPrivate));
-
gobject_class->finalize = gdata_exif_tags_finalize;
parsable_class->parse_xml = parse_xml;
@@ -86,7 +84,7 @@ gdata_exif_tags_class_init (GDataExifTagsClass *klass)
static void
gdata_exif_tags_init (GDataExifTags *self)
{
- self->priv = G_TYPE_INSTANCE_GET_PRIVATE (self, GDATA_TYPE_EXIF_TAGS, GDataExifTagsPrivate);
+ self->priv = gdata_exif_tags_get_instance_private (self);
self->priv->_time = -1;
}
diff --git a/gdata/gcontact/gdata-gcontact-calendar.c b/gdata/gcontact/gdata-gcontact-calendar.c
index 90562d24..9f0243db 100644
--- a/gdata/gcontact/gdata-gcontact-calendar.c
+++ b/gdata/gcontact/gdata-gcontact-calendar.c
@@ -60,6 +60,7 @@ enum {
};
G_DEFINE_TYPE_WITH_CODE (GDataGContactCalendar, gdata_gcontact_calendar, GDATA_TYPE_PARSABLE,
+ G_ADD_PRIVATE (GDataGContactCalendar)
G_IMPLEMENT_INTERFACE (GDATA_TYPE_COMPARABLE,
gdata_gcontact_calendar_comparable_init))
static void
@@ -68,8 +69,6 @@ gdata_gcontact_calendar_class_init (GDataGContactCalendarClass *klass)
GObjectClass *gobject_class = G_OBJECT_CLASS (klass);
GDataParsableClass *parsable_class = GDATA_PARSABLE_CLASS (klass);
- g_type_class_add_private (klass, sizeof (GDataGContactCalendarPrivate));
-
gobject_class->get_property = gdata_gcontact_calendar_get_property;
gobject_class->set_property = gdata_gcontact_calendar_set_property;
gobject_class->finalize = gdata_gcontact_calendar_finalize;
@@ -165,7 +164,7 @@ gdata_gcontact_calendar_comparable_init (GDataComparableIface *iface)
static void
gdata_gcontact_calendar_init (GDataGContactCalendar *self)
{
- self->priv = G_TYPE_INSTANCE_GET_PRIVATE (self, GDATA_TYPE_GCONTACT_CALENDAR,
GDataGContactCalendarPrivate);
+ self->priv = gdata_gcontact_calendar_get_instance_private (self);
}
static void
diff --git a/gdata/gcontact/gdata-gcontact-event.c b/gdata/gcontact/gdata-gcontact-event.c
index 6ea8257d..33c3b43a 100644
--- a/gdata/gcontact/gdata-gcontact-event.c
+++ b/gdata/gcontact/gdata-gcontact-event.c
@@ -59,7 +59,7 @@ enum {
PROP_LABEL
};
-G_DEFINE_TYPE (GDataGContactEvent, gdata_gcontact_event, GDATA_TYPE_PARSABLE)
+G_DEFINE_TYPE_WITH_PRIVATE (GDataGContactEvent, gdata_gcontact_event, GDATA_TYPE_PARSABLE)
static void
gdata_gcontact_event_class_init (GDataGContactEventClass *klass)
@@ -67,8 +67,6 @@ gdata_gcontact_event_class_init (GDataGContactEventClass *klass)
GObjectClass *gobject_class = G_OBJECT_CLASS (klass);
GDataParsableClass *parsable_class = GDATA_PARSABLE_CLASS (klass);
- g_type_class_add_private (klass, sizeof (GDataGContactEventPrivate));
-
gobject_class->get_property = gdata_gcontact_event_get_property;
gobject_class->set_property = gdata_gcontact_event_set_property;
gobject_class->finalize = gdata_gcontact_event_finalize;
@@ -136,7 +134,7 @@ gdata_gcontact_event_class_init (GDataGContactEventClass *klass)
static void
gdata_gcontact_event_init (GDataGContactEvent *self)
{
- self->priv = G_TYPE_INSTANCE_GET_PRIVATE (self, GDATA_TYPE_GCONTACT_EVENT, GDataGContactEventPrivate);
+ self->priv = gdata_gcontact_event_get_instance_private (self);
/* Clear the date to an invalid but sane value */
g_date_clear (&(self->priv->date), 1);
diff --git a/gdata/gcontact/gdata-gcontact-external-id.c b/gdata/gcontact/gdata-gcontact-external-id.c
index 3da3ef07..f7a60a74 100644
--- a/gdata/gcontact/gdata-gcontact-external-id.c
+++ b/gdata/gcontact/gdata-gcontact-external-id.c
@@ -58,6 +58,7 @@ enum {
};
G_DEFINE_TYPE_WITH_CODE (GDataGContactExternalID, gdata_gcontact_external_id, GDATA_TYPE_PARSABLE,
+ G_ADD_PRIVATE (GDataGContactExternalID)
G_IMPLEMENT_INTERFACE (GDATA_TYPE_COMPARABLE,
gdata_gcontact_external_id_comparable_init))
static void
@@ -66,8 +67,6 @@ gdata_gcontact_external_id_class_init (GDataGContactExternalIDClass *klass)
GObjectClass *gobject_class = G_OBJECT_CLASS (klass);
GDataParsableClass *parsable_class = GDATA_PARSABLE_CLASS (klass);
- g_type_class_add_private (klass, sizeof (GDataGContactExternalIDPrivate));
-
gobject_class->get_property = gdata_gcontact_external_id_get_property;
gobject_class->set_property = gdata_gcontact_external_id_set_property;
gobject_class->finalize = gdata_gcontact_external_id_finalize;
@@ -147,7 +146,7 @@ gdata_gcontact_external_id_comparable_init (GDataComparableIface *iface)
static void
gdata_gcontact_external_id_init (GDataGContactExternalID *self)
{
- self->priv = G_TYPE_INSTANCE_GET_PRIVATE (self, GDATA_TYPE_GCONTACT_EXTERNAL_ID,
GDataGContactExternalIDPrivate);
+ self->priv = gdata_gcontact_external_id_get_instance_private (self);
}
static void
diff --git a/gdata/gcontact/gdata-gcontact-jot.c b/gdata/gcontact/gdata-gcontact-jot.c
index 0e58d1b8..7a514724 100644
--- a/gdata/gcontact/gdata-gcontact-jot.c
+++ b/gdata/gcontact/gdata-gcontact-jot.c
@@ -55,7 +55,7 @@ enum {
PROP_RELATION_TYPE
};
-G_DEFINE_TYPE (GDataGContactJot, gdata_gcontact_jot, GDATA_TYPE_PARSABLE)
+G_DEFINE_TYPE_WITH_PRIVATE (GDataGContactJot, gdata_gcontact_jot, GDATA_TYPE_PARSABLE)
static void
gdata_gcontact_jot_class_init (GDataGContactJotClass *klass)
@@ -63,8 +63,6 @@ gdata_gcontact_jot_class_init (GDataGContactJotClass *klass)
GObjectClass *gobject_class = G_OBJECT_CLASS (klass);
GDataParsableClass *parsable_class = GDATA_PARSABLE_CLASS (klass);
- g_type_class_add_private (klass, sizeof (GDataGContactJotPrivate));
-
gobject_class->get_property = gdata_gcontact_jot_get_property;
gobject_class->set_property = gdata_gcontact_jot_set_property;
gobject_class->finalize = gdata_gcontact_jot_finalize;
@@ -113,7 +111,7 @@ gdata_gcontact_jot_class_init (GDataGContactJotClass *klass)
static void
gdata_gcontact_jot_init (GDataGContactJot *self)
{
- self->priv = G_TYPE_INSTANCE_GET_PRIVATE (self, GDATA_TYPE_GCONTACT_JOT, GDataGContactJotPrivate);
+ self->priv = gdata_gcontact_jot_get_instance_private (self);
}
static void
diff --git a/gdata/gcontact/gdata-gcontact-language.c b/gdata/gcontact/gdata-gcontact-language.c
index 5fe867f9..e0c5f88a 100644
--- a/gdata/gcontact/gdata-gcontact-language.c
+++ b/gdata/gcontact/gdata-gcontact-language.c
@@ -56,6 +56,7 @@ enum {
};
G_DEFINE_TYPE_WITH_CODE (GDataGContactLanguage, gdata_gcontact_language, GDATA_TYPE_PARSABLE,
+ G_ADD_PRIVATE (GDataGContactLanguage)
G_IMPLEMENT_INTERFACE (GDATA_TYPE_COMPARABLE,
gdata_gcontact_language_comparable_init))
static void
@@ -64,8 +65,6 @@ gdata_gcontact_language_class_init (GDataGContactLanguageClass *klass)
GObjectClass *gobject_class = G_OBJECT_CLASS (klass);
GDataParsableClass *parsable_class = GDATA_PARSABLE_CLASS (klass);
- g_type_class_add_private (klass, sizeof (GDataGContactLanguagePrivate));
-
gobject_class->get_property = gdata_gcontact_language_get_property;
gobject_class->set_property = gdata_gcontact_language_set_property;
gobject_class->finalize = gdata_gcontact_language_finalize;
@@ -128,7 +127,7 @@ gdata_gcontact_language_comparable_init (GDataComparableIface *iface)
static void
gdata_gcontact_language_init (GDataGContactLanguage *self)
{
- self->priv = G_TYPE_INSTANCE_GET_PRIVATE (self, GDATA_TYPE_GCONTACT_LANGUAGE,
GDataGContactLanguagePrivate);
+ self->priv = gdata_gcontact_language_get_instance_private (self);
}
static void
diff --git a/gdata/gcontact/gdata-gcontact-relation.c b/gdata/gcontact/gdata-gcontact-relation.c
index b562fa47..172acc21 100644
--- a/gdata/gcontact/gdata-gcontact-relation.c
+++ b/gdata/gcontact/gdata-gcontact-relation.c
@@ -57,7 +57,7 @@ enum {
PROP_LABEL
};
-G_DEFINE_TYPE (GDataGContactRelation, gdata_gcontact_relation, GDATA_TYPE_PARSABLE)
+G_DEFINE_TYPE_WITH_PRIVATE (GDataGContactRelation, gdata_gcontact_relation, GDATA_TYPE_PARSABLE)
static void
gdata_gcontact_relation_class_init (GDataGContactRelationClass *klass)
@@ -65,8 +65,6 @@ gdata_gcontact_relation_class_init (GDataGContactRelationClass *klass)
GObjectClass *gobject_class = G_OBJECT_CLASS (klass);
GDataParsableClass *parsable_class = GDATA_PARSABLE_CLASS (klass);
- g_type_class_add_private (klass, sizeof (GDataGContactRelationPrivate));
-
gobject_class->get_property = gdata_gcontact_relation_get_property;
gobject_class->set_property = gdata_gcontact_relation_set_property;
gobject_class->finalize = gdata_gcontact_relation_finalize;
@@ -132,7 +130,7 @@ gdata_gcontact_relation_class_init (GDataGContactRelationClass *klass)
static void
gdata_gcontact_relation_init (GDataGContactRelation *self)
{
- self->priv = G_TYPE_INSTANCE_GET_PRIVATE (self, GDATA_TYPE_GCONTACT_RELATION,
GDataGContactRelationPrivate);
+ self->priv = gdata_gcontact_relation_get_instance_private (self);
}
static void
diff --git a/gdata/gcontact/gdata-gcontact-website.c b/gdata/gcontact/gdata-gcontact-website.c
index e0ec4c6f..789b7a4b 100644
--- a/gdata/gcontact/gdata-gcontact-website.c
+++ b/gdata/gcontact/gdata-gcontact-website.c
@@ -60,6 +60,7 @@ enum {
};
G_DEFINE_TYPE_WITH_CODE (GDataGContactWebsite, gdata_gcontact_website, GDATA_TYPE_PARSABLE,
+ G_ADD_PRIVATE (GDataGContactWebsite)
G_IMPLEMENT_INTERFACE (GDATA_TYPE_COMPARABLE,
gdata_gcontact_website_comparable_init))
static void
@@ -68,8 +69,6 @@ gdata_gcontact_website_class_init (GDataGContactWebsiteClass *klass)
GObjectClass *gobject_class = G_OBJECT_CLASS (klass);
GDataParsableClass *parsable_class = GDATA_PARSABLE_CLASS (klass);
- g_type_class_add_private (klass, sizeof (GDataGContactWebsitePrivate));
-
gobject_class->get_property = gdata_gcontact_website_get_property;
gobject_class->set_property = gdata_gcontact_website_set_property;
gobject_class->finalize = gdata_gcontact_website_finalize;
@@ -166,7 +165,7 @@ gdata_gcontact_website_comparable_init (GDataComparableIface *iface)
static void
gdata_gcontact_website_init (GDataGContactWebsite *self)
{
- self->priv = G_TYPE_INSTANCE_GET_PRIVATE (self, GDATA_TYPE_GCONTACT_WEBSITE,
GDataGContactWebsitePrivate);
+ self->priv = gdata_gcontact_website_get_instance_private (self);
}
static void
diff --git a/gdata/gd/gdata-gd-email-address.c b/gdata/gd/gdata-gd-email-address.c
index 63ae95bb..8bb4f99a 100644
--- a/gdata/gd/gdata-gd-email-address.c
+++ b/gdata/gd/gdata-gd-email-address.c
@@ -62,6 +62,7 @@ enum {
};
G_DEFINE_TYPE_WITH_CODE (GDataGDEmailAddress, gdata_gd_email_address, GDATA_TYPE_PARSABLE,
+ G_ADD_PRIVATE (GDataGDEmailAddress)
G_IMPLEMENT_INTERFACE (GDATA_TYPE_COMPARABLE,
gdata_gd_email_address_comparable_init))
static void
@@ -70,8 +71,6 @@ gdata_gd_email_address_class_init (GDataGDEmailAddressClass *klass)
GObjectClass *gobject_class = G_OBJECT_CLASS (klass);
GDataParsableClass *parsable_class = GDATA_PARSABLE_CLASS (klass);
- g_type_class_add_private (klass, sizeof (GDataGDEmailAddressPrivate));
-
gobject_class->get_property = gdata_gd_email_address_get_property;
gobject_class->set_property = gdata_gd_email_address_set_property;
gobject_class->finalize = gdata_gd_email_address_finalize;
@@ -178,7 +177,7 @@ gdata_gd_email_address_comparable_init (GDataComparableIface *iface)
static void
gdata_gd_email_address_init (GDataGDEmailAddress *self)
{
- self->priv = G_TYPE_INSTANCE_GET_PRIVATE (self, GDATA_TYPE_GD_EMAIL_ADDRESS,
GDataGDEmailAddressPrivate);
+ self->priv = gdata_gd_email_address_get_instance_private (self);
}
static void
diff --git a/gdata/gd/gdata-gd-feed-link.c b/gdata/gd/gdata-gd-feed-link.c
index e29ee51e..a2c427a3 100644
--- a/gdata/gd/gdata-gd-feed-link.c
+++ b/gdata/gd/gdata-gd-feed-link.c
@@ -67,7 +67,7 @@ enum {
PROP_IS_READ_ONLY,
};
-G_DEFINE_TYPE (GDataGDFeedLink, gdata_gd_feed_link, GDATA_TYPE_PARSABLE)
+G_DEFINE_TYPE_WITH_PRIVATE (GDataGDFeedLink, gdata_gd_feed_link, GDATA_TYPE_PARSABLE)
static void
gdata_gd_feed_link_class_init (GDataGDFeedLinkClass *klass)
@@ -75,8 +75,6 @@ gdata_gd_feed_link_class_init (GDataGDFeedLinkClass *klass)
GObjectClass *gobject_class = G_OBJECT_CLASS (klass);
GDataParsableClass *parsable_class = GDATA_PARSABLE_CLASS (klass);
- g_type_class_add_private (klass, sizeof (GDataGDFeedLinkPrivate));
-
gobject_class->set_property = gdata_gd_feed_link_set_property;
gobject_class->get_property = gdata_gd_feed_link_get_property;
gobject_class->finalize = gdata_gd_feed_link_finalize;
@@ -155,7 +153,7 @@ gdata_gd_feed_link_class_init (GDataGDFeedLinkClass *klass)
static void
gdata_gd_feed_link_init (GDataGDFeedLink *self)
{
- self->priv = G_TYPE_INSTANCE_GET_PRIVATE (self, GDATA_TYPE_GD_FEED_LINK, GDataGDFeedLinkPrivate);
+ self->priv = gdata_gd_feed_link_get_instance_private (self);
self->priv->count_hint = -1;
self->priv->relation_type = g_strdup (GDATA_LINK_ALTERNATE);
}
diff --git a/gdata/gd/gdata-gd-im-address.c b/gdata/gd/gdata-gd-im-address.c
index 5b446801..dfcf8ced 100644
--- a/gdata/gd/gdata-gd-im-address.c
+++ b/gdata/gd/gdata-gd-im-address.c
@@ -62,6 +62,7 @@ enum {
};
G_DEFINE_TYPE_WITH_CODE (GDataGDIMAddress, gdata_gd_im_address, GDATA_TYPE_PARSABLE,
+ G_ADD_PRIVATE (GDataGDIMAddress)
G_IMPLEMENT_INTERFACE (GDATA_TYPE_COMPARABLE, gdata_gd_im_address_comparable_init))
static void
@@ -70,8 +71,6 @@ gdata_gd_im_address_class_init (GDataGDIMAddressClass *klass)
GObjectClass *gobject_class = G_OBJECT_CLASS (klass);
GDataParsableClass *parsable_class = GDATA_PARSABLE_CLASS (klass);
- g_type_class_add_private (klass, sizeof (GDataGDIMAddressPrivate));
-
gobject_class->get_property = gdata_gd_im_address_get_property;
gobject_class->set_property = gdata_gd_im_address_set_property;
gobject_class->finalize = gdata_gd_im_address_finalize;
@@ -182,7 +181,7 @@ gdata_gd_im_address_comparable_init (GDataComparableIface *iface)
static void
gdata_gd_im_address_init (GDataGDIMAddress *self)
{
- self->priv = G_TYPE_INSTANCE_GET_PRIVATE (self, GDATA_TYPE_GD_IM_ADDRESS, GDataGDIMAddressPrivate);
+ self->priv = gdata_gd_im_address_get_instance_private (self);
}
static void
diff --git a/gdata/gd/gdata-gd-name.c b/gdata/gd/gdata-gd-name.c
index 4c1fde67..c663bfe1 100644
--- a/gdata/gd/gdata-gd-name.c
+++ b/gdata/gd/gdata-gd-name.c
@@ -74,6 +74,7 @@ enum {
};
G_DEFINE_TYPE_WITH_CODE (GDataGDName, gdata_gd_name, GDATA_TYPE_PARSABLE,
+ G_ADD_PRIVATE (GDataGDName)
G_IMPLEMENT_INTERFACE (GDATA_TYPE_COMPARABLE, gdata_gd_name_comparable_init))
static void
@@ -82,8 +83,6 @@ gdata_gd_name_class_init (GDataGDNameClass *klass)
GObjectClass *gobject_class = G_OBJECT_CLASS (klass);
GDataParsableClass *parsable_class = GDATA_PARSABLE_CLASS (klass);
- g_type_class_add_private (klass, sizeof (GDataGDNamePrivate));
-
gobject_class->get_property = gdata_gd_name_get_property;
gobject_class->set_property = gdata_gd_name_set_property;
gobject_class->finalize = gdata_gd_name_finalize;
@@ -212,7 +211,7 @@ gdata_gd_name_comparable_init (GDataComparableIface *iface)
static void
gdata_gd_name_init (GDataGDName *self)
{
- self->priv = G_TYPE_INSTANCE_GET_PRIVATE (self, GDATA_TYPE_GD_NAME, GDataGDNamePrivate);
+ self->priv = gdata_gd_name_get_instance_private (self);
}
static void
diff --git a/gdata/gd/gdata-gd-organization.c b/gdata/gd/gdata-gd-organization.c
index c5d6a23a..43222767 100644
--- a/gdata/gd/gdata-gd-organization.c
+++ b/gdata/gd/gdata-gd-organization.c
@@ -75,6 +75,7 @@ enum {
};
G_DEFINE_TYPE_WITH_CODE (GDataGDOrganization, gdata_gd_organization, GDATA_TYPE_PARSABLE,
+ G_ADD_PRIVATE (GDataGDOrganization)
G_IMPLEMENT_INTERFACE (GDATA_TYPE_COMPARABLE,
gdata_gd_organization_comparable_init))
static void
@@ -83,8 +84,6 @@ gdata_gd_organization_class_init (GDataGDOrganizationClass *klass)
GObjectClass *gobject_class = G_OBJECT_CLASS (klass);
GDataParsableClass *parsable_class = GDATA_PARSABLE_CLASS (klass);
- g_type_class_add_private (klass, sizeof (GDataGDOrganizationPrivate));
-
gobject_class->get_property = gdata_gd_organization_get_property;
gobject_class->set_property = gdata_gd_organization_set_property;
gobject_class->dispose = gdata_gd_organization_dispose;
@@ -263,7 +262,7 @@ gdata_gd_organization_comparable_init (GDataComparableIface *iface)
static void
gdata_gd_organization_init (GDataGDOrganization *self)
{
- self->priv = G_TYPE_INSTANCE_GET_PRIVATE (self, GDATA_TYPE_GD_ORGANIZATION,
GDataGDOrganizationPrivate);
+ self->priv = gdata_gd_organization_get_instance_private (self);
}
static void
diff --git a/gdata/gd/gdata-gd-phone-number.c b/gdata/gd/gdata-gd-phone-number.c
index 06c0be98..f2b1e5d3 100644
--- a/gdata/gd/gdata-gd-phone-number.c
+++ b/gdata/gd/gdata-gd-phone-number.c
@@ -65,6 +65,7 @@ enum {
};
G_DEFINE_TYPE_WITH_CODE (GDataGDPhoneNumber, gdata_gd_phone_number, GDATA_TYPE_PARSABLE,
+ G_ADD_PRIVATE (GDataGDPhoneNumber)
G_IMPLEMENT_INTERFACE (GDATA_TYPE_COMPARABLE,
gdata_gd_phone_number_comparable_init))
static void
@@ -73,8 +74,6 @@ gdata_gd_phone_number_class_init (GDataGDPhoneNumberClass *klass)
GObjectClass *gobject_class = G_OBJECT_CLASS (klass);
GDataParsableClass *parsable_class = GDATA_PARSABLE_CLASS (klass);
- g_type_class_add_private (klass, sizeof (GDataGDPhoneNumberPrivate));
-
gobject_class->get_property = gdata_gd_phone_number_get_property;
gobject_class->set_property = gdata_gd_phone_number_set_property;
gobject_class->finalize = gdata_gd_phone_number_finalize;
@@ -199,7 +198,7 @@ gdata_gd_phone_number_comparable_init (GDataComparableIface *iface)
static void
gdata_gd_phone_number_init (GDataGDPhoneNumber *self)
{
- self->priv = G_TYPE_INSTANCE_GET_PRIVATE (self, GDATA_TYPE_GD_PHONE_NUMBER,
GDataGDPhoneNumberPrivate);
+ self->priv = gdata_gd_phone_number_get_instance_private (self);
}
static void
diff --git a/gdata/gd/gdata-gd-postal-address.c b/gdata/gd/gdata-gd-postal-address.c
index a037b48e..396b9f8b 100644
--- a/gdata/gd/gdata-gd-postal-address.c
+++ b/gdata/gd/gdata-gd-postal-address.c
@@ -90,6 +90,7 @@ enum {
};
G_DEFINE_TYPE_WITH_CODE (GDataGDPostalAddress, gdata_gd_postal_address, GDATA_TYPE_PARSABLE,
+ G_ADD_PRIVATE (GDataGDPostalAddress)
G_IMPLEMENT_INTERFACE (GDATA_TYPE_COMPARABLE,
gdata_gd_postal_address_comparable_init))
static void
@@ -98,8 +99,6 @@ gdata_gd_postal_address_class_init (GDataGDPostalAddressClass *klass)
GObjectClass *gobject_class = G_OBJECT_CLASS (klass);
GDataParsableClass *parsable_class = GDATA_PARSABLE_CLASS (klass);
- g_type_class_add_private (klass, sizeof (GDataGDPostalAddressPrivate));
-
gobject_class->get_property = gdata_gd_postal_address_get_property;
gobject_class->set_property = gdata_gd_postal_address_set_property;
gobject_class->finalize = gdata_gd_postal_address_finalize;
@@ -411,7 +410,7 @@ gdata_gd_postal_address_comparable_init (GDataComparableIface *iface)
static void
gdata_gd_postal_address_init (GDataGDPostalAddress *self)
{
- self->priv = G_TYPE_INSTANCE_GET_PRIVATE (self, GDATA_TYPE_GD_POSTAL_ADDRESS,
GDataGDPostalAddressPrivate);
+ self->priv = gdata_gd_postal_address_get_instance_private (self);
}
static void
diff --git a/gdata/gd/gdata-gd-reminder.c b/gdata/gd/gdata-gd-reminder.c
index 6c1e25d3..ec1357dc 100644
--- a/gdata/gd/gdata-gd-reminder.c
+++ b/gdata/gd/gdata-gd-reminder.c
@@ -60,6 +60,7 @@ enum {
};
G_DEFINE_TYPE_WITH_CODE (GDataGDReminder, gdata_gd_reminder, GDATA_TYPE_PARSABLE,
+ G_ADD_PRIVATE (GDataGDReminder)
G_IMPLEMENT_INTERFACE (GDATA_TYPE_COMPARABLE, gdata_gd_reminder_comparable_init))
static void
@@ -68,8 +69,6 @@ gdata_gd_reminder_class_init (GDataGDReminderClass *klass)
GObjectClass *gobject_class = G_OBJECT_CLASS (klass);
GDataParsableClass *parsable_class = GDATA_PARSABLE_CLASS (klass);
- g_type_class_add_private (klass, sizeof (GDataGDReminderPrivate));
-
gobject_class->get_property = gdata_gd_reminder_get_property;
gobject_class->set_property = gdata_gd_reminder_set_property;
gobject_class->finalize = gdata_gd_reminder_finalize;
@@ -176,7 +175,7 @@ gdata_gd_reminder_comparable_init (GDataComparableIface *iface)
static void
gdata_gd_reminder_init (GDataGDReminder *self)
{
- self->priv = G_TYPE_INSTANCE_GET_PRIVATE (self, GDATA_TYPE_GD_REMINDER, GDataGDReminderPrivate);
+ self->priv = gdata_gd_reminder_get_instance_private (self);
self->priv->absolute_time = -1;
}
diff --git a/gdata/gd/gdata-gd-when.c b/gdata/gd/gdata-gd-when.c
index 4df94a22..7815e560 100644
--- a/gdata/gd/gdata-gd-when.c
+++ b/gdata/gd/gdata-gd-when.c
@@ -68,6 +68,7 @@ enum {
};
G_DEFINE_TYPE_WITH_CODE (GDataGDWhen, gdata_gd_when, GDATA_TYPE_PARSABLE,
+ G_ADD_PRIVATE (GDataGDWhen)
G_IMPLEMENT_INTERFACE (GDATA_TYPE_COMPARABLE, gdata_gd_when_comparable_init))
static void
@@ -76,8 +77,6 @@ gdata_gd_when_class_init (GDataGDWhenClass *klass)
GObjectClass *gobject_class = G_OBJECT_CLASS (klass);
GDataParsableClass *parsable_class = GDATA_PARSABLE_CLASS (klass);
- g_type_class_add_private (klass, sizeof (GDataGDWhenPrivate));
-
gobject_class->get_property = gdata_gd_when_get_property;
gobject_class->set_property = gdata_gd_when_set_property;
gobject_class->dispose = gdata_gd_when_dispose;
@@ -184,7 +183,7 @@ gdata_gd_when_comparable_init (GDataComparableIface *iface)
static void
gdata_gd_when_init (GDataGDWhen *self)
{
- self->priv = G_TYPE_INSTANCE_GET_PRIVATE (self, GDATA_TYPE_GD_WHEN, GDataGDWhenPrivate);
+ self->priv = gdata_gd_when_get_instance_private (self);
self->priv->end_time = -1;
}
diff --git a/gdata/gd/gdata-gd-where.c b/gdata/gd/gdata-gd-where.c
index ea299c02..2807bced 100644
--- a/gdata/gd/gdata-gd-where.c
+++ b/gdata/gd/gdata-gd-where.c
@@ -60,6 +60,7 @@ enum {
};
G_DEFINE_TYPE_WITH_CODE (GDataGDWhere, gdata_gd_where, GDATA_TYPE_PARSABLE,
+ G_ADD_PRIVATE (GDataGDWhere)
G_IMPLEMENT_INTERFACE (GDATA_TYPE_COMPARABLE, gdata_gd_where_comparable_init))
static void
@@ -68,8 +69,6 @@ gdata_gd_where_class_init (GDataGDWhereClass *klass)
GObjectClass *gobject_class = G_OBJECT_CLASS (klass);
GDataParsableClass *parsable_class = GDATA_PARSABLE_CLASS (klass);
- g_type_class_add_private (klass, sizeof (GDataGDWherePrivate));
-
gobject_class->get_property = gdata_gd_where_get_property;
gobject_class->set_property = gdata_gd_where_set_property;
gobject_class->finalize = gdata_gd_where_finalize;
@@ -151,7 +150,7 @@ gdata_gd_where_comparable_init (GDataComparableIface *iface)
static void
gdata_gd_where_init (GDataGDWhere *self)
{
- self->priv = G_TYPE_INSTANCE_GET_PRIVATE (self, GDATA_TYPE_GD_WHERE, GDataGDWherePrivate);
+ self->priv = gdata_gd_where_get_instance_private (self);
}
static void
diff --git a/gdata/gd/gdata-gd-who.c b/gdata/gd/gdata-gd-who.c
index f637ee9a..b98b9c0c 100644
--- a/gdata/gd/gdata-gd-who.c
+++ b/gdata/gd/gdata-gd-who.c
@@ -60,6 +60,7 @@ enum {
};
G_DEFINE_TYPE_WITH_CODE (GDataGDWho, gdata_gd_who, GDATA_TYPE_PARSABLE,
+ G_ADD_PRIVATE (GDataGDWho)
G_IMPLEMENT_INTERFACE (GDATA_TYPE_COMPARABLE, gdata_gd_who_comparable_init))
static void
@@ -68,8 +69,6 @@ gdata_gd_who_class_init (GDataGDWhoClass *klass)
GObjectClass *gobject_class = G_OBJECT_CLASS (klass);
GDataParsableClass *parsable_class = GDATA_PARSABLE_CLASS (klass);
- g_type_class_add_private (klass, sizeof (GDataGDWhoPrivate));
-
gobject_class->get_property = gdata_gd_who_get_property;
gobject_class->set_property = gdata_gd_who_set_property;
gobject_class->finalize = gdata_gd_who_finalize;
@@ -151,7 +150,7 @@ gdata_gd_who_comparable_init (GDataComparableIface *iface)
static void
gdata_gd_who_init (GDataGDWho *self)
{
- self->priv = G_TYPE_INSTANCE_GET_PRIVATE (self, GDATA_TYPE_GD_WHO, GDataGDWhoPrivate);
+ self->priv = gdata_gd_who_get_instance_private (self);
}
static void
diff --git a/gdata/gdata-access-rule.c b/gdata/gdata-access-rule.c
index ae501ec0..9fd1ce95 100644
--- a/gdata/gdata-access-rule.c
+++ b/gdata/gdata-access-rule.c
@@ -114,7 +114,7 @@ enum {
PROP_KEY,
};
-G_DEFINE_TYPE (GDataAccessRule, gdata_access_rule, GDATA_TYPE_ENTRY)
+G_DEFINE_TYPE_WITH_PRIVATE (GDataAccessRule, gdata_access_rule, GDATA_TYPE_ENTRY)
static void
gdata_access_rule_class_init (GDataAccessRuleClass *klass)
@@ -123,8 +123,6 @@ gdata_access_rule_class_init (GDataAccessRuleClass *klass)
GDataParsableClass *parsable_class = GDATA_PARSABLE_CLASS (klass);
GDataEntryClass *entry_class = GDATA_ENTRY_CLASS (klass);
- g_type_class_add_private (klass, sizeof (GDataAccessRulePrivate));
-
gobject_class->constructor = gdata_access_rule_constructor;
gobject_class->finalize = gdata_access_rule_finalize;
gobject_class->get_property = gdata_access_rule_get_property;
@@ -240,7 +238,7 @@ notify_role_cb (GDataAccessRule *self, GParamSpec *pspec, gpointer user_data)
static void
gdata_access_rule_init (GDataAccessRule *self)
{
- self->priv = G_TYPE_INSTANCE_GET_PRIVATE (self, GDATA_TYPE_ACCESS_RULE, GDataAccessRulePrivate);
+ self->priv = gdata_access_rule_get_instance_private (self);
self->priv->edited = -1;
/* Listen to change notifications for the entry's title, since it's linked to GDataAccessRule:role */
diff --git a/gdata/gdata-authorization-domain.c b/gdata/gdata-authorization-domain.c
index 1867974e..e8c1353a 100644
--- a/gdata/gdata-authorization-domain.c
+++ b/gdata/gdata-authorization-domain.c
@@ -60,15 +60,13 @@ enum {
PROP_SCOPE,
};
-G_DEFINE_TYPE (GDataAuthorizationDomain, gdata_authorization_domain, G_TYPE_OBJECT)
+G_DEFINE_TYPE_WITH_PRIVATE (GDataAuthorizationDomain, gdata_authorization_domain, G_TYPE_OBJECT)
static void
gdata_authorization_domain_class_init (GDataAuthorizationDomainClass *klass)
{
GObjectClass *gobject_class = G_OBJECT_CLASS (klass);
- g_type_class_add_private (klass, sizeof (GDataAuthorizationDomainPrivate));
-
gobject_class->get_property = get_property;
gobject_class->set_property = set_property;
gobject_class->finalize = finalize;
@@ -105,7 +103,7 @@ gdata_authorization_domain_class_init (GDataAuthorizationDomainClass *klass)
static void
gdata_authorization_domain_init (GDataAuthorizationDomain *self)
{
- self->priv = G_TYPE_INSTANCE_GET_PRIVATE (self, GDATA_TYPE_AUTHORIZATION_DOMAIN,
GDataAuthorizationDomainPrivate);
+ self->priv = gdata_authorization_domain_get_instance_private (self);
}
static void
diff --git a/gdata/gdata-batch-operation.c b/gdata/gdata-batch-operation.c
index adac8b5e..f78801ed 100644
--- a/gdata/gdata-batch-operation.c
+++ b/gdata/gdata-batch-operation.c
@@ -126,16 +126,13 @@ enum {
PROP_AUTHORIZATION_DOMAIN,
};
-G_DEFINE_TYPE (GDataBatchOperation, gdata_batch_operation, G_TYPE_OBJECT)
-#define GDATA_BATCH_OPERATION_GET_PRIVATE(obj) (G_TYPE_INSTANCE_GET_PRIVATE ((obj),
GDATA_TYPE_BATCH_OPERATION, GDataBatchOperationPrivate))
+G_DEFINE_TYPE_WITH_PRIVATE (GDataBatchOperation, gdata_batch_operation, G_TYPE_OBJECT)
static void
gdata_batch_operation_class_init (GDataBatchOperationClass *klass)
{
GObjectClass *gobject_class = G_OBJECT_CLASS (klass);
- g_type_class_add_private (klass, sizeof (GDataBatchOperationPrivate));
-
gobject_class->dispose = gdata_batch_operation_dispose;
gobject_class->finalize = gdata_batch_operation_finalize;
gobject_class->get_property = gdata_batch_operation_get_property;
@@ -188,7 +185,7 @@ gdata_batch_operation_class_init (GDataBatchOperationClass *klass)
static void
gdata_batch_operation_get_property (GObject *object, guint property_id, GValue *value, GParamSpec *pspec)
{
- GDataBatchOperationPrivate *priv = GDATA_BATCH_OPERATION_GET_PRIVATE (object);
+ GDataBatchOperationPrivate *priv = gdata_batch_operation_get_instance_private (GDATA_BATCH_OPERATION
(object));
switch (property_id) {
case PROP_SERVICE:
@@ -210,7 +207,7 @@ gdata_batch_operation_get_property (GObject *object, guint property_id, GValue *
static void
gdata_batch_operation_set_property (GObject *object, guint property_id, const GValue *value, GParamSpec
*pspec)
{
- GDataBatchOperationPrivate *priv = GDATA_BATCH_OPERATION_GET_PRIVATE (object);
+ GDataBatchOperationPrivate *priv = gdata_batch_operation_get_instance_private (GDATA_BATCH_OPERATION
(object));
switch (property_id) {
case PROP_SERVICE:
@@ -233,7 +230,7 @@ gdata_batch_operation_set_property (GObject *object, guint property_id, const GV
static void
gdata_batch_operation_init (GDataBatchOperation *self)
{
- self->priv = G_TYPE_INSTANCE_GET_PRIVATE (self, GDATA_TYPE_BATCH_OPERATION,
GDataBatchOperationPrivate);
+ self->priv = gdata_batch_operation_get_instance_private (self);
self->priv->next_id = 1; /* reserve ID 0 for error conditions */
self->priv->operations = g_hash_table_new_full (g_direct_hash, g_direct_equal, NULL, (GDestroyNotify)
operation_free);
}
@@ -241,7 +238,7 @@ gdata_batch_operation_init (GDataBatchOperation *self)
static void
gdata_batch_operation_dispose (GObject *object)
{
- GDataBatchOperationPrivate *priv = GDATA_BATCH_OPERATION_GET_PRIVATE (object);
+ GDataBatchOperationPrivate *priv = gdata_batch_operation_get_instance_private (GDATA_BATCH_OPERATION
(object));
if (priv->authorization_domain != NULL)
g_object_unref (priv->authorization_domain);
@@ -258,7 +255,7 @@ gdata_batch_operation_dispose (GObject *object)
static void
gdata_batch_operation_finalize (GObject *object)
{
- GDataBatchOperationPrivate *priv = GDATA_BATCH_OPERATION_GET_PRIVATE (object);
+ GDataBatchOperationPrivate *priv = gdata_batch_operation_get_instance_private (GDATA_BATCH_OPERATION
(object));
g_free (priv->feed_uri);
g_hash_table_destroy (priv->operations);
diff --git a/gdata/gdata-client-login-authorizer.c b/gdata/gdata-client-login-authorizer.c
index 31edee36..295f5106 100644
--- a/gdata/gdata-client-login-authorizer.c
+++ b/gdata/gdata-client-login-authorizer.c
@@ -159,6 +159,7 @@ enum {
static guint authorizer_signals[LAST_SIGNAL] = { 0, };
G_DEFINE_TYPE_WITH_CODE (GDataClientLoginAuthorizer, gdata_client_login_authorizer, G_TYPE_OBJECT,
+ G_ADD_PRIVATE (GDataClientLoginAuthorizer)
G_IMPLEMENT_INTERFACE (GDATA_TYPE_AUTHORIZER, authorizer_init))
static void
@@ -166,8 +167,6 @@ gdata_client_login_authorizer_class_init (GDataClientLoginAuthorizerClass *klass
{
GObjectClass *gobject_class = G_OBJECT_CLASS (klass);
- g_type_class_add_private (klass, sizeof (GDataClientLoginAuthorizerPrivate));
-
gobject_class->get_property = get_property;
gobject_class->set_property = set_property;
gobject_class->dispose = dispose;
@@ -302,7 +301,7 @@ authorizer_init (GDataAuthorizerInterface *iface)
static void
gdata_client_login_authorizer_init (GDataClientLoginAuthorizer *self)
{
- self->priv = G_TYPE_INSTANCE_GET_PRIVATE (self, GDATA_TYPE_CLIENT_LOGIN_AUTHORIZER,
GDataClientLoginAuthorizerPrivate);
+ self->priv = gdata_client_login_authorizer_get_instance_private (self);
/* Set up the authentication mutex */
g_rec_mutex_init (&(self->priv->mutex));
diff --git a/gdata/gdata-download-stream.c b/gdata/gdata-download-stream.c
index a797de68..a6d64316 100644
--- a/gdata/gdata-download-stream.c
+++ b/gdata/gdata-download-stream.c
@@ -182,6 +182,7 @@ enum {
};
G_DEFINE_TYPE_WITH_CODE (GDataDownloadStream, gdata_download_stream, G_TYPE_INPUT_STREAM,
+ G_ADD_PRIVATE (GDataDownloadStream)
G_IMPLEMENT_INTERFACE (G_TYPE_SEEKABLE, gdata_download_stream_seekable_iface_init))
static void
@@ -190,8 +191,6 @@ gdata_download_stream_class_init (GDataDownloadStreamClass *klass)
GObjectClass *gobject_class = G_OBJECT_CLASS (klass);
GInputStreamClass *stream_class = G_INPUT_STREAM_CLASS (klass);
- g_type_class_add_private (klass, sizeof (GDataDownloadStreamPrivate));
-
gobject_class->constructor = gdata_download_stream_constructor;
gobject_class->dispose = gdata_download_stream_dispose;
gobject_class->finalize = gdata_download_stream_finalize;
@@ -314,7 +313,7 @@ gdata_download_stream_seekable_iface_init (GSeekableIface *seekable_iface)
static void
gdata_download_stream_init (GDataDownloadStream *self)
{
- self->priv = G_TYPE_INSTANCE_GET_PRIVATE (self, GDATA_TYPE_DOWNLOAD_STREAM,
GDataDownloadStreamPrivate);
+ self->priv = gdata_download_stream_get_instance_private (self);
self->priv->buffer = NULL; /* created when the network thread is started and destroyed when the
stream is closed */
self->priv->finished = FALSE;
diff --git a/gdata/gdata-entry.c b/gdata/gdata-entry.c
index 30488a83..c6127d87 100644
--- a/gdata/gdata-entry.c
+++ b/gdata/gdata-entry.c
@@ -91,7 +91,7 @@ enum {
PROP_CONTENT_URI
};
-G_DEFINE_TYPE (GDataEntry, gdata_entry, GDATA_TYPE_PARSABLE)
+G_DEFINE_TYPE_WITH_PRIVATE (GDataEntry, gdata_entry, GDATA_TYPE_PARSABLE)
static void
gdata_entry_class_init (GDataEntryClass *klass)
@@ -99,8 +99,6 @@ gdata_entry_class_init (GDataEntryClass *klass)
GObjectClass *gobject_class = G_OBJECT_CLASS (klass);
GDataParsableClass *parsable_class = GDATA_PARSABLE_CLASS (klass);
- g_type_class_add_private (klass, sizeof (GDataEntryPrivate));
-
gobject_class->constructed = gdata_entry_constructed;
gobject_class->get_property = gdata_entry_get_property;
gobject_class->set_property = gdata_entry_set_property;
@@ -272,7 +270,7 @@ gdata_entry_class_init (GDataEntryClass *klass)
static void
gdata_entry_init (GDataEntry *self)
{
- self->priv = G_TYPE_INSTANCE_GET_PRIVATE (self, GDATA_TYPE_ENTRY, GDataEntryPrivate);
+ self->priv = gdata_entry_get_instance_private (self);
self->priv->updated = -1;
self->priv->published = -1;
}
diff --git a/gdata/gdata-feed.c b/gdata/gdata-feed.c
index c1e6aa93..e3777543 100644
--- a/gdata/gdata-feed.c
+++ b/gdata/gdata-feed.c
@@ -97,7 +97,7 @@ enum {
PROP_NEXT_PAGE_TOKEN,
};
-G_DEFINE_TYPE (GDataFeed, gdata_feed, GDATA_TYPE_PARSABLE)
+G_DEFINE_TYPE_WITH_PRIVATE (GDataFeed, gdata_feed, GDATA_TYPE_PARSABLE)
static void
gdata_feed_class_init (GDataFeedClass *klass)
@@ -105,8 +105,6 @@ gdata_feed_class_init (GDataFeedClass *klass)
GObjectClass *gobject_class = G_OBJECT_CLASS (klass);
GDataParsableClass *parsable_class = GDATA_PARSABLE_CLASS (klass);
- g_type_class_add_private (klass, sizeof (GDataFeedPrivate));
-
gobject_class->get_property = gdata_feed_get_property;
gobject_class->dispose = gdata_feed_dispose;
gobject_class->finalize = gdata_feed_finalize;
@@ -319,7 +317,7 @@ gdata_feed_class_init (GDataFeedClass *klass)
static void
gdata_feed_init (GDataFeed *self)
{
- self->priv = G_TYPE_INSTANCE_GET_PRIVATE (self, GDATA_TYPE_FEED, GDataFeedPrivate);
+ self->priv = gdata_feed_get_instance_private (self);
self->priv->updated = -1;
}
diff --git a/gdata/gdata-goa-authorizer.c b/gdata/gdata-goa-authorizer.c
index a5e650d8..b6b33c71 100644
--- a/gdata/gdata-goa-authorizer.c
+++ b/gdata/gdata-goa-authorizer.c
@@ -96,6 +96,7 @@ enum {
};
G_DEFINE_TYPE_WITH_CODE (GDataGoaAuthorizer, gdata_goa_authorizer, G_TYPE_OBJECT,
+ G_ADD_PRIVATE (GDataGoaAuthorizer)
G_IMPLEMENT_INTERFACE (GDATA_TYPE_AUTHORIZER, gdata_goa_authorizer_interface_init))
static void
@@ -324,8 +325,6 @@ gdata_goa_authorizer_class_init (GDataGoaAuthorizerClass *class)
{
GObjectClass *object_class;
- g_type_class_add_private (class, sizeof (GDataGoaAuthorizerPrivate));
-
object_class = G_OBJECT_CLASS (class);
object_class->set_property = gdata_goa_authorizer_set_property;
object_class->get_property = gdata_goa_authorizer_get_property;
@@ -360,7 +359,7 @@ gdata_goa_authorizer_init (GDataGoaAuthorizer *authorizer)
authorization_domains = g_hash_table_new_full ((GHashFunc) g_direct_hash, (GEqualFunc) g_direct_equal,
(GDestroyNotify) g_object_unref, (GDestroyNotify)
NULL);
- authorizer->priv = G_TYPE_INSTANCE_GET_PRIVATE (authorizer, GDATA_TYPE_GOA_AUTHORIZER,
GDataGoaAuthorizerPrivate);
+ authorizer->priv = gdata_goa_authorizer_get_instance_private (authorizer);
authorizer->priv->authorization_domains = authorization_domains;
}
diff --git a/gdata/gdata-oauth1-authorizer.c b/gdata/gdata-oauth1-authorizer.c
index 09d766ec..7b857ac0 100644
--- a/gdata/gdata-oauth1-authorizer.c
+++ b/gdata/gdata-oauth1-authorizer.c
@@ -199,6 +199,7 @@ enum {
};
G_DEFINE_TYPE_WITH_CODE (GDataOAuth1Authorizer, gdata_oauth1_authorizer, G_TYPE_OBJECT,
+ G_ADD_PRIVATE (GDataOAuth1Authorizer)
G_IMPLEMENT_INTERFACE (GDATA_TYPE_AUTHORIZER, authorizer_init))
static void
@@ -206,8 +207,6 @@ gdata_oauth1_authorizer_class_init (GDataOAuth1AuthorizerClass *klass)
{
GObjectClass *gobject_class = G_OBJECT_CLASS (klass);
- g_type_class_add_private (klass, sizeof (GDataOAuth1AuthorizerPrivate));
-
gobject_class->get_property = get_property;
gobject_class->set_property = set_property;
gobject_class->dispose = dispose;
@@ -303,7 +302,7 @@ authorizer_init (GDataAuthorizerInterface *iface)
static void
gdata_oauth1_authorizer_init (GDataOAuth1Authorizer *self)
{
- self->priv = G_TYPE_INSTANCE_GET_PRIVATE (self, GDATA_TYPE_OAUTH1_AUTHORIZER,
GDataOAuth1AuthorizerPrivate);
+ self->priv = gdata_oauth1_authorizer_get_instance_private (self);
/* Set up the authorizer's mutex */
g_mutex_init (&(self->priv->mutex));
diff --git a/gdata/gdata-oauth2-authorizer.c b/gdata/gdata-oauth2-authorizer.c
index a08a265f..b81f0d42 100644
--- a/gdata/gdata-oauth2-authorizer.c
+++ b/gdata/gdata-oauth2-authorizer.c
@@ -213,6 +213,7 @@ enum {
G_DEFINE_TYPE_WITH_CODE (GDataOAuth2Authorizer, gdata_oauth2_authorizer,
G_TYPE_OBJECT,
+ G_ADD_PRIVATE (GDataOAuth2Authorizer)
G_IMPLEMENT_INTERFACE (GDATA_TYPE_AUTHORIZER,
authorizer_init))
@@ -221,8 +222,6 @@ gdata_oauth2_authorizer_class_init (GDataOAuth2AuthorizerClass *klass)
{
GObjectClass *gobject_class = G_OBJECT_CLASS (klass);
- g_type_class_add_private (klass, sizeof (GDataOAuth2AuthorizerPrivate));
-
gobject_class->get_property = get_property;
gobject_class->set_property = set_property;
gobject_class->dispose = dispose;
@@ -402,9 +401,7 @@ authorizer_init (GDataAuthorizerInterface *iface)
static void
gdata_oauth2_authorizer_init (GDataOAuth2Authorizer *self)
{
- self->priv = G_TYPE_INSTANCE_GET_PRIVATE (self,
- GDATA_TYPE_OAUTH2_AUTHORIZER,
- GDataOAuth2AuthorizerPrivate);
+ self->priv = gdata_oauth2_authorizer_get_instance_private (self);
/* Set up the authorizer's mutex */
g_mutex_init (&self->priv->mutex);
diff --git a/gdata/gdata-parsable.c b/gdata/gdata-parsable.c
index 80b1a102..6db9e429 100644
--- a/gdata/gdata-parsable.c
+++ b/gdata/gdata-parsable.c
@@ -70,15 +70,13 @@ enum {
PROP_CONSTRUCTED_FROM_XML = 1,
};
-G_DEFINE_ABSTRACT_TYPE (GDataParsable, gdata_parsable, G_TYPE_OBJECT)
+G_DEFINE_ABSTRACT_TYPE_WITH_PRIVATE (GDataParsable, gdata_parsable, G_TYPE_OBJECT)
static void
gdata_parsable_class_init (GDataParsableClass *klass)
{
GObjectClass *gobject_class = G_OBJECT_CLASS (klass);
- g_type_class_add_private (klass, sizeof (GDataParsablePrivate));
-
gobject_class->get_property = gdata_parsable_get_property;
gobject_class->set_property = gdata_parsable_set_property;
gobject_class->finalize = gdata_parsable_finalize;
@@ -104,7 +102,7 @@ gdata_parsable_class_init (GDataParsableClass *klass)
static void
gdata_parsable_init (GDataParsable *self)
{
- self->priv = G_TYPE_INSTANCE_GET_PRIVATE (self, GDATA_TYPE_PARSABLE, GDataParsablePrivate);
+ self->priv = gdata_parsable_get_instance_private (self);
self->priv->extra_xml = g_string_new ("");
self->priv->extra_namespaces = g_hash_table_new_full (g_str_hash, g_str_equal, g_free, g_free);
diff --git a/gdata/gdata-query.c b/gdata/gdata-query.c
index e2d59486..458cab46 100644
--- a/gdata/gdata-query.c
+++ b/gdata/gdata-query.c
@@ -117,15 +117,13 @@ enum {
PROP_ETAG
};
-G_DEFINE_TYPE (GDataQuery, gdata_query, G_TYPE_OBJECT)
+G_DEFINE_TYPE_WITH_PRIVATE (GDataQuery, gdata_query, G_TYPE_OBJECT)
static void
gdata_query_class_init (GDataQueryClass *klass)
{
GObjectClass *gobject_class = G_OBJECT_CLASS (klass);
- g_type_class_add_private (klass, sizeof (GDataQueryPrivate));
-
gobject_class->set_property = gdata_query_set_property;
gobject_class->get_property = gdata_query_get_property;
gobject_class->finalize = gdata_query_finalize;
@@ -305,7 +303,7 @@ gdata_query_class_init (GDataQueryClass *klass)
static void
gdata_query_init (GDataQuery *self)
{
- self->priv = G_TYPE_INSTANCE_GET_PRIVATE (self, GDATA_TYPE_QUERY, GDataQueryPrivate);
+ self->priv = gdata_query_get_instance_private (self);
self->priv->updated_min = -1;
self->priv->updated_max = -1;
self->priv->published_min = -1;
diff --git a/gdata/gdata-service.c b/gdata/gdata-service.c
index 3597b13f..fce970ec 100644
--- a/gdata/gdata-service.c
+++ b/gdata/gdata-service.c
@@ -105,15 +105,13 @@ enum {
PROP_PROXY_RESOLVER,
};
-G_DEFINE_TYPE (GDataService, gdata_service, G_TYPE_OBJECT)
+G_DEFINE_TYPE_WITH_PRIVATE (GDataService, gdata_service, G_TYPE_OBJECT)
static void
gdata_service_class_init (GDataServiceClass *klass)
{
GObjectClass *gobject_class = G_OBJECT_CLASS (klass);
- g_type_class_add_private (klass, sizeof (GDataServicePrivate));
-
gobject_class->set_property = gdata_service_set_property;
gobject_class->get_property = gdata_service_get_property;
gobject_class->dispose = gdata_service_dispose;
@@ -220,7 +218,7 @@ gdata_service_class_init (GDataServiceClass *klass)
static void
gdata_service_init (GDataService *self)
{
- self->priv = G_TYPE_INSTANCE_GET_PRIVATE (self, GDATA_TYPE_SERVICE, GDataServicePrivate);
+ self->priv = gdata_service_get_instance_private (self);
self->priv->session = _gdata_service_build_session ();
/* Log handling for all message types except debug */
diff --git a/gdata/gdata-upload-stream.c b/gdata/gdata-upload-stream.c
index 85738fd3..71e8b71c 100644
--- a/gdata/gdata-upload-stream.c
+++ b/gdata/gdata-upload-stream.c
@@ -242,7 +242,7 @@ enum {
PROP_CONTENT_LENGTH,
};
-G_DEFINE_TYPE (GDataUploadStream, gdata_upload_stream, G_TYPE_OUTPUT_STREAM)
+G_DEFINE_TYPE_WITH_PRIVATE (GDataUploadStream, gdata_upload_stream, G_TYPE_OUTPUT_STREAM)
static void
gdata_upload_stream_class_init (GDataUploadStreamClass *klass)
@@ -250,8 +250,6 @@ gdata_upload_stream_class_init (GDataUploadStreamClass *klass)
GObjectClass *gobject_class = G_OBJECT_CLASS (klass);
GOutputStreamClass *stream_class = G_OUTPUT_STREAM_CLASS (klass);
- g_type_class_add_private (klass, sizeof (GDataUploadStreamPrivate));
-
gobject_class->constructed = gdata_upload_stream_constructed;
gobject_class->dispose = gdata_upload_stream_dispose;
gobject_class->finalize = gdata_upload_stream_finalize;
@@ -397,7 +395,7 @@ gdata_upload_stream_class_init (GDataUploadStreamClass *klass)
static void
gdata_upload_stream_init (GDataUploadStream *self)
{
- self->priv = G_TYPE_INSTANCE_GET_PRIVATE (self, GDATA_TYPE_UPLOAD_STREAM, GDataUploadStreamPrivate);
+ self->priv = gdata_upload_stream_get_instance_private (self);
self->priv->buffer = gdata_buffer_new ();
g_mutex_init (&(self->priv->write_mutex));
g_cond_init (&(self->priv->write_cond));
diff --git a/gdata/georss/gdata-georss-where.c b/gdata/georss/gdata-georss-where.c
index 8673c261..7a7aa5c2 100644
--- a/gdata/georss/gdata-georss-where.c
+++ b/gdata/georss/gdata-georss-where.c
@@ -54,15 +54,13 @@ struct _GDataGeoRSSWherePrivate {
gdouble longitude;
};
-G_DEFINE_TYPE (GDataGeoRSSWhere, gdata_georss_where, GDATA_TYPE_PARSABLE)
+G_DEFINE_TYPE_WITH_PRIVATE (GDataGeoRSSWhere, gdata_georss_where, GDATA_TYPE_PARSABLE)
static void
gdata_georss_where_class_init (GDataGeoRSSWhereClass *klass)
{
GDataParsableClass *parsable_class = GDATA_PARSABLE_CLASS (klass);
- g_type_class_add_private (klass, sizeof (GDataGeoRSSWherePrivate));
-
parsable_class->get_xml = get_xml;
parsable_class->parse_xml = parse_xml;
parsable_class->get_namespaces = get_namespaces;
@@ -73,7 +71,7 @@ gdata_georss_where_class_init (GDataGeoRSSWhereClass *klass)
static void
gdata_georss_where_init (GDataGeoRSSWhere *self)
{
- self->priv = G_TYPE_INSTANCE_GET_PRIVATE (self, GDATA_TYPE_GEORSS_WHERE, GDataGeoRSSWherePrivate);
+ self->priv = gdata_georss_where_get_instance_private (self);
self->priv->latitude = G_MAXDOUBLE;
self->priv->longitude = G_MAXDOUBLE;
diff --git a/gdata/media/gdata-media-category.c b/gdata/media/gdata-media-category.c
index da7e1564..228f5e2b 100644
--- a/gdata/media/gdata-media-category.c
+++ b/gdata/media/gdata-media-category.c
@@ -58,7 +58,7 @@ enum {
PROP_LABEL
};
-G_DEFINE_TYPE (GDataMediaCategory, gdata_media_category, GDATA_TYPE_PARSABLE)
+G_DEFINE_TYPE_WITH_PRIVATE (GDataMediaCategory, gdata_media_category, GDATA_TYPE_PARSABLE)
static void
gdata_media_category_class_init (GDataMediaCategoryClass *klass)
@@ -66,8 +66,6 @@ gdata_media_category_class_init (GDataMediaCategoryClass *klass)
GObjectClass *gobject_class = G_OBJECT_CLASS (klass);
GDataParsableClass *parsable_class = GDATA_PARSABLE_CLASS (klass);
- g_type_class_add_private (klass, sizeof (GDataMediaCategoryPrivate));
-
gobject_class->get_property = gdata_media_category_get_property;
gobject_class->set_property = gdata_media_category_set_property;
gobject_class->finalize = gdata_media_category_finalize;
@@ -129,7 +127,7 @@ gdata_media_category_class_init (GDataMediaCategoryClass *klass)
static void
gdata_media_category_init (GDataMediaCategory *self)
{
- self->priv = G_TYPE_INSTANCE_GET_PRIVATE (self, GDATA_TYPE_MEDIA_CATEGORY, GDataMediaCategoryPrivate);
+ self->priv = gdata_media_category_get_instance_private (self);
}
static void
diff --git a/gdata/media/gdata-media-content.c b/gdata/media/gdata-media-content.c
index 50a35d34..bd2adc00 100644
--- a/gdata/media/gdata-media-content.c
+++ b/gdata/media/gdata-media-content.c
@@ -71,7 +71,7 @@ enum {
PROP_WIDTH
};
-G_DEFINE_TYPE (GDataMediaContent, gdata_media_content, GDATA_TYPE_PARSABLE)
+G_DEFINE_TYPE_WITH_PRIVATE (GDataMediaContent, gdata_media_content, GDATA_TYPE_PARSABLE)
static void
gdata_media_content_class_init (GDataMediaContentClass *klass)
@@ -79,8 +79,6 @@ gdata_media_content_class_init (GDataMediaContentClass *klass)
GObjectClass *gobject_class = G_OBJECT_CLASS (klass);
GDataParsableClass *parsable_class = GDATA_PARSABLE_CLASS (klass);
- g_type_class_add_private (klass, sizeof (GDataMediaContentPrivate));
-
gobject_class->get_property = gdata_media_content_get_property;
gobject_class->finalize = gdata_media_content_finalize;
@@ -229,7 +227,7 @@ gdata_media_content_class_init (GDataMediaContentClass *klass)
static void
gdata_media_content_init (GDataMediaContent *self)
{
- self->priv = G_TYPE_INSTANCE_GET_PRIVATE (self, GDATA_TYPE_MEDIA_CONTENT, GDataMediaContentPrivate);
+ self->priv = gdata_media_content_get_instance_private (self);
}
static void
diff --git a/gdata/media/gdata-media-credit.c b/gdata/media/gdata-media-credit.c
index de206779..d4f85391 100644
--- a/gdata/media/gdata-media-credit.c
+++ b/gdata/media/gdata-media-credit.c
@@ -57,7 +57,7 @@ enum {
PROP_ROLE
};
-G_DEFINE_TYPE (GDataMediaCredit, gdata_media_credit, GDATA_TYPE_PARSABLE)
+G_DEFINE_TYPE_WITH_PRIVATE (GDataMediaCredit, gdata_media_credit, GDATA_TYPE_PARSABLE)
static void
gdata_media_credit_class_init (GDataMediaCreditClass *klass)
@@ -65,8 +65,6 @@ gdata_media_credit_class_init (GDataMediaCreditClass *klass)
GObjectClass *gobject_class = G_OBJECT_CLASS (klass);
GDataParsableClass *parsable_class = GDATA_PARSABLE_CLASS (klass);
- g_type_class_add_private (klass, sizeof (GDataMediaCreditPrivate));
-
gobject_class->get_property = gdata_media_credit_get_property;
gobject_class->finalize = gdata_media_credit_finalize;
@@ -125,7 +123,7 @@ gdata_media_credit_class_init (GDataMediaCreditClass *klass)
static void
gdata_media_credit_init (GDataMediaCredit *self)
{
- self->priv = G_TYPE_INSTANCE_GET_PRIVATE (self, GDATA_TYPE_MEDIA_CREDIT, GDataMediaCreditPrivate);
+ self->priv = gdata_media_credit_get_instance_private (self);
}
static void
diff --git a/gdata/media/gdata-media-group.c b/gdata/media/gdata-media-group.c
index 6d0db9b6..4469433c 100644
--- a/gdata/media/gdata-media-group.c
+++ b/gdata/media/gdata-media-group.c
@@ -66,7 +66,7 @@ struct _GDataMediaGroupPrivate {
gchar *description;
};
-G_DEFINE_TYPE (GDataMediaGroup, gdata_media_group, GDATA_TYPE_PARSABLE)
+G_DEFINE_TYPE_WITH_PRIVATE (GDataMediaGroup, gdata_media_group, GDATA_TYPE_PARSABLE)
static void
gdata_media_group_class_init (GDataMediaGroupClass *klass)
@@ -74,8 +74,6 @@ gdata_media_group_class_init (GDataMediaGroupClass *klass)
GObjectClass *gobject_class = G_OBJECT_CLASS (klass);
GDataParsableClass *parsable_class = GDATA_PARSABLE_CLASS (klass);
- g_type_class_add_private (klass, sizeof (GDataMediaGroupPrivate));
-
gobject_class->dispose = gdata_media_group_dispose;
gobject_class->finalize = gdata_media_group_finalize;
@@ -89,7 +87,7 @@ gdata_media_group_class_init (GDataMediaGroupClass *klass)
static void
gdata_media_group_init (GDataMediaGroup *self)
{
- self->priv = G_TYPE_INSTANCE_GET_PRIVATE (self, GDATA_TYPE_MEDIA_GROUP, GDataMediaGroupPrivate);
+ self->priv = gdata_media_group_get_instance_private (self);
self->priv->restricted_countries = g_hash_table_new_full (g_str_hash, g_str_equal, g_free, NULL);
}
diff --git a/gdata/media/gdata-media-thumbnail.c b/gdata/media/gdata-media-thumbnail.c
index e8b48066..41ccd604 100644
--- a/gdata/media/gdata-media-thumbnail.c
+++ b/gdata/media/gdata-media-thumbnail.c
@@ -61,7 +61,7 @@ enum {
PROP_TIME
};
-G_DEFINE_TYPE (GDataMediaThumbnail, gdata_media_thumbnail, GDATA_TYPE_PARSABLE)
+G_DEFINE_TYPE_WITH_PRIVATE (GDataMediaThumbnail, gdata_media_thumbnail, GDATA_TYPE_PARSABLE)
static void
gdata_media_thumbnail_class_init (GDataMediaThumbnailClass *klass)
@@ -69,8 +69,6 @@ gdata_media_thumbnail_class_init (GDataMediaThumbnailClass *klass)
GObjectClass *gobject_class = G_OBJECT_CLASS (klass);
GDataParsableClass *parsable_class = GDATA_PARSABLE_CLASS (klass);
- g_type_class_add_private (klass, sizeof (GDataMediaThumbnailPrivate));
-
gobject_class->get_property = gdata_media_thumbnail_get_property;
gobject_class->finalize = gdata_media_thumbnail_finalize;
@@ -144,7 +142,7 @@ gdata_media_thumbnail_class_init (GDataMediaThumbnailClass *klass)
static void
gdata_media_thumbnail_init (GDataMediaThumbnail *self)
{
- self->priv = G_TYPE_INSTANCE_GET_PRIVATE (self, GDATA_TYPE_MEDIA_THUMBNAIL,
GDataMediaThumbnailPrivate);
+ self->priv = gdata_media_thumbnail_get_instance_private (self);
}
static void
diff --git a/gdata/services/calendar/gdata-calendar-calendar.c
b/gdata/services/calendar/gdata-calendar-calendar.c
index c7815588..1fefb5ce 100644
--- a/gdata/services/calendar/gdata-calendar-calendar.c
+++ b/gdata/services/calendar/gdata-calendar-calendar.c
@@ -116,6 +116,7 @@ enum {
};
G_DEFINE_TYPE_WITH_CODE (GDataCalendarCalendar, gdata_calendar_calendar, GDATA_TYPE_ENTRY,
+ G_ADD_PRIVATE (GDataCalendarCalendar)
G_IMPLEMENT_INTERFACE (GDATA_TYPE_ACCESS_HANDLER,
gdata_calendar_calendar_access_handler_init))
static void
@@ -125,8 +126,6 @@ gdata_calendar_calendar_class_init (GDataCalendarCalendarClass *klass)
GDataParsableClass *parsable_class = GDATA_PARSABLE_CLASS (klass);
GDataEntryClass *entry_class = GDATA_ENTRY_CLASS (klass);
- g_type_class_add_private (klass, sizeof (GDataCalendarCalendarPrivate));
-
gobject_class->set_property = gdata_calendar_calendar_set_property;
gobject_class->get_property = gdata_calendar_calendar_get_property;
gobject_class->finalize = gdata_calendar_calendar_finalize;
@@ -337,7 +336,7 @@ gdata_calendar_calendar_access_handler_init (GDataAccessHandlerIface *iface)
static void
gdata_calendar_calendar_init (GDataCalendarCalendar *self)
{
- self->priv = G_TYPE_INSTANCE_GET_PRIVATE (self, GDATA_TYPE_CALENDAR_CALENDAR,
GDataCalendarCalendarPrivate);
+ self->priv = gdata_calendar_calendar_get_instance_private (self);
}
static void
diff --git a/gdata/services/calendar/gdata-calendar-event.c b/gdata/services/calendar/gdata-calendar-event.c
index d11f0455..a3a4d713 100644
--- a/gdata/services/calendar/gdata-calendar-event.c
+++ b/gdata/services/calendar/gdata-calendar-event.c
@@ -150,7 +150,7 @@ enum {
PROP_ORIGINAL_EVENT_URI
};
-G_DEFINE_TYPE (GDataCalendarEvent, gdata_calendar_event, GDATA_TYPE_ENTRY)
+G_DEFINE_TYPE_WITH_PRIVATE (GDataCalendarEvent, gdata_calendar_event, GDATA_TYPE_ENTRY)
static void
gdata_calendar_event_class_init (GDataCalendarEventClass *klass)
@@ -159,8 +159,6 @@ gdata_calendar_event_class_init (GDataCalendarEventClass *klass)
GDataParsableClass *parsable_class = GDATA_PARSABLE_CLASS (klass);
GDataEntryClass *entry_class = GDATA_ENTRY_CLASS (klass);
- g_type_class_add_private (klass, sizeof (GDataCalendarEventPrivate));
-
gobject_class->constructor = gdata_calendar_event_constructor;
gobject_class->get_property = gdata_calendar_event_get_property;
gobject_class->set_property = gdata_calendar_event_set_property;
@@ -362,7 +360,7 @@ gdata_calendar_event_class_init (GDataCalendarEventClass *klass)
static void
gdata_calendar_event_init (GDataCalendarEvent *self)
{
- self->priv = G_TYPE_INSTANCE_GET_PRIVATE (self, GDATA_TYPE_CALENDAR_EVENT, GDataCalendarEventPrivate);
+ self->priv = gdata_calendar_event_get_instance_private (self);
self->priv->edited = -1;
}
diff --git a/gdata/services/calendar/gdata-calendar-query.c b/gdata/services/calendar/gdata-calendar-query.c
index a64960cd..37779bbe 100644
--- a/gdata/services/calendar/gdata-calendar-query.c
+++ b/gdata/services/calendar/gdata-calendar-query.c
@@ -119,7 +119,7 @@ enum {
PROP_SHOW_DELETED,
};
-G_DEFINE_TYPE (GDataCalendarQuery, gdata_calendar_query, GDATA_TYPE_QUERY)
+G_DEFINE_TYPE_WITH_PRIVATE (GDataCalendarQuery, gdata_calendar_query, GDATA_TYPE_QUERY)
static void
gdata_calendar_query_class_init (GDataCalendarQueryClass *klass)
@@ -127,8 +127,6 @@ gdata_calendar_query_class_init (GDataCalendarQueryClass *klass)
GObjectClass *gobject_class = G_OBJECT_CLASS (klass);
GDataQueryClass *query_class = GDATA_QUERY_CLASS (klass);
- g_type_class_add_private (klass, sizeof (GDataCalendarQueryPrivate));
-
gobject_class->set_property = gdata_calendar_query_set_property;
gobject_class->get_property = gdata_calendar_query_get_property;
gobject_class->finalize = gdata_calendar_query_finalize;
@@ -290,7 +288,7 @@ gdata_calendar_query_class_init (GDataCalendarQueryClass *klass)
static void
gdata_calendar_query_init (GDataCalendarQuery *self)
{
- self->priv = G_TYPE_INSTANCE_GET_PRIVATE (self, GDATA_TYPE_CALENDAR_QUERY, GDataCalendarQueryPrivate);
+ self->priv = gdata_calendar_query_get_instance_private (self);
self->priv->recurrence_expansion_start = -1;
self->priv->recurrence_expansion_end = -1;
self->priv->start_min = -1;
diff --git a/gdata/services/contacts/gdata-contacts-contact.c
b/gdata/services/contacts/gdata-contacts-contact.c
index fc577f3d..4f511315 100644
--- a/gdata/services/contacts/gdata-contacts-contact.c
+++ b/gdata/services/contacts/gdata-contacts-contact.c
@@ -234,7 +234,7 @@ enum {
PROP_FILE_AS,
};
-G_DEFINE_TYPE (GDataContactsContact, gdata_contacts_contact, GDATA_TYPE_ENTRY)
+G_DEFINE_TYPE_WITH_PRIVATE (GDataContactsContact, gdata_contacts_contact, GDATA_TYPE_ENTRY)
static void
gdata_contacts_contact_class_init (GDataContactsContactClass *klass)
@@ -243,8 +243,6 @@ gdata_contacts_contact_class_init (GDataContactsContactClass *klass)
GDataParsableClass *parsable_class = GDATA_PARSABLE_CLASS (klass);
GDataEntryClass *entry_class = GDATA_ENTRY_CLASS (klass);
- g_type_class_add_private (klass, sizeof (GDataContactsContactPrivate));
-
gobject_class->constructor = gdata_contacts_contact_constructor;
gobject_class->get_property = gdata_contacts_contact_get_property;
gobject_class->set_property = gdata_contacts_contact_set_property;
@@ -533,7 +531,7 @@ notify_full_name_cb (GObject *gobject, GParamSpec *pspec, GDataContactsContact *
static void
gdata_contacts_contact_init (GDataContactsContact *self)
{
- self->priv = G_TYPE_INSTANCE_GET_PRIVATE (self, GDATA_TYPE_CONTACTS_CONTACT,
GDataContactsContactPrivate);
+ self->priv = gdata_contacts_contact_get_instance_private (self);
self->priv->extended_properties = g_hash_table_new_full (g_str_hash, g_str_equal, g_free, g_free);
self->priv->user_defined_fields = g_hash_table_new_full (g_str_hash, g_str_equal, g_free, g_free);
self->priv->groups = g_hash_table_new_full (g_str_hash, g_str_equal, g_free, NULL);
diff --git a/gdata/services/contacts/gdata-contacts-group.c b/gdata/services/contacts/gdata-contacts-group.c
index d8ab4a46..055f4255 100644
--- a/gdata/services/contacts/gdata-contacts-group.c
+++ b/gdata/services/contacts/gdata-contacts-group.c
@@ -130,7 +130,7 @@ enum {
PROP_SYSTEM_GROUP_ID
};
-G_DEFINE_TYPE (GDataContactsGroup, gdata_contacts_group, GDATA_TYPE_ENTRY)
+G_DEFINE_TYPE_WITH_PRIVATE (GDataContactsGroup, gdata_contacts_group, GDATA_TYPE_ENTRY)
static void
gdata_contacts_group_class_init (GDataContactsGroupClass *klass)
@@ -139,8 +139,6 @@ gdata_contacts_group_class_init (GDataContactsGroupClass *klass)
GDataParsableClass *parsable_class = GDATA_PARSABLE_CLASS (klass);
GDataEntryClass *entry_class = GDATA_ENTRY_CLASS (klass);
- g_type_class_add_private (klass, sizeof (GDataContactsGroupPrivate));
-
gobject_class->constructor = gdata_contacts_group_constructor;
gobject_class->get_property = gdata_contacts_group_get_property;
gobject_class->finalize = gdata_contacts_group_finalize;
@@ -225,7 +223,7 @@ notify_content_cb (GObject *gobject, GParamSpec *pspec, GDataContactsGroup *self
static void
gdata_contacts_group_init (GDataContactsGroup *self)
{
- self->priv = G_TYPE_INSTANCE_GET_PRIVATE (self, GDATA_TYPE_CONTACTS_GROUP, GDataContactsGroupPrivate);
+ self->priv =gdata_contacts_group_get_instance_private (self);
self->priv->extended_properties = g_hash_table_new_full (g_str_hash, g_str_equal, g_free, g_free);
self->priv->edited = -1;
diff --git a/gdata/services/contacts/gdata-contacts-query.c b/gdata/services/contacts/gdata-contacts-query.c
index 3f3fab58..d0256559 100644
--- a/gdata/services/contacts/gdata-contacts-query.c
+++ b/gdata/services/contacts/gdata-contacts-query.c
@@ -105,7 +105,7 @@ enum {
PROP_GROUP
};
-G_DEFINE_TYPE (GDataContactsQuery, gdata_contacts_query, GDATA_TYPE_QUERY)
+G_DEFINE_TYPE_WITH_PRIVATE (GDataContactsQuery, gdata_contacts_query, GDATA_TYPE_QUERY)
static void
gdata_contacts_query_class_init (GDataContactsQueryClass *klass)
@@ -113,8 +113,6 @@ gdata_contacts_query_class_init (GDataContactsQueryClass *klass)
GObjectClass *gobject_class = G_OBJECT_CLASS (klass);
GDataQueryClass *query_class = GDATA_QUERY_CLASS (klass);
- g_type_class_add_private (klass, sizeof (GDataContactsQueryPrivate));
-
gobject_class->set_property = gdata_contacts_query_set_property;
gobject_class->get_property = gdata_contacts_query_get_property;
gobject_class->finalize = gdata_contacts_query_finalize;
@@ -180,7 +178,7 @@ gdata_contacts_query_class_init (GDataContactsQueryClass *klass)
static void
gdata_contacts_query_init (GDataContactsQuery *self)
{
- self->priv = G_TYPE_INSTANCE_GET_PRIVATE (self, GDATA_TYPE_CONTACTS_QUERY, GDataContactsQueryPrivate);
+ self->priv = gdata_contacts_query_get_instance_private (self);
/* https://developers.google.com/google-apps/contacts/v3/reference#contacts-query-parameters-reference
* indicates that the Contacts service uses index pagination, but all
diff --git a/gdata/services/documents/gdata-documents-document.c
b/gdata/services/documents/gdata-documents-document.c
index f5d94cd1..bb97edae 100644
--- a/gdata/services/documents/gdata-documents-document.c
+++ b/gdata/services/documents/gdata-documents-document.c
@@ -220,7 +220,7 @@ struct _GDataDocumentsDocumentPrivate {
GHashTable *export_links; /* owned string → owned string */
};
-G_DEFINE_TYPE (GDataDocumentsDocument, gdata_documents_document, GDATA_TYPE_DOCUMENTS_ENTRY)
+G_DEFINE_TYPE_WITH_PRIVATE (GDataDocumentsDocument, gdata_documents_document, GDATA_TYPE_DOCUMENTS_ENTRY)
static void
gdata_documents_document_class_init (GDataDocumentsDocumentClass *klass)
@@ -229,8 +229,6 @@ gdata_documents_document_class_init (GDataDocumentsDocumentClass *klass)
GDataParsableClass *parsable_class = GDATA_PARSABLE_CLASS (klass);
GDataEntryClass *entry_class = GDATA_ENTRY_CLASS (klass);
- g_type_class_add_private (klass, sizeof (GDataDocumentsDocumentPrivate));
-
gobject_class->finalize = gdata_documents_document_finalize;
parsable_class->parse_json = parse_json;
parsable_class->post_parse_json = post_parse_json;
@@ -240,7 +238,7 @@ gdata_documents_document_class_init (GDataDocumentsDocumentClass *klass)
static void
gdata_documents_document_init (GDataDocumentsDocument *self)
{
- self->priv = G_TYPE_INSTANCE_GET_PRIVATE (self, GDATA_TYPE_DOCUMENTS_DOCUMENT,
GDataDocumentsDocumentPrivate);
+ self->priv = gdata_documents_document_get_instance_private (self);
self->priv->export_links = g_hash_table_new_full (g_str_hash, g_str_equal, g_free, g_free);
}
diff --git a/gdata/services/documents/gdata-documents-entry.c
b/gdata/services/documents/gdata-documents-entry.c
index b9b1ffe2..5c225804 100644
--- a/gdata/services/documents/gdata-documents-entry.c
+++ b/gdata/services/documents/gdata-documents-entry.c
@@ -154,6 +154,7 @@ enum {
};
G_DEFINE_ABSTRACT_TYPE_WITH_CODE (GDataDocumentsEntry, gdata_documents_entry, GDATA_TYPE_ENTRY,
+ G_ADD_PRIVATE (GDataDocumentsEntry)
G_IMPLEMENT_INTERFACE (GDATA_TYPE_ACCESS_HANDLER,
gdata_documents_entry_access_handler_init))
static void
@@ -163,8 +164,6 @@ gdata_documents_entry_class_init (GDataDocumentsEntryClass *klass)
GDataParsableClass *parsable_class = GDATA_PARSABLE_CLASS (klass);
GDataEntryClass *entry_class = GDATA_ENTRY_CLASS (klass);
- g_type_class_add_private (klass, sizeof (GDataDocumentsEntryPrivate));
-
gobject_class->get_property = gdata_documents_entry_get_property;
gobject_class->set_property = gdata_documents_entry_set_property;
gobject_class->finalize = gdata_documents_entry_finalize;
@@ -403,7 +402,7 @@ gdata_documents_entry_access_handler_init (GDataAccessHandlerIface *iface)
static void
gdata_documents_entry_init (GDataDocumentsEntry *self)
{
- self->priv = G_TYPE_INSTANCE_GET_PRIVATE (self, GDATA_TYPE_DOCUMENTS_ENTRY,
GDataDocumentsEntryPrivate);
+ self->priv = gdata_documents_entry_get_instance_private (self);
self->priv->last_viewed = -1;
}
diff --git a/gdata/services/documents/gdata-documents-metadata.c
b/gdata/services/documents/gdata-documents-metadata.c
index f587af5a..ca5c49cc 100644
--- a/gdata/services/documents/gdata-documents-metadata.c
+++ b/gdata/services/documents/gdata-documents-metadata.c
@@ -56,7 +56,7 @@ enum {
PROP_QUOTA_USED,
};
-G_DEFINE_TYPE (GDataDocumentsMetadata, gdata_documents_metadata, GDATA_TYPE_PARSABLE)
+G_DEFINE_TYPE_WITH_PRIVATE (GDataDocumentsMetadata, gdata_documents_metadata, GDATA_TYPE_PARSABLE)
static void
gdata_documents_metadata_class_init (GDataDocumentsMetadataClass *klass)
@@ -64,8 +64,6 @@ gdata_documents_metadata_class_init (GDataDocumentsMetadataClass *klass)
GObjectClass *gobject_class = G_OBJECT_CLASS (klass);
GDataParsableClass *parsable_class = GDATA_PARSABLE_CLASS (klass);
- g_type_class_add_private (klass, sizeof (GDataDocumentsMetadataPrivate));
-
gobject_class->get_property = gdata_documents_metadata_get_property;
gobject_class->set_property = gdata_documents_metadata_set_property;
@@ -102,7 +100,7 @@ gdata_documents_metadata_class_init (GDataDocumentsMetadataClass *klass)
static void
gdata_documents_metadata_init (GDataDocumentsMetadata *self)
{
- self->priv = G_TYPE_INSTANCE_GET_PRIVATE (self, GDATA_TYPE_DOCUMENTS_METADATA,
GDataDocumentsMetadataPrivate);
+ self->priv = gdata_documents_metadata_get_instance_private (self);
}
static void
diff --git a/gdata/services/documents/gdata-documents-property.c
b/gdata/services/documents/gdata-documents-property.c
index c1d497d5..505afd11 100644
--- a/gdata/services/documents/gdata-documents-property.c
+++ b/gdata/services/documents/gdata-documents-property.c
@@ -66,7 +66,8 @@ enum {
};
G_DEFINE_TYPE_WITH_CODE (GDataDocumentsProperty, gdata_documents_property, GDATA_TYPE_PARSABLE,
- G_IMPLEMENT_INTERFACE (GDATA_TYPE_COMPARABLE,
gdata_documents_property_comparable_init))
+ G_ADD_PRIVATE (GDataDocumentsProperty)
+ G_IMPLEMENT_INTERFACE (GDATA_TYPE_COMPARABLE,
gdata_documents_property_comparable_init))
static void
gdata_documents_property_class_init (GDataDocumentsPropertyClass *klass)
@@ -74,8 +75,6 @@ gdata_documents_property_class_init (GDataDocumentsPropertyClass *klass)
GObjectClass *gobject_class = G_OBJECT_CLASS (klass);
GDataParsableClass *parsable_class = GDATA_PARSABLE_CLASS (klass);
- g_type_class_add_private (klass, sizeof (GDataDocumentsPropertyPrivate));
-
gobject_class->set_property = gdata_documents_property_set_property;
gobject_class->get_property = gdata_documents_property_get_property;
gobject_class->finalize = gdata_documents_property_finalize;
@@ -234,7 +233,7 @@ gdata_documents_property_comparable_init (GDataComparableIface *iface)
static void
gdata_documents_property_init (GDataDocumentsProperty *self)
{
- self->priv = G_TYPE_INSTANCE_GET_PRIVATE (self, GDATA_TYPE_DOCUMENTS_PROPERTY,
GDataDocumentsPropertyPrivate);
+ self->priv = gdata_documents_property_get_instance_private (self);
/* Google Drive sets the default value of a Property Resource to be an empty string (""),
* and visibility is %GDATA_DOCUMENTS_PROPERTY_VISIBILITY_PRIVATE by default */
diff --git a/gdata/services/documents/gdata-documents-query.c
b/gdata/services/documents/gdata-documents-query.c
index 0a5a8d4b..e589b524 100644
--- a/gdata/services/documents/gdata-documents-query.c
+++ b/gdata/services/documents/gdata-documents-query.c
@@ -120,7 +120,7 @@ enum {
PROP_TITLE
};
-G_DEFINE_TYPE (GDataDocumentsQuery, gdata_documents_query, GDATA_TYPE_QUERY)
+G_DEFINE_TYPE_WITH_PRIVATE (GDataDocumentsQuery, gdata_documents_query, GDATA_TYPE_QUERY)
static void
gdata_documents_query_class_init (GDataDocumentsQueryClass *klass)
@@ -128,8 +128,6 @@ gdata_documents_query_class_init (GDataDocumentsQueryClass *klass)
GObjectClass *gobject_class = G_OBJECT_CLASS (klass);
GDataQueryClass *query_class = GDATA_QUERY_CLASS (klass);
- g_type_class_add_private (klass, sizeof (GDataDocumentsQueryPrivate));
-
gobject_class->get_property = gdata_documents_query_get_property;
gobject_class->set_property = gdata_documents_query_set_property;
gobject_class->dispose = gdata_documents_query_dispose;
@@ -207,7 +205,7 @@ gdata_documents_query_class_init (GDataDocumentsQueryClass *klass)
static void
gdata_documents_query_init (GDataDocumentsQuery *self)
{
- self->priv = G_TYPE_INSTANCE_GET_PRIVATE (self, GDATA_TYPE_DOCUMENTS_QUERY,
GDataDocumentsQueryPrivate);
+ self->priv = gdata_documents_query_get_instance_private (self);
/* https://developers.google.com/drive/v3/reference/files/list#q */
_gdata_query_set_pagination_type (GDATA_QUERY (self),
diff --git a/gdata/services/documents/gdata-documents-upload-query.c
b/gdata/services/documents/gdata-documents-upload-query.c
index 383db176..e88bf8cb 100644
--- a/gdata/services/documents/gdata-documents-upload-query.c
+++ b/gdata/services/documents/gdata-documents-upload-query.c
@@ -157,15 +157,13 @@ enum {
PROP_CONVERT,
};
-G_DEFINE_TYPE (GDataDocumentsUploadQuery, gdata_documents_upload_query, G_TYPE_OBJECT)
+G_DEFINE_TYPE_WITH_PRIVATE (GDataDocumentsUploadQuery, gdata_documents_upload_query, G_TYPE_OBJECT)
static void
gdata_documents_upload_query_class_init (GDataDocumentsUploadQueryClass *klass)
{
GObjectClass *gobject_class = G_OBJECT_CLASS (klass);
- g_type_class_add_private (klass, sizeof (GDataDocumentsUploadQueryPrivate));
-
gobject_class->get_property = gdata_documents_upload_query_get_property;
gobject_class->set_property = gdata_documents_upload_query_set_property;
gobject_class->dispose = gdata_documents_upload_query_dispose;
@@ -209,7 +207,7 @@ gdata_documents_upload_query_class_init (GDataDocumentsUploadQueryClass *klass)
static void
gdata_documents_upload_query_init (GDataDocumentsUploadQuery *self)
{
- self->priv = G_TYPE_INSTANCE_GET_PRIVATE (self, GDATA_TYPE_DOCUMENTS_UPLOAD_QUERY,
GDataDocumentsUploadQueryPrivate);
+ self->priv = gdata_documents_upload_query_get_instance_private (self);
self->priv->convert = TRUE;
}
diff --git a/gdata/services/picasaweb/gdata-picasaweb-album.c
b/gdata/services/picasaweb/gdata-picasaweb-album.c
index cb55c04e..40fd8cfb 100644
--- a/gdata/services/picasaweb/gdata-picasaweb-album.c
+++ b/gdata/services/picasaweb/gdata-picasaweb-album.c
@@ -147,7 +147,7 @@ enum {
PROP_ALBUM_ID
};
-G_DEFINE_TYPE (GDataPicasaWebAlbum, gdata_picasaweb_album, GDATA_TYPE_ENTRY)
+G_DEFINE_TYPE_WITH_PRIVATE (GDataPicasaWebAlbum, gdata_picasaweb_album, GDATA_TYPE_ENTRY)
static void
gdata_picasaweb_album_class_init (GDataPicasaWebAlbumClass *klass)
@@ -156,8 +156,6 @@ gdata_picasaweb_album_class_init (GDataPicasaWebAlbumClass *klass)
GDataParsableClass *parsable_class = GDATA_PARSABLE_CLASS (klass);
GDataEntryClass *entry_class = GDATA_ENTRY_CLASS (klass);
- g_type_class_add_private (klass, sizeof (GDataPicasaWebAlbumPrivate));
-
gobject_class->constructor = gdata_picasaweb_album_constructor;
gobject_class->get_property = gdata_picasaweb_album_get_property;
gobject_class->set_property = gdata_picasaweb_album_set_property;
@@ -477,7 +475,7 @@ notify_visibility_cb (GDataPicasaWebAlbum *self, GParamSpec *pspec, gpointer use
static void
gdata_picasaweb_album_init (GDataPicasaWebAlbum *self)
{
- self->priv = G_TYPE_INSTANCE_GET_PRIVATE (self, GDATA_TYPE_PICASAWEB_ALBUM,
GDataPicasaWebAlbumPrivate);
+ self->priv = gdata_picasaweb_album_get_instance_private (self);
self->priv->media_group = g_object_new (GDATA_TYPE_MEDIA_GROUP, NULL);
self->priv->georss_where = g_object_new (GDATA_TYPE_GEORSS_WHERE, NULL);
self->priv->edited = -1;
diff --git a/gdata/services/picasaweb/gdata-picasaweb-file.c b/gdata/services/picasaweb/gdata-picasaweb-file.c
index d669d084..53aab33b 100644
--- a/gdata/services/picasaweb/gdata-picasaweb-file.c
+++ b/gdata/services/picasaweb/gdata-picasaweb-file.c
@@ -180,6 +180,7 @@ enum {
};
G_DEFINE_TYPE_WITH_CODE (GDataPicasaWebFile, gdata_picasaweb_file, GDATA_TYPE_ENTRY,
+ G_ADD_PRIVATE (GDataPicasaWebFile)
G_IMPLEMENT_INTERFACE (GDATA_TYPE_COMMENTABLE,
gdata_picasaweb_file_commentable_init))
static void
@@ -189,8 +190,6 @@ gdata_picasaweb_file_class_init (GDataPicasaWebFileClass *klass)
GDataParsableClass *parsable_class = GDATA_PARSABLE_CLASS (klass);
GDataEntryClass *entry_class = GDATA_ENTRY_CLASS (klass);
- g_type_class_add_private (klass, sizeof (GDataPicasaWebFilePrivate));
-
gobject_class->constructor = gdata_picasaweb_file_constructor;
gobject_class->get_property = gdata_picasaweb_file_get_property;
gobject_class->set_property = gdata_picasaweb_file_set_property;
@@ -667,7 +666,7 @@ notify_summary_cb (GDataPicasaWebFile *self, GParamSpec *pspec, gpointer user_da
static void
gdata_picasaweb_file_init (GDataPicasaWebFile *self)
{
- self->priv = G_TYPE_INSTANCE_GET_PRIVATE (self, GDATA_TYPE_PICASAWEB_FILE, GDataPicasaWebFilePrivate);
+ self->priv = gdata_picasaweb_file_get_instance_private (self);
self->priv->media_group = g_object_new (GDATA_TYPE_MEDIA_GROUP, NULL);
self->priv->exif_tags = g_object_new (GDATA_TYPE_EXIF_TAGS, NULL);
self->priv->georss_where = g_object_new (GDATA_TYPE_GEORSS_WHERE, NULL);
diff --git a/gdata/services/picasaweb/gdata-picasaweb-query.c
b/gdata/services/picasaweb/gdata-picasaweb-query.c
index 57851575..2b3f7576 100644
--- a/gdata/services/picasaweb/gdata-picasaweb-query.c
+++ b/gdata/services/picasaweb/gdata-picasaweb-query.c
@@ -71,7 +71,7 @@ enum {
PROP_LOCATION
};
-G_DEFINE_TYPE (GDataPicasaWebQuery, gdata_picasaweb_query, GDATA_TYPE_QUERY)
+G_DEFINE_TYPE_WITH_PRIVATE (GDataPicasaWebQuery, gdata_picasaweb_query, GDATA_TYPE_QUERY)
static void
gdata_picasaweb_query_class_init (GDataPicasaWebQueryClass *klass)
@@ -79,8 +79,6 @@ gdata_picasaweb_query_class_init (GDataPicasaWebQueryClass *klass)
GObjectClass *gobject_class = G_OBJECT_CLASS (klass);
GDataQueryClass *query_class = GDATA_QUERY_CLASS (klass);
- g_type_class_add_private (klass, sizeof (GDataPicasaWebQueryPrivate));
-
gobject_class->get_property = gdata_picasaweb_query_get_property;
gobject_class->set_property = gdata_picasaweb_query_set_property;
gobject_class->finalize = gdata_picasaweb_query_finalize;
@@ -166,7 +164,7 @@ gdata_picasaweb_query_class_init (GDataPicasaWebQueryClass *klass)
static void
gdata_picasaweb_query_init (GDataPicasaWebQuery *self)
{
- self->priv = G_TYPE_INSTANCE_GET_PRIVATE (self, GDATA_TYPE_PICASAWEB_QUERY,
GDataPicasaWebQueryPrivate);
+ self->priv = gdata_picasaweb_query_get_instance_private (self);
/* https://developers.google.com/picasa-web/docs/3.0/reference#Parameters */
_gdata_query_set_pagination_type (GDATA_QUERY (self),
diff --git a/gdata/services/picasaweb/gdata-picasaweb-user.c b/gdata/services/picasaweb/gdata-picasaweb-user.c
index 38db73f6..c2798b74 100644
--- a/gdata/services/picasaweb/gdata-picasaweb-user.c
+++ b/gdata/services/picasaweb/gdata-picasaweb-user.c
@@ -60,7 +60,7 @@ enum {
PROP_THUMBNAIL_URI
};
-G_DEFINE_TYPE (GDataPicasaWebUser, gdata_picasaweb_user, GDATA_TYPE_ENTRY)
+G_DEFINE_TYPE_WITH_PRIVATE (GDataPicasaWebUser, gdata_picasaweb_user, GDATA_TYPE_ENTRY)
static void
gdata_picasaweb_user_class_init (GDataPicasaWebUserClass *klass)
@@ -69,8 +69,6 @@ gdata_picasaweb_user_class_init (GDataPicasaWebUserClass *klass)
GDataParsableClass *parsable_class = GDATA_PARSABLE_CLASS (klass);
GDataEntryClass *entry_class = GDATA_ENTRY_CLASS (klass);
- g_type_class_add_private (klass, sizeof (GDataPicasaWebUserPrivate));
-
gobject_class->get_property = gdata_picasaweb_user_get_property;
gobject_class->finalize = gdata_picasaweb_user_finalize;
@@ -173,7 +171,7 @@ gdata_picasaweb_user_class_init (GDataPicasaWebUserClass *klass)
static void
gdata_picasaweb_user_init (GDataPicasaWebUser *self)
{
- self->priv = G_TYPE_INSTANCE_GET_PRIVATE (self, GDATA_TYPE_PICASAWEB_USER, GDataPicasaWebUserPrivate);
+ self->priv = gdata_picasaweb_user_get_instance_private (self);
/* Initialise the properties whose values we can theoretically not know */
self->priv->quota_limit = self->priv->quota_current = self->priv->max_photos_per_album = -1;
diff --git a/gdata/services/tasks/gdata-tasks-query.c b/gdata/services/tasks/gdata-tasks-query.c
index 627dc862..74a8855c 100644
--- a/gdata/services/tasks/gdata-tasks-query.c
+++ b/gdata/services/tasks/gdata-tasks-query.c
@@ -67,7 +67,7 @@ enum {
PROP_SHOW_HIDDEN,
};
-G_DEFINE_TYPE (GDataTasksQuery, gdata_tasks_query, GDATA_TYPE_QUERY)
+G_DEFINE_TYPE_WITH_PRIVATE (GDataTasksQuery, gdata_tasks_query, GDATA_TYPE_QUERY)
static void
gdata_tasks_query_class_init (GDataTasksQueryClass *klass)
@@ -75,8 +75,6 @@ gdata_tasks_query_class_init (GDataTasksQueryClass *klass)
GObjectClass *gobject_class = G_OBJECT_CLASS (klass);
GDataQueryClass *query_class = GDATA_QUERY_CLASS (klass);
- g_type_class_add_private (klass, sizeof (GDataTasksQueryPrivate));
-
gobject_class->set_property = gdata_tasks_query_set_property;
gobject_class->get_property = gdata_tasks_query_get_property;
gobject_class->finalize = gdata_tasks_query_finalize;
@@ -181,7 +179,7 @@ gdata_tasks_query_class_init (GDataTasksQueryClass *klass)
static void
gdata_tasks_query_init (GDataTasksQuery *self)
{
- self->priv = G_TYPE_INSTANCE_GET_PRIVATE (self, GDATA_TYPE_TASKS_QUERY, GDataTasksQueryPrivate);
+ self->priv = gdata_tasks_query_get_instance_private (self);
self->priv->completed_min = -1;
self->priv->completed_max = -1;
self->priv->due_min = -1;
diff --git a/gdata/services/tasks/gdata-tasks-task.c b/gdata/services/tasks/gdata-tasks-task.c
index 265dd137..e217555b 100644
--- a/gdata/services/tasks/gdata-tasks-task.c
+++ b/gdata/services/tasks/gdata-tasks-task.c
@@ -75,7 +75,7 @@ enum {
PROP_HIDDEN,
};
-G_DEFINE_TYPE (GDataTasksTask, gdata_tasks_task, GDATA_TYPE_ENTRY)
+G_DEFINE_TYPE_WITH_PRIVATE (GDataTasksTask, gdata_tasks_task, GDATA_TYPE_ENTRY)
static void
gdata_tasks_task_class_init (GDataTasksTaskClass *klass)
@@ -84,8 +84,6 @@ gdata_tasks_task_class_init (GDataTasksTaskClass *klass)
GDataParsableClass *parsable_class = GDATA_PARSABLE_CLASS (klass);
GDataEntryClass *entry_class = GDATA_ENTRY_CLASS (klass);
- g_type_class_add_private (klass, sizeof (GDataTasksTaskPrivate));
-
gobject_class->get_property = gdata_tasks_task_get_property;
gobject_class->set_property = gdata_tasks_task_set_property;
gobject_class->finalize = gdata_tasks_task_finalize;
@@ -222,7 +220,7 @@ gdata_tasks_task_class_init (GDataTasksTaskClass *klass)
static void
gdata_tasks_task_init (GDataTasksTask *self)
{
- self->priv = G_TYPE_INSTANCE_GET_PRIVATE (self, GDATA_TYPE_TASKS_TASK, GDataTasksTaskPrivate);
+ self->priv = gdata_tasks_task_get_instance_private (self);
self->priv->due = -1;
self->priv->completed = -1;
}
diff --git a/gdata/services/youtube/gdata-youtube-category.c b/gdata/services/youtube/gdata-youtube-category.c
index 20af9102..7eba4735 100644
--- a/gdata/services/youtube/gdata-youtube-category.c
+++ b/gdata/services/youtube/gdata-youtube-category.c
@@ -55,7 +55,7 @@ enum {
PROP_IS_DEPRECATED
};
-G_DEFINE_TYPE (GDataYouTubeCategory, gdata_youtube_category, GDATA_TYPE_CATEGORY)
+G_DEFINE_TYPE_WITH_PRIVATE (GDataYouTubeCategory, gdata_youtube_category, GDATA_TYPE_CATEGORY)
static void
gdata_youtube_category_class_init (GDataYouTubeCategoryClass *klass)
@@ -63,8 +63,6 @@ gdata_youtube_category_class_init (GDataYouTubeCategoryClass *klass)
GObjectClass *gobject_class = G_OBJECT_CLASS (klass);
GDataParsableClass *parsable_class = GDATA_PARSABLE_CLASS (klass);
- g_type_class_add_private (klass, sizeof (GDataYouTubeCategoryPrivate));
-
gobject_class->get_property = gdata_youtube_category_get_property;
gobject_class->finalize = gdata_youtube_category_finalize;
@@ -101,7 +99,7 @@ gdata_youtube_category_class_init (GDataYouTubeCategoryClass *klass)
static void
gdata_youtube_category_init (GDataYouTubeCategory *self)
{
- self->priv = G_TYPE_INSTANCE_GET_PRIVATE (self, GDATA_TYPE_YOUTUBE_CATEGORY,
GDataYouTubeCategoryPrivate);
+ self->priv = gdata_youtube_category_get_instance_private (self);
}
static void
diff --git a/gdata/services/youtube/gdata-youtube-comment.c b/gdata/services/youtube/gdata-youtube-comment.c
index 1a19847b..c285fcf2 100644
--- a/gdata/services/youtube/gdata-youtube-comment.c
+++ b/gdata/services/youtube/gdata-youtube-comment.c
@@ -63,7 +63,7 @@ enum {
PROP_PARENT_COMMENT_URI = 1,
};
-G_DEFINE_TYPE (GDataYouTubeComment, gdata_youtube_comment, GDATA_TYPE_COMMENT)
+G_DEFINE_TYPE_WITH_PRIVATE (GDataYouTubeComment, gdata_youtube_comment, GDATA_TYPE_COMMENT)
static void
gdata_youtube_comment_class_init (GDataYouTubeCommentClass *klass)
@@ -72,8 +72,6 @@ gdata_youtube_comment_class_init (GDataYouTubeCommentClass *klass)
GDataParsableClass *parsable_class = GDATA_PARSABLE_CLASS (klass);
GDataEntryClass *entry_class = GDATA_ENTRY_CLASS (klass);
- g_type_class_add_private (klass, sizeof (GDataYouTubeCommentPrivate));
-
gobject_class->get_property = gdata_youtube_comment_get_property;
gobject_class->set_property = gdata_youtube_comment_set_property;
gobject_class->finalize = gdata_youtube_comment_finalize;
@@ -103,7 +101,7 @@ gdata_youtube_comment_class_init (GDataYouTubeCommentClass *klass)
static void
gdata_youtube_comment_init (GDataYouTubeComment *self)
{
- self->priv = G_TYPE_INSTANCE_GET_PRIVATE (self, GDATA_TYPE_YOUTUBE_COMMENT,
GDataYouTubeCommentPrivate);
+ self->priv = gdata_youtube_comment_get_instance_private (self);
}
static void
diff --git a/gdata/services/youtube/gdata-youtube-query.c b/gdata/services/youtube/gdata-youtube-query.c
index 99ae9961..212a0d10 100644
--- a/gdata/services/youtube/gdata-youtube-query.c
+++ b/gdata/services/youtube/gdata-youtube-query.c
@@ -87,7 +87,7 @@ enum {
PROP_LICENSE,
};
-G_DEFINE_TYPE (GDataYouTubeQuery, gdata_youtube_query, GDATA_TYPE_QUERY)
+G_DEFINE_TYPE_WITH_PRIVATE (GDataYouTubeQuery, gdata_youtube_query, GDATA_TYPE_QUERY)
static void
gdata_youtube_query_class_init (GDataYouTubeQueryClass *klass)
@@ -95,8 +95,6 @@ gdata_youtube_query_class_init (GDataYouTubeQueryClass *klass)
GObjectClass *gobject_class = G_OBJECT_CLASS (klass);
GDataQueryClass *query_class = GDATA_QUERY_CLASS (klass);
- g_type_class_add_private (klass, sizeof (GDataYouTubeQueryPrivate));
-
gobject_class->set_property = gdata_youtube_query_set_property;
gobject_class->get_property = gdata_youtube_query_get_property;
gobject_class->finalize = gdata_youtube_query_finalize;
@@ -351,7 +349,7 @@ gdata_youtube_query_class_init (GDataYouTubeQueryClass *klass)
static void
gdata_youtube_query_init (GDataYouTubeQuery *self)
{
- self->priv = G_TYPE_INSTANCE_GET_PRIVATE (self, GDATA_TYPE_YOUTUBE_QUERY, GDataYouTubeQueryPrivate);
+ self->priv = gdata_youtube_query_get_instance_private (self);
self->priv->latitude = G_MAXDOUBLE;
self->priv->longitude = G_MAXDOUBLE;
diff --git a/gdata/services/youtube/gdata-youtube-service.c b/gdata/services/youtube/gdata-youtube-service.c
index 89d44bb5..75134e57 100644
--- a/gdata/services/youtube/gdata-youtube-service.c
+++ b/gdata/services/youtube/gdata-youtube-service.c
@@ -292,6 +292,7 @@ _GDATA_DEFINE_AUTHORIZATION_DOMAIN (youtube, "youtube",
_GDATA_DEFINE_AUTHORIZATION_DOMAIN (youtube_force_ssl, "youtube-force-ssl",
"https://www.googleapis.com/auth/youtube.force-ssl")
G_DEFINE_TYPE_WITH_CODE (GDataYouTubeService, gdata_youtube_service, GDATA_TYPE_SERVICE,
+ G_ADD_PRIVATE (GDataYouTubeService)
G_IMPLEMENT_INTERFACE (GDATA_TYPE_BATCHABLE,
gdata_youtube_service_batchable_init))
@@ -301,8 +302,6 @@ gdata_youtube_service_class_init (GDataYouTubeServiceClass *klass)
GObjectClass *gobject_class = G_OBJECT_CLASS (klass);
GDataServiceClass *service_class = GDATA_SERVICE_CLASS (klass);
- g_type_class_add_private (klass, sizeof (GDataYouTubeServicePrivate));
-
gobject_class->set_property = gdata_youtube_service_set_property;
gobject_class->get_property = gdata_youtube_service_get_property;
gobject_class->finalize = gdata_youtube_service_finalize;
@@ -346,7 +345,7 @@ gdata_youtube_service_batchable_init (GDataBatchableIface *iface)
static void
gdata_youtube_service_init (GDataYouTubeService *self)
{
- self->priv = G_TYPE_INSTANCE_GET_PRIVATE (self, GDATA_TYPE_YOUTUBE_SERVICE,
GDataYouTubeServicePrivate);
+ self->priv = gdata_youtube_service_get_instance_private (self);
}
static void
diff --git a/gdata/services/youtube/gdata-youtube-state.c b/gdata/services/youtube/gdata-youtube-state.c
index be1fa0f5..5887e04b 100644
--- a/gdata/services/youtube/gdata-youtube-state.c
+++ b/gdata/services/youtube/gdata-youtube-state.c
@@ -56,15 +56,13 @@ enum {
PROP_MESSAGE
};
-G_DEFINE_TYPE (GDataYouTubeState, gdata_youtube_state, GDATA_TYPE_PARSABLE)
+G_DEFINE_TYPE_WITH_PRIVATE (GDataYouTubeState, gdata_youtube_state, GDATA_TYPE_PARSABLE)
static void
gdata_youtube_state_class_init (GDataYouTubeStateClass *klass)
{
GObjectClass *gobject_class = G_OBJECT_CLASS (klass);
- g_type_class_add_private (klass, sizeof (GDataYouTubeStatePrivate));
-
gobject_class->get_property = gdata_youtube_state_get_property;
gobject_class->set_property = gdata_youtube_state_set_property;
gobject_class->finalize = gdata_youtube_state_finalize;
@@ -146,7 +144,7 @@ gdata_youtube_state_class_init (GDataYouTubeStateClass *klass)
static void
gdata_youtube_state_init (GDataYouTubeState *self)
{
- self->priv = G_TYPE_INSTANCE_GET_PRIVATE (self, GDATA_TYPE_YOUTUBE_STATE, GDataYouTubeStatePrivate);
+ self->priv = gdata_youtube_state_get_instance_private (self);
}
static void
diff --git a/gdata/services/youtube/gdata-youtube-video.c b/gdata/services/youtube/gdata-youtube-video.c
index f44272d6..85a3bb84 100644
--- a/gdata/services/youtube/gdata-youtube-video.c
+++ b/gdata/services/youtube/gdata-youtube-video.c
@@ -160,6 +160,7 @@ enum {
};
G_DEFINE_TYPE_WITH_CODE (GDataYouTubeVideo, gdata_youtube_video, GDATA_TYPE_ENTRY,
+ G_ADD_PRIVATE (GDataYouTubeVideo)
G_IMPLEMENT_INTERFACE (GDATA_TYPE_COMMENTABLE,
gdata_youtube_video_commentable_init))
static void
@@ -169,8 +170,6 @@ gdata_youtube_video_class_init (GDataYouTubeVideoClass *klass)
GDataParsableClass *parsable_class = GDATA_PARSABLE_CLASS (klass);
GDataEntryClass *entry_class = GDATA_ENTRY_CLASS (klass);
- g_type_class_add_private (klass, sizeof (GDataYouTubeVideoPrivate));
-
gobject_class->get_property = gdata_youtube_video_get_property;
gobject_class->set_property = gdata_youtube_video_set_property;
gobject_class->dispose = gdata_youtube_video_dispose;
@@ -525,7 +524,7 @@ gdata_youtube_video_commentable_init (GDataCommentableInterface *iface)
static void
gdata_youtube_video_init (GDataYouTubeVideo *self)
{
- self->priv = G_TYPE_INSTANCE_GET_PRIVATE (self, GDATA_TYPE_YOUTUBE_VIDEO, GDataYouTubeVideoPrivate);
+ self->priv = gdata_youtube_video_get_instance_private (self);
self->priv->recorded = -1;
self->priv->access_controls = g_hash_table_new_full (g_str_hash, g_str_equal, (GDestroyNotify)
g_free, NULL);
self->priv->latitude = G_MAXDOUBLE;
diff --git a/gdata/tests/gdata-dummy-authorizer.c b/gdata/tests/gdata-dummy-authorizer.c
index b9b246e0..c6b2c219 100644
--- a/gdata/tests/gdata-dummy-authorizer.c
+++ b/gdata/tests/gdata-dummy-authorizer.c
@@ -62,6 +62,7 @@ struct _GDataDummyAuthorizerPrivate {
G_DEFINE_TYPE_WITH_CODE (GDataDummyAuthorizer, gdata_dummy_authorizer,
G_TYPE_OBJECT,
+ G_ADD_PRIVATE (GDataDummyAuthorizer)
G_IMPLEMENT_INTERFACE (GDATA_TYPE_AUTHORIZER,
authorizer_init))
@@ -70,8 +71,6 @@ gdata_dummy_authorizer_class_init (GDataDummyAuthorizerClass *klass)
{
GObjectClass *gobject_class = G_OBJECT_CLASS (klass);
- g_type_class_add_private (klass, sizeof (GDataDummyAuthorizerPrivate));
-
gobject_class->finalize = finalize;
}
@@ -85,9 +84,7 @@ authorizer_init (GDataAuthorizerInterface *iface)
static void
gdata_dummy_authorizer_init (GDataDummyAuthorizer *self)
{
- self->priv = G_TYPE_INSTANCE_GET_PRIVATE (self,
- GDATA_TYPE_DUMMY_AUTHORIZER,
- GDataDummyAuthorizerPrivate);
+ self->priv = gdata_dummy_authorizer_get_instance_private (self);
/* Set up the authorizer's mutex */
g_mutex_init (&(self->priv->mutex));
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]