libxenserver
============

Version 7.2.0

libxenserver is a complete SDK for Citrix XenServer, exposing the XenServer
API to C programmers.

It is available in the XenServer-SDK-7.2.0.zip, which can be downloaded
from http://www.citrix.com/downloads/xenserver/.

For XenServer documentation, see http://docs.ctrix.com.
libxenserver includes a C function call for each XenServer API call, so API
documentation and examples written for for other languages can be easily
mapped to C. In particular, the SDK Guide and API Documentation are ideal
for developers wishing to use libxenserver.

For community content, blogs, and downloads, visit
http://xenserver.org/partners/developing-products-for-xenserver.html.

libxenserver is free sofware. You can redistribute and modify it under the
terms of the BSD license. See COPYING for details.

This library is accompanied by a number of test programs that can be used as
pedagogical examples. These do not form part of this library, and are licensed
for redistribution and modification under the BSD license. libxenserver comes
with the usual complexities inherent with programming in C, and it is recommended
that you study these examples carefully to understand the approach to error
reporting and memory management taken by this library.


Dependencies
------------

This library is dependent upon libxml2, the XML toolkit from the GNOME project,
by Daniel Veillard, et al.  This can be obtained from http://xmlsoft.org/.

The test programs are dependent also upon libcurl-devel, by Daniel Stenberg, et al.
This can be downloaded from http://curl.haxx.se/. You may choose to use
libcurl3 in your application, just as we have for the test programs, though
it is not required to do so, and you may use a different network layer if you
prefer.

On Debian, these are packaged as libxml2-dev and libcurl3-dev.


Folder structure
----------------

The XenServer-SDK-7.2.0.zip contains the following folders that are
relevant to C programmers:
- libxenserver/bin: contains the compiled binaries
- libxenserver/src: contains the source code and tests.


Compiling from source
---------------------

To build, simply type "make" in the libxenserver/src directory.
To build on Windows with cygwin type "make CYGWIN=1"

To run any of the tests, for example the test_vm_ops, do

./test/test_vm_ops <url> <sr-name> <username> <password>

The <url> should be of the form: https://hostname.domain/

You can obtain a suitable <sr-name> by typing in "xe sr-list" on the host.
