diff options
author | Philip Withnall <philip.withnall@collabora.co.uk> | 2015-07-10 10:32:56 +0100 |
---|---|---|
committer | Philip Withnall <philip.withnall@collabora.co.uk> | 2015-07-10 10:38:38 +0100 |
commit | b37f185f7a24ec0ff87e4acadeb90ab2fd556382 (patch) | |
tree | ccaea7b2de733862e270e861b5af59b1eab49890 | |
parent | b5262ecca7237c414dcd6dc59ae0ba244c628242 (diff) | |
download | libgdata-b37f185f7a24ec0ff87e4acadeb90ab2fd556382.tar.gz |
core: Add a new internal method for setting GDataEntry:etag
This will be useful for YouTube comments, coming up shortly.
-rw-r--r-- | gdata/gdata-entry.c | 18 | ||||
-rw-r--r-- | gdata/gdata-private.h | 1 |
2 files changed, 19 insertions, 0 deletions
diff --git a/gdata/gdata-entry.c b/gdata/gdata-entry.c index c154d887..dd35bc17 100644 --- a/gdata/gdata-entry.c +++ b/gdata/gdata-entry.c @@ -824,6 +824,24 @@ gdata_entry_get_etag (GDataEntry *self) return NULL; } +/* + * _gdata_entry_set_etag: + * @self: a #GDataEntry + * @etag: the new ETag value + * + * Sets the value of the #GDataEntry:etag property to @etag. + * + * Since: UNRELEASED + */ +void +_gdata_entry_set_etag (GDataEntry *self, const gchar *etag) +{ + g_return_if_fail (GDATA_IS_ENTRY (self)); + + g_free (self->priv->etag); + self->priv->etag = g_strdup (etag); +} + /** * gdata_entry_get_updated: * @self: a #GDataEntry diff --git a/gdata/gdata-private.h b/gdata/gdata-private.h index c3f61384..62b16696 100644 --- a/gdata/gdata-private.h +++ b/gdata/gdata-private.h @@ -118,6 +118,7 @@ _gdata_feed_set_page_info (GDataFeed *self, guint total_results, G_GNUC_INTERNAL void _gdata_entry_set_updated (GDataEntry *self, gint64 updated); G_GNUC_INTERNAL void _gdata_entry_set_published (GDataEntry *self, gint64 published); G_GNUC_INTERNAL void _gdata_entry_set_id (GDataEntry *self, const gchar *id); +G_GNUC_INTERNAL void _gdata_entry_set_etag (GDataEntry *self, const gchar *etag); G_GNUC_INTERNAL void _gdata_entry_set_batch_data (GDataEntry *self, guint id, GDataBatchOperationType type); #include "gdata-access-rule.h" |