[libgdata] picasaweb: Remove GDataPicasaWebFile:position
- From: Philip Withnall <pwithnall src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [libgdata] picasaweb: Remove GDataPicasaWebFile:position
- Date: Sat, 4 Dec 2010 12:30:41 +0000 (UTC)
commit abc595a95f9556678bde56364fdfe40920fbb5cb
Author: Philip Withnall <philip tecnocode co uk>
Date: Thu Dec 2 18:24:40 2010 +0000
picasaweb: Remove GDataPicasaWebFile:position
The service no longer deals with photo positions in albums (see
http://code.google.com/apis/picasaweb/docs/2.0/releasenotes.html). The
following API has been removed:
â?¢ GDataPicasaWebFile:position
â?¢ gdata_picasaweb_file_get_position()
â?¢ gdata_picasaweb_file_set_position()
docs/reference/gdata-sections.txt | 2 -
gdata/gdata.symbols | 2 -
gdata/services/picasaweb/gdata-picasaweb-file.c | 67 -----------------------
gdata/services/picasaweb/gdata-picasaweb-file.h | 2 -
gdata/tests/picasaweb.c | 4 --
5 files changed, 0 insertions(+), 77 deletions(-)
---
diff --git a/docs/reference/gdata-sections.txt b/docs/reference/gdata-sections.txt
index 89c2080..382ee15 100644
--- a/docs/reference/gdata-sections.txt
+++ b/docs/reference/gdata-sections.txt
@@ -1472,8 +1472,6 @@ gdata_picasaweb_file_new
gdata_picasaweb_file_get_id
gdata_picasaweb_file_get_edited
gdata_picasaweb_file_get_version
-gdata_picasaweb_file_get_position
-gdata_picasaweb_file_set_position
gdata_picasaweb_file_get_album_id
gdata_picasaweb_file_set_album_id
gdata_picasaweb_file_get_width
diff --git a/gdata/gdata.symbols b/gdata/gdata.symbols
index ec8232d..ae97d82 100644
--- a/gdata/gdata.symbols
+++ b/gdata/gdata.symbols
@@ -548,8 +548,6 @@ gdata_picasaweb_file_new
gdata_picasaweb_file_get_id
gdata_picasaweb_file_get_edited
gdata_picasaweb_file_get_version
-gdata_picasaweb_file_get_position
-gdata_picasaweb_file_set_position
gdata_picasaweb_file_get_album_id
gdata_picasaweb_file_set_album_id
gdata_picasaweb_file_get_width
diff --git a/gdata/services/picasaweb/gdata-picasaweb-file.c b/gdata/services/picasaweb/gdata-picasaweb-file.c
index b2081f2..b4623f6 100644
--- a/gdata/services/picasaweb/gdata-picasaweb-file.c
+++ b/gdata/services/picasaweb/gdata-picasaweb-file.c
@@ -109,7 +109,6 @@ struct _GDataPicasaWebFilePrivate {
gchar *file_id;
gint64 edited;
gchar *version;
- gdouble position;
gchar *album_id;
guint width;
guint height;
@@ -132,7 +131,6 @@ struct _GDataPicasaWebFilePrivate {
enum {
PROP_EDITED = 1,
PROP_VERSION,
- PROP_POSITION,
PROP_ALBUM_ID,
PROP_WIDTH,
PROP_HEIGHT,
@@ -268,22 +266,6 @@ gdata_picasaweb_file_class_init (GDataPicasaWebFileClass *klass)
G_PARAM_READABLE | G_PARAM_STATIC_STRINGS));
/**
- * GDataPicasaWebFile:position:
- *
- * The ordinal position of the file within the album. Lower values mean the file will be closer to the start of the album.
- *
- * For more information, see the <ulink type="http" url="http://code.google.com/apis/picasaweb/reference.html#gphoto_position">
- * gphoto specification</ulink>.
- *
- * Since: 0.4.0
- **/
- g_object_class_install_property (gobject_class, PROP_POSITION,
- g_param_spec_double ("position",
- "Position", "The ordinal position of the file within the album.",
- 0.0, G_MAXFLOAT, 0.0,
- G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
-
- /**
* GDataPicasaWebFile:width:
*
* The width of the photo or video, in pixels.
@@ -740,9 +722,6 @@ gdata_picasaweb_file_get_property (GObject *object, guint property_id, GValue *v
case PROP_VERSION:
g_value_set_string (value, priv->version);
break;
- case PROP_POSITION:
- g_value_set_double (value, priv->position);
- break;
case PROP_ALBUM_ID:
g_value_set_string (value, priv->album_id);
break;
@@ -839,9 +818,6 @@ gdata_picasaweb_file_set_property (GObject *object, guint property_id, const GVa
g_free (self->priv->version);
self->priv->version = g_value_dup_string (value);
break;
- case PROP_POSITION:
- gdata_picasaweb_file_set_position (self, g_value_get_double (value));
- break;
case PROP_ALBUM_ID:
/* TODO: do we allow this to change albums? I think that's how pictures are moved. */
gdata_picasaweb_file_set_album_id (self, g_value_get_string (value));
@@ -910,11 +886,6 @@ parse_xml (GDataParsable *parsable, xmlDoc *doc, xmlNode *node, gpointer user_da
gdata_parser_string_from_element (node, "id", P_REQUIRED | P_NON_EMPTY | P_NO_DUPES,
&(self->priv->file_id), &success, error) == TRUE) {
return success;
- } else if (xmlStrcmp (node->name, (xmlChar*) "position") == 0) {
- /* gphoto:position */
- xmlChar *position_str = xmlNodeListGetString (doc, node->children, TRUE);
- gdata_picasaweb_file_set_position (self, g_ascii_strtod ((gchar*) position_str, NULL));
- xmlFree (position_str);
} else if (xmlStrcmp (node->name, (xmlChar*) "width") == 0) {
/* gphoto:width */
xmlChar *width = xmlNodeListGetString (doc, node->children, TRUE);
@@ -976,7 +947,6 @@ static void
get_xml (GDataParsable *parsable, GString *xml_string)
{
GDataPicasaWebFilePrivate *priv = GDATA_PICASAWEB_FILE (parsable)->priv;
- gchar ascii_double_str[G_ASCII_DTOSTR_BUF_SIZE];
/* Chain up to the parent class */
GDATA_PARSABLE_CLASS (gdata_picasaweb_file_parent_class)->get_xml (parsable, xml_string);
@@ -988,9 +958,6 @@ get_xml (GDataParsable *parsable, GString *xml_string)
if (priv->version != NULL)
gdata_parser_string_append_escaped (xml_string, "<gphoto:version>", priv->version, "</gphoto:version>");
- g_string_append_printf (xml_string, "<gphoto:position>%s</gphoto:position>",
- g_ascii_dtostr (ascii_double_str, sizeof (ascii_double_str), priv->position));
-
if (priv->album_id != NULL)
gdata_parser_string_append_escaped (xml_string, "<gphoto:albumid>", priv->album_id, "</gphoto:albumid>");
@@ -1142,40 +1109,6 @@ gdata_picasaweb_file_get_version (GDataPicasaWebFile *self)
}
/**
- * gdata_picasaweb_file_get_position:
- * @self: a #GDataPicasaWebFile
- *
- * Gets the #GDataPicasaWebFile:position property.
- *
- * Return value: the file's ordinal position in the album
- *
- * Since: 0.4.0
- **/
-gdouble
-gdata_picasaweb_file_get_position (GDataPicasaWebFile *self)
-{
- g_return_val_if_fail (GDATA_IS_PICASAWEB_FILE (self), 0.0);
- return self->priv->position;
-}
-
-/**
- * gdata_picasaweb_file_set_position:
- * @self: a #GDataPicasaWebFile
- * @position: the file's new position in the album
- *
- * Sets the #GDataPicasaWebFile:position property.
- *
- * Since: 0.4.0
- **/
-void
-gdata_picasaweb_file_set_position (GDataPicasaWebFile *self, gdouble position)
-{
- g_return_if_fail (GDATA_IS_PICASAWEB_FILE (self));
- self->priv->position = position;
- g_object_notify (G_OBJECT (self), "position");
-}
-
-/**
* gdata_picasaweb_file_get_album_id:
* @self: a #GDataPicasaWebFile
*
diff --git a/gdata/services/picasaweb/gdata-picasaweb-file.h b/gdata/services/picasaweb/gdata-picasaweb-file.h
index ccc5512..709f06c 100644
--- a/gdata/services/picasaweb/gdata-picasaweb-file.h
+++ b/gdata/services/picasaweb/gdata-picasaweb-file.h
@@ -105,8 +105,6 @@ GDataPicasaWebFile *gdata_picasaweb_file_new (const gchar *id) G_GNUC_WARN_UNUSE
const gchar *gdata_picasaweb_file_get_id (GDataPicasaWebFile *self) G_GNUC_PURE;
gint64 gdata_picasaweb_file_get_edited (GDataPicasaWebFile *self);
const gchar *gdata_picasaweb_file_get_version (GDataPicasaWebFile *self) G_GNUC_PURE;
-gdouble gdata_picasaweb_file_get_position (GDataPicasaWebFile *self) G_GNUC_PURE;
-void gdata_picasaweb_file_set_position (GDataPicasaWebFile *self, gdouble position);
const gchar *gdata_picasaweb_file_get_album_id (GDataPicasaWebFile *self) G_GNUC_PURE;
/* TODO should we have a more obvious _move() API too? nah */
void gdata_picasaweb_file_set_album_id (GDataPicasaWebFile *self, const gchar *album_id);
diff --git a/gdata/tests/picasaweb.c b/gdata/tests/picasaweb.c
index e1c0eda..5d07ea8 100644
--- a/gdata/tests/picasaweb.c
+++ b/gdata/tests/picasaweb.c
@@ -184,7 +184,6 @@ test_upload_async (gconstpointer service)
"<summary type='text'>Async Photo Summary \\(%s\\)</summary>"
"<category term='http://schemas.google.com/photos/2007#photo' "
"scheme='http://schemas.google.com/g/2005#kind'/>"
- "<gphoto:position>0</gphoto:position>"
"<gphoto:timestamp>([0-9]+)</gphoto:timestamp>"
"<gphoto:commentingEnabled>true</gphoto:commentingEnabled>"
"<media:group>"
@@ -558,7 +557,6 @@ test_upload_simple (gconstpointer service)
"<summary type='text'>Photo Summary \\(%s\\)</summary>"
"<category term='http://schemas.google.com/photos/2007#photo' "
"scheme='http://schemas.google.com/g/2005#kind'/>"
- "<gphoto:position>0</gphoto:position>"
"<gphoto:timestamp>([0-9]+)</gphoto:timestamp>"
"<gphoto:commentingEnabled>true</gphoto:commentingEnabled>"
"<media:group>"
@@ -753,7 +751,6 @@ test_photo (gconstpointer service)
g_assert_cmpstr (gdata_picasaweb_file_get_caption (photo), ==, "Ginger cookie caption");
g_assert_cmpstr (gdata_picasaweb_file_get_version (photo), ==, "29"); /* 1240729023474000"); */ /* TODO check how constant this even is */
- g_assert_cmpfloat (gdata_picasaweb_file_get_position (photo), ==, 0.0);
g_assert_cmpstr (gdata_picasaweb_file_get_album_id (photo), ==, "5328889949261497249");
g_assert_cmpuint (gdata_picasaweb_file_get_width (photo), ==, 2576);
g_assert_cmpuint (gdata_picasaweb_file_get_height (photo), ==, 1932);
@@ -1549,7 +1546,6 @@ test_file_escaping (void)
"<category term='http://schemas.google.com/photos/2007#photo' scheme='http://schemas.google.com/g/2005#kind'/>"
"<gphoto:id><id></gphoto:id>"
"<gphoto:version><version></gphoto:version>"
- "<gphoto:position>0</gphoto:position>"
"<gphoto:albumid>http://foo.com?foo&bar</gphoto:albumid>"
"<gphoto:checksum><checksum></gphoto:checksum>"
"<gphoto:commentingEnabled>true</gphoto:commentingEnabled>"
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]