{ name => "virConnectGetCapabilities", sig => "conn : string" },
{ name => "virDomainCreateLinux", sig => "conn, string, 0U : dom" },
- { name => "virDomainCreateLinuxJob", sig => "conn, string, 0U : job" },
+ { name => "virDomainCreateLinuxJob",
+ sig => "conn, string, 0U : job", weak => 1 },
{ name => "virDomainFree", sig => "dom : free" },
{ name => "virDomainDestroy", sig => "dom : free" },
{ name => "virDomainLookupByName", sig => "conn, string : dom" },
{ name => "virDomainGetUUIDString", sig => "dom : uuid string" },
{ name => "virDomainGetMaxVcpus", sig => "dom : int" },
{ name => "virDomainSave", sig => "dom, string : unit" },
- { name => "virDomainSaveJob", sig => "dom, string : job from dom" },
+ { name => "virDomainSaveJob",
+ sig => "dom, string : job from dom", weak => 1 },
{ name => "virDomainRestore", sig => "conn, string : unit" },
- { name => "virDomainRestoreJob", sig => "conn, string : job" },
+ { name => "virDomainRestoreJob",
+ sig => "conn, string : job", weak => 1 },
{ name => "virDomainCoreDump", sig => "dom, string, 0 : unit" },
- { name => "virDomainCoreDumpJob", sig => "dom, string, 0 : job from dom" },
+ { name => "virDomainCoreDumpJob",
+ sig => "dom, string, 0 : job from dom", weak => 1 },
{ name => "virDomainSuspend", sig => "dom : unit" },
{ name => "virDomainResume", sig => "dom : unit" },
{ name => "virDomainShutdown", sig => "dom : unit" },
{ name => "virDomainDefineXML", sig => "conn, string : dom" },
{ name => "virDomainUndefine", sig => "dom : unit" },
{ name => "virDomainCreate", sig => "dom : unit" },
- { name => "virDomainCreateJob", sig => "dom, 0U : job from dom" },
+ { name => "virDomainCreateJob",
+ sig => "dom, 0U : job from dom", weak => 1 },
{ name => "virDomainAttachDevice", sig => "dom, string : unit" },
{ name => "virDomainDetachDevice", sig => "dom, string : unit" },
{ name => "virDomainGetAutostart", sig => "dom : bool" },
{ name => "virNetworkGetUUIDString", sig => "net : uuid string" },
{ name => "virNetworkUndefine", sig => "net : unit" },
{ name => "virNetworkCreateXML", sig => "conn, string : net" },
- { name => "virNetworkCreateXMLJob", sig => "conn, string : job" },
+ { name => "virNetworkCreateXMLJob",
+ sig => "conn, string : job", weak => 1 },
{ name => "virNetworkDefineXML", sig => "conn, string : net" },
{ name => "virNetworkCreate", sig => "net : unit" },
- { name => "virNetworkCreateJob", sig => "net : job from net" },
+ { name => "virNetworkCreateJob",
+ sig => "net : job from net", weak => 1 },
{ name => "virNetworkGetAutostart", sig => "net : bool" },
{ name => "virNetworkSetAutostart", sig => "net, bool : unit" },
CAMLreturn (rv);
}
+#ifdef HAVE_WEAK_SYMBOLS
+#ifdef HAVE_VIRDOMAINCREATELINUXJOB
+extern virJobPtr virDomainCreateLinuxJob (virConnectPtr conn, const char *str, unsigned int flags) __attribute__((weak));
+#endif
+#endif
+
CAMLprim value
ocaml_libvirt_domain_create_linux_job (value connv, value strv)
{
CAMLparam2 (connv, strv);
+#ifndef HAVE_VIRDOMAINCREATELINUXJOB
+ /* Symbol virDomainCreateLinuxJob not found at compile time. */
+ not_supported ("virDomainCreateLinuxJob");
+ /* Suppresses a compiler warning. */
+ (void) caml__frame;
+#else
+ /* Check that the symbol virDomainCreateLinuxJob
+ * is in runtime version of libvirt.
+ */
+ WEAK_SYMBOL_CHECK (virDomainCreateLinuxJob);
CAMLlocal1 (rv);
virConnectPtr conn = Connect_val (connv);
rv = Val_job (r, connv);
CAMLreturn (rv);
+#endif
}
CAMLprim value
CAMLreturn (Val_unit);
}
+#ifdef HAVE_WEAK_SYMBOLS
+#ifdef HAVE_VIRDOMAINSAVEJOB
+extern virJobPtr virDomainSaveJob (virDomainPtr dom, const char *str) __attribute__((weak));
+#endif
+#endif
+
CAMLprim value
ocaml_libvirt_domain_save_job (value domv, value strv)
{
CAMLparam2 (domv, strv);
+#ifndef HAVE_VIRDOMAINSAVEJOB
+ /* Symbol virDomainSaveJob not found at compile time. */
+ not_supported ("virDomainSaveJob");
+ /* Suppresses a compiler warning. */
+ (void) caml__frame;
+#else
+ /* Check that the symbol virDomainSaveJob
+ * is in runtime version of libvirt.
+ */
+ WEAK_SYMBOL_CHECK (virDomainSaveJob);
CAMLlocal2 (rv, connv);
virDomainPtr dom = Domain_val (domv);
rv = Val_job (r, connv);
CAMLreturn (rv);
+#endif
}
CAMLprim value
CAMLreturn (Val_unit);
}
+#ifdef HAVE_WEAK_SYMBOLS
+#ifdef HAVE_VIRDOMAINRESTOREJOB
+extern virJobPtr virDomainRestoreJob (virConnectPtr conn, const char *str) __attribute__((weak));
+#endif
+#endif
+
CAMLprim value
ocaml_libvirt_domain_restore_job (value connv, value strv)
{
CAMLparam2 (connv, strv);
+#ifndef HAVE_VIRDOMAINRESTOREJOB
+ /* Symbol virDomainRestoreJob not found at compile time. */
+ not_supported ("virDomainRestoreJob");
+ /* Suppresses a compiler warning. */
+ (void) caml__frame;
+#else
+ /* Check that the symbol virDomainRestoreJob
+ * is in runtime version of libvirt.
+ */
+ WEAK_SYMBOL_CHECK (virDomainRestoreJob);
CAMLlocal1 (rv);
virConnectPtr conn = Connect_val (connv);
rv = Val_job (r, connv);
CAMLreturn (rv);
+#endif
}
CAMLprim value
CAMLreturn (Val_unit);
}
+#ifdef HAVE_WEAK_SYMBOLS
+#ifdef HAVE_VIRDOMAINCOREDUMPJOB
+extern virJobPtr virDomainCoreDumpJob (virDomainPtr dom, const char *str, int flags) __attribute__((weak));
+#endif
+#endif
+
CAMLprim value
ocaml_libvirt_domain_core_dump_job (value domv, value strv)
{
CAMLparam2 (domv, strv);
+#ifndef HAVE_VIRDOMAINCOREDUMPJOB
+ /* Symbol virDomainCoreDumpJob not found at compile time. */
+ not_supported ("virDomainCoreDumpJob");
+ /* Suppresses a compiler warning. */
+ (void) caml__frame;
+#else
+ /* Check that the symbol virDomainCoreDumpJob
+ * is in runtime version of libvirt.
+ */
+ WEAK_SYMBOL_CHECK (virDomainCoreDumpJob);
CAMLlocal2 (rv, connv);
virDomainPtr dom = Domain_val (domv);
rv = Val_job (r, connv);
CAMLreturn (rv);
+#endif
}
CAMLprim value
CAMLreturn (Val_unit);
}
+#ifdef HAVE_WEAK_SYMBOLS
+#ifdef HAVE_VIRDOMAINCREATEJOB
+extern virJobPtr virDomainCreateJob (virDomainPtr dom, unsigned int flags) __attribute__((weak));
+#endif
+#endif
+
CAMLprim value
ocaml_libvirt_domain_create_job (value domv)
{
CAMLparam1 (domv);
+#ifndef HAVE_VIRDOMAINCREATEJOB
+ /* Symbol virDomainCreateJob not found at compile time. */
+ not_supported ("virDomainCreateJob");
+ /* Suppresses a compiler warning. */
+ (void) caml__frame;
+#else
+ /* Check that the symbol virDomainCreateJob
+ * is in runtime version of libvirt.
+ */
+ WEAK_SYMBOL_CHECK (virDomainCreateJob);
CAMLlocal2 (rv, connv);
virDomainPtr dom = Domain_val (domv);
rv = Val_job (r, connv);
CAMLreturn (rv);
+#endif
}
CAMLprim value
CAMLreturn (rv);
}
+#ifdef HAVE_WEAK_SYMBOLS
+#ifdef HAVE_VIRNETWORKCREATEXMLJOB
+extern virJobPtr virNetworkCreateXMLJob (virConnectPtr conn, const char *str) __attribute__((weak));
+#endif
+#endif
+
CAMLprim value
ocaml_libvirt_network_create_xml_job (value connv, value strv)
{
CAMLparam2 (connv, strv);
+#ifndef HAVE_VIRNETWORKCREATEXMLJOB
+ /* Symbol virNetworkCreateXMLJob not found at compile time. */
+ not_supported ("virNetworkCreateXMLJob");
+ /* Suppresses a compiler warning. */
+ (void) caml__frame;
+#else
+ /* Check that the symbol virNetworkCreateXMLJob
+ * is in runtime version of libvirt.
+ */
+ WEAK_SYMBOL_CHECK (virNetworkCreateXMLJob);
CAMLlocal1 (rv);
virConnectPtr conn = Connect_val (connv);
rv = Val_job (r, connv);
CAMLreturn (rv);
+#endif
}
CAMLprim value
CAMLreturn (Val_unit);
}
+#ifdef HAVE_WEAK_SYMBOLS
+#ifdef HAVE_VIRNETWORKCREATEJOB
+extern virJobPtr virNetworkCreateJob (virNetworkPtr net) __attribute__((weak));
+#endif
+#endif
+
CAMLprim value
ocaml_libvirt_network_create_job (value netv)
{
CAMLparam1 (netv);
+#ifndef HAVE_VIRNETWORKCREATEJOB
+ /* Symbol virNetworkCreateJob not found at compile time. */
+ not_supported ("virNetworkCreateJob");
+ /* Suppresses a compiler warning. */
+ (void) caml__frame;
+#else
+ /* Check that the symbol virNetworkCreateJob
+ * is in runtime version of libvirt.
+ */
+ WEAK_SYMBOL_CHECK (virNetworkCreateJob);
CAMLlocal2 (rv, connv);
virNetworkPtr net = Network_val (netv);
rv = Val_job (r, connv);
CAMLreturn (rv);
+#endif
}
CAMLprim value