Bug 655192 - Wrong libgdata bindings for DocumentsService.query_documents
Wrong libgdata bindings for DocumentsService.query_documents
Status: RESOLVED FIXED
Product: vala
Classification: Core
Component: Bindings
unspecified
Other Linux
: Normal normal
: ---
Assigned To: Vala maintainers
Vala maintainers
:
Depends on:
Blocks:
  Show dependency tree
 
Reported: 2011-07-24 01:59 UTC by bsquared
Modified: 2011-08-11 15:57 UTC (History)
1 user (show)

See Also:
GNOME target: ---
GNOME version: ---


Attachments

Description bsquared 2011-07-24 01:59:58 UTC
I am looking for a vala example using GData.  I keep getting errors on
the one I have found.  I want to access documents and spreadsheets.

https://code.launchpad.net/~doctormo/.../gdata-vala-experiments

I posted on the vala mailing list and it was suggested that I submit a bug.

 I get the following error running the code snippet I
found as is.

gdata_experiments.vala:26.24-26.75: error: 1 missing arguments for
`GData.DocumentsFeed GData.DocumentsService.query_documents
(GData.DocumentsQuery query, GLib.Cancellable cancellable,
GData.QueryProgressCallback progress_callback, void*
progress_user_data)'
           var feed = this.gdocs.query_documents (query, cancel, () => {});

I looked at valadoc api documentation and it indicates an additional
parameter of type void* (not sure what this is exactly - gpointer
according to the header file), so I add a null as the last parameter
and then I get the following error.

gdata_experiments.c:134:3: error: too many arguments to function
‘gdata_documents_service_query_documents’
/usr/include/libgdata/gdata/services/documents/gdata-documents-service.h:84:21:
note: declared here


//////////////////
copied from gdata-documents-service.h:
GDataDocumentsFeed *gdata_documents_service_query_documents
(GDataDocumentsService *self, GDataDocumentsQuery *query, GCancellable
*cancellable,

GDataQueryProgressCallback progress_callback, gpointer
progress_user_data,
                                                            GError
**error) G_GNUC_WARN_UNUSED_RESULT G_GNUC_MALLOC;

//////////////////
The vala code - original:
var feed = this.gdocs.query_documents (query, cancel, () => {});

//////////////////
The c code - generated:
_tmp2_ = gdata_documents_service_query_documents
(self->priv->gdocs,query, cancel,
__lambda1__gdata_query_progress_callback ,self, NULL,&_inner_error_);
               _tmp3_ = _g_object_ref0 (_tmp2_);
               feed = _tmp3_;


$ pkg-config --modversion libgdata
0.8.0
$ valac --version
Vala 0.13.1


On Sat, Jul 23, 2011 at 2:25 PM, Luca Bruno <lethalman88@gmail.com> wrote:
> I feel like the code snippet used GData gir, since libgdata.vapi is buggy
> (that void* argument must be dropped).
> You can report a bug to http://bugzilla.gnome.org .
Comment 1 Luca Bruno 2011-07-26 20:28:07 UTC
Thanks for the bug report.
There's an ongoing transition to use the gir for generating libgdata that will fix many bugs like this.
Comment 2 bsquared 2011-07-26 20:36:14 UTC
Very good.  keep up the good work.
Comment 3 Luca Bruno 2011-08-11 15:57:30 UTC
commit e30d045342ac4f865857a3eeb8d4698daef0b589
Author: Luca Bruno <lucabru@src.gnome.org>
Date:   Sun Jul 24 21:23:46 2011 +0200

    libgdata: Switch to GIR
    
    Fixes bug 655192.

This problem has been fixed in the development version. The fix will be available in the next major software release. Thank you for your bug report.

Note You need to log in before you can comment on or make changes to this bug.