[libgdata] [core] Remove several enumerated types



commit 869553d37d02ddff39166c0c961c2697b59ae9ba
Author: Philip Withnall <philip tecnocode co uk>
Date:   Fri Mar 26 22:10:44 2010 +0000

    [core] Remove several enumerated types
    
    Remove GDataYouTubeAspectRatio, and replace it with a
    GDATA_YOUTUBE_ASPECT_RATIO_WIDESCREEN #define.
    
    Remove GDataYouTubeAction and replace it with #defines for all its members.
    
    This is an API and ABI break necessary to enforce the newly-finalised
    policy that enums are avoided where possible for API which interacts with or
    represents data from the server.

 docs/reference/gdata-overview.xml            |    5 +-
 docs/reference/gdata-sections.txt            |   13 ++--
 gdata/gdata.symbols                          |    2 -
 gdata/services/youtube/gdata-youtube-group.c |   31 ++++-----
 gdata/services/youtube/gdata-youtube-group.h |    4 +-
 gdata/services/youtube/gdata-youtube-video.c |   58 ++++++-----------
 gdata/services/youtube/gdata-youtube-video.h |   91 +++++++++++++++++---------
 7 files changed, 104 insertions(+), 100 deletions(-)
---
diff --git a/docs/reference/gdata-overview.xml b/docs/reference/gdata-overview.xml
index 425b32b..2b7fb6d 100644
--- a/docs/reference/gdata-overview.xml
+++ b/docs/reference/gdata-overview.xml
@@ -118,7 +118,10 @@
 				the future. In any other case, a string value is used instead, with libgdata providing <code>#define</code>d values
 				for the known values of the property. These values should be used as much as possible by applications which use
 				libgdata (i.e. they should be treated as if they were enumerated values), but applications are free to use strings
-				of their own, too. All validation of such pseudi-enums is left to the server.</para>
+				of their own, too. All validation of such pseudo-enums is left to the server.</para>
+			<para>One situation where it is acceptable to use enumerated types is in API which is only ever used to query the server, and
+				isn't involved in processing or representing the response at all, i.e. subclasses of
+				<type><link linkend="GDataQuery">GDataQuery</link></type>.</para>
 		</refsect2>
 
 		<refsect2>
diff --git a/docs/reference/gdata-sections.txt b/docs/reference/gdata-sections.txt
index 0feadd0..3945ef6 100644
--- a/docs/reference/gdata-sections.txt
+++ b/docs/reference/gdata-sections.txt
@@ -206,10 +206,15 @@ GDataYouTubeServicePrivate
 <SECTION>
 <FILE>gdata-youtube-video</FILE>
 <TITLE>GDataYouTubeVideo</TITLE>
+GDATA_YOUTUBE_ASPECT_RATIO_WIDESCREEN
+GDATA_YOUTUBE_ACTION_RATE
+GDATA_YOUTUBE_ACTION_COMMENT
+GDATA_YOUTUBE_ACTION_COMMENT_VOTE
+GDATA_YOUTUBE_ACTION_VIDEO_RESPOND
+GDATA_YOUTUBE_ACTION_EMBED
+GDATA_YOUTUBE_ACTION_SYNDICATE
 GDataYouTubeVideo
 GDataYouTubeVideoClass
-GDataYouTubeAspectRatio
-GDataYouTubeAction
 GDataYouTubePermission
 gdata_youtube_video_new
 gdata_youtube_video_look_up_content
@@ -251,11 +256,7 @@ GDATA_YOUTUBE_VIDEO
 GDATA_YOUTUBE_VIDEO_CLASS
 GDATA_YOUTUBE_VIDEO_GET_CLASS
 gdata_youtube_video_get_type
-GDATA_TYPE_YOUTUBE_ASPECT_RATIO
-GDATA_TYPE_YOUTUBE_ACTION
 GDATA_TYPE_YOUTUBE_PERMISSION
-gdata_youtube_aspect_ratio_get_type
-gdata_youtube_action_get_type
 gdata_youtube_permission_get_type
 <SUBSECTION Private>
 GDataYouTubeVideoPrivate
diff --git a/gdata/gdata.symbols b/gdata/gdata.symbols
index 682188a..8b501a0 100644
--- a/gdata/gdata.symbols
+++ b/gdata/gdata.symbols
@@ -150,7 +150,6 @@ gdata_youtube_safe_search_get_type
 gdata_youtube_sort_order_get_type
 gdata_youtube_age_get_type
 gdata_youtube_uploader_get_type
-gdata_youtube_aspect_ratio_get_type
 gdata_youtube_query_get_type
 gdata_youtube_query_new
 gdata_youtube_query_get_format
@@ -718,7 +717,6 @@ gdata_gd_name_get_suffix
 gdata_gd_name_set_suffix
 gdata_gd_name_get_full_name
 gdata_gd_name_set_full_name
-gdata_youtube_action_get_type
 gdata_youtube_permission_get_type
 gdata_gcontact_jot_get_type
 gdata_gcontact_jot_new
diff --git a/gdata/services/youtube/gdata-youtube-group.c b/gdata/services/youtube/gdata-youtube-group.c
index bd3e509..ec4e0fe 100644
--- a/gdata/services/youtube/gdata-youtube-group.c
+++ b/gdata/services/youtube/gdata-youtube-group.c
@@ -49,7 +49,7 @@ struct _GDataYouTubeGroupPrivate {
 	gboolean is_private;
 	GTimeVal uploaded;
 	gchar *video_id;
-	GDataYouTubeAspectRatio aspect_ratio;
+	gchar *aspect_ratio;
 };
 
 G_DEFINE_TYPE (GDataYouTubeGroup, gdata_youtube_group, GDATA_TYPE_MEDIA_GROUP)
@@ -109,6 +109,8 @@ parse_xml (GDataParsable *parsable, xmlDoc *doc, xmlNode *node, gpointer user_da
 		if (gdata_parser_object_from_element_setter (node, "content", P_REQUIRED, GDATA_TYPE_YOUTUBE_CONTENT,
 		                                             _gdata_media_group_add_content, self, &success, error) == TRUE ||
 		    gdata_parser_string_from_element (node, "videoid", P_NO_DUPES, &(self->priv->video_id), &success, error) == TRUE ||
+		    gdata_parser_string_from_element (node, "aspectRatio", P_REQUIRED | P_NO_DUPES,
+		                                      &(self->priv->aspect_ratio), &success, error) == TRUE ||
 		    gdata_parser_time_val_from_element (node, "uploaded", P_REQUIRED | P_NO_DUPES, &(self->priv->uploaded), &success, error) == TRUE) {
 			return success;
 		} else if (xmlStrcmp (node->name, (xmlChar*) "duration") == 0) {
@@ -122,17 +124,6 @@ parse_xml (GDataParsable *parsable, xmlDoc *doc, xmlNode *node, gpointer user_da
 		} else if (xmlStrcmp (node->name, (xmlChar*) "private") == 0) {
 			/* yt:private */
 			gdata_youtube_group_set_is_private (self, TRUE);
-		} else if (xmlStrcmp (node->name, (xmlChar*) "aspectRatio") == 0) {
-			/* yt:aspectRatio */
-			xmlChar *aspect_ratio = xmlNodeGetContent (node);
-			if (xmlStrcmp (aspect_ratio, (xmlChar*) "widescreen") == 0) {
-				gdata_youtube_group_set_aspect_ratio (self, GDATA_YOUTUBE_ASPECT_RATIO_WIDESCREEN);
-			} else {
-				gdata_parser_error_unknown_content (node, (const gchar*) aspect_ratio, error);
-				xmlFree (aspect_ratio);
-				return FALSE;
-			}
-			xmlFree (aspect_ratio);
 		} else {
 			return GDATA_PARSABLE_CLASS (gdata_youtube_group_parent_class)->parse_xml (parsable, doc, node, user_data, error);
 		}
@@ -244,29 +235,33 @@ gdata_youtube_group_get_video_id (GDataYouTubeGroup *self)
  *
  * Gets the #GDataYouTubeGroup:aspect-ratio property.
  *
- * Return value: the aspect ratio property
+ * Return value: the aspect ratio property, or %NULL
  *
  * Since: 0.4.0
  **/
-GDataYouTubeAspectRatio
+const gchar *
 gdata_youtube_group_get_aspect_ratio (GDataYouTubeGroup *self)
 {
-	g_return_val_if_fail (GDATA_IS_YOUTUBE_GROUP (self), GDATA_YOUTUBE_ASPECT_RATIO_UNKNOWN);
+	g_return_val_if_fail (GDATA_IS_YOUTUBE_GROUP (self), NULL);
 	return self->priv->aspect_ratio;
 }
 
 /**
  * gdata_youtube_group_set_aspect_ratio:
  * @self: a #GDataYouTubeGroup
- * @aspect_ratio: the aspect ratio property
+ * @aspect_ratio: the aspect ratio property, or %NULL
  *
  * Sets the #GDataYouTubeGroup:aspect-ratio property to decide the video aspect ratio.
+ * If @aspect_ratio is %NULL, the property will be unset.
  *
  * Since: 0.4.0
  **/
 void
-gdata_youtube_group_set_aspect_ratio (GDataYouTubeGroup *self, GDataYouTubeAspectRatio aspect_ratio)
+gdata_youtube_group_set_aspect_ratio (GDataYouTubeGroup *self, const gchar *aspect_ratio)
 {
 	g_return_if_fail (GDATA_IS_YOUTUBE_GROUP (self));
-	self->priv->aspect_ratio = aspect_ratio;
+
+	g_free (self->priv->aspect_ratio);
+	self->priv->aspect_ratio = g_strdup (aspect_ratio);
+	g_object_notify (G_OBJECT (self), "aspect-ratio");
 }
diff --git a/gdata/services/youtube/gdata-youtube-group.h b/gdata/services/youtube/gdata-youtube-group.h
index d731c1c..759b6f1 100644
--- a/gdata/services/youtube/gdata-youtube-group.h
+++ b/gdata/services/youtube/gdata-youtube-group.h
@@ -67,8 +67,8 @@ gboolean gdata_youtube_group_is_private (GDataYouTubeGroup *self);
 void gdata_youtube_group_set_is_private (GDataYouTubeGroup *self, gboolean is_private);
 void gdata_youtube_group_get_uploaded (GDataYouTubeGroup *self, GTimeVal *uploaded);
 const gchar *gdata_youtube_group_get_video_id (GDataYouTubeGroup *self);
-GDataYouTubeAspectRatio gdata_youtube_group_get_aspect_ratio (GDataYouTubeGroup *self);
-void gdata_youtube_group_set_aspect_ratio (GDataYouTubeGroup *self, GDataYouTubeAspectRatio aspect_ratio);
+const gchar *gdata_youtube_group_get_aspect_ratio (GDataYouTubeGroup *self);
+void gdata_youtube_group_set_aspect_ratio (GDataYouTubeGroup *self, const gchar *aspect_ratio);
 
 G_END_DECLS
 
diff --git a/gdata/services/youtube/gdata-youtube-video.c b/gdata/services/youtube/gdata-youtube-video.c
index 9185599..c2e568b 100644
--- a/gdata/services/youtube/gdata-youtube-video.c
+++ b/gdata/services/youtube/gdata-youtube-video.c
@@ -426,7 +426,8 @@ gdata_youtube_video_class_init (GDataYouTubeVideoClass *klass)
 	/**
 	 * GDataYouTubeVideo:aspect-ratio:
 	 *
-	 * The aspect ratio of the video.
+	 * The aspect ratio of the video. A %NULL value means the aspect ratio is unknown (it could still be a widescreen video). A value of
+	 * %GDATA_YOUTUBE_ASPECT_RATIO_WIDESCREEN means the video is definitely widescreen.
 	 *
 	 * For more information see the <ulink type="http"
 	 * url="http://code.google.com/apis/youtube/2.0/reference.html#youtube_data_api_tag_yt:aspectratio";>online documentation</ulink>.
@@ -434,10 +435,9 @@ gdata_youtube_video_class_init (GDataYouTubeVideoClass *klass)
 	 * Since: 0.4.0
 	 **/
 	g_object_class_install_property (gobject_class, PROP_ASPECT_RATIO,
-				g_param_spec_enum ("aspect-ratio",
+				g_param_spec_string ("aspect-ratio",
 					"Aspect Ratio", "The aspect ratio of the video.",
-					GDATA_TYPE_YOUTUBE_ASPECT_RATIO,
-					GDATA_YOUTUBE_ASPECT_RATIO_UNKNOWN,
+					NULL,
 					G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
 }
 
@@ -556,7 +556,7 @@ gdata_youtube_video_get_property (GObject *object, guint property_id, GValue *va
 			g_value_set_boxed (value, &(priv->recorded));
 			break;
 		case PROP_ASPECT_RATIO:
-			g_value_set_enum (value, gdata_youtube_group_get_aspect_ratio (GDATA_YOUTUBE_GROUP (priv->media_group)));
+			g_value_set_string (value, gdata_youtube_group_get_aspect_ratio (GDATA_YOUTUBE_GROUP (priv->media_group)));
 			break;
 		default:
 			/* We don't have any other property... */
@@ -593,7 +593,7 @@ gdata_youtube_video_set_property (GObject *object, guint property_id, const GVal
 			gdata_youtube_video_set_recorded (self, g_value_get_boxed (value));
 			break;
 		case PROP_ASPECT_RATIO:
-			gdata_youtube_video_set_aspect_ratio (self, g_value_get_enum (value));
+			gdata_youtube_video_set_aspect_ratio (self, g_value_get_string (value));
 			break;
 		default:
 			/* We don't have any other property... */
@@ -925,29 +925,6 @@ gdata_youtube_video_set_location (GDataYouTubeVideo *self, const gchar *location
 	g_object_notify (G_OBJECT (self), "location");
 }
 
-/* Convert a GDataYouTubeAction into its string representation.
- * See: http://code.google.com/apis/youtube/2.0/reference.html#youtube_data_api_tag_yt:accessControl */
-static const gchar *
-action_to_string (GDataYouTubeAction action)
-{
-	switch (action) {
-		case GDATA_YOUTUBE_ACTION_RATE:
-			return "rate";
-		case GDATA_YOUTUBE_ACTION_COMMENT:
-			return "comment";
-		case GDATA_YOUTUBE_ACTION_COMMENT_VOTE:
-			return "commentVote";
-		case GDATA_YOUTUBE_ACTION_VIDEO_RESPOND:
-			return "videoRespond";
-		case GDATA_YOUTUBE_ACTION_EMBED:
-			return "embed";
-		case GDATA_YOUTUBE_ACTION_SYNDICATE:
-			return "syndicate";
-		default:
-			g_assert_not_reached ();
-	}
-}
-
 /**
  * gdata_youtube_video_get_access_control:
  * @self: a #GDataYouTubeVideo
@@ -961,13 +938,14 @@ action_to_string (GDataYouTubeAction action)
  * Since: 0.7.0
  **/
 GDataYouTubePermission
-gdata_youtube_video_get_access_control (GDataYouTubeVideo *self, GDataYouTubeAction action)
+gdata_youtube_video_get_access_control (GDataYouTubeVideo *self, const gchar *action)
 {
 	gpointer value;
 
 	g_return_val_if_fail (GDATA_IS_YOUTUBE_VIDEO (self), GDATA_YOUTUBE_PERMISSION_DENIED);
+	g_return_val_if_fail (action != NULL, GDATA_YOUTUBE_PERMISSION_DENIED);
 
-	if (g_hash_table_lookup_extended (self->priv->access_controls, action_to_string (action), NULL, &value) == FALSE)
+	if (g_hash_table_lookup_extended (self->priv->access_controls, action, NULL, &value) == FALSE)
 		return GDATA_YOUTUBE_PERMISSION_DENIED;
 	return GPOINTER_TO_INT (value);
 }
@@ -986,13 +964,14 @@ gdata_youtube_video_get_access_control (GDataYouTubeVideo *self, GDataYouTubeAct
  * Since: 0.7.0
  **/
 void
-gdata_youtube_video_set_access_control (GDataYouTubeVideo *self, GDataYouTubeAction action, GDataYouTubePermission permission)
+gdata_youtube_video_set_access_control (GDataYouTubeVideo *self, const gchar *action, GDataYouTubePermission permission)
 {
 	g_return_if_fail (GDATA_IS_YOUTUBE_VIDEO (self));
-	g_return_if_fail (action == GDATA_YOUTUBE_ACTION_RATE || action == GDATA_YOUTUBE_ACTION_COMMENT ||
+	g_return_if_fail (action != NULL);
+	g_return_if_fail (strcmp (action, GDATA_YOUTUBE_ACTION_RATE) == 0 || strcmp (action, GDATA_YOUTUBE_ACTION_COMMENT) == 0 ||
 	                  permission != GDATA_YOUTUBE_PERMISSION_MODERATED);
 
-	g_hash_table_replace (self->priv->access_controls, g_strdup (action_to_string (action)), GINT_TO_POINTER (permission));
+	g_hash_table_replace (self->priv->access_controls, g_strdup (action), GINT_TO_POINTER (permission));
 }
 
 /**
@@ -1443,28 +1422,29 @@ gdata_youtube_video_get_video_id_from_uri (const gchar *video_uri)
  *
  * Gets the #GDataYouTubeVideo:aspect-ratio property.
  *
- * Return value: the aspect ratio property
+ * Return value: the aspect ratio property, or %NULL
  *
  * Since: 0.4.0
  **/
-GDataYouTubeAspectRatio
+const gchar *
 gdata_youtube_video_get_aspect_ratio (GDataYouTubeVideo *self)
 {
-	g_return_val_if_fail (GDATA_IS_YOUTUBE_VIDEO (self), FALSE);
+	g_return_val_if_fail (GDATA_IS_YOUTUBE_VIDEO (self), NULL);
 	return gdata_youtube_group_get_aspect_ratio (GDATA_YOUTUBE_GROUP (self->priv->media_group));
 }
 
 /**
  * gdata_youtube_video_set_aspect_ratio:
  * @self: a #GDataYouTubeVideo
- * @aspect_ratio: the aspect ratio property
+ * @aspect_ratio: the aspect ratio property, or %NULL
  *
  * Sets the #GDataYouTubeVideo:aspect-ratio property to specify the video's aspect ratio.
+ * If @aspect_ratio is %NULL, the property will be unset.
  *
  * Since: 0.4.0
  **/
 void
-gdata_youtube_video_set_aspect_ratio (GDataYouTubeVideo *self, GDataYouTubeAspectRatio aspect_ratio)
+gdata_youtube_video_set_aspect_ratio (GDataYouTubeVideo *self, const gchar *aspect_ratio)
 {
 	g_return_if_fail (GDATA_IS_YOUTUBE_VIDEO (self));
 	gdata_youtube_group_set_aspect_ratio (GDATA_YOUTUBE_GROUP (self->priv->media_group), aspect_ratio);
diff --git a/gdata/services/youtube/gdata-youtube-video.h b/gdata/services/youtube/gdata-youtube-video.h
index a89c74c..83ae6fb 100644
--- a/gdata/services/youtube/gdata-youtube-video.h
+++ b/gdata/services/youtube/gdata-youtube-video.h
@@ -32,43 +32,70 @@
 G_BEGIN_DECLS
 
 /**
- * GDataYouTubeAspectRatio:
- * @GDATA_YOUTUBE_ASPECT_RATIO_UNKNOWN: unknown aspect ratio
- * @GDATA_YOUTUBE_ASPECT_RATIO_WIDESCREEN: widescreen (16:9) video
+ * GDATA_YOUTUBE_ASPECT_RATIO_WIDESCREEN:
  *
- * The aspect ratio of a video. See the
- * <ulink type="http" url="http://code.google.com/apis/youtube/2.0/reference.html#youtube_data_api_tag_yt:aspectratio";>online documentation</ulink>
- * for more information.
+ * The aspect ratio for widescreen (16:9) videos.
  *
- * Since: 0.4.0
+ * For more information, see the <ulink type="http" url="http://code.google.com/apis/youtube/2.0/reference.html#youtube_data_api_tag_yt:aspectratio";>
+ * online documentation</ulink>.
+ *
+ * Since: 0.7.0
  **/
-typedef enum {
-	GDATA_YOUTUBE_ASPECT_RATIO_UNKNOWN = 0,
-	GDATA_YOUTUBE_ASPECT_RATIO_WIDESCREEN
-} GDataYouTubeAspectRatio;
+#define GDATA_YOUTUBE_ASPECT_RATIO_WIDESCREEN "widescreen"
 
 /**
- * GDataYouTubeAction:
- * @GDATA_YOUTUBE_ACTION_RATE: rate the video
- * @GDATA_YOUTUBE_ACTION_COMMENT: comment on the video
- * @GDATA_YOUTUBE_ACTION_COMMENT_VOTE: rate other users' comments on the video
- * @GDATA_YOUTUBE_ACTION_VIDEO_RESPOND: add a video response to the video
- * @GDATA_YOUTUBE_ACTION_EMBED: embed the video on third-party websites
- * @GDATA_YOUTUBE_ACTION_SYNDICATE: YouTube can show the video on mobile phones and televisions
+ * GDATA_YOUTUBE_ACTION_RATE:
  *
- * Access-controllable actions which can be performed on a #GDataYouTubeVideo. The permissions for each action
- * can be set using gdata_youtube_video_set_access_control().
+ * An action to rate a video, for use with gdata_youtube_video_set_access_control().
  *
  * Since: 0.7.0
  **/
-typedef enum {
-	GDATA_YOUTUBE_ACTION_RATE,
-	GDATA_YOUTUBE_ACTION_COMMENT,
-	GDATA_YOUTUBE_ACTION_COMMENT_VOTE,
-	GDATA_YOUTUBE_ACTION_VIDEO_RESPOND,
-	GDATA_YOUTUBE_ACTION_EMBED,
-	GDATA_YOUTUBE_ACTION_SYNDICATE
-} GDataYouTubeAction;
+#define GDATA_YOUTUBE_ACTION_RATE "rate"
+
+/**
+ * GDATA_YOUTUBE_ACTION_COMMENT:
+ *
+ * An action to comment on a video, for use with gdata_youtube_video_set_access_control().
+ *
+ * Since: 0.7.0
+ **/
+#define GDATA_YOUTUBE_ACTION_COMMENT "comment"
+
+/**
+ * GDATA_YOUTUBE_ACTION_COMMENT_VOTE:
+ *
+ * An action to rate other users' comments on a video, for use with gdata_youtube_video_set_access_control().
+ *
+ * Since: 0.7.0
+ **/
+#define GDATA_YOUTUBE_ACTION_COMMENT_VOTE "commentVote"
+
+/**
+ * GDATA_YOUTUBE_ACTION_VIDEO_RESPOND:
+ *
+ * An action to add a video response to a video, for use with gdata_youtube_video_set_access_control().
+ *
+ * Since: 0.7.0
+ **/
+#define GDATA_YOUTUBE_ACTION_VIDEO_RESPOND "videoRespond"
+
+/**
+ * GDATA_YOUTUBE_ACTION_EMBED:
+ *
+ * An action to embed a video on third-party websites, for use with gdata_youtube_video_set_access_control().
+ *
+ * Since: 0.7.0
+ **/
+#define GDATA_YOUTUBE_ACTION_EMBED "embed"
+
+/**
+ * GDATA_YOUTUBE_ACTION_SYNDICATE:
+ *
+ * An action allowing YouTube to show the video on mobile phones and televisions, for use with gdata_youtube_video_set_access_control().
+ *
+ * Since: 0.7.0
+ **/
+#define GDATA_YOUTUBE_ACTION_SYNDICATE "syndicate"
 
 /**
  * GDataYouTubePermission:
@@ -125,8 +152,8 @@ guint gdata_youtube_video_get_view_count (GDataYouTubeVideo *self);
 guint gdata_youtube_video_get_favorite_count (GDataYouTubeVideo *self);
 const gchar *gdata_youtube_video_get_location (GDataYouTubeVideo *self);
 void gdata_youtube_video_set_location (GDataYouTubeVideo *self, const gchar *location);
-GDataYouTubePermission gdata_youtube_video_get_access_control (GDataYouTubeVideo *self, GDataYouTubeAction action);
-void gdata_youtube_video_set_access_control (GDataYouTubeVideo *self, GDataYouTubeAction action, GDataYouTubePermission permission);
+GDataYouTubePermission gdata_youtube_video_get_access_control (GDataYouTubeVideo *self, const gchar *action);
+void gdata_youtube_video_set_access_control (GDataYouTubeVideo *self, const gchar *action, GDataYouTubePermission permission);
 void gdata_youtube_video_get_rating (GDataYouTubeVideo *self, guint *min, guint *max, guint *count, gdouble *average);
 const gchar *gdata_youtube_video_get_keywords (GDataYouTubeVideo *self);
 void gdata_youtube_video_set_keywords (GDataYouTubeVideo *self, const gchar *keywords);
@@ -149,8 +176,8 @@ void gdata_youtube_video_set_is_draft (GDataYouTubeVideo *self, gboolean is_draf
 GDataYouTubeState *gdata_youtube_video_get_state (GDataYouTubeVideo *self);
 void gdata_youtube_video_get_recorded (GDataYouTubeVideo *self, GTimeVal *recorded);
 void gdata_youtube_video_set_recorded (GDataYouTubeVideo *self, const GTimeVal *recorded);
-GDataYouTubeAspectRatio gdata_youtube_video_get_aspect_ratio (GDataYouTubeVideo *self);
-void gdata_youtube_video_set_aspect_ratio (GDataYouTubeVideo *self, GDataYouTubeAspectRatio aspect_ratio);
+const gchar *gdata_youtube_video_get_aspect_ratio (GDataYouTubeVideo *self);
+void gdata_youtube_video_set_aspect_ratio (GDataYouTubeVideo *self, const gchar *aspect_ratio);
 
 gchar *gdata_youtube_video_get_video_id_from_uri (const gchar *video_uri);
 



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