diff options
author | Philip Withnall <philip@tecnocode.co.uk> | 2010-04-03 00:02:49 +0100 |
---|---|---|
committer | Philip Withnall <philip@tecnocode.co.uk> | 2010-04-16 21:34:06 +0100 |
commit | f3d4e4261e0b1b06c2ab5ec401b08e518ed22090 (patch) | |
tree | c94a37f2d2801788e616852280b7f52effb93fbb /gdata/media/gdata-media-content.h | |
parent | e54748533b841ffa9decbb0245b1bdb39a86ae3e (diff) | |
download | libgdata-f3d4e4261e0b1b06c2ab5ec401b08e518ed22090.tar.gz |
[core] Mark most getter functions as pure
Add G_GNUC_PURE to all applicable getter functions, which should allow gcc to
optimise calls to libgdata in some cases. This required a little rewrite of
the authentication system to ensure the username and password (etc.) are only
changed on the #GDataService from the main thread.
Diffstat (limited to 'gdata/media/gdata-media-content.h')
-rw-r--r-- | gdata/media/gdata-media-content.h | 19 |
1 files changed, 10 insertions, 9 deletions
diff --git a/gdata/media/gdata-media-content.h b/gdata/media/gdata-media-content.h index 324a878d..e8a1ad1e 100644 --- a/gdata/media/gdata-media-content.h +++ b/gdata/media/gdata-media-content.h @@ -97,15 +97,16 @@ typedef struct { GType gdata_media_content_get_type (void) G_GNUC_CONST; -const gchar *gdata_media_content_get_uri (GDataMediaContent *self); -gsize gdata_media_content_get_filesize (GDataMediaContent *self); -const gchar *gdata_media_content_get_content_type (GDataMediaContent *self); -GDataMediaMedium gdata_media_content_get_medium (GDataMediaContent *self); -gboolean gdata_media_content_is_default (GDataMediaContent *self); -GDataMediaExpression gdata_media_content_get_expression (GDataMediaContent *self); -gint64 gdata_media_content_get_duration (GDataMediaContent *self); -guint gdata_media_content_get_height (GDataMediaContent *self); -guint gdata_media_content_get_width (GDataMediaContent *self); +const gchar *gdata_media_content_get_uri (GDataMediaContent *self) G_GNUC_PURE; +gsize gdata_media_content_get_filesize (GDataMediaContent *self) G_GNUC_PURE; +const gchar *gdata_media_content_get_content_type (GDataMediaContent *self) G_GNUC_PURE; +GDataMediaMedium gdata_media_content_get_medium (GDataMediaContent *self) G_GNUC_PURE; +gboolean gdata_media_content_is_default (GDataMediaContent *self) G_GNUC_PURE; +GDataMediaExpression gdata_media_content_get_expression (GDataMediaContent *self) G_GNUC_PURE; +gint64 gdata_media_content_get_duration (GDataMediaContent *self) G_GNUC_PURE; +guint gdata_media_content_get_height (GDataMediaContent *self) G_GNUC_PURE; +guint gdata_media_content_get_width (GDataMediaContent *self) G_GNUC_PURE; + 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) G_GNUC_WARN_UNUSED_RESULT G_GNUC_MALLOC; |