diff options
Diffstat (limited to 'gdata/media')
-rw-r--r-- | gdata/media/gdata-media-category.c | 24 | ||||
-rw-r--r-- | gdata/media/gdata-media-content.c | 104 | ||||
-rw-r--r-- | gdata/media/gdata-media-credit.c | 24 | ||||
-rw-r--r-- | gdata/media/gdata-media-group.c | 14 | ||||
-rw-r--r-- | gdata/media/gdata-media-thumbnail.c | 40 |
5 files changed, 105 insertions, 101 deletions
diff --git a/gdata/media/gdata-media-category.c b/gdata/media/gdata-media-category.c index 72cf9564..4ed39781 100644 --- a/gdata/media/gdata-media-category.c +++ b/gdata/media/gdata-media-category.c @@ -90,10 +90,10 @@ gdata_media_category_class_init (GDataMediaCategoryClass *klass) * Since: 0.4.0 **/ g_object_class_install_property (gobject_class, PROP_CATEGORY, - g_param_spec_string ("category", - "Category", "The category name.", - NULL, - G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS)); + g_param_spec_string ("category", + "Category", "The category name.", + NULL, + G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS)); /** * GDataMediaCategory:scheme: @@ -105,10 +105,10 @@ gdata_media_category_class_init (GDataMediaCategoryClass *klass) * Since: 0.4.0 **/ g_object_class_install_property (gobject_class, PROP_SCHEME, - g_param_spec_string ("scheme", - "Scheme", "A URI that identifies the categorization scheme.", - NULL, - G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS)); + g_param_spec_string ("scheme", + "Scheme", "A URI that identifies the categorization scheme.", + NULL, + G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS)); /** * GDataMediaCategory:label: @@ -120,10 +120,10 @@ gdata_media_category_class_init (GDataMediaCategoryClass *klass) * Since: 0.4.0 **/ g_object_class_install_property (gobject_class, PROP_LABEL, - g_param_spec_string ("label", - "Label", "A human-readable label that can be displayed in end-user applications.", - NULL, - G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS)); + g_param_spec_string ("label", + "Label", "A human-readable label that can be displayed in end-user applications.", + NULL, + G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS)); } static void diff --git a/gdata/media/gdata-media-content.c b/gdata/media/gdata-media-content.c index 1ab00a56..e32d627a 100644 --- a/gdata/media/gdata-media-content.c +++ b/gdata/media/gdata-media-content.c @@ -99,10 +99,10 @@ gdata_media_content_class_init (GDataMediaContentClass *klass) * Since: 0.4.0 **/ g_object_class_install_property (gobject_class, PROP_URI, - g_param_spec_string ("uri", - "URI", "The direct URI to the media object.", - NULL, - G_PARAM_READABLE | G_PARAM_STATIC_STRINGS)); + g_param_spec_string ("uri", + "URI", "The direct URI to the media object.", + NULL, + G_PARAM_READABLE | G_PARAM_STATIC_STRINGS)); /** * GDataMediaContent:filesize: @@ -114,10 +114,10 @@ gdata_media_content_class_init (GDataMediaContentClass *klass) * Since: 0.4.0 **/ g_object_class_install_property (gobject_class, PROP_FILESIZE, - g_param_spec_ulong ("filesize", - "Filesize", "The number of bytes of the media object.", - 0, G_MAXULONG, 0, - G_PARAM_READABLE | G_PARAM_STATIC_STRINGS)); + g_param_spec_ulong ("filesize", + "Filesize", "The number of bytes of the media object.", + 0, G_MAXULONG, 0, + G_PARAM_READABLE | G_PARAM_STATIC_STRINGS)); /** * GDataMediaContent:content-type: @@ -129,10 +129,10 @@ gdata_media_content_class_init (GDataMediaContentClass *klass) * Since: 0.4.0 **/ g_object_class_install_property (gobject_class, PROP_CONTENT_TYPE, - g_param_spec_string ("content-type", - "Content type", "The standard MIME type of the object.", - NULL, - G_PARAM_READABLE | G_PARAM_STATIC_STRINGS)); + g_param_spec_string ("content-type", + "Content type", "The standard MIME type of the object.", + NULL, + G_PARAM_READABLE | G_PARAM_STATIC_STRINGS)); /** * GDataMediaContent:medium: @@ -145,25 +145,25 @@ gdata_media_content_class_init (GDataMediaContentClass *klass) * Since: 0.4.0 **/ g_object_class_install_property (gobject_class, PROP_MEDIUM, - g_param_spec_enum ("medium", - "Medium", "The type of object.", - GDATA_TYPE_MEDIA_MEDIUM, GDATA_MEDIA_UNKNOWN, - G_PARAM_READABLE | G_PARAM_STATIC_STRINGS)); + g_param_spec_enum ("medium", + "Medium", "The type of object.", + GDATA_TYPE_MEDIA_MEDIUM, GDATA_MEDIA_UNKNOWN, + G_PARAM_READABLE | G_PARAM_STATIC_STRINGS)); /** * GDataMediaContent:is-default: * - * Determines if this is the default object that should be used for the media group. There should only be one default object per media group. + * Determines if this is the default content for the media group. There should only be one default object per media group. * * For more information, see the <ulink type="http" url="http://video.search.yahoo.com/mrss">Media RSS specification</ulink>. * * Since: 0.4.0 **/ g_object_class_install_property (gobject_class, PROP_IS_DEFAULT, - g_param_spec_boolean ("is-default", - "Default?", "Determines if this is the default object that should be used for the media group.", - FALSE, - G_PARAM_READABLE | G_PARAM_STATIC_STRINGS)); + g_param_spec_boolean ("is-default", + "Default?", "Determines if this is the default content for the media group.", + FALSE, + G_PARAM_READABLE | G_PARAM_STATIC_STRINGS)); /** * GDataMediaContent:expression: @@ -175,10 +175,10 @@ gdata_media_content_class_init (GDataMediaContentClass *klass) * Since: 0.4.0 **/ g_object_class_install_property (gobject_class, PROP_EXPRESSION, - g_param_spec_enum ("expression", - "Expression", "Determines if the object is a sample or the full version of the object.", - GDATA_TYPE_MEDIA_EXPRESSION, GDATA_MEDIA_EXPRESSION_FULL, - G_PARAM_READABLE | G_PARAM_STATIC_STRINGS)); + g_param_spec_enum ("expression", + "Expression", "Determines if the object is a sample or the full version of the object.", + GDATA_TYPE_MEDIA_EXPRESSION, GDATA_MEDIA_EXPRESSION_FULL, + G_PARAM_READABLE | G_PARAM_STATIC_STRINGS)); /** * GDataMediaContent:duration: @@ -190,10 +190,10 @@ gdata_media_content_class_init (GDataMediaContentClass *klass) * Since: 0.4.0 **/ g_object_class_install_property (gobject_class, PROP_DURATION, - g_param_spec_int64 ("duration", - "Duration", "The number of seconds for which the media object plays.", - 0, G_MAXINT64, 0, - G_PARAM_READABLE | G_PARAM_STATIC_STRINGS)); + g_param_spec_int64 ("duration", + "Duration", "The number of seconds for which the media object plays.", + 0, G_MAXINT64, 0, + G_PARAM_READABLE | G_PARAM_STATIC_STRINGS)); /** * GDataMediaContent:height: @@ -205,10 +205,10 @@ gdata_media_content_class_init (GDataMediaContentClass *klass) * Since: 0.4.0 **/ g_object_class_install_property (gobject_class, PROP_HEIGHT, - g_param_spec_uint ("height", - "Height", "The height of the media object.", - 0, G_MAXUINT, 0, - G_PARAM_READABLE | G_PARAM_STATIC_STRINGS)); + g_param_spec_uint ("height", + "Height", "The height of the media object.", + 0, G_MAXUINT, 0, + G_PARAM_READABLE | G_PARAM_STATIC_STRINGS)); /** * GDataMediaContent:width: @@ -220,10 +220,10 @@ gdata_media_content_class_init (GDataMediaContentClass *klass) * Since: 0.4.0 **/ g_object_class_install_property (gobject_class, PROP_WIDTH, - g_param_spec_uint ("width", - "Width", "The width of the media object.", - 0, G_MAXUINT, 0, - G_PARAM_READABLE | G_PARAM_STATIC_STRINGS)); + g_param_spec_uint ("width", + "Width", "The width of the media object.", + 0, G_MAXUINT, 0, + G_PARAM_READABLE | G_PARAM_STATIC_STRINGS)); } static void @@ -302,13 +302,13 @@ pre_parse_xml (GDataParsable *parsable, xmlDoc *doc, xmlNode *root_node, gpointe /* Parse expression */ expression = xmlGetProp (root_node, (xmlChar*) "expression"); - if (expression == NULL || xmlStrcmp (expression, (xmlChar*) "full") == 0) + if (expression == NULL || xmlStrcmp (expression, (xmlChar*) "full") == 0) { expression_enum = GDATA_MEDIA_EXPRESSION_FULL; - else if (xmlStrcmp (expression, (xmlChar*) "sample") == 0) + } else if (xmlStrcmp (expression, (xmlChar*) "sample") == 0) { expression_enum = GDATA_MEDIA_EXPRESSION_SAMPLE; - else if (xmlStrcmp (expression, (xmlChar*) "nonstop") == 0) + } else if (xmlStrcmp (expression, (xmlChar*) "nonstop") == 0) { expression_enum = GDATA_MEDIA_EXPRESSION_NONSTOP; - else { + } else { gdata_parser_error_unknown_property_value (root_node, "expression", (gchar*) expression, error); xmlFree (expression); return FALSE; @@ -317,19 +317,19 @@ pre_parse_xml (GDataParsable *parsable, xmlDoc *doc, xmlNode *root_node, gpointe /* Parse medium */ medium = xmlGetProp (root_node, (xmlChar*) "medium"); - if (medium == NULL) + if (medium == NULL) { medium_enum = GDATA_MEDIA_UNKNOWN; - else if (xmlStrcmp (medium, (xmlChar*) "image") == 0) + } else if (xmlStrcmp (medium, (xmlChar*) "image") == 0) { medium_enum = GDATA_MEDIA_IMAGE; - else if (xmlStrcmp (medium, (xmlChar*) "audio") == 0) + } else if (xmlStrcmp (medium, (xmlChar*) "audio") == 0) { medium_enum = GDATA_MEDIA_AUDIO; - else if (xmlStrcmp (medium, (xmlChar*) "video") == 0) + } else if (xmlStrcmp (medium, (xmlChar*) "video") == 0) { medium_enum = GDATA_MEDIA_VIDEO; - else if (xmlStrcmp (medium, (xmlChar*) "document") == 0) + } else if (xmlStrcmp (medium, (xmlChar*) "document") == 0) { medium_enum = GDATA_MEDIA_DOCUMENT; - else if (xmlStrcmp (medium, (xmlChar*) "executable") == 0) + } else if (xmlStrcmp (medium, (xmlChar*) "executable") == 0) { medium_enum = GDATA_MEDIA_EXECUTABLE; - else { + } else { gdata_parser_error_unknown_property_value (root_node, "medium", (gchar*) medium, error); xmlFree (medium); return FALSE; @@ -555,7 +555,8 @@ gdata_media_content_get_width (GDataMediaContent *self) * Since: 0.6.0 **/ GFile * -gdata_media_content_download (GDataMediaContent *self, GDataService *service, const gchar *default_filename, GFile *target_dest_file, gboolean replace_file_if_exists, GCancellable *cancellable, GError **error) +gdata_media_content_download (GDataMediaContent *self, GDataService *service, const gchar *default_filename, GFile *target_dest_file, + gboolean replace_file_if_exists, GCancellable *cancellable, GError **error) { GFileOutputStream *dest_stream; const gchar *src_uri; @@ -570,7 +571,8 @@ gdata_media_content_download (GDataMediaContent *self, GDataService *service, co g_return_val_if_fail (cancellable == NULL || G_IS_CANCELLABLE (cancellable), NULL); g_return_val_if_fail (error == NULL || *error == NULL, NULL); - dest_stream = _gdata_download_stream_find_destination (default_filename, target_dest_file, &actual_file, replace_file_if_exists, cancellable, error); + dest_stream = _gdata_download_stream_find_destination (default_filename, target_dest_file, &actual_file, replace_file_if_exists, + cancellable, error); if (dest_stream == NULL) return NULL; @@ -579,7 +581,7 @@ gdata_media_content_download (GDataMediaContent *self, GDataService *service, co /* Synchronously splice the data from the download stream to the file stream (network -> disk) */ src_stream = gdata_download_stream_new (GDATA_SERVICE (service), src_uri); g_output_stream_splice (G_OUTPUT_STREAM (dest_stream), src_stream, - G_OUTPUT_STREAM_SPLICE_CLOSE_SOURCE | G_OUTPUT_STREAM_SPLICE_CLOSE_TARGET, cancellable, &child_error); + G_OUTPUT_STREAM_SPLICE_CLOSE_SOURCE | G_OUTPUT_STREAM_SPLICE_CLOSE_TARGET, cancellable, &child_error); g_object_unref (src_stream); g_object_unref (dest_stream); if (child_error != NULL) { diff --git a/gdata/media/gdata-media-credit.c b/gdata/media/gdata-media-credit.c index 5784f8e1..92a96619 100644 --- a/gdata/media/gdata-media-credit.c +++ b/gdata/media/gdata-media-credit.c @@ -86,10 +86,10 @@ gdata_media_credit_class_init (GDataMediaCreditClass *klass) * Since: 0.4.0 **/ g_object_class_install_property (gobject_class, PROP_CREDIT, - g_param_spec_string ("credit", - "Credit", "The credited entity's name.", - NULL, - G_PARAM_READABLE | G_PARAM_STATIC_STRINGS)); + g_param_spec_string ("credit", + "Credit", "The credited entity's name.", + NULL, + G_PARAM_READABLE | G_PARAM_STATIC_STRINGS)); /** * GDataMediaCredit:scheme: @@ -101,10 +101,10 @@ gdata_media_credit_class_init (GDataMediaCreditClass *klass) * Since: 0.4.0 **/ g_object_class_install_property (gobject_class, PROP_SCHEME, - g_param_spec_string ("scheme", - "Scheme", "A URI that identifies the role scheme.", - NULL, - G_PARAM_READABLE | G_PARAM_STATIC_STRINGS)); + g_param_spec_string ("scheme", + "Scheme", "A URI that identifies the role scheme.", + NULL, + G_PARAM_READABLE | G_PARAM_STATIC_STRINGS)); /** * GDataMediaCredit:role: @@ -116,10 +116,10 @@ gdata_media_credit_class_init (GDataMediaCreditClass *klass) * Since: 0.4.0 **/ g_object_class_install_property (gobject_class, PROP_ROLE, - g_param_spec_string ("role", - "Role", "The role the credited entity played in the production of the media.", - NULL, - G_PARAM_READABLE | G_PARAM_STATIC_STRINGS)); + g_param_spec_string ("role", + "Role", "The role the credited entity played in the production of the media.", + NULL, + G_PARAM_READABLE | G_PARAM_STATIC_STRINGS)); } static void diff --git a/gdata/media/gdata-media-group.c b/gdata/media/gdata-media-group.c index f75a5388..e9566f24 100644 --- a/gdata/media/gdata-media-group.c +++ b/gdata/media/gdata-media-group.c @@ -144,13 +144,13 @@ parse_xml (GDataParsable *parsable, xmlDoc *doc, xmlNode *node, gpointer user_da if (gdata_parser_string_from_element (node, "title", P_NONE, &(self->priv->title), &success, error) == TRUE || gdata_parser_string_from_element (node, "description", P_NONE, &(self->priv->description), &success, error) == TRUE || gdata_parser_object_from_element_setter (node, "category", P_REQUIRED, GDATA_TYPE_MEDIA_CATEGORY, - gdata_media_group_set_category, self, &success, error) == TRUE || + gdata_media_group_set_category, self, &success, error) == TRUE || gdata_parser_object_from_element_setter (node, "content", P_REQUIRED, GDATA_TYPE_MEDIA_CONTENT, - _gdata_media_group_add_content, self, &success, error) == TRUE || + _gdata_media_group_add_content, self, &success, error) == TRUE || gdata_parser_object_from_element_setter (node, "thumbnail", P_REQUIRED, GDATA_TYPE_MEDIA_THUMBNAIL, - _gdata_media_group_add_thumbnail, self, &success, error) == TRUE || + _gdata_media_group_add_thumbnail, self, &success, error) == TRUE || gdata_parser_object_from_element (node, "credit", P_REQUIRED | P_NO_DUPES, GDATA_TYPE_MEDIA_CREDIT, - &(self->priv->credit), &success, error) == TRUE) { + &(self->priv->credit), &success, error) == TRUE) { return success; } else if (xmlStrcmp (node->name, (xmlChar*) "keywords") == 0) { /* media:keywords */ @@ -220,11 +220,11 @@ parse_xml (GDataParsable *parsable, xmlDoc *doc, xmlNode *node, gpointer user_da xmlFree (type); relationship = xmlGetProp (node, (xmlChar*) "relationship"); - if (xmlStrcmp (relationship, (xmlChar*) "allow") == 0) + if (xmlStrcmp (relationship, (xmlChar*) "allow") == 0) { relationship_bool = FALSE; /* it's *not* a restricted country */ - else if (xmlStrcmp (relationship, (xmlChar*) "deny") == 0) + } else if (xmlStrcmp (relationship, (xmlChar*) "deny") == 0) { relationship_bool = TRUE; /* it *is* a restricted country */ - else { + } else { gdata_parser_error_unknown_property_value (node, "relationship", (gchar*) relationship, error); xmlFree (relationship); return FALSE; diff --git a/gdata/media/gdata-media-thumbnail.c b/gdata/media/gdata-media-thumbnail.c index eb98a679..59592a74 100644 --- a/gdata/media/gdata-media-thumbnail.c +++ b/gdata/media/gdata-media-thumbnail.c @@ -86,10 +86,10 @@ gdata_media_thumbnail_class_init (GDataMediaThumbnailClass *klass) * Since: 0.4.0 **/ g_object_class_install_property (gobject_class, PROP_URI, - g_param_spec_string ("uri", - "URI", "The URI of the thumbnail.", - NULL, - G_PARAM_READABLE | G_PARAM_STATIC_STRINGS)); + g_param_spec_string ("uri", + "URI", "The URI of the thumbnail.", + NULL, + G_PARAM_READABLE | G_PARAM_STATIC_STRINGS)); /** * GDataMediaThumbnail:height: @@ -101,10 +101,10 @@ gdata_media_thumbnail_class_init (GDataMediaThumbnailClass *klass) * Since: 0.4.0 **/ g_object_class_install_property (gobject_class, PROP_HEIGHT, - g_param_spec_uint ("height", - "Height", "The height of the thumbnail, in pixels.", - 0, G_MAXUINT, 0, - G_PARAM_READABLE | G_PARAM_STATIC_STRINGS)); + g_param_spec_uint ("height", + "Height", "The height of the thumbnail, in pixels.", + 0, G_MAXUINT, 0, + G_PARAM_READABLE | G_PARAM_STATIC_STRINGS)); /** * GDataMediaThumbnail:width: @@ -116,10 +116,10 @@ gdata_media_thumbnail_class_init (GDataMediaThumbnailClass *klass) * Since: 0.4.0 **/ g_object_class_install_property (gobject_class, PROP_WIDTH, - g_param_spec_uint ("width", - "Width", "The width of the thumbnail, in pixels.", - 0, G_MAXUINT, 0, - G_PARAM_READABLE | G_PARAM_STATIC_STRINGS)); + g_param_spec_uint ("width", + "Width", "The width of the thumbnail, in pixels.", + 0, G_MAXUINT, 0, + G_PARAM_READABLE | G_PARAM_STATIC_STRINGS)); /** * GDataMediaThumbnail:time: @@ -131,10 +131,10 @@ gdata_media_thumbnail_class_init (GDataMediaThumbnailClass *klass) * Since: 0.4.0 **/ g_object_class_install_property (gobject_class, PROP_TIME, - g_param_spec_int64 ("time", - "Time", "The time offset of the thumbnail in relation to the media object, in milliseconds.", - -1, G_MAXINT64, -1, - G_PARAM_READABLE | G_PARAM_STATIC_STRINGS)); + g_param_spec_int64 ("time", + "Time", "The time offset of the thumbnail in relation to the media object, in ms.", + -1, G_MAXINT64, -1, + G_PARAM_READABLE | G_PARAM_STATIC_STRINGS)); } static void @@ -382,7 +382,8 @@ gdata_media_thumbnail_get_time (GDataMediaThumbnail *self) * Since: 0.6.0 **/ GFile * -gdata_media_thumbnail_download (GDataMediaThumbnail *self, GDataService *service, const gchar *default_filename, GFile *target_dest_file, gboolean replace_file_if_exists, GCancellable *cancellable, GError **error) +gdata_media_thumbnail_download (GDataMediaThumbnail *self, GDataService *service, const gchar *default_filename, GFile *target_dest_file, + gboolean replace_file_if_exists, GCancellable *cancellable, GError **error) { GFileOutputStream *dest_stream; const gchar *src_uri; @@ -397,7 +398,8 @@ gdata_media_thumbnail_download (GDataMediaThumbnail *self, GDataService *service g_return_val_if_fail (cancellable == NULL || G_IS_CANCELLABLE (cancellable), NULL); g_return_val_if_fail (error == NULL || *error == NULL, NULL); - dest_stream = _gdata_download_stream_find_destination (default_filename, target_dest_file, &actual_file, replace_file_if_exists, cancellable, error); + dest_stream = _gdata_download_stream_find_destination (default_filename, target_dest_file, &actual_file, replace_file_if_exists, + cancellable, error); if (dest_stream == NULL) return NULL; @@ -406,7 +408,7 @@ gdata_media_thumbnail_download (GDataMediaThumbnail *self, GDataService *service /* Synchronously splice the data from the download stream to the file stream (network -> disk) */ src_stream = gdata_download_stream_new (GDATA_SERVICE (service), src_uri); g_output_stream_splice (G_OUTPUT_STREAM (dest_stream), src_stream, - G_OUTPUT_STREAM_SPLICE_CLOSE_SOURCE | G_OUTPUT_STREAM_SPLICE_CLOSE_TARGET, cancellable, &child_error); + G_OUTPUT_STREAM_SPLICE_CLOSE_SOURCE | G_OUTPUT_STREAM_SPLICE_CLOSE_TARGET, cancellable, &child_error); g_object_unref (src_stream); g_object_unref (dest_stream); if (child_error != NULL) { |