[libgdata] [core] Make function order consistent



commit 459aaf6d5931b426e062ecbe6d29df06cca2d7fe
Author: Philip Withnall <philip tecnocode co uk>
Date:   Sat Apr 3 09:10:57 2010 +0100

    [core] Make function order consistent

 gdata/gdata-access-rule.c                          |  122 ++++++++--------
 gdata/services/calendar/gdata-calendar-calendar.c  |   12 +-
 gdata/services/documents/gdata-documents-entry.c   |  152 ++++++++++----------
 gdata/services/documents/gdata-documents-folder.c  |   38 +++---
 gdata/services/documents/gdata-documents-query.c   |   22 ++--
 gdata/services/documents/gdata-documents-service.c |   40 +++---
 gdata/services/picasaweb/gdata-picasaweb-service.c |   40 +++---
 gdata/services/youtube/gdata-youtube-video.c       |   36 +++---
 8 files changed, 231 insertions(+), 231 deletions(-)
---
diff --git a/gdata/gdata-access-rule.c b/gdata/gdata-access-rule.c
index ecaec29..af70824 100644
--- a/gdata/gdata-access-rule.c
+++ b/gdata/gdata-access-rule.c
@@ -50,7 +50,7 @@ static gboolean parse_xml (GDataParsable *parsable, xmlDoc *doc, xmlNode *node,
 
 struct _GDataAccessRulePrivate {
 	gchar *role;
-	gchar *scope_type; 
+	gchar *scope_type;
 	gchar *scope_value;
 	GTimeVal edited;
 };
@@ -73,8 +73,8 @@ gdata_access_rule_class_init (GDataAccessRuleClass *klass)
 	g_type_class_add_private (klass, sizeof (GDataAccessRulePrivate));
 
 	gobject_class->finalize = gdata_access_rule_finalize;
-	gobject_class->set_property = gdata_access_rule_set_property; 
-	gobject_class->get_property = gdata_access_rule_get_property; 
+	gobject_class->get_property = gdata_access_rule_get_property;
+	gobject_class->set_property = gdata_access_rule_set_property;
 
 	parsable_class->parse_xml = parse_xml;
 	parsable_class->get_xml = get_xml;
@@ -138,50 +138,42 @@ gdata_access_rule_class_init (GDataAccessRuleClass *klass)
 					G_PARAM_READABLE | G_PARAM_STATIC_STRINGS));
 }
 
-/**
- * gdata_access_rule_new:
- * @id: the access rule's ID, or %NULL
- *
- * Creates a new #GDataAccessRule with the given ID and default properties.
- *
- * Return value: a new #GDataAccessRule; unref with g_object_unref()
- *
- * Since: 0.3.0
- **/
-GDataAccessRule *
-gdata_access_rule_new (const gchar *id)
+static void
+gdata_access_rule_init (GDataAccessRule *self)
 {
-	GDataAccessRule *rule = GDATA_ACCESS_RULE (g_object_new (GDATA_TYPE_ACCESS_RULE, "id", id, NULL));
+	self->priv = G_TYPE_INSTANCE_GET_PRIVATE (self, GDATA_TYPE_ACCESS_RULE, GDataAccessRulePrivate);
+}
 
-	/* Set the edited property to the current time (creation time). We don't do this in *_init() since that would cause
-	 * setting it from parse_xml() to fail (duplicate element). */
-	g_get_current_time (&(rule->priv->edited));
+static void
+gdata_access_rule_finalize (GObject *object)
+{
+	GDataAccessRulePrivate *priv = GDATA_ACCESS_RULE (object)->priv;
 
-	/* Set up the role and scope type */
-	rule->priv->role = g_strdup (GDATA_ACCESS_ROLE_NONE);
-	rule->priv->scope_type = g_strdup (GDATA_ACCESS_SCOPE_DEFAULT);
+	g_free (priv->role);
+	g_free (priv->scope_type);
+	g_free (priv->scope_value);
 
-	return rule;
+	/* Chain up to the parent class */
+	G_OBJECT_CLASS (gdata_access_rule_parent_class)->finalize (object);
 }
 
 static void
-gdata_access_rule_set_property (GObject *object, guint property_id, const GValue *value, GParamSpec *pspec)
+gdata_access_rule_get_property (GObject *object, guint property_id, GValue *value, GParamSpec *pspec)
 {
-	GDataAccessRule *self = GDATA_ACCESS_RULE (object);
+	GDataAccessRulePrivate *priv = GDATA_ACCESS_RULE (object)->priv;
 
 	switch (property_id) {
 		case PROP_ROLE:
-			gdata_access_rule_set_role (self, g_value_get_string (value));
+			g_value_set_string (value, priv->role);
 			break;
 		case PROP_SCOPE_TYPE:
-			g_free (self->priv->scope_type);
-			self->priv->scope_type = g_value_dup_string (value);
-			g_object_notify (object, "scope-type");
+			g_value_set_string (value, priv->scope_type);
 			break;
 		case PROP_SCOPE_VALUE:
-			g_free (self->priv->scope_value);
-			self->priv->scope_value = g_value_dup_string (value);
-			g_object_notify (object, "scope-value");
+			g_value_set_string (value, priv->scope_value);
+			break;
+		case PROP_EDITED:
+			g_value_set_boxed (value, &(priv->edited));
 			break;
 		default:
 			/* We don't have any other property... */
@@ -191,22 +183,23 @@ gdata_access_rule_set_property (GObject *object, guint property_id, const GValue
 }
 
 static void
-gdata_access_rule_get_property (GObject *object, guint property_id, GValue *value, GParamSpec *pspec)
+gdata_access_rule_set_property (GObject *object, guint property_id, const GValue *value, GParamSpec *pspec)
 {
-	GDataAccessRulePrivate *priv = GDATA_ACCESS_RULE (object)->priv;
+	GDataAccessRule *self = GDATA_ACCESS_RULE (object);
 
 	switch (property_id) {
 		case PROP_ROLE:
-			g_value_set_string (value, priv->role);
+			gdata_access_rule_set_role (self, g_value_get_string (value));
 			break;
 		case PROP_SCOPE_TYPE:
-			g_value_set_string (value, priv->scope_type);
+			g_free (self->priv->scope_type);
+			self->priv->scope_type = g_value_dup_string (value);
+			g_object_notify (object, "scope-type");
 			break;
 		case PROP_SCOPE_VALUE:
-			g_value_set_string (value, priv->scope_value);
-			break;
-		case PROP_EDITED:
-			g_value_set_boxed (value, &(priv->edited));
+			g_free (self->priv->scope_value);
+			self->priv->scope_value = g_value_dup_string (value);
+			g_object_notify (object, "scope-value");
 			break;
 		default:
 			/* We don't have any other property... */
@@ -215,25 +208,6 @@ gdata_access_rule_get_property (GObject *object, guint property_id, GValue *valu
 	}
 }
 
-static void
-gdata_access_rule_init (GDataAccessRule *self)
-{
-	self->priv = G_TYPE_INSTANCE_GET_PRIVATE (self, GDATA_TYPE_ACCESS_RULE, GDataAccessRulePrivate);
-}
-
-static void
-gdata_access_rule_finalize (GObject *object)
-{
-	GDataAccessRulePrivate *priv = GDATA_ACCESS_RULE (object)->priv;
-
-	g_free (priv->role);
-	g_free (priv->scope_type); 
-	g_free (priv->scope_value);
-
-	/* Chain up to the parent class */
-	G_OBJECT_CLASS (gdata_access_rule_parent_class)->finalize (object);
-}
-
 static gboolean
 parse_xml (GDataParsable *parsable, xmlDoc *doc, xmlNode *node, gpointer user_data, GError **error)
 {
@@ -314,7 +288,33 @@ get_namespaces (GDataParsable *parsable, GHashTable *namespaces)
 	/* Chain up to the parent class */
 	GDATA_PARSABLE_CLASS (gdata_access_rule_parent_class)->get_namespaces (parsable, namespaces);
 
-	g_hash_table_insert (namespaces, (gchar*) "gAcl", (gchar*) "http://schemas.google.com/acl/2007";); 
+	g_hash_table_insert (namespaces, (gchar*) "gAcl", (gchar*) "http://schemas.google.com/acl/2007";);
+}
+
+/**
+ * gdata_access_rule_new:
+ * @id: the access rule's ID, or %NULL
+ *
+ * Creates a new #GDataAccessRule with the given ID and default properties.
+ *
+ * Return value: a new #GDataAccessRule; unref with g_object_unref()
+ *
+ * Since: 0.3.0
+ **/
+GDataAccessRule *
+gdata_access_rule_new (const gchar *id)
+{
+	GDataAccessRule *rule = GDATA_ACCESS_RULE (g_object_new (GDATA_TYPE_ACCESS_RULE, "id", id, NULL));
+
+	/* Set the edited property to the current time (creation time). We don't do this in *_init() since that would cause
+	 * setting it from parse_xml() to fail (duplicate element). */
+	g_get_current_time (&(rule->priv->edited));
+
+	/* Set up the role and scope type */
+	rule->priv->role = g_strdup (GDATA_ACCESS_ROLE_NONE);
+	rule->priv->scope_type = g_strdup (GDATA_ACCESS_SCOPE_DEFAULT);
+
+	return rule;
 }
 
 /**
@@ -328,7 +328,7 @@ get_namespaces (GDataParsable *parsable, GHashTable *namespaces)
  *
  * Since: 0.3.0
  **/
-void 
+void
 gdata_access_rule_set_role (GDataAccessRule *self, const gchar *role)
 {
 	g_return_if_fail (GDATA_IS_ACCESS_RULE (self));
diff --git a/gdata/services/calendar/gdata-calendar-calendar.c b/gdata/services/calendar/gdata-calendar-calendar.c
index c4f3189..5f27289 100644
--- a/gdata/services/calendar/gdata-calendar-calendar.c
+++ b/gdata/services/calendar/gdata-calendar-calendar.c
@@ -181,12 +181,6 @@ gdata_calendar_calendar_class_init (GDataCalendarCalendarClass *klass)
 					G_PARAM_READABLE | G_PARAM_STATIC_STRINGS));
 }
 
-static void
-gdata_calendar_calendar_init (GDataCalendarCalendar *self)
-{
-	self->priv = G_TYPE_INSTANCE_GET_PRIVATE (self, GDATA_TYPE_CALENDAR_CALENDAR, GDataCalendarCalendarPrivate);
-}
-
 static gboolean
 is_owner_rule (GDataAccessRule *rule)
 {
@@ -200,6 +194,12 @@ 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);
+}
+
+static void
 gdata_calendar_calendar_finalize (GObject *object)
 {
 	GDataCalendarCalendarPrivate *priv = GDATA_CALENDAR_CALENDAR (object)->priv;
diff --git a/gdata/services/documents/gdata-documents-entry.c b/gdata/services/documents/gdata-documents-entry.c
index d7bfdc0..c472886 100644
--- a/gdata/services/documents/gdata-documents-entry.c
+++ b/gdata/services/documents/gdata-documents-entry.c
@@ -180,6 +180,18 @@ gdata_documents_entry_class_init (GDataDocumentsEntryClass *klass)
 
 }
 
+static gboolean
+is_owner_rule (GDataAccessRule *rule)
+{
+	return (strcmp (gdata_access_rule_get_role (rule), GDATA_DOCUMENTS_ACCESS_ROLE_OWNER) == 0) ? TRUE : FALSE;
+}
+
+static void
+gdata_documents_entry_access_handler_init (GDataAccessHandlerIface *iface)
+{
+	iface->is_owner_rule = is_owner_rule;
+}
+
 static void
 gdata_documents_entry_init (GDataDocumentsEntry *self)
 {
@@ -203,16 +215,75 @@ _gdata_documents_entry_init_edited (GDataDocumentsEntry *self)
 	g_get_current_time (&(self->priv->edited));
 }
 
-static gboolean
-is_owner_rule (GDataAccessRule *rule)
+static void
+gdata_entry_dispose (GObject *object)
 {
-	return (strcmp (gdata_access_rule_get_role (rule), GDATA_DOCUMENTS_ACCESS_ROLE_OWNER) == 0) ? TRUE : FALSE;
+	GDataDocumentsEntryPrivate *priv = GDATA_DOCUMENTS_ENTRY (object)->priv;
+
+	if (priv->last_modified_by != NULL)
+		g_object_unref (priv->last_modified_by);
+	priv->last_modified_by = NULL;
+
+	/* Chain up to the parent class */
+	G_OBJECT_CLASS (gdata_documents_entry_parent_class)->dispose (object);
 }
 
 static void
-gdata_documents_entry_access_handler_init (GDataAccessHandlerIface *iface)
+gdata_documents_entry_finalize (GObject *object)
 {
-	iface->is_owner_rule = is_owner_rule;
+	GDataDocumentsEntryPrivate *priv = GDATA_DOCUMENTS_ENTRY (object)->priv;
+
+	g_free (priv->document_id);
+
+	/* Chain up to the parent class */
+	G_OBJECT_CLASS (gdata_documents_entry_parent_class)->finalize (object);
+}
+
+static void
+gdata_documents_entry_get_property (GObject *object, guint property_id, GValue *value, GParamSpec *pspec)
+{
+	GDataDocumentsEntryPrivate *priv = GDATA_DOCUMENTS_ENTRY (object)->priv;
+
+	switch (property_id) {
+		case PROP_DOCUMENT_ID:
+			g_value_set_string (value, priv->document_id);
+			break;
+		case PROP_WRITERS_CAN_INVITE:
+			g_value_set_boolean (value, priv->writers_can_invite);
+			break;
+		case PROP_IS_DELETED:
+			g_value_set_boolean (value, priv->is_deleted);
+			break;
+		case PROP_EDITED:
+			g_value_set_boxed (value, &(priv->edited));
+			break;
+		case PROP_LAST_VIEWED:
+			g_value_set_boxed (value, &(priv->last_viewed));
+			break;
+		case PROP_LAST_MODIFIED_BY:
+			g_value_set_object (value, priv->last_modified_by);
+			break;
+		default:
+			/* We don't have any other property... */
+			G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
+			break;
+	}
+}
+
+static void
+gdata_documents_entry_set_property (GObject *object, guint property_id, const GValue *value, GParamSpec *pspec)
+{
+	GDataDocumentsEntry *self = GDATA_DOCUMENTS_ENTRY (object);
+
+	switch (property_id) {
+		case PROP_WRITERS_CAN_INVITE:
+			gdata_documents_entry_set_writers_can_invite (self, g_value_get_boolean (value));
+			break;
+		default:
+			/* We don't have any other property... */
+			G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
+			break;
+	}
 }
 
 static gboolean
@@ -274,77 +345,6 @@ parse_xml (GDataParsable *parsable, xmlDoc *doc, xmlNode *node, gpointer user_da
 }
 
 static void
-gdata_documents_entry_finalize (GObject *object)
-{
-	GDataDocumentsEntryPrivate *priv = GDATA_DOCUMENTS_ENTRY (object)->priv;
-
-	g_free (priv->document_id);
-
-	/* Chain up to the parent class */
-	G_OBJECT_CLASS (gdata_documents_entry_parent_class)->finalize (object);
-}
-
-static void
-gdata_entry_dispose (GObject *object)
-{
-	GDataDocumentsEntryPrivate *priv = GDATA_DOCUMENTS_ENTRY (object)->priv;
-
-	if (priv->last_modified_by != NULL)
-		g_object_unref (priv->last_modified_by);
-	priv->last_modified_by = NULL;
-
-	/* Chain up to the parent class */
-	G_OBJECT_CLASS (gdata_documents_entry_parent_class)->dispose (object);
-}
-
-static void
-gdata_documents_entry_get_property (GObject *object, guint property_id, GValue *value, GParamSpec *pspec)
-{
-	GDataDocumentsEntryPrivate *priv = GDATA_DOCUMENTS_ENTRY (object)->priv;
-
-	switch (property_id) {
-		case PROP_DOCUMENT_ID:
-			g_value_set_string (value, priv->document_id);
-			break;
-		case PROP_WRITERS_CAN_INVITE:
-			g_value_set_boolean (value, priv->writers_can_invite);
-			break;
-		case PROP_IS_DELETED:
-			g_value_set_boolean (value, priv->is_deleted);
-			break;
-		case PROP_EDITED:
-			g_value_set_boxed (value, &(priv->edited));
-			break;
-		case PROP_LAST_VIEWED:
-			g_value_set_boxed (value, &(priv->last_viewed));
-			break;
-		case PROP_LAST_MODIFIED_BY:
-			g_value_set_object (value, priv->last_modified_by);
-			break;
-		default:
-			/* We don't have any other property... */
-			G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
-			break;
-	}
-}
-
-static void
-gdata_documents_entry_set_property (GObject *object, guint property_id, const GValue *value, GParamSpec *pspec)
-{
-	GDataDocumentsEntry *self = GDATA_DOCUMENTS_ENTRY (object);
-
-	switch (property_id) {
-		case PROP_WRITERS_CAN_INVITE:
-			gdata_documents_entry_set_writers_can_invite (self, g_value_get_boolean (value));
-			break;
-		default:
-			/* We don't have any other property... */
-			G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
-			break;
-	}
-}
-
-static void
 get_xml (GDataParsable *parsable, GString *xml_string)
 {
 	GDataDocumentsEntryPrivate *priv = GDATA_DOCUMENTS_ENTRY (parsable)->priv;
diff --git a/gdata/services/documents/gdata-documents-folder.c b/gdata/services/documents/gdata-documents-folder.c
index ce342c0..5458a50 100644
--- a/gdata/services/documents/gdata-documents-folder.c
+++ b/gdata/services/documents/gdata-documents-folder.c
@@ -54,6 +54,25 @@ gdata_documents_folder_class_init (GDataDocumentsFolderClass *klass)
 	parsable_class->get_xml = get_xml;
 }
 
+static void
+gdata_documents_folder_init (GDataDocumentsFolder *self)
+{
+	/* Why am I writing it? */
+}
+
+static void
+get_xml (GDataParsable *parsable, GString *xml_string)
+{
+	const gchar *document_id;
+
+	/* Chain up to the parent class */
+	GDATA_PARSABLE_CLASS (gdata_documents_folder_parent_class)->get_xml (parsable, xml_string);
+
+	document_id = gdata_documents_entry_get_document_id (GDATA_DOCUMENTS_ENTRY (parsable));
+	if (document_id != NULL)
+		g_string_append_printf (xml_string, "<gd:resourceId>folder:%s</gd:resourceId>", document_id);
+}
+
 /**
  * gdata_documents_folder_new:
  * @id: the entry's ID (not the document ID of the folder), or %NULL
@@ -75,22 +94,3 @@ gdata_documents_folder_new (const gchar *id)
 
 	return folder;
 }
-
-static void
-gdata_documents_folder_init (GDataDocumentsFolder *self)
-{
-	/* Why am I writing it? */
-}
-
-static void
-get_xml (GDataParsable *parsable, GString *xml_string)
-{
-	const gchar *document_id;
-
-	/* Chain up to the parent class */
-	GDATA_PARSABLE_CLASS (gdata_documents_folder_parent_class)->get_xml (parsable, xml_string);
-
-	document_id = gdata_documents_entry_get_document_id (GDATA_DOCUMENTS_ENTRY (parsable));
-	if (document_id != NULL)
-		g_string_append_printf (xml_string, "<gd:resourceId>folder:%s</gd:resourceId>", document_id);
-}
diff --git a/gdata/services/documents/gdata-documents-query.c b/gdata/services/documents/gdata-documents-query.c
index 9051126..9a02af8 100644
--- a/gdata/services/documents/gdata-documents-query.c
+++ b/gdata/services/documents/gdata-documents-query.c
@@ -160,6 +160,17 @@ gdata_documents_query_init (GDataDocumentsQuery *self)
 }
 
 static void
+gdata_documents_query_finalize (GObject *object)
+{
+	GDataDocumentsQueryPrivate *priv = GDATA_DOCUMENTS_QUERY (object)->priv;
+
+	g_free (priv->folder_id);
+	g_free (priv->title);
+
+	G_OBJECT_CLASS (gdata_documents_query_parent_class)->finalize (object);
+}
+
+static void
 gdata_documents_query_get_property (GObject *object, guint property_id, GValue *value, GParamSpec *pspec)
 {
 	GDataDocumentsQueryPrivate *priv = GDATA_DOCUMENTS_QUERY (object)->priv;
@@ -216,17 +227,6 @@ gdata_documents_query_set_property (GObject *object, guint property_id, const GV
 }
 
 static void
-gdata_documents_query_finalize (GObject *object)
-{
-	GDataDocumentsQueryPrivate *priv = GDATA_DOCUMENTS_QUERY (object)->priv;
-
-	g_free (priv->folder_id);
-	g_free (priv->title);
-
-	G_OBJECT_CLASS (gdata_documents_query_parent_class)->finalize (object);
-}
-
-static void
 get_query_uri (GDataQuery *self, const gchar *feed_uri, GString *query_uri, gboolean *params_started)
 {
 	GDataDocumentsQueryPrivate *priv = GDATA_DOCUMENTS_QUERY (self)->priv;
diff --git a/gdata/services/documents/gdata-documents-service.c b/gdata/services/documents/gdata-documents-service.c
index 0413b2b..dbe95d6 100644
--- a/gdata/services/documents/gdata-documents-service.c
+++ b/gdata/services/documents/gdata-documents-service.c
@@ -114,26 +114,6 @@ gdata_documents_service_init (GDataDocumentsService *self)
 	g_signal_connect (self, "notify::proxy-uri", G_CALLBACK (notify_proxy_uri_cb), NULL);
 }
 
-/**
- * gdata_documents_service_new:
- * @client_id: your application's client ID
- *
- * Creates a new #GDataDocumentsService. The @client_id must be unique for your application, and as registered with Google.
- *
- * Return value: a new #GDataDocumentsService, or %NULL; unref with g_object_unref()
- *
- * Since: 0.4.0
- **/
-GDataDocumentsService *
-gdata_documents_service_new (const gchar *client_id)
-{
-	g_return_val_if_fail (client_id != NULL, NULL);
-
-	return g_object_new (GDATA_TYPE_DOCUMENTS_SERVICE,
-			     "client-id", client_id,
-			     NULL);
-}
-
 static void
 gdata_documents_service_dispose (GObject *object)
 {
@@ -163,6 +143,26 @@ gdata_documents_service_get_property (GObject *object, guint property_id, GValue
 }
 
 /**
+ * gdata_documents_service_new:
+ * @client_id: your application's client ID
+ *
+ * Creates a new #GDataDocumentsService. The @client_id must be unique for your application, and as registered with Google.
+ *
+ * Return value: a new #GDataDocumentsService, or %NULL; unref with g_object_unref()
+ *
+ * Since: 0.4.0
+ **/
+GDataDocumentsService *
+gdata_documents_service_new (const gchar *client_id)
+{
+	g_return_val_if_fail (client_id != NULL, NULL);
+
+	return g_object_new (GDATA_TYPE_DOCUMENTS_SERVICE,
+			     "client-id", client_id,
+			     NULL);
+}
+
+/**
  * gdata_documents_service_query_documents:
  * @self: a #GDataDocumentsService
  * @query: a #GDataQuery with the query parameters, or %NULL
diff --git a/gdata/services/picasaweb/gdata-picasaweb-service.c b/gdata/services/picasaweb/gdata-picasaweb-service.c
index 8de16bc..30b8155 100644
--- a/gdata/services/picasaweb/gdata-picasaweb-service.c
+++ b/gdata/services/picasaweb/gdata-picasaweb-service.c
@@ -61,6 +61,26 @@ gdata_picasaweb_service_init (GDataPicasaWebService *self)
 	/* Nothing to see here */
 }
 
+/**
+ * gdata_picasaweb_service_new:
+ * @client_id: your application's client ID
+ *
+ * Creates a new #GDataPicasaWebService. The @client_id must be unique for your application, and as registered with Google.
+ *
+ * Return value: a new #GDataPicasaWebService, or %NULL
+ *
+ * Since: 0.4.0
+ **/
+GDataPicasaWebService *
+gdata_picasaweb_service_new (const gchar *client_id)
+{
+	g_return_val_if_fail (client_id != NULL, NULL);
+
+	return g_object_new (GDATA_TYPE_PICASAWEB_SERVICE,
+			     "client-id", client_id,
+			     NULL);
+}
+
 /*
  * create_uri:
  * @self: a #GDataPicasaWebService
@@ -89,26 +109,6 @@ create_uri (GDataPicasaWebService *self, const gchar *username, const gchar *typ
 }
 
 /**
- * gdata_picasaweb_service_new:
- * @client_id: your application's client ID
- *
- * Creates a new #GDataPicasaWebService. The @client_id must be unique for your application, and as registered with Google.
- *
- * Return value: a new #GDataPicasaWebService, or %NULL
- *
- * Since: 0.4.0
- **/
-GDataPicasaWebService *
-gdata_picasaweb_service_new (const gchar *client_id)
-{
-	g_return_val_if_fail (client_id != NULL, NULL);
-
-	return g_object_new (GDATA_TYPE_PICASAWEB_SERVICE,
-			     "client-id", client_id,
-			     NULL);
-}
-
-/**
  * gdata_picasaweb_service_get_user
  * @self: a #GDataPicasaWebService
  * @username: the username of the user whose information you wish to retrieve, or %NULL for the currently authenticated user.
diff --git a/gdata/services/youtube/gdata-youtube-video.c b/gdata/services/youtube/gdata-youtube-video.c
index 0d57a45..20cd7b0 100644
--- a/gdata/services/youtube/gdata-youtube-video.c
+++ b/gdata/services/youtube/gdata-youtube-video.c
@@ -606,24 +606,6 @@ gdata_youtube_video_set_property (GObject *object, guint property_id, const GVal
 	}
 }
 
-/**
- * gdata_youtube_video_new:
- * @id: the video's ID, or %NULL
- *
- * Creates a new #GDataYouTubeVideo with the given ID and default properties.
- *
- * Return value: a new #GDataYouTubeVideo; unref with g_object_unref()
- **/
-GDataYouTubeVideo *
-gdata_youtube_video_new (const gchar *id)
-{
-	GDataYouTubeVideo *video = g_object_new (GDATA_TYPE_YOUTUBE_VIDEO, "id", id, NULL);
-	/* We can't create these in init, or they would collide with the group and control created when parsing the XML */
-	video->priv->media_group = g_object_new (GDATA_TYPE_YOUTUBE_GROUP, NULL);
-	video->priv->youtube_control = g_object_new (GDATA_TYPE_YOUTUBE_CONTROL, NULL);
-	return video;
-}
-
 static gboolean
 parse_xml (GDataParsable *parsable, xmlDoc *doc, xmlNode *node, gpointer user_data, GError **error)
 {
@@ -892,6 +874,24 @@ get_entry_uri (const gchar *id)
 }
 
 /**
+ * gdata_youtube_video_new:
+ * @id: the video's ID, or %NULL
+ *
+ * Creates a new #GDataYouTubeVideo with the given ID and default properties.
+ *
+ * Return value: a new #GDataYouTubeVideo; unref with g_object_unref()
+ **/
+GDataYouTubeVideo *
+gdata_youtube_video_new (const gchar *id)
+{
+	GDataYouTubeVideo *video = g_object_new (GDATA_TYPE_YOUTUBE_VIDEO, "id", id, NULL);
+	/* We can't create these in init, or they would collide with the group and control created when parsing the XML */
+	video->priv->media_group = g_object_new (GDATA_TYPE_YOUTUBE_GROUP, NULL);
+	video->priv->youtube_control = g_object_new (GDATA_TYPE_YOUTUBE_CONTROL, NULL);
+	return video;
+}
+
+/**
  * gdata_youtube_video_get_view_count:
  * @self: a #GDataYouTubeVideo
  *



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