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 588714 - <gd:quotaBytesUsed> handling in GDataDocumentsEntry
<gd:quotaBytesUsed> handling in GDataDocumentsEntry
Status: RESOLVED FIXED
Product: libgdata
Classification: Platform
Component: Google Documents service
git master
Other All
: Normal enhancement
: Apps for Business
Assigned To: libgdata-maint
libgdata-maint
: 590344 (view as bug list)
Depends on:
Blocks:
 
 
Reported: 2009-07-15 21:27 UTC by Thibault Saunier
Modified: 2012-04-14 10:43 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Fixe the bug (2.28 KB, patch)
2009-08-01 06:01 UTC, Thibault Saunier
reviewed Details | Review

Description Thibault Saunier 2009-07-15 21:27:21 UTC
Handle this 'newly appeared' xml node.
Comment 1 Philip Withnall 2009-07-31 14:42:45 UTC
*** Bug 590345 has been marked as a duplicate of this bug. ***
Comment 2 Philip Withnall 2009-07-31 14:42:45 UTC
*** Bug 590344 has been marked as a duplicate of this bug. ***
Comment 3 Philip Withnall 2009-07-31 17:58:33 UTC
> 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.
Comment 4 Thibault Saunier 2009-08-01 06:01:18 UTC
Created attachment 139668 [details] [review]
Fixe the bug
Comment 5 Philip Withnall 2009-08-01 10:11:49 UTC
(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.
Comment 6 Philip Withnall 2010-12-08 13:43:51 UTC
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.
Comment 7 Philip Withnall 2012-04-13 15:18:37 UTC
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.
Comment 8 Philip Withnall 2012-04-14 10:43:50 UTC
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(-)