WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-api

[Xen-API] New API Document and C Bindings

To: Xen-API <xen-api@xxxxxxxxxxxxxxxxxxx>
Subject: [Xen-API] New API Document and C Bindings
From: Ewan Mellor <ewan@xxxxxxxxxxxxx>
Date: Fri, 25 Aug 2006 19:58:21 +0100
Delivery-date: Fri, 25 Aug 2006 11:58:39 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxx
List-help: <mailto:xen-api-request@lists.xensource.com?subject=help>
List-id: Discussion of API issues surrounding Xen <xen-api.lists.xensource.com>
List-post: <mailto:xen-api@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-api>, <mailto:xen-api-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-api>, <mailto:xen-api-request@lists.xensource.com?subject=unsubscribe>
Sender: xen-api-bounces@xxxxxxxxxxxxxxxxxxx
User-agent: Mutt/1.5.9i
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
<Prev in Thread] Current Thread [Next in Thread>