After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 589858 - Handle gphoto XML elements found in 'GDataFeed'
Handle gphoto XML elements found in 'GDataFeed'
Status: RESOLVED FIXED
Product: libgdata
Classification: Platform
Component: PicasaWeb service
git master
Other All
: Normal enhancement
: ---
Assigned To: libgdata-maint
libgdata-maint
Depends on:
Blocks:
 
 
Reported: 2009-07-27 11:44 UTC by Richard Schwarting
Modified: 2009-10-27 08:25 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Patch adding support for atom:icon to GDataFeed (4.96 KB, patch)
2009-10-04 03:31 UTC, Richard Schwarting
needs-work Details | Review
Patch adding support for gphoto:access as visibility to GDataPicasaWebFile (6.66 KB, patch)
2009-10-04 05:12 UTC, Richard Schwarting
rejected Details | Review
Patch adding support for atom:icon to GDataFeed with since and proper uri (5.03 KB, patch)
2009-10-07 21:38 UTC, Richard Schwarting
committed Details | Review
Patch capturing and suppressing gphoto:access on GDataPicasaWebFile (1002 bytes, patch)
2009-10-07 21:39 UTC, Richard Schwarting
committed Details | Review
Patch adding GDataPicasaWebUser class, handling various user feed elements (43.05 KB, patch)
2009-10-16 05:32 UTC, Richard Schwarting
none Details | Review
Patch adding support for GDataPicasaWebUser and GDataPicasaFeed (38.07 KB, patch)
2009-10-21 03:35 UTC, Richard Schwarting
committed Details | Review

Description Richard Schwarting 2009-07-27 11:44:44 UTC
There's some user/account-specific information which it would be nice to capture and offer, including quota and user information.  

This is reported when we run the picasaweb test:

** Message: Unhandled XML in GDataFeed: <icon>http://lh6.ggpht.com/_1kdcGyvOb8c/AAAA9mDag3s/AAAAAAAAAAA/Jq-NWYWKFao/s64-c/libgdata.picasaweb.jpg</icon>
** Message: Unhandled XML in GDataFeed: <gphoto:user>libgdata.picasaweb</gphoto:user>
** Message: Unhandled XML in GDataFeed: <gphoto:nickname>libgdata.picasaweb</gphoto:nickname>
** Message: Unhandled XML in GDataFeed: <gphoto:thumbnail>http://lh6.ggpht.com/_1kdcGyvOb8c/AAAA9mDag3s/AAAAAAAAAAA/Jq-NWYWKFao/s64-c/libgdata.picasaweb.jpg</gphoto:thumbnail>
** Message: Unhandled XML in GDataFeed: <gphoto:quotalimit>1073741824</gphoto:quotalimit>
** Message: Unhandled XML in GDataFeed: <gphoto:quotacurrent>2721086</gphoto:quotacurrent>
** Message: Unhandled XML in GDataFeed: <gphoto:maxPhotosPerAlbum>500</gphoto:maxPhotosPerAlbum>
Comment 1 Richard Schwarting 2009-07-27 13:25:24 UTC
Going to implement something like GDATA_TYPE_CALENDAR_FEED.  
Comment 2 Philip Withnall 2009-07-27 14:03:18 UTC
Yes, that's the right thing to do. However, you should check first to see if the feed class should be specific to the query which is producing that unhandled XML, or if the class can be general across all PicasaWeb queries. (i.e. Does it make sense to expose a user, nickname, thumbnail, quota limit, etc. across all PicasaWeb queries? Do we get given the XML from all of them?)

Note also that <icon> support should be added to GDataQuery, rather than in a new class.
Comment 3 Philip Withnall 2009-08-05 14:50:32 UTC
(In reply to comment #2)
> Note also that <icon> support should be added to GDataQuery, rather than in a
> new class.

Whoops. It should be added to GDataFeed, sorry.

Comment 4 Richard Schwarting 2009-08-06 03:24:54 UTC
Hehe.  I started figuring that.  I'm starting to look at the other services again to get the best idea of how to do this.

I noticed that the properties of GDataPicasaWebAlbum, which we currently get from <entry> nodes from a <feed> of queried albums, are also contained as elements of the feed in a query for an album's photo entries.  

Would we want to bother parsing those again?  GDataPicasaWebService's API for listing files for an album requires supplying GDataPicasaWebAlbum which assumes someone already parsed the <feed> of album entries from the albums queries, so it doesn't seem necessary.

Comment 5 Philip Withnall 2009-08-06 06:59:46 UTC
(In reply to comment #4)
> Would we want to bother parsing those again?  GDataPicasaWebService's API for
> listing files for an album requires supplying GDataPicasaWebAlbum which assumes
> someone already parsed the <feed> of album entries from the albums queries, so
> it doesn't seem necessary.

No, we don't want to parse them again. Let's not make the API unnecessarily bloated. Patches welcome to ignore those nodes when they're children of a <feed>.
Comment 6 Richard Schwarting 2009-10-04 03:31:17 UTC
Created attachment 144696 [details] [review]
Patch adding support for atom:icon to GDataFeed

GDataFeed support for atom:icon, modelled after support for atom:logo, + a test using a PicasaWeb Album's feed.
Comment 7 Richard Schwarting 2009-10-04 05:12:50 UTC
Created attachment 144698 [details] [review]
Patch adding support for gphoto:access as visibility to GDataPicasaWebFile

Now that I've written this, I'm beginning to wonder whether it was decided to not support visibility directly in GDataPicasaWebFile yet because PicasaWeb doesn't yet offer fine-grained access control over individual photos and videos, only their albums.

The <gphoto:access> element is included in photos' GDataEntry elements, it's nice to have the visibility information without grabbing the album first, but I understand if you'd rather not store information accessible through the album again on the file. 

If we don't end up supporting <gphoto:access> on photo's themselves, is there some appropriate way to suppress the "Unhandled XML" messages?


About the patch:
Based off of GDataPicasaWebAlbum's support for gphoto:access as visibility.

One issue with that is, in reusing GDataPicasaWebVisibility, I am including "gdata-picasaweb-album.h" in gdata-picasaweb-file.h for its definition.  Should GDataPicasaWebVisibility have its definition stored in gdata-picasaweb-enums.h instead (which seems to be autogenerated)?

Yah, no setters since we cannot control access rights at the file level right now.
Comment 8 Richard Schwarting 2009-10-04 05:40:28 UTC
WHAT THERE IS NOW:

Concerning remaining "Unhandled XML" messages, 

So it seems the main elements I'm interested in from a GDataFeed of albums from gdata_picasaweb_service_query_all_albums() are these:
<gphoto:user>libgdata.picasaweb</gphoto:user>
<gphoto:nickname>libgdata.picasaweb</gphoto:nickname>
<gphoto:thumbnail>http://lh6.ggpht.com/_1kdcGyvOb8c/AAAA9mDag3s/AAAAAAAAAAA/Jq-NWYWKFao/s64-c/libgdata.picasaweb.jpg</gphoto:thumbnail>
<gphoto:quotalimit>1073741824</gphoto:quotalimit>
<gphoto:quotacurrent>6712246</gphoto:quotacurrent>
<gphoto:maxPhotosPerAlbum>500</gphoto:maxPhotosPerAlbum>

These seem to describe the user who is logged in and their account, as opposed to the owners of the albums in the feed.  That's good.


From the GDataFeed of a given album and its photos, got from gdata_picasaweb_service_query_files(), I get 
<gphoto:id>5348972684386663249</gphoto:id>
<gphoto:location/>
<gphoto:access>private</gphoto:access>
<gphoto:timestamp>1245404752000</gphoto:timestamp>
<gphoto:numphotos>287</gphoto:numphotos>
<gphoto:numphotosremaining>213</gphoto:numphotosremaining>
<gphoto:bytesUsed>5002462</gphoto:bytesUsed>
<gphoto:user>libgdata.picasaweb</gphoto:user>
<gphoto:nickname>libgdata.picasaweb</gphoto:nickname>
<gphoto:allowPrints>true</gphoto:allowPrints>
<gphoto:allowDownloads>true</gphoto:allowDownloads>

id, location, access, timestamp, numphotos, numphotosremaining, bytesUsed, user, and nickname seem to be redundant with elements contained within the album's entry from the feed of albums, and which we capture in GDataPicasaWebAlbum already. 

allowPrints and allowDownloads seem to not be available elsewhere.   



FINALLY, THE POINT: 

So, I'm inclined to add two new Feed classes, with names along the line of 
from gdata_picasaweb_service_query_all_albums*:
GDataPicasaWebAlbumsFeed
from gdata_picasaweb_service_query_files*:
GDataPicasaWebFilesFeed 

It's a bit unintuitive to think that your accounts information is in the *AlbumsFeed, but it would avoid adding a *_query_account API which might duplicate the work of an album query (perhaps with max-results query limit of 0 :) to give some comparable but different class like a "GDataPicasaWebAccount".  

YouTube, Documents, and Calendar don't seem to deal with having multiple types of Feed, so I can't go-with-the-flow like usual :)
Comment 9 Philip Withnall 2009-10-07 19:35:58 UTC
(In reply to comment #6)
>  	/**
> +	 * GDataFeed:icon:
> +	 *
> +	 * The URI of an icon for the feed.
> +	 *
> +	 * API reference: <ulink type="http" url="http://code.google.com/apis/gdata/docs/2.0/reference.html">atom:icon</ulink>
> +	 **/

It needs a "Since" clause, and that URI is wrong. It should point to atomenabled.org.

Other than that, the first patch looks good.

(In reply to comment #7)
> Created an attachment (id=144698) [details]
> Patch adding support for gphoto:access as visibility to GDataPicasaWebFile
> 
> Now that I've written this, I'm beginning to wonder whether it was decided to
> not support visibility directly in GDataPicasaWebFile yet because PicasaWeb
> doesn't yet offer fine-grained access control over individual photos and
> videos, only their albums.

Correct. When PicasaWeb gains that ability, we can add visibility support to GDataPicasaWebFile.

> If we don't end up supporting <gphoto:access> on photo's themselves, is there
> some appropriate way to suppress the "Unhandled XML" messages?

Just add a block for it in parse_xml which does nothing, along with a suitable comment (and perhaps a reference to this bug report).

(In reply to comment #8)
> So, I'm inclined to add two new Feed classes, with names along the line of 
> from gdata_picasaweb_service_query_all_albums*:
> GDataPicasaWebAlbumsFeed
> from gdata_picasaweb_service_query_files*:
> GDataPicasaWebFilesFeed 
> 
> It's a bit unintuitive to think that your accounts information is in the
> *AlbumsFeed, but it would avoid adding a *_query_account API which might
> duplicate the work of an album query (perhaps with max-results query limit of 0
> :) to give some comparable but different class like a "GDataPicasaWebAccount".  

I'd be inclined to go with the GDataPicasaWebAccount route (though I'd call it GDataPicasaWebUser). It seems cleaner to me.
Comment 10 Richard Schwarting 2009-10-07 21:38:49 UTC
Created attachment 144996 [details] [review]
Patch adding support for atom:icon to GDataFeed with since and proper uri

This adds the Since: clauses to the get_icon() method and property installation comments.  

It also links to the way more appropriate http://www.atomenabled.org/developers/syndication/atom-format-spec.php#element.icon.
Comment 11 Richard Schwarting 2009-10-07 21:39:55 UTC
Created attachment 144997 [details] [review]
Patch capturing and suppressing gphoto:access on GDataPicasaWebFile

We now capture it and ignore it on the file, including a link to this bug.
Comment 12 Richard Schwarting 2009-10-07 23:48:54 UTC
So, in gdata_picasaweb_service_query_all_albums* and gdata_picasaweb_query_files, we pass our self, GDataPicasaWebService to gdata_service_query(). 

gdata_service_query() gets the class of the service (so, GDataPicasaWebServiceClass) and uses its 'feed_type' property to tell which type the feed is. 

For the feed of albums, I could set GDataPicasaWebServiceClass's feed_type (in gdata_picasaweb_service_class_init) to GDATA_TYPE_PICASAWEB_USER and then the feed will be parsed into GDataPicasaWebUser, a child of GDataFeed.  

However, this prevents me from separately parsing the feed for the files' feed, which had the two properties allowDownloads and allowPrints unique to it, and a bunch of properties that were redundant with the GDataPicasaWebAlbum if supplied, which I was hoping to capture and ignore them as per comment 5.  

Ideas:
* modify gdata_service_query to make feed_type its own parameter, bringing changes to all its clients but enabling more flexibility for different feeds for the same service
* decide that the two unique properties are probably not very relevant to people other than Google (they're not in the API reference other, though they also appear in the examples at http://code.google.com/apis/picasaweb/docs/2.0/developers_guide_protocol.html).  Then, we could ignore them and the properties redundant with GDataPicasaWebAlbum entries.  

Also, I'm wondering how a client should best obtain GDataPicasaWebUser.  In my current code, it's just like how you get a GDataPicasaWebAlbum from a GDataEntry (i.e. "GDataPicasaWebAlbum *album = GDATA_PICASAWEB_ALBUM (entry);", but "GDataPicasaWebUser *user = GDATA_PICASAWEB_USER (feed);"  I was wondering whether a gdata_picasaweb_service_get_user () would be more intuitive, though it would be slightly redundant, as it would need to also get a GDataFeed of albums.
Comment 13 Philip Withnall 2009-10-08 21:47:54 UTC
commit 9b08a9ae6140ac7398ae4fd87910f555f95600a0
Author: Richard Schwarting <aquarichy@gmail.com>
Date:   Thu Oct 8 22:45:49 2009 +0100

    [picasaweb] Suppress gphoto:access on GDataPicasaWebFile
    
    Handle the gphoto:access element for files with a stub, such that a
    warning isn't printed. Proper support will be added when individual file
    permissions are supported by PicasaWeb. Helps: bgo#589858

 gdata/services/picasaweb/gdata-picasaweb-file.c |    5 +++++
 1 files changed, 5 insertions(+), 0 deletions(-)

commit ceb151b4f8b80722516478a577297431eed056d9
Author: Richard Schwarting <aquarichy@gmail.com>
Date:   Thu Oct 8 22:43:42 2009 +0100

    [core] Add support for atom:icon to GDataFeed
    
    Add support for the atom:icon element to GDataFeed. Helps: bgo#589858

 docs/reference/gdata-sections.txt |    1 +
 gdata/gdata-feed.c                |   44 +++++++++++++++++++++++++++++++++++++
 gdata/gdata-feed.h                |    1 +
 gdata/gdata.symbols               |    1 +
 gdata/tests/picasaweb.c           |    1 +
 5 files changed, 48 insertions(+), 0 deletions(-)
Comment 14 Philip Withnall 2009-10-08 21:52:11 UTC
(In reply to comment #12)
*snip*
> Ideas:
> * modify gdata_service_query to make feed_type its own parameter, bringing
> changes to all its clients but enabling more flexibility for different feeds
> for the same service
> * decide that the two unique properties are probably not very relevant to
> people other than Google (they're not in the API reference other, though they
> also appear in the examples at
> http://code.google.com/apis/picasaweb/docs/2.0/developers_guide_protocol.html).
>  Then, we could ignore them and the properties redundant with
> GDataPicasaWebAlbum entries.  

If they're not in the API reference, I'd consider that a reason for not implementing them. Just ignore them for now.

> Also, I'm wondering how a client should best obtain GDataPicasaWebUser.  In my
> current code, it's just like how you get a GDataPicasaWebAlbum from a
> GDataEntry (i.e. "GDataPicasaWebAlbum *album = GDATA_PICASAWEB_ALBUM (entry);",
> but "GDataPicasaWebUser *user = GDATA_PICASAWEB_USER (feed);"  I was wondering
> whether a gdata_picasaweb_service_get_user () would be more intuitive, though
> it would be slightly redundant, as it would need to also get a GDataFeed of
> albums.

I'd go with gdata_picasaweb_service_get_user().
Comment 15 Richard Schwarting 2009-10-16 05:32:25 UTC
Created attachment 145575 [details] [review]
Patch adding GDataPicasaWebUser class, handling various user feed elements

Hello.  

This adds GDataPicasaWebUser which subclasses GDataFeed and handles various elements particular to a user and not a single album.

It adds gdata_picasaweb_service_get_user () which lets you name a user or, if you're authenticated, NULL, and it will return the object for that user.  PicasaWeb returns 0 for some values which are only visible to the account holder (when authenticated as such), so currently I do that too with a note in the documentation alerting users to that.  

Album queries no longer automatically have ?access=all appended if PUBLIC or PRIVATE wasn't explicitly specified.  Querying albums and accounts with that parameter when unauthenticated results in a 403 Forbidden error.  Omitting it has the effect of all for authenticated users, and the effect of public for unauthenticated, just like if you visited it in the browser. 

Fields from the GDataFeed got when querying an album's files which are redundant with the album's properties are now ignored.  (I think it was all of said fields, without anything special in that feed.)

The two undocumented fields, allowDownloads and allowPrints, from querying a user's albums are ignored, too, as discussed above.

When I implemented some of the georss tags, I went to ignore the <gml:Envelope> node because it wasn't documented in PicasaWeb's API either, but you expressed the following preference: "We shouldn't ignore it; the 'Unhandled XML' messages for it should continue to be printed on the command line, so that we don't forget about implementing it in the future, when it's appropriate." and made commit 953d0c148e412b45bd7f1d0e8f36309f256d131f, setting the G_LOG_DOMAIN so command-line clients could ignore them themselves. 

Has your preference changed for ignoring these versus leaving them in?  The unhandled XML message for gml:Envelope is the last unhandled tag that gets reported now, and I'm don't think Google will necessarily introduce it into a future API.  

Cheers!
Comment 16 Richard Schwarting 2009-10-17 10:20:02 UTC
Comment on attachment 145575 [details] [review]
Patch adding GDataPicasaWebUser class, handling various user feed elements

I'm an idiot.  I can query for users as an entry.  I think my preference is to implement a GDataPicasaWebFeed to catch and ignore redundant elements (i.e. a query of albums have elements redundant with a user's GDataEntry) and have a GDataPicasaWebUser that gets produced from GDataEntry in a feed from a query on users.
Comment 17 Richard Schwarting 2009-10-17 10:40:30 UTC
Hmm.  Maybe this is actually sufficient, just using the GDataFeed of albums?  

If you'd prefer GDataPicasaWebUser reflected its GDataEntry (from http://picasaweb.google.com/data/*entry*/api/user/<userid>/) instead of the elements in the albums feed (from http://picasaweb.google.com/data/*feed*/api/user/<userid>/), I'll rework the patch and have have a GDataPicasaWebFeed separate from GDataPicasaWebUser to catch the redundant fields returned in the queries.
Comment 18 Philip Withnall 2009-10-19 10:26:22 UTC
(In reply to comment #17)
> Hmm.  Maybe this is actually sufficient, just using the GDataFeed of albums?  
> 
> If you'd prefer GDataPicasaWebUser reflected its GDataEntry (from
> http://picasaweb.google.com/data/*entry*/api/user/<userid>/) instead of the
> elements in the albums feed (from
> http://picasaweb.google.com/data/*feed*/api/user/<userid>/), I'll rework the
> patch and have have a GDataPicasaWebFeed separate from GDataPicasaWebUser to
> catch the redundant fields returned in the queries.

That sounds better. I don't want to have the properties of a GDataPicasaWebUser depending on various elements in a <feed> which aren't well defined and could disappear. If it's based on an <entry> then at least the properties are defined in the API documentation.

(Sorry for the late reply: I've been busy with university work.)
Comment 19 Richard Schwarting 2009-10-19 11:18:29 UTC
Yah, I agree, I was just being lazy for a moment and wanting to work on other things :)  I feel stupid for missing this in the first place.

(Hurrah for school! :D  If you don't mind mail building up, I don't mind belated replies :)
Comment 20 Richard Schwarting 2009-10-21 03:35:25 UTC
Created attachment 145916 [details] [review]
Patch adding support for GDataPicasaWebUser and GDataPicasaFeed

Hi again.

GDataPicasaWebUser now is built from the relevant <entry>, and doesn't touch the feed. And we now have GDataPicasaWebFeed, which basically just grabs all elements in a feed that are redundant with separate entries and ignores them. 

This leaves only one message unhandled: 
libgdata-Message: Unhandled XML in GDataGeoRSSWhere: <gml:Envelope><gml:lowerCorner>45.2605939 12.1238603</gml:lowerCorner><gml:upperCorner>45.6080781 12.5537077</gml:upperCorner></gml:Envelope>

whose use isn't documented by Google, but which I imagine is used to frame the map's scale/zoom.
Comment 21 Philip Withnall 2009-10-25 14:21:07 UTC
Review of attachment 145916 [details] [review]:

Looks good to me, though untested. I'll apply it and fix the issues below (they're just here for reference purposes). Thanks.

::: gdata/services/picasaweb/gdata-picasaweb-feed.c
@@ +41,3 @@
+
+struct _GDataPicasaWebFeedPrivate {
+	char nodata; 

Instead of doing this, you should just remove the entire struct.

@@ +72,3 @@
+{
+	/* Chain up to the parent class */
+	G_OBJECT_CLASS (gdata_picasaweb_feed_parent_class)->finalize (object);

If the finalize function just chains up to the parent, there's no need to include it.

@@ +80,3 @@
+	switch (property_id) {
+		default:
+			/* We don't have any other property... */

No properties? Don't need _get_property then.

@@ +88,3 @@
+parse_xml (GDataParsable *parsable, xmlDoc *doc, xmlNode *node, gpointer user_data, GError **error)
+{
+	if (xmlStrcmp (node->name, (xmlChar*) "user") == 0) {

Most of these if statements could be ORed together.

::: gdata/services/picasaweb/gdata-picasaweb-feed.h
@@ +48,3 @@
+typedef struct {
+	GDataFeed parent;
+	GDataPicasaWebFeedPrivate *priv;

This can just be replaced with some padding instead of creating a dummy private struct.

@@ +63,3 @@
+} GDataPicasaWebFeedClass;
+
+GType gdata_picasaweb_feed_get_type (void);

Should have the G_GNUC_CONST property.

::: gdata/services/picasaweb/gdata-picasaweb-service.c
@@ +62,3 @@
 /*
+ * This constructs the URI we want to access for querying albums or a
+ * user.  Type should be either entry (for just a user) or feed (for

"entry" or "feed".

@@ +132,3 @@
+	message = _gdata_service_query (GDATA_SERVICE (self), uri, NULL, cancellable, NULL, NULL, error);
+	if (message == NULL)
+		return NULL; /* RHSTODO: shouldn't we set an error?  (gdata_youtube_service_query_single_video doesn't) */

error should have been set by _gdata_service_query if it returns NULL.

::: gdata/services/picasaweb/gdata-picasaweb-user.c
@@ +46,3 @@
+	gint64 quota_limit;
+	gint64 quota_current;
+	gint max_photos_per_album;

Should these three be initialised to -1?

@@ +93,3 @@
+	 * GDataPicasaWebUser:nickname:
+	 *
+	 * The nickname of the user as specified by the user.

Not brilliantly worded. How about "The user's chosen nickname; how their name should be displayed."?

@@ +107,3 @@
+	 * GDataPicasaWebUser:quota-limit:
+	 *
+	 * The total amount of space in bytes available to the user. 

-1 means?

@@ +283,3 @@
+ * Gets the #GDataPicasaWebUser:user property.
+ *
+ * Return value: the feed's user, or %NULL

"the user's username"?

@@ +300,3 @@
+ * Gets the #GDataPicasaWebUser:nickname property.
+ *
+ * Return value: the nickname of the feed's user's nickname, or %NULL

"the user's nickname"?

@@ +317,3 @@
+ * Gets the #GDataPicasaWebUser:quota-limit property.  Note that
+ * this information is not available when accessing feeds which we
+ * haven't authenticated, and 0 is returned.

0 -> %0

Unless it should be %-1?

@@ +319,3 @@
+ * haven't authenticated, and 0 is returned.
+ *
+ * Return value: the maximum capacity in bytes for this feed's account or %-1

s/ or/, or/

@@ +338,3 @@
+ * haven't authenticated, and 0 is returned.
+ *
+ * Return value: the current number of bytes in used by this feed's account, or %-1

s/in used/in use/

::: gdata/services/picasaweb/gdata-picasaweb-user.h
@@ +63,3 @@
+} GDataPicasaWebUserClass;
+
+GType gdata_picasaweb_user_get_type (void);

G_GNUC_CONST

@@ +65,3 @@
+GType gdata_picasaweb_user_get_type (void);
+
+const gchar * gdata_picasaweb_user_get_user (GDataPicasaWebUser *self);

s/* /*/

::: gdata/tests/picasaweb.c
@@ +596,3 @@
+	GError *error;
+
+	error = NULL;

Could just initialise error to NULL when you declare it?
Comment 22 Philip Withnall 2009-10-25 15:12:31 UTC
commit 68b774ab2134e311cd564139aa899d8fe8ecbb65
Author: Richard Schwarting <aquarichy@gmail.com>
Date:   Sun Oct 25 14:46:23 2009 +0000

    Bug 589858 — Handle gphoto XML elements found in 'GDataFeed'
    
    Adds a GDataPicasaWebUser, which exposes information about each
    registered user on PicasaWeb, queryable from the PicasaWeb service. The
    patch also suppresses gphoto XML elements on PicasaWeb feeds, since
    they duplicate data available in other, better places.
    Closes: bgo#589858

 docs/reference/gdata-sections.txt                  |   39 +++++++++++++
 gdata/gdata.h                                      |    1 +
 gdata/gdata.symbols                                |    9 +++
 gdata/services/picasaweb/Makefile.am               |    8 ++-
 gdata/services/picasaweb/gdata-picasaweb-query.c   |    2 +-
 gdata/services/picasaweb/gdata-picasaweb-service.c |   60 +++++++++++++++++--
 gdata/services/picasaweb/gdata-picasaweb-service.h |    3 +
 gdata/tests/picasaweb.c                            |   22 +++++++
 8 files changed, 134 insertions(+), 10 deletions(-)
Comment 23 Richard Schwarting 2009-10-27 06:43:49 UTC
I have a not-so-little checklist of things to keep in mind for libgdata, like initialising values on the same line and such.  Sorry that things get through :|  I also wasn't sure what to do with an empty object, and though the structure might be retained for future use (though I can't readily imagine why they'd have feed-only data.) 

I'm curious about the "Looks good to me, though untested." comment.  Was it causing you problems? 

Thanks.
Comment 24 Philip Withnall 2009-10-27 08:25:56 UTC
(In reply to comment #23)
> I have a not-so-little checklist of things to keep in mind for libgdata, like
> initialising values on the same line and such.  Sorry that things get through

Don't worry about it; the code's good.

> I also wasn't sure what to do with an empty object, and though the
> structure might be retained for future use (though I can't readily imagine why
> they'd have feed-only data.) 

It's better to not have the object there and reserve a pointer for it, than to have it there wasting a lot more space unnecessarily. It can always be added if necessary.

> I'm curious about the "Looks good to me, though untested." comment.  Was it
> causing you problems? 

No, I just didn't test it more thoroughly than running the test case.