#include "libvirt_c_oneoffs.c"
+/* Automatically generated binding for virConnectClose.
+ * In generator.pl this function has signature "conn : free".
+ */
+
CAMLprim value
ocaml_libvirt_connect_close (value connv)
{
CAMLreturn (Val_unit);
}
+/* Automatically generated binding for virConnectGetHostname.
+ * In generator.pl this function has signature "conn : string".
+ */
+
#ifdef HAVE_WEAK_SYMBOLS
#ifdef HAVE_VIRCONNECTGETHOSTNAME
extern char *virConnectGetHostname (virConnectPtr conn) __attribute__((weak));
#endif
}
+/* Automatically generated binding for virConnectGetURI.
+ * In generator.pl this function has signature "conn : string".
+ */
+
#ifdef HAVE_WEAK_SYMBOLS
#ifdef HAVE_VIRCONNECTGETURI
extern char *virConnectGetURI (virConnectPtr conn) __attribute__((weak));
#endif
}
+/* Automatically generated binding for virConnectGetType.
+ * In generator.pl this function has signature "conn : static string".
+ */
+
CAMLprim value
ocaml_libvirt_connect_get_type (value connv)
{
CAMLreturn (rv);
}
+/* Automatically generated binding for virConnectNumOfDomains.
+ * In generator.pl this function has signature "conn : int".
+ */
+
CAMLprim value
ocaml_libvirt_connect_num_of_domains (value connv)
{
CAMLreturn (Val_int (r));
}
+/* Automatically generated binding for virConnectListDomains.
+ * In generator.pl this function has signature "conn, int : int array".
+ */
+
CAMLprim value
ocaml_libvirt_connect_list_domains (value connv, value iv)
{
CAMLreturn (rv);
}
+/* Automatically generated binding for virConnectNumOfDefinedDomains.
+ * In generator.pl this function has signature "conn : int".
+ */
+
CAMLprim value
ocaml_libvirt_connect_num_of_defined_domains (value connv)
{
CAMLreturn (Val_int (r));
}
+/* Automatically generated binding for virConnectListDefinedDomains.
+ * In generator.pl this function has signature "conn, int : string array".
+ */
+
CAMLprim value
ocaml_libvirt_connect_list_defined_domains (value connv, value iv)
{
CAMLreturn (rv);
}
+/* Automatically generated binding for virConnectNumOfNetworks.
+ * In generator.pl this function has signature "conn : int".
+ */
+
CAMLprim value
ocaml_libvirt_connect_num_of_networks (value connv)
{
CAMLreturn (Val_int (r));
}
+/* Automatically generated binding for virConnectListNetworks.
+ * In generator.pl this function has signature "conn, int : string array".
+ */
+
CAMLprim value
ocaml_libvirt_connect_list_networks (value connv, value iv)
{
CAMLreturn (rv);
}
+/* Automatically generated binding for virConnectNumOfDefinedNetworks.
+ * In generator.pl this function has signature "conn : int".
+ */
+
CAMLprim value
ocaml_libvirt_connect_num_of_defined_networks (value connv)
{
CAMLreturn (Val_int (r));
}
+/* Automatically generated binding for virConnectListDefinedNetworks.
+ * In generator.pl this function has signature "conn, int : string array".
+ */
+
CAMLprim value
ocaml_libvirt_connect_list_defined_networks (value connv, value iv)
{
CAMLreturn (rv);
}
+/* Automatically generated binding for virConnectNumOfStoragePools.
+ * In generator.pl this function has signature "conn : int".
+ */
+
#ifdef HAVE_WEAK_SYMBOLS
#ifdef HAVE_VIRCONNECTNUMOFSTORAGEPOOLS
extern int virConnectNumOfStoragePools (virConnectPtr conn) __attribute__((weak));
#endif
}
+/* Automatically generated binding for virConnectListStoragePools.
+ * In generator.pl this function has signature "conn, int : string array".
+ */
+
#ifdef HAVE_WEAK_SYMBOLS
#ifdef HAVE_VIRCONNECTLISTSTORAGEPOOLS
extern int virConnectListStoragePools (virConnectPtr conn, char **const names, int maxnames) __attribute__((weak));
#endif
}
+/* Automatically generated binding for virConnectNumOfDefinedStoragePools.
+ * In generator.pl this function has signature "conn : int".
+ */
+
#ifdef HAVE_WEAK_SYMBOLS
#ifdef HAVE_VIRCONNECTNUMOFDEFINEDSTORAGEPOOLS
extern int virConnectNumOfDefinedStoragePools (virConnectPtr conn) __attribute__((weak));
#endif
}
+/* Automatically generated binding for virConnectListDefinedStoragePools.
+ * In generator.pl this function has signature "conn, int : string array".
+ */
+
#ifdef HAVE_WEAK_SYMBOLS
#ifdef HAVE_VIRCONNECTLISTDEFINEDSTORAGEPOOLS
extern int virConnectListDefinedStoragePools (virConnectPtr conn, char **const names, int maxnames) __attribute__((weak));
#endif
}
+/* Automatically generated binding for virConnectGetCapabilities.
+ * In generator.pl this function has signature "conn : string".
+ */
+
CAMLprim value
ocaml_libvirt_connect_get_capabilities (value connv)
{
CAMLreturn (rv);
}
+/* Automatically generated binding for virDomainCreateLinux.
+ * In generator.pl this function has signature "conn, string, 0U : dom".
+ */
+
CAMLprim value
ocaml_libvirt_domain_create_linux (value connv, value strv)
{
CAMLreturn (rv);
}
+/* Automatically generated binding for virDomainCreateLinuxJob.
+ * In generator.pl this function has signature "conn, string, 0U : job".
+ */
+
#ifdef HAVE_WEAK_SYMBOLS
#ifdef HAVE_VIRDOMAINCREATELINUXJOB
extern virJobPtr virDomainCreateLinuxJob (virConnectPtr conn, const char *str, unsigned int flags) __attribute__((weak));
#endif
}
+/* Automatically generated binding for virDomainFree.
+ * In generator.pl this function has signature "dom : free".
+ */
+
CAMLprim value
ocaml_libvirt_domain_free (value domv)
{
CAMLreturn (Val_unit);
}
+/* Automatically generated binding for virDomainDestroy.
+ * In generator.pl this function has signature "dom : free".
+ */
+
CAMLprim value
ocaml_libvirt_domain_destroy (value domv)
{
CAMLreturn (Val_unit);
}
+/* Automatically generated binding for virDomainLookupByName.
+ * In generator.pl this function has signature "conn, string : dom".
+ */
+
CAMLprim value
ocaml_libvirt_domain_lookup_by_name (value connv, value strv)
{
CAMLreturn (rv);
}
+/* Automatically generated binding for virDomainLookupByID.
+ * In generator.pl this function has signature "conn, int : dom".
+ */
+
CAMLprim value
ocaml_libvirt_domain_lookup_by_id (value connv, value iv)
{
CAMLreturn (rv);
}
+/* Automatically generated binding for virDomainLookupByUUID.
+ * In generator.pl this function has signature "conn, uuid : dom".
+ */
+
CAMLprim value
ocaml_libvirt_domain_lookup_by_uuid (value connv, value uuidv)
{
CAMLreturn (rv);
}
+/* Automatically generated binding for virDomainLookupByUUIDString.
+ * In generator.pl this function has signature "conn, string : dom".
+ */
+
CAMLprim value
ocaml_libvirt_domain_lookup_by_uuid_string (value connv, value strv)
{
CAMLreturn (rv);
}
+/* Automatically generated binding for virDomainGetName.
+ * In generator.pl this function has signature "dom : static string".
+ */
+
CAMLprim value
ocaml_libvirt_domain_get_name (value domv)
{
CAMLreturn (rv);
}
+/* Automatically generated binding for virDomainGetOSType.
+ * In generator.pl this function has signature "dom : string".
+ */
+
CAMLprim value
ocaml_libvirt_domain_get_os_type (value domv)
{
CAMLreturn (rv);
}
+/* Automatically generated binding for virDomainGetXMLDesc.
+ * In generator.pl this function has signature "dom, 0 : string".
+ */
+
CAMLprim value
ocaml_libvirt_domain_get_xml_desc (value domv)
{
CAMLreturn (rv);
}
+/* Automatically generated binding for virDomainGetUUID.
+ * In generator.pl this function has signature "dom : uuid".
+ */
+
CAMLprim value
ocaml_libvirt_domain_get_uuid (value domv)
{
NONBLOCKING (r = virDomainGetUUID (dom, uuid));
CHECK_ERROR (r == -1, conn, "virDomainGetUUID");
- rv = caml_copy_string ((char *) uuid);
+ /* UUIDs are byte arrays with a fixed length. */
+ rv = caml_alloc_string (VIR_UUID_BUFLEN);
+ memcpy (String_val (rv), uuid, VIR_UUID_BUFLEN);
CAMLreturn (rv);
}
+/* Automatically generated binding for virDomainGetUUIDString.
+ * In generator.pl this function has signature "dom : uuid string".
+ */
+
CAMLprim value
ocaml_libvirt_domain_get_uuid_string (value domv)
{
CAMLreturn (rv);
}
+/* Automatically generated binding for virDomainGetMaxVcpus.
+ * In generator.pl this function has signature "dom : int".
+ */
+
CAMLprim value
ocaml_libvirt_domain_get_max_vcpus (value domv)
{
CAMLreturn (Val_int (r));
}
+/* Automatically generated binding for virDomainSave.
+ * In generator.pl this function has signature "dom, string : unit".
+ */
+
CAMLprim value
ocaml_libvirt_domain_save (value domv, value strv)
{
CAMLreturn (Val_unit);
}
+/* Automatically generated binding for virDomainSaveJob.
+ * In generator.pl this function has signature "dom, string : job from dom".
+ */
+
#ifdef HAVE_WEAK_SYMBOLS
#ifdef HAVE_VIRDOMAINSAVEJOB
extern virJobPtr virDomainSaveJob (virDomainPtr dom, const char *str) __attribute__((weak));
#endif
}
+/* Automatically generated binding for virDomainRestore.
+ * In generator.pl this function has signature "conn, string : unit".
+ */
+
CAMLprim value
ocaml_libvirt_domain_restore (value connv, value strv)
{
CAMLreturn (Val_unit);
}
+/* Automatically generated binding for virDomainRestoreJob.
+ * In generator.pl this function has signature "conn, string : job".
+ */
+
#ifdef HAVE_WEAK_SYMBOLS
#ifdef HAVE_VIRDOMAINRESTOREJOB
extern virJobPtr virDomainRestoreJob (virConnectPtr conn, const char *str) __attribute__((weak));
#endif
}
+/* Automatically generated binding for virDomainCoreDump.
+ * In generator.pl this function has signature "dom, string, 0 : unit".
+ */
+
CAMLprim value
ocaml_libvirt_domain_core_dump (value domv, value strv)
{
CAMLreturn (Val_unit);
}
+/* Automatically generated binding for virDomainCoreDumpJob.
+ * In generator.pl this function has signature "dom, string, 0 : job from dom".
+ */
+
#ifdef HAVE_WEAK_SYMBOLS
#ifdef HAVE_VIRDOMAINCOREDUMPJOB
extern virJobPtr virDomainCoreDumpJob (virDomainPtr dom, const char *str, int flags) __attribute__((weak));
#endif
}
+/* Automatically generated binding for virDomainSuspend.
+ * In generator.pl this function has signature "dom : unit".
+ */
+
CAMLprim value
ocaml_libvirt_domain_suspend (value domv)
{
CAMLreturn (Val_unit);
}
+/* Automatically generated binding for virDomainResume.
+ * In generator.pl this function has signature "dom : unit".
+ */
+
CAMLprim value
ocaml_libvirt_domain_resume (value domv)
{
CAMLreturn (Val_unit);
}
+/* Automatically generated binding for virDomainShutdown.
+ * In generator.pl this function has signature "dom : unit".
+ */
+
CAMLprim value
ocaml_libvirt_domain_shutdown (value domv)
{
CAMLreturn (Val_unit);
}
+/* Automatically generated binding for virDomainReboot.
+ * In generator.pl this function has signature "dom, 0 : unit".
+ */
+
CAMLprim value
ocaml_libvirt_domain_reboot (value domv)
{
CAMLreturn (Val_unit);
}
+/* Automatically generated binding for virDomainDefineXML.
+ * In generator.pl this function has signature "conn, string : dom".
+ */
+
CAMLprim value
ocaml_libvirt_domain_define_xml (value connv, value strv)
{
CAMLreturn (rv);
}
+/* Automatically generated binding for virDomainUndefine.
+ * In generator.pl this function has signature "dom : unit".
+ */
+
CAMLprim value
ocaml_libvirt_domain_undefine (value domv)
{
CAMLreturn (Val_unit);
}
+/* Automatically generated binding for virDomainCreate.
+ * In generator.pl this function has signature "dom : unit".
+ */
+
CAMLprim value
ocaml_libvirt_domain_create (value domv)
{
CAMLreturn (Val_unit);
}
+/* Automatically generated binding for virDomainCreateJob.
+ * In generator.pl this function has signature "dom, 0U : job from dom".
+ */
+
#ifdef HAVE_WEAK_SYMBOLS
#ifdef HAVE_VIRDOMAINCREATEJOB
extern virJobPtr virDomainCreateJob (virDomainPtr dom, unsigned int flags) __attribute__((weak));
#endif
}
+/* Automatically generated binding for virDomainAttachDevice.
+ * In generator.pl this function has signature "dom, string : unit".
+ */
+
CAMLprim value
ocaml_libvirt_domain_attach_device (value domv, value strv)
{
CAMLreturn (Val_unit);
}
+/* Automatically generated binding for virDomainDetachDevice.
+ * In generator.pl this function has signature "dom, string : unit".
+ */
+
CAMLprim value
ocaml_libvirt_domain_detach_device (value domv, value strv)
{
CAMLreturn (Val_unit);
}
+/* Automatically generated binding for virDomainGetAutostart.
+ * In generator.pl this function has signature "dom : bool".
+ */
+
CAMLprim value
ocaml_libvirt_domain_get_autostart (value domv)
{
CAMLreturn (b ? Val_true : Val_false);
}
+/* Automatically generated binding for virDomainSetAutostart.
+ * In generator.pl this function has signature "dom, bool : unit".
+ */
+
CAMLprim value
ocaml_libvirt_domain_set_autostart (value domv, value bv)
{
CAMLreturn (Val_unit);
}
+/* Automatically generated binding for virNetworkFree.
+ * In generator.pl this function has signature "net : free".
+ */
+
CAMLprim value
ocaml_libvirt_network_free (value netv)
{
CAMLreturn (Val_unit);
}
+/* Automatically generated binding for virNetworkDestroy.
+ * In generator.pl this function has signature "net : free".
+ */
+
CAMLprim value
ocaml_libvirt_network_destroy (value netv)
{
CAMLreturn (Val_unit);
}
+/* Automatically generated binding for virNetworkLookupByName.
+ * In generator.pl this function has signature "conn, string : net".
+ */
+
CAMLprim value
ocaml_libvirt_network_lookup_by_name (value connv, value strv)
{
CAMLreturn (rv);
}
+/* Automatically generated binding for virNetworkLookupByUUID.
+ * In generator.pl this function has signature "conn, uuid : net".
+ */
+
CAMLprim value
ocaml_libvirt_network_lookup_by_uuid (value connv, value uuidv)
{
CAMLreturn (rv);
}
+/* Automatically generated binding for virNetworkLookupByUUIDString.
+ * In generator.pl this function has signature "conn, string : net".
+ */
+
CAMLprim value
ocaml_libvirt_network_lookup_by_uuid_string (value connv, value strv)
{
CAMLreturn (rv);
}
+/* Automatically generated binding for virNetworkGetName.
+ * In generator.pl this function has signature "net : static string".
+ */
+
CAMLprim value
ocaml_libvirt_network_get_name (value netv)
{
CAMLreturn (rv);
}
+/* Automatically generated binding for virNetworkGetXMLDesc.
+ * In generator.pl this function has signature "net, 0 : string".
+ */
+
CAMLprim value
ocaml_libvirt_network_get_xml_desc (value netv)
{
CAMLreturn (rv);
}
+/* Automatically generated binding for virNetworkGetBridgeName.
+ * In generator.pl this function has signature "net : string".
+ */
+
CAMLprim value
ocaml_libvirt_network_get_bridge_name (value netv)
{
CAMLreturn (rv);
}
+/* Automatically generated binding for virNetworkGetUUID.
+ * In generator.pl this function has signature "net : uuid".
+ */
+
CAMLprim value
ocaml_libvirt_network_get_uuid (value netv)
{
NONBLOCKING (r = virNetworkGetUUID (net, uuid));
CHECK_ERROR (r == -1, conn, "virNetworkGetUUID");
- rv = caml_copy_string ((char *) uuid);
+ /* UUIDs are byte arrays with a fixed length. */
+ rv = caml_alloc_string (VIR_UUID_BUFLEN);
+ memcpy (String_val (rv), uuid, VIR_UUID_BUFLEN);
CAMLreturn (rv);
}
+/* Automatically generated binding for virNetworkGetUUIDString.
+ * In generator.pl this function has signature "net : uuid string".
+ */
+
CAMLprim value
ocaml_libvirt_network_get_uuid_string (value netv)
{
CAMLreturn (rv);
}
+/* Automatically generated binding for virNetworkUndefine.
+ * In generator.pl this function has signature "net : unit".
+ */
+
CAMLprim value
ocaml_libvirt_network_undefine (value netv)
{
CAMLreturn (Val_unit);
}
+/* Automatically generated binding for virNetworkCreateXML.
+ * In generator.pl this function has signature "conn, string : net".
+ */
+
CAMLprim value
ocaml_libvirt_network_create_xml (value connv, value strv)
{
CAMLreturn (rv);
}
+/* Automatically generated binding for virNetworkCreateXMLJob.
+ * In generator.pl this function has signature "conn, string : job".
+ */
+
#ifdef HAVE_WEAK_SYMBOLS
#ifdef HAVE_VIRNETWORKCREATEXMLJOB
extern virJobPtr virNetworkCreateXMLJob (virConnectPtr conn, const char *str) __attribute__((weak));
#endif
}
+/* Automatically generated binding for virNetworkDefineXML.
+ * In generator.pl this function has signature "conn, string : net".
+ */
+
CAMLprim value
ocaml_libvirt_network_define_xml (value connv, value strv)
{
CAMLreturn (rv);
}
+/* Automatically generated binding for virNetworkCreate.
+ * In generator.pl this function has signature "net : unit".
+ */
+
CAMLprim value
ocaml_libvirt_network_create (value netv)
{
CAMLreturn (Val_unit);
}
+/* Automatically generated binding for virNetworkCreateJob.
+ * In generator.pl this function has signature "net : job from net".
+ */
+
#ifdef HAVE_WEAK_SYMBOLS
#ifdef HAVE_VIRNETWORKCREATEJOB
extern virJobPtr virNetworkCreateJob (virNetworkPtr net) __attribute__((weak));
#endif
}
+/* Automatically generated binding for virNetworkGetAutostart.
+ * In generator.pl this function has signature "net : bool".
+ */
+
CAMLprim value
ocaml_libvirt_network_get_autostart (value netv)
{
CAMLreturn (b ? Val_true : Val_false);
}
+/* Automatically generated binding for virNetworkSetAutostart.
+ * In generator.pl this function has signature "net, bool : unit".
+ */
+
CAMLprim value
ocaml_libvirt_network_set_autostart (value netv, value bv)
{
CAMLreturn (Val_unit);
}
+/* Automatically generated binding for virStoragePoolFree.
+ * In generator.pl this function has signature "pool : free".
+ */
+
#ifdef HAVE_WEAK_SYMBOLS
#ifdef HAVE_VIRSTORAGEPOOLFREE
extern int virStoragePoolFree (virStoragePoolPtr pool) __attribute__((weak));
#endif
}
+/* Automatically generated binding for virStoragePoolDestroy.
+ * In generator.pl this function has signature "pool : free".
+ */
+
#ifdef HAVE_WEAK_SYMBOLS
#ifdef HAVE_VIRSTORAGEPOOLDESTROY
extern int virStoragePoolDestroy (virStoragePoolPtr pool) __attribute__((weak));
#endif
}
+/* Automatically generated binding for virStoragePoolLookupByName.
+ * In generator.pl this function has signature "conn, string : pool".
+ */
+
#ifdef HAVE_WEAK_SYMBOLS
#ifdef HAVE_VIRSTORAGEPOOLLOOKUPBYNAME
extern virStoragePoolPtr virStoragePoolLookupByName (virConnectPtr conn, const char *str) __attribute__((weak));
#endif
}
+/* Automatically generated binding for virStoragePoolLookupByUUID.
+ * In generator.pl this function has signature "conn, uuid : pool".
+ */
+
#ifdef HAVE_WEAK_SYMBOLS
#ifdef HAVE_VIRSTORAGEPOOLLOOKUPBYUUID
extern virStoragePoolPtr virStoragePoolLookupByUUID (virConnectPtr conn, const unsigned char *str) __attribute__((weak));
#endif
}
+/* Automatically generated binding for virStoragePoolLookupByUUIDString.
+ * In generator.pl this function has signature "conn, string : pool".
+ */
+
#ifdef HAVE_WEAK_SYMBOLS
#ifdef HAVE_VIRSTORAGEPOOLLOOKUPBYUUIDSTRING
extern virStoragePoolPtr virStoragePoolLookupByUUIDString (virConnectPtr conn, const char *str) __attribute__((weak));
#endif
}
+/* Automatically generated binding for virStoragePoolGetName.
+ * In generator.pl this function has signature "pool : static string".
+ */
+
#ifdef HAVE_WEAK_SYMBOLS
#ifdef HAVE_VIRSTORAGEPOOLGETNAME
extern const char *virStoragePoolGetName (virStoragePoolPtr pool) __attribute__((weak));
#endif
}
+/* Automatically generated binding for virStoragePoolGetXMLDesc.
+ * In generator.pl this function has signature "pool, 0 : string".
+ */
+
#ifdef HAVE_WEAK_SYMBOLS
#ifdef HAVE_VIRSTORAGEPOOLGETXMLDESC
extern char *virStoragePoolGetXMLDesc (virStoragePoolPtr pool, int flags) __attribute__((weak));
#endif
}
+/* Automatically generated binding for virStoragePoolGetUUID.
+ * In generator.pl this function has signature "pool : uuid".
+ */
+
#ifdef HAVE_WEAK_SYMBOLS
#ifdef HAVE_VIRSTORAGEPOOLGETUUID
extern int virStoragePoolGetUUID (virStoragePoolPtr pool, unsigned char *) __attribute__((weak));
NONBLOCKING (r = virStoragePoolGetUUID (pool, uuid));
CHECK_ERROR (r == -1, conn, "virStoragePoolGetUUID");
- rv = caml_copy_string ((char *) uuid);
+ /* UUIDs are byte arrays with a fixed length. */
+ rv = caml_alloc_string (VIR_UUID_BUFLEN);
+ memcpy (String_val (rv), uuid, VIR_UUID_BUFLEN);
CAMLreturn (rv);
#endif
}
+/* Automatically generated binding for virStoragePoolGetUUIDString.
+ * In generator.pl this function has signature "pool : uuid string".
+ */
+
#ifdef HAVE_WEAK_SYMBOLS
#ifdef HAVE_VIRSTORAGEPOOLGETUUIDSTRING
extern int virStoragePoolGetUUIDString (virStoragePoolPtr pool, char *) __attribute__((weak));
#endif
}
+/* Automatically generated binding for virStoragePoolCreateXML.
+ * In generator.pl this function has signature "conn, string : pool".
+ */
+
#ifdef HAVE_WEAK_SYMBOLS
#ifdef HAVE_VIRSTORAGEPOOLCREATEXML
extern virStoragePoolPtr virStoragePoolCreateXML (virConnectPtr conn, const char *str) __attribute__((weak));
#endif
}
+/* Automatically generated binding for virStoragePoolDefineXML.
+ * In generator.pl this function has signature "conn, string : pool".
+ */
+
#ifdef HAVE_WEAK_SYMBOLS
#ifdef HAVE_VIRSTORAGEPOOLDEFINEXML
extern virStoragePoolPtr virStoragePoolDefineXML (virConnectPtr conn, const char *str) __attribute__((weak));
#endif
}
+/* Automatically generated binding for virStoragePoolUndefine.
+ * In generator.pl this function has signature "pool : unit".
+ */
+
#ifdef HAVE_WEAK_SYMBOLS
#ifdef HAVE_VIRSTORAGEPOOLUNDEFINE
extern int virStoragePoolUndefine (virStoragePoolPtr pool) __attribute__((weak));
#endif
}
+/* Automatically generated binding for virStoragePoolCreate.
+ * In generator.pl this function has signature "pool : unit".
+ */
+
#ifdef HAVE_WEAK_SYMBOLS
#ifdef HAVE_VIRSTORAGEPOOLCREATE
extern int virStoragePoolCreate (virStoragePoolPtr pool) __attribute__((weak));
#endif
}
+/* Automatically generated binding for virStoragePoolShutdown.
+ * In generator.pl this function has signature "pool : unit".
+ */
+
#ifdef HAVE_WEAK_SYMBOLS
#ifdef HAVE_VIRSTORAGEPOOLSHUTDOWN
extern int virStoragePoolShutdown (virStoragePoolPtr pool) __attribute__((weak));
#endif
}
+/* Automatically generated binding for virStoragePoolRefresh.
+ * In generator.pl this function has signature "pool, 0U : unit".
+ */
+
#ifdef HAVE_WEAK_SYMBOLS
#ifdef HAVE_VIRSTORAGEPOOLREFRESH
extern int virStoragePoolRefresh (virStoragePoolPtr pool, unsigned int flags) __attribute__((weak));
#endif
}
+/* Automatically generated binding for virStoragePoolGetAutostart.
+ * In generator.pl this function has signature "pool : bool".
+ */
+
#ifdef HAVE_WEAK_SYMBOLS
#ifdef HAVE_VIRSTORAGEPOOLGETAUTOSTART
extern int virStoragePoolGetAutostart (virStoragePoolPtr pool, int *r) __attribute__((weak));
#endif
}
+/* Automatically generated binding for virStoragePoolSetAutostart.
+ * In generator.pl this function has signature "pool, bool : unit".
+ */
+
#ifdef HAVE_WEAK_SYMBOLS
#ifdef HAVE_VIRSTORAGEPOOLSETAUTOSTART
extern int virStoragePoolSetAutostart (virStoragePoolPtr pool, int b) __attribute__((weak));
#endif
}
+/* Automatically generated binding for virStorageVolFree.
+ * In generator.pl this function has signature "vol : free".
+ */
+
#ifdef HAVE_WEAK_SYMBOLS
#ifdef HAVE_VIRSTORAGEVOLFREE
extern int virStorageVolFree (virStorageVolPtr vol) __attribute__((weak));
#endif
}
+/* Automatically generated binding for virStorageVolDestroy.
+ * In generator.pl this function has signature "vol : free".
+ */
+
#ifdef HAVE_WEAK_SYMBOLS
#ifdef HAVE_VIRSTORAGEVOLDESTROY
extern int virStorageVolDestroy (virStorageVolPtr vol) __attribute__((weak));
#endif
}
+/* Automatically generated binding for virStorageVolLookupByName.
+ * In generator.pl this function has signature "pool, string : vol from pool".
+ */
+
+#ifdef HAVE_WEAK_SYMBOLS
+#ifdef HAVE_VIRSTORAGEVOLLOOKUPBYNAME
+extern virStorageVolPtr virStorageVolLookupByName (virStoragePoolPtr pool, const char *str) __attribute__((weak));
+#endif
+#endif
+
+CAMLprim value
+ocaml_libvirt_storage_vol_lookup_by_name (value poolv, value strv)
+{
+ CAMLparam2 (poolv, strv);
+#ifndef HAVE_VIRSTORAGEVOLLOOKUPBYNAME
+ /* Symbol virStorageVolLookupByName not found at compile time. */
+ not_supported ("virStorageVolLookupByName");
+ /* Suppresses a compiler warning. */
+ (void) caml__frame;
+#else
+ /* Check that the symbol virStorageVolLookupByName
+ * is in runtime version of libvirt.
+ */
+ WEAK_SYMBOL_CHECK (virStorageVolLookupByName);
+
+ CAMLlocal2 (rv, connv);
+ virStoragePoolPtr pool = Pool_val (poolv);
+ virConnectPtr conn = Connect_polv (poolv);
+ char *str = String_val (strv);
+ virStorageVolPtr r;
+
+ NONBLOCKING (r = virStorageVolLookupByName (pool, str));
+ CHECK_ERROR (!r, conn, "virStorageVolLookupByName");
+
+ connv = Field (poolv, 1);
+ rv = Val_volume (r, connv);
+
+ CAMLreturn (rv);
+#endif
+}
+
+/* Automatically generated binding for virStorageVolLookupByKey.
+ * In generator.pl this function has signature "conn, string : vol".
+ */
+
#ifdef HAVE_WEAK_SYMBOLS
#ifdef HAVE_VIRSTORAGEVOLLOOKUPBYKEY
extern virStorageVolPtr virStorageVolLookupByKey (virConnectPtr conn, const char *str) __attribute__((weak));
#endif
}
+/* Automatically generated binding for virStorageVolLookupByPath.
+ * In generator.pl this function has signature "conn, string : vol".
+ */
+
#ifdef HAVE_WEAK_SYMBOLS
#ifdef HAVE_VIRSTORAGEVOLLOOKUPBYPATH
extern virStorageVolPtr virStorageVolLookupByPath (virConnectPtr conn, const char *str) __attribute__((weak));
#endif
}
+/* Automatically generated binding for virStorageVolCreateXML.
+ * In generator.pl this function has signature "pool, string, 0 : vol from pool".
+ */
+
+#ifdef HAVE_WEAK_SYMBOLS
+#ifdef HAVE_VIRSTORAGEVOLCREATEXML
+extern virStorageVolPtr virStorageVolCreateXML (virStoragePoolPtr pool, const char *str, int flags) __attribute__((weak));
+#endif
+#endif
+
+CAMLprim value
+ocaml_libvirt_storage_vol_create_xml (value poolv, value strv)
+{
+ CAMLparam2 (poolv, strv);
+#ifndef HAVE_VIRSTORAGEVOLCREATEXML
+ /* Symbol virStorageVolCreateXML not found at compile time. */
+ not_supported ("virStorageVolCreateXML");
+ /* Suppresses a compiler warning. */
+ (void) caml__frame;
+#else
+ /* Check that the symbol virStorageVolCreateXML
+ * is in runtime version of libvirt.
+ */
+ WEAK_SYMBOL_CHECK (virStorageVolCreateXML);
+
+ CAMLlocal2 (rv, connv);
+ virStoragePoolPtr pool = Pool_val (poolv);
+ virConnectPtr conn = Connect_polv (poolv);
+ char *str = String_val (strv);
+ virStorageVolPtr r;
+
+ NONBLOCKING (r = virStorageVolCreateXML (pool, str, 0));
+ CHECK_ERROR (!r, conn, "virStorageVolCreateXML");
+
+ connv = Field (poolv, 1);
+ rv = Val_volume (r, connv);
+
+ CAMLreturn (rv);
+#endif
+}
+
+/* Automatically generated binding for virStorageVolGetXMLDesc.
+ * In generator.pl this function has signature "vol, 0 : string".
+ */
+
#ifdef HAVE_WEAK_SYMBOLS
#ifdef HAVE_VIRSTORAGEVOLGETXMLDESC
extern char *virStorageVolGetXMLDesc (virStorageVolPtr vol, int flags) __attribute__((weak));
#endif
}
+/* Automatically generated binding for virStorageVolGetPath.
+ * In generator.pl this function has signature "vol : string".
+ */
+
#ifdef HAVE_WEAK_SYMBOLS
#ifdef HAVE_VIRSTORAGEVOLGETPATH
extern char *virStorageVolGetPath (virStorageVolPtr vol) __attribute__((weak));
#endif
}
+/* Automatically generated binding for virStorageVolGetKey.
+ * In generator.pl this function has signature "vol : static string".
+ */
+
#ifdef HAVE_WEAK_SYMBOLS
#ifdef HAVE_VIRSTORAGEVOLGETKEY
extern const char *virStorageVolGetKey (virStorageVolPtr vol) __attribute__((weak));
#endif
}
+/* Automatically generated binding for virStorageVolGetName.
+ * In generator.pl this function has signature "vol : static string".
+ */
+
#ifdef HAVE_WEAK_SYMBOLS
#ifdef HAVE_VIRSTORAGEVOLGETNAME
extern const char *virStorageVolGetName (virStorageVolPtr vol) __attribute__((weak));
#endif
}
+/* Automatically generated binding for virStoragePoolLookupByVolume.
+ * In generator.pl this function has signature "vol : pool from vol".
+ */
+
#ifdef HAVE_WEAK_SYMBOLS
#ifdef HAVE_VIRSTORAGEPOOLLOOKUPBYVOLUME
extern virStoragePoolPtr virStoragePoolLookupByVolume (virStorageVolPtr vol) __attribute__((weak));
#endif
}
+/* Automatically generated binding for virJobFree.
+ * In generator.pl this function has signature "job : free".
+ */
+
#ifdef HAVE_WEAK_SYMBOLS
#ifdef HAVE_VIRJOBFREE
extern int virJobFree (virJobPtr job) __attribute__((weak));
#endif
}
+/* Automatically generated binding for virJobCancel.
+ * In generator.pl this function has signature "job : unit".
+ */
+
#ifdef HAVE_WEAK_SYMBOLS
#ifdef HAVE_VIRJOBCANCEL
extern int virJobCancel (virJobPtr job) __attribute__((weak));
#endif
}
+/* Automatically generated binding for virJobGetNetwork.
+ * In generator.pl this function has signature "job : net from job".
+ */
+
#ifdef HAVE_WEAK_SYMBOLS
#ifdef HAVE_VIRJOBGETNETWORK
extern virNetworkPtr virJobGetNetwork (virJobPtr job) __attribute__((weak));
#endif
}
+/* Automatically generated binding for virJobGetDomain.
+ * In generator.pl this function has signature "job : dom from job".
+ */
+
#ifdef HAVE_WEAK_SYMBOLS
#ifdef HAVE_VIRJOBGETDOMAIN
extern virDomainPtr virJobGetDomain (virJobPtr job) __attribute__((weak));
#endif
}
-/* The following functions are unimplemented and always fail.
- * See generator.pl '@unimplemented'
- */
-
-CAMLprim value
-ocaml_libvirt_storage_vol_lookup_by_name ()
-{
- failwith ("ocaml_libvirt_storage_vol_lookup_by_name is unimplemented");
-}
-
-CAMLprim value
-ocaml_libvirt_storage_vol_create_xml ()
-{
- failwith ("ocaml_libvirt_storage_vol_create_xml is unimplemented");
-}
-
#include "libvirt_c_epilogue.c"
/* EOF */