[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Xen-API] New API Document and C Bindings


  • To: Xen-API <xen-api@xxxxxxxxxxxxxxxxxxx>
  • From: Ewan Mellor <ewan@xxxxxxxxxxxxx>
  • Date: Fri, 25 Aug 2006 19:58:21 +0100
  • Delivery-date: Fri, 25 Aug 2006 11:58:39 -0700
  • List-id: Discussion of API issues surrounding Xen <xen-api.lists.xensource.com>

Hi all,

I've put a new version of the Xen Management API document and the
corresponding C bindings on the Xen-API wiki page (and they are attached).
There's nothing very exciting in the document -- I've just updated the todo
list, basically.

The C bindings have been updated to the new way of passing results back and
handling errors.  The API calls now look a lot like this:

    xen_vm vm;
    if (!xen_vm_get_by_uuid(session, &vm,
                            "00000000-0000-0000-0000-000000000000"))
    {
        print_error(session);
        CLEANUP;
        return 1;
    }

That is, you pass a pointer to the result destination, which will be filled if
the call is successful, or NULL otherwise, and you get a boolean result from
the actual function call to tell you whether or not an error occurred.

I've also added the appropriate casts so that this code compiles under GCC 4.0
with -Werror.

Have fun hacking, and to all the Brits out there, happy holidays,

Ewan.

Attachment: xenapi-0.4.3.pdf
Description: Adobe PDF document

Attachment: libxen-src-0.4.3-2.tar.bz2
Description: Binary data

_______________________________________________
xen-api mailing list
xen-api@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-api

 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.