GNOME Bugzilla – Bug 588714
<gd:quotaBytesUsed> handling in GDataDocumentsEntry
Last modified: 2012-04-14 10:43:50 UTC
Handle this 'newly appeared' xml node.
*** Bug 590345 has been marked as a duplicate of this bug. ***
*** Bug 590344 has been marked as a duplicate of this bug. ***
> I think I always get a 0 for this property, but it's probably goin to b e used > later, I think they are implementing it and it will be usefull in the comin > days right? I don't want to add the API if Google's just outputting 0 at the moment. You can provide a patch now, but I won't commit it until what we get from the server actually makes sense.
Created attachment 139668 [details] [review] Fixe the bug
(In reply to comment #4) > Created an attachment (id=139668) [edit] > Fixe the bug An unsigned long would probably be a better choice of container, and you're missing a getter function. However, they can be added in when I commit the patch, whenever Google fixes the element on their servers.
From some research, it appears to only be non-zero for arbitrary file types. I can't check this, however, as I don't have a Google Apps for Business account. See: http://code.google.com/apis/documents/docs/3.0/developers_guide_protocol.html#UploadingArbitraryFileTypes Since implementing this depends on me getting a Google Apps for Business account, I'll have to punt it until I can get hold of one.
It’s only used for arbitrary files (since the quota only applies to them), and since bug #607616 is now fixed, this can be tested.
The patch didn’t apply any longer, so I rewrote it. Fixed on master. commit dc298f4f5123ba62df56ae1e4ece08d6055eb2bb Author: Philip Withnall <philip@tecnocode.co.uk> Date: Sat Apr 14 11:08:30 2012 +0100 documents: Add an XML parsing test for GDataDocumentsFolder This includes a test for GDataDocumentsEntry:quota-used. Helps: https://bugzilla.gnome.org/show_bug.cgi?id=588714 gdata/tests/documents.c | 73 +++++++++++++++++++++++++++++++++++++++++++++++ 1 files changed, 73 insertions(+), 0 deletions(-) commit 3ee77832b4dcfdb83a5e653760eeece34d68c045 Author: Philip Withnall <philip@tecnocode.co.uk> Date: Sat Apr 14 11:00:35 2012 +0100 Bug 588714 — <gd:quotaBytesUsed> handling in GDataDocumentsEntry Add support for <gd:quotaBytesUsed> to GDataDocumentsEntry. API additions: • GDataDocumentsEntry:quota-used and gdata_documents_entry_get_quota_used() Closes: https://bugzilla.gnome.org/show_bug.cgi?id=588714 docs/reference/gdata-sections.txt | 1 + gdata/gdata.symbols | 1 + gdata/services/documents/gdata-documents-entry.c | 45 +++++++++++++++++++++- gdata/services/documents/gdata-documents-entry.h | 2 + 4 files changed, 48 insertions(+), 1 deletions(-)