1 /* WARNING: THIS FILE IS AUTOMATICALLY GENERATED BY 'generator.pl'.
2 * Any changes you make to this file may be overwritten.
5 /* OCaml bindings for libvirt.
6 * (C) Copyright 2007-2008 Richard W.M. Jones, Red Hat Inc.
9 * This library is free software; you can redistribute it and/or
10 * modify it under the terms of the GNU Lesser General Public
11 * License as published by the Free Software Foundation; either
12 * version 2 of the License, or (at your option) any later version.
14 * This library is distributed in the hope that it will be useful,
15 * but WITHOUT ANY WARRANTY; without even the implied warranty of
16 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
17 * Lesser General Public License for more details.
19 * You should have received a copy of the GNU Lesser General Public
20 * License along with this library; if not, write to the Free Software
21 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
30 #include <libvirt/libvirt.h>
31 #include <libvirt/virterror.h>
33 #include <caml/config.h>
34 #include <caml/alloc.h>
35 #include <caml/callback.h>
36 #include <caml/custom.h>
37 #include <caml/fail.h>
38 #include <caml/memory.h>
39 #include <caml/misc.h>
40 #include <caml/mlvalues.h>
41 #include <caml/signals.h>
43 #include "libvirt_c_prologue.c"
45 #include "libvirt_c_oneoffs.c"
47 #ifdef HAVE_WEAK_SYMBOLS
48 #ifdef HAVE_VIRCONNECTGETHOSTNAME
49 extern char *virConnectGetHostname (virConnectPtr conn) __attribute__((weak));
54 ocaml_libvirt_connect_get_hostname (value connv)
57 #ifndef HAVE_VIRCONNECTGETHOSTNAME
58 /* Symbol virConnectGetHostname not found at compile time. */
59 not_supported ("virConnectGetHostname");
60 /* Suppresses a compiler warning. */
63 /* Check that the symbol virConnectGetHostname
64 * is in runtime version of libvirt.
66 WEAK_SYMBOL_CHECK (virConnectGetHostname);
69 virConnectPtr conn = Connect_val (connv);
72 NONBLOCKING (r = virConnectGetHostname (conn));
73 CHECK_ERROR (!r, conn, "virConnectGetHostname");
75 rv = caml_copy_string (r);
81 #ifdef HAVE_WEAK_SYMBOLS
82 #ifdef HAVE_VIRCONNECTGETURI
83 extern char *virConnectGetURI (virConnectPtr conn) __attribute__((weak));
88 ocaml_libvirt_connect_get_uri (value connv)
91 #ifndef HAVE_VIRCONNECTGETURI
92 /* Symbol virConnectGetURI not found at compile time. */
93 not_supported ("virConnectGetURI");
94 /* Suppresses a compiler warning. */
97 /* Check that the symbol virConnectGetURI
98 * is in runtime version of libvirt.
100 WEAK_SYMBOL_CHECK (virConnectGetURI);
103 virConnectPtr conn = Connect_val (connv);
106 NONBLOCKING (r = virConnectGetURI (conn));
107 CHECK_ERROR (!r, conn, "virConnectGetURI");
109 rv = caml_copy_string (r);
116 ocaml_libvirt_connect_get_type (value connv)
121 virConnectPtr conn = Connect_val (connv);
124 NONBLOCKING (r = virConnectGetType (conn));
125 CHECK_ERROR (!r, conn, "virConnectGetType");
127 rv = caml_copy_string (r);
132 ocaml_libvirt_connect_num_of_domains (value connv)
136 virConnectPtr conn = Connect_val (connv);
139 NONBLOCKING (r = virConnectNumOfDomains (conn));
140 CHECK_ERROR (r == -1, conn, "virConnectNumOfDomains");
142 CAMLreturn (Val_int (r));
146 ocaml_libvirt_connect_list_domains (value connv, value iv)
148 CAMLparam2 (connv, iv);
151 virConnectPtr conn = Connect_val (connv);
152 int i = Int_val (iv);
155 NONBLOCKING (r = virConnectListDomains (conn, ids, i));
156 CHECK_ERROR (r == -1, conn, "virConnectListDomains");
158 rv = caml_alloc (r, 0);
159 for (i = 0; i < r; ++i)
160 Store_field (rv, i, Val_int (ids[i]));
166 ocaml_libvirt_connect_num_of_defined_domains (value connv)
170 virConnectPtr conn = Connect_val (connv);
173 NONBLOCKING (r = virConnectNumOfDefinedDomains (conn));
174 CHECK_ERROR (r == -1, conn, "virConnectNumOfDefinedDomains");
176 CAMLreturn (Val_int (r));
180 ocaml_libvirt_connect_list_defined_domains (value connv, value iv)
182 CAMLparam2 (connv, iv);
184 CAMLlocal2 (rv, strv);
185 virConnectPtr conn = Connect_val (connv);
186 int i = Int_val (iv);
190 NONBLOCKING (r = virConnectListDefinedDomains (conn, names, i));
191 CHECK_ERROR (r == -1, conn, "virConnectListDefinedDomains");
193 rv = caml_alloc (r, 0);
194 for (i = 0; i < r; ++i) {
195 strv = caml_copy_string (names[i]);
196 Store_field (rv, i, strv);
204 ocaml_libvirt_connect_num_of_networks (value connv)
208 virConnectPtr conn = Connect_val (connv);
211 NONBLOCKING (r = virConnectNumOfNetworks (conn));
212 CHECK_ERROR (r == -1, conn, "virConnectNumOfNetworks");
214 CAMLreturn (Val_int (r));
218 ocaml_libvirt_connect_list_networks (value connv, value iv)
220 CAMLparam2 (connv, iv);
222 CAMLlocal2 (rv, strv);
223 virConnectPtr conn = Connect_val (connv);
224 int i = Int_val (iv);
228 NONBLOCKING (r = virConnectListNetworks (conn, names, i));
229 CHECK_ERROR (r == -1, conn, "virConnectListNetworks");
231 rv = caml_alloc (r, 0);
232 for (i = 0; i < r; ++i) {
233 strv = caml_copy_string (names[i]);
234 Store_field (rv, i, strv);
242 ocaml_libvirt_connect_num_of_defined_networks (value connv)
246 virConnectPtr conn = Connect_val (connv);
249 NONBLOCKING (r = virConnectNumOfDefinedNetworks (conn));
250 CHECK_ERROR (r == -1, conn, "virConnectNumOfDefinedNetworks");
252 CAMLreturn (Val_int (r));
256 ocaml_libvirt_connect_list_defined_networks (value connv, value iv)
258 CAMLparam2 (connv, iv);
260 CAMLlocal2 (rv, strv);
261 virConnectPtr conn = Connect_val (connv);
262 int i = Int_val (iv);
266 NONBLOCKING (r = virConnectListDefinedNetworks (conn, names, i));
267 CHECK_ERROR (r == -1, conn, "virConnectListDefinedNetworks");
269 rv = caml_alloc (r, 0);
270 for (i = 0; i < r; ++i) {
271 strv = caml_copy_string (names[i]);
272 Store_field (rv, i, strv);
279 #ifdef HAVE_WEAK_SYMBOLS
280 #ifdef HAVE_VIRCONNECTNUMOFSTORAGEPOOLS
281 extern int virConnectNumOfStoragePools (virConnectPtr conn) __attribute__((weak));
286 ocaml_libvirt_connect_num_of_storage_pools (value connv)
289 #ifndef HAVE_VIRCONNECTNUMOFSTORAGEPOOLS
290 /* Symbol virConnectNumOfStoragePools not found at compile time. */
291 not_supported ("virConnectNumOfStoragePools");
292 /* Suppresses a compiler warning. */
295 /* Check that the symbol virConnectNumOfStoragePools
296 * is in runtime version of libvirt.
298 WEAK_SYMBOL_CHECK (virConnectNumOfStoragePools);
300 virConnectPtr conn = Connect_val (connv);
303 NONBLOCKING (r = virConnectNumOfStoragePools (conn));
304 CHECK_ERROR (r == -1, conn, "virConnectNumOfStoragePools");
306 CAMLreturn (Val_int (r));
310 #ifdef HAVE_WEAK_SYMBOLS
311 #ifdef HAVE_VIRCONNECTLISTSTORAGEPOOLS
312 extern int virConnectListStoragePools (virConnectPtr conn, char **const names, int maxnames) __attribute__((weak));
317 ocaml_libvirt_connect_list_storage_pools (value connv, value iv)
319 CAMLparam2 (connv, iv);
320 #ifndef HAVE_VIRCONNECTLISTSTORAGEPOOLS
321 /* Symbol virConnectListStoragePools not found at compile time. */
322 not_supported ("virConnectListStoragePools");
323 /* Suppresses a compiler warning. */
326 /* Check that the symbol virConnectListStoragePools
327 * is in runtime version of libvirt.
329 WEAK_SYMBOL_CHECK (virConnectListStoragePools);
331 CAMLlocal2 (rv, strv);
332 virConnectPtr conn = Connect_val (connv);
333 int i = Int_val (iv);
337 NONBLOCKING (r = virConnectListStoragePools (conn, names, i));
338 CHECK_ERROR (r == -1, conn, "virConnectListStoragePools");
340 rv = caml_alloc (r, 0);
341 for (i = 0; i < r; ++i) {
342 strv = caml_copy_string (names[i]);
343 Store_field (rv, i, strv);
351 #ifdef HAVE_WEAK_SYMBOLS
352 #ifdef HAVE_VIRCONNECTNUMOFDEFINEDSTORAGEPOOLS
353 extern int virConnectNumOfDefinedStoragePools (virConnectPtr conn) __attribute__((weak));
358 ocaml_libvirt_connect_num_of_defined_storage_pools (value connv)
361 #ifndef HAVE_VIRCONNECTNUMOFDEFINEDSTORAGEPOOLS
362 /* Symbol virConnectNumOfDefinedStoragePools not found at compile time. */
363 not_supported ("virConnectNumOfDefinedStoragePools");
364 /* Suppresses a compiler warning. */
367 /* Check that the symbol virConnectNumOfDefinedStoragePools
368 * is in runtime version of libvirt.
370 WEAK_SYMBOL_CHECK (virConnectNumOfDefinedStoragePools);
372 virConnectPtr conn = Connect_val (connv);
375 NONBLOCKING (r = virConnectNumOfDefinedStoragePools (conn));
376 CHECK_ERROR (r == -1, conn, "virConnectNumOfDefinedStoragePools");
378 CAMLreturn (Val_int (r));
382 #ifdef HAVE_WEAK_SYMBOLS
383 #ifdef HAVE_VIRCONNECTLISTDEFINEDSTORAGEPOOLS
384 extern int virConnectListDefinedStoragePools (virConnectPtr conn, char **const names, int maxnames) __attribute__((weak));
389 ocaml_libvirt_connect_list_defined_storage_pools (value connv, value iv)
391 CAMLparam2 (connv, iv);
392 #ifndef HAVE_VIRCONNECTLISTDEFINEDSTORAGEPOOLS
393 /* Symbol virConnectListDefinedStoragePools not found at compile time. */
394 not_supported ("virConnectListDefinedStoragePools");
395 /* Suppresses a compiler warning. */
398 /* Check that the symbol virConnectListDefinedStoragePools
399 * is in runtime version of libvirt.
401 WEAK_SYMBOL_CHECK (virConnectListDefinedStoragePools);
403 CAMLlocal2 (rv, strv);
404 virConnectPtr conn = Connect_val (connv);
405 int i = Int_val (iv);
409 NONBLOCKING (r = virConnectListDefinedStoragePools (conn, names, i));
410 CHECK_ERROR (r == -1, conn, "virConnectListDefinedStoragePools");
412 rv = caml_alloc (r, 0);
413 for (i = 0; i < r; ++i) {
414 strv = caml_copy_string (names[i]);
415 Store_field (rv, i, strv);
424 ocaml_libvirt_connect_get_capabilities (value connv)
429 virConnectPtr conn = Connect_val (connv);
432 NONBLOCKING (r = virConnectGetCapabilities (conn));
433 CHECK_ERROR (!r, conn, "virConnectGetCapabilities");
435 rv = caml_copy_string (r);
441 ocaml_libvirt_domain_get_name (value domv)
446 virDomainPtr dom = Domain_val (domv);
447 virConnectPtr conn = Connect_domv (domv);
450 NONBLOCKING (r = virDomainGetName (dom));
451 CHECK_ERROR (!r, conn, "virDomainGetName");
453 rv = caml_copy_string (r);
458 ocaml_libvirt_domain_get_os_type (value domv)
463 virDomainPtr dom = Domain_val (domv);
464 virConnectPtr conn = Connect_domv (domv);
467 NONBLOCKING (r = virDomainGetOSType (dom));
468 CHECK_ERROR (!r, conn, "virDomainGetOSType");
470 rv = caml_copy_string (r);
476 ocaml_libvirt_domain_get_xml_desc (value domv)
481 virDomainPtr dom = Domain_val (domv);
482 virConnectPtr conn = Connect_domv (domv);
485 NONBLOCKING (r = virDomainGetXMLDesc (dom, 0));
486 CHECK_ERROR (!r, conn, "virDomainGetXMLDesc");
488 rv = caml_copy_string (r);
494 ocaml_libvirt_domain_suspend (value domv)
498 virDomainPtr dom = Domain_val (domv);
499 virConnectPtr conn = Connect_domv (domv);
502 NONBLOCKING (r = virDomainSuspend (dom));
503 CHECK_ERROR (r == -1, conn, "virDomainSuspend");
505 CAMLreturn (Val_unit);
509 ocaml_libvirt_domain_resume (value domv)
513 virDomainPtr dom = Domain_val (domv);
514 virConnectPtr conn = Connect_domv (domv);
517 NONBLOCKING (r = virDomainResume (dom));
518 CHECK_ERROR (r == -1, conn, "virDomainResume");
520 CAMLreturn (Val_unit);
524 ocaml_libvirt_domain_shutdown (value domv)
528 virDomainPtr dom = Domain_val (domv);
529 virConnectPtr conn = Connect_domv (domv);
532 NONBLOCKING (r = virDomainShutdown (dom));
533 CHECK_ERROR (r == -1, conn, "virDomainShutdown");
535 CAMLreturn (Val_unit);
539 ocaml_libvirt_domain_reboot (value domv)
543 virDomainPtr dom = Domain_val (domv);
544 virConnectPtr conn = Connect_domv (domv);
547 NONBLOCKING (r = virDomainReboot (dom, 0));
548 CHECK_ERROR (r == -1, conn, "virDomainReboot");
550 CAMLreturn (Val_unit);
554 ocaml_libvirt_domain_undefine (value domv)
558 virDomainPtr dom = Domain_val (domv);
559 virConnectPtr conn = Connect_domv (domv);
562 NONBLOCKING (r = virDomainUndefine (dom));
563 CHECK_ERROR (r == -1, conn, "virDomainUndefine");
565 CAMLreturn (Val_unit);
569 ocaml_libvirt_domain_create (value domv)
573 virDomainPtr dom = Domain_val (domv);
574 virConnectPtr conn = Connect_domv (domv);
577 NONBLOCKING (r = virDomainCreate (dom));
578 CHECK_ERROR (r == -1, conn, "virDomainCreate");
580 CAMLreturn (Val_unit);
584 ocaml_libvirt_network_get_name (value netv)
589 virNetworkPtr net = Network_val (netv);
590 virConnectPtr conn = Connect_netv (netv);
593 NONBLOCKING (r = virNetworkGetName (net));
594 CHECK_ERROR (!r, conn, "virNetworkGetName");
596 rv = caml_copy_string (r);
601 ocaml_libvirt_network_get_xml_desc (value netv)
606 virNetworkPtr net = Network_val (netv);
607 virConnectPtr conn = Connect_netv (netv);
610 NONBLOCKING (r = virNetworkGetXMLDesc (net, 0));
611 CHECK_ERROR (!r, conn, "virNetworkGetXMLDesc");
613 rv = caml_copy_string (r);
619 ocaml_libvirt_network_get_bridge_name (value netv)
624 virNetworkPtr net = Network_val (netv);
625 virConnectPtr conn = Connect_netv (netv);
628 NONBLOCKING (r = virNetworkGetBridgeName (net));
629 CHECK_ERROR (!r, conn, "virNetworkGetBridgeName");
631 rv = caml_copy_string (r);
637 ocaml_libvirt_network_undefine (value netv)
641 virNetworkPtr net = Network_val (netv);
642 virConnectPtr conn = Connect_netv (netv);
645 NONBLOCKING (r = virNetworkUndefine (net));
646 CHECK_ERROR (r == -1, conn, "virNetworkUndefine");
648 CAMLreturn (Val_unit);
652 ocaml_libvirt_network_create (value netv)
656 virNetworkPtr net = Network_val (netv);
657 virConnectPtr conn = Connect_netv (netv);
660 NONBLOCKING (r = virNetworkCreate (net));
661 CHECK_ERROR (r == -1, conn, "virNetworkCreate");
663 CAMLreturn (Val_unit);
666 #ifdef HAVE_WEAK_SYMBOLS
667 #ifdef HAVE_VIRSTORAGEPOOLGETNAME
668 extern const char *virStoragePoolGetName (virStoragePoolPtr pool) __attribute__((weak));
673 ocaml_libvirt_storage_pool_get_name (value poolv)
676 #ifndef HAVE_VIRSTORAGEPOOLGETNAME
677 /* Symbol virStoragePoolGetName not found at compile time. */
678 not_supported ("virStoragePoolGetName");
679 /* Suppresses a compiler warning. */
682 /* Check that the symbol virStoragePoolGetName
683 * is in runtime version of libvirt.
685 WEAK_SYMBOL_CHECK (virStoragePoolGetName);
688 virStoragePoolPtr pool = Pool_val (poolv);
689 virConnectPtr conn = Connect_polv (poolv);
692 NONBLOCKING (r = virStoragePoolGetName (pool));
693 CHECK_ERROR (!r, conn, "virStoragePoolGetName");
695 rv = caml_copy_string (r);
700 #ifdef HAVE_WEAK_SYMBOLS
701 #ifdef HAVE_VIRSTORAGEPOOLGETXMLDESC
702 extern char *virStoragePoolGetXMLDesc (virStoragePoolPtr pool, int flags) __attribute__((weak));
707 ocaml_libvirt_storage_pool_get_xml_desc (value poolv)
710 #ifndef HAVE_VIRSTORAGEPOOLGETXMLDESC
711 /* Symbol virStoragePoolGetXMLDesc not found at compile time. */
712 not_supported ("virStoragePoolGetXMLDesc");
713 /* Suppresses a compiler warning. */
716 /* Check that the symbol virStoragePoolGetXMLDesc
717 * is in runtime version of libvirt.
719 WEAK_SYMBOL_CHECK (virStoragePoolGetXMLDesc);
722 virStoragePoolPtr pool = Pool_val (poolv);
723 virConnectPtr conn = Connect_polv (poolv);
726 NONBLOCKING (r = virStoragePoolGetXMLDesc (pool, 0));
727 CHECK_ERROR (!r, conn, "virStoragePoolGetXMLDesc");
729 rv = caml_copy_string (r);
735 #ifdef HAVE_WEAK_SYMBOLS
736 #ifdef HAVE_VIRSTORAGEPOOLUNDEFINE
737 extern char *virStoragePoolUndefine (virStoragePoolPtr pool) __attribute__((weak));
742 ocaml_libvirt_storage_pool_undefine (value poolv)
745 #ifndef HAVE_VIRSTORAGEPOOLUNDEFINE
746 /* Symbol virStoragePoolUndefine not found at compile time. */
747 not_supported ("virStoragePoolUndefine");
748 /* Suppresses a compiler warning. */
751 /* Check that the symbol virStoragePoolUndefine
752 * is in runtime version of libvirt.
754 WEAK_SYMBOL_CHECK (virStoragePoolUndefine);
757 virStoragePoolPtr pool = Pool_val (poolv);
758 virConnectPtr conn = Connect_polv (poolv);
761 NONBLOCKING (r = virStoragePoolUndefine (pool));
762 CHECK_ERROR (!r, conn, "virStoragePoolUndefine");
764 rv = caml_copy_string (r);
770 #ifdef HAVE_WEAK_SYMBOLS
771 #ifdef HAVE_VIRSTORAGEPOOLCREATE
772 extern char *virStoragePoolCreate (virStoragePoolPtr pool) __attribute__((weak));
777 ocaml_libvirt_storage_pool_create (value poolv)
780 #ifndef HAVE_VIRSTORAGEPOOLCREATE
781 /* Symbol virStoragePoolCreate not found at compile time. */
782 not_supported ("virStoragePoolCreate");
783 /* Suppresses a compiler warning. */
786 /* Check that the symbol virStoragePoolCreate
787 * is in runtime version of libvirt.
789 WEAK_SYMBOL_CHECK (virStoragePoolCreate);
792 virStoragePoolPtr pool = Pool_val (poolv);
793 virConnectPtr conn = Connect_polv (poolv);
796 NONBLOCKING (r = virStoragePoolCreate (pool));
797 CHECK_ERROR (!r, conn, "virStoragePoolCreate");
799 rv = caml_copy_string (r);
805 #ifdef HAVE_WEAK_SYMBOLS
806 #ifdef HAVE_VIRSTORAGEPOOLSHUTDOWN
807 extern char *virStoragePoolShutdown (virStoragePoolPtr pool) __attribute__((weak));
812 ocaml_libvirt_storage_pool_shutdown (value poolv)
815 #ifndef HAVE_VIRSTORAGEPOOLSHUTDOWN
816 /* Symbol virStoragePoolShutdown not found at compile time. */
817 not_supported ("virStoragePoolShutdown");
818 /* Suppresses a compiler warning. */
821 /* Check that the symbol virStoragePoolShutdown
822 * is in runtime version of libvirt.
824 WEAK_SYMBOL_CHECK (virStoragePoolShutdown);
827 virStoragePoolPtr pool = Pool_val (poolv);
828 virConnectPtr conn = Connect_polv (poolv);
831 NONBLOCKING (r = virStoragePoolShutdown (pool));
832 CHECK_ERROR (!r, conn, "virStoragePoolShutdown");
834 rv = caml_copy_string (r);
840 #ifdef HAVE_WEAK_SYMBOLS
841 #ifdef HAVE_VIRSTORAGEPOOLREFRESH
842 extern char *virStoragePoolRefresh (virStoragePoolPtr pool, int flags) __attribute__((weak));
847 ocaml_libvirt_storage_pool_refresh (value poolv)
850 #ifndef HAVE_VIRSTORAGEPOOLREFRESH
851 /* Symbol virStoragePoolRefresh not found at compile time. */
852 not_supported ("virStoragePoolRefresh");
853 /* Suppresses a compiler warning. */
856 /* Check that the symbol virStoragePoolRefresh
857 * is in runtime version of libvirt.
859 WEAK_SYMBOL_CHECK (virStoragePoolRefresh);
862 virStoragePoolPtr pool = Pool_val (poolv);
863 virConnectPtr conn = Connect_polv (poolv);
866 NONBLOCKING (r = virStoragePoolRefresh (pool, 0));
867 CHECK_ERROR (!r, conn, "virStoragePoolRefresh");
869 rv = caml_copy_string (r);
875 #ifdef HAVE_WEAK_SYMBOLS
876 #ifdef HAVE_VIRSTORAGEVOLGETXMLDESC
877 extern char *virStorageVolGetXMLDesc (virStoragePoolPtr pool, int flags) __attribute__((weak));
882 ocaml_libvirt_storage_vol_get_xml_desc (value poolv)
885 #ifndef HAVE_VIRSTORAGEVOLGETXMLDESC
886 /* Symbol virStorageVolGetXMLDesc not found at compile time. */
887 not_supported ("virStorageVolGetXMLDesc");
888 /* Suppresses a compiler warning. */
891 /* Check that the symbol virStorageVolGetXMLDesc
892 * is in runtime version of libvirt.
894 WEAK_SYMBOL_CHECK (virStorageVolGetXMLDesc);
897 virStoragePoolPtr pool = Pool_val (poolv);
898 virConnectPtr conn = Connect_polv (poolv);
901 NONBLOCKING (r = virStorageVolGetXMLDesc (pool, 0));
902 CHECK_ERROR (!r, conn, "virStorageVolGetXMLDesc");
904 rv = caml_copy_string (r);
910 #ifdef HAVE_WEAK_SYMBOLS
911 #ifdef HAVE_VIRSTORAGEVOLGETPATH
912 extern char *virStorageVolGetPath (virStoragePoolPtr pool) __attribute__((weak));
917 ocaml_libvirt_storage_vol_get_path (value poolv)
920 #ifndef HAVE_VIRSTORAGEVOLGETPATH
921 /* Symbol virStorageVolGetPath not found at compile time. */
922 not_supported ("virStorageVolGetPath");
923 /* Suppresses a compiler warning. */
926 /* Check that the symbol virStorageVolGetPath
927 * is in runtime version of libvirt.
929 WEAK_SYMBOL_CHECK (virStorageVolGetPath);
932 virStoragePoolPtr pool = Pool_val (poolv);
933 virConnectPtr conn = Connect_polv (poolv);
936 NONBLOCKING (r = virStorageVolGetPath (pool));
937 CHECK_ERROR (!r, conn, "virStorageVolGetPath");
939 rv = caml_copy_string (r);
945 #ifdef HAVE_WEAK_SYMBOLS
946 #ifdef HAVE_VIRSTORAGEVOLGETKEY
947 extern const char *virStorageVolGetKey (virStoragePoolPtr pool) __attribute__((weak));
952 ocaml_libvirt_storage_vol_get_key (value poolv)
955 #ifndef HAVE_VIRSTORAGEVOLGETKEY
956 /* Symbol virStorageVolGetKey not found at compile time. */
957 not_supported ("virStorageVolGetKey");
958 /* Suppresses a compiler warning. */
961 /* Check that the symbol virStorageVolGetKey
962 * is in runtime version of libvirt.
964 WEAK_SYMBOL_CHECK (virStorageVolGetKey);
967 virStoragePoolPtr pool = Pool_val (poolv);
968 virConnectPtr conn = Connect_polv (poolv);
971 NONBLOCKING (r = virStorageVolGetKey (pool));
972 CHECK_ERROR (!r, conn, "virStorageVolGetKey");
974 rv = caml_copy_string (r);
979 #ifdef HAVE_WEAK_SYMBOLS
980 #ifdef HAVE_VIRSTORAGEVOLGETNAME
981 extern const char *virStorageVolGetName (virStoragePoolPtr pool) __attribute__((weak));
986 ocaml_libvirt_storage_vol_get_name (value poolv)
989 #ifndef HAVE_VIRSTORAGEVOLGETNAME
990 /* Symbol virStorageVolGetName not found at compile time. */
991 not_supported ("virStorageVolGetName");
992 /* Suppresses a compiler warning. */
995 /* Check that the symbol virStorageVolGetName
996 * is in runtime version of libvirt.
998 WEAK_SYMBOL_CHECK (virStorageVolGetName);
1001 virStoragePoolPtr pool = Pool_val (poolv);
1002 virConnectPtr conn = Connect_polv (poolv);
1005 NONBLOCKING (r = virStorageVolGetName (pool));
1006 CHECK_ERROR (!r, conn, "virStorageVolGetName");
1008 rv = caml_copy_string (r);
1014 ocaml_libvirt_domain_create_job ()
1016 failwith ("ocaml_libvirt_domain_create_job is unimplemented");
1020 ocaml_libvirt_domain_core_dump_job ()
1022 failwith ("ocaml_libvirt_domain_core_dump_job is unimplemented");
1026 ocaml_libvirt_domain_restore_job ()
1028 failwith ("ocaml_libvirt_domain_restore_job is unimplemented");
1032 ocaml_libvirt_domain_save_job ()
1034 failwith ("ocaml_libvirt_domain_save_job is unimplemented");
1038 ocaml_libvirt_connect_create_linux_job ()
1040 failwith ("ocaml_libvirt_connect_create_linux_job is unimplemented");
1044 ocaml_libvirt_network_create_job ()
1046 failwith ("ocaml_libvirt_network_create_job is unimplemented");
1050 ocaml_libvirt_network_create_xml_job ()
1052 failwith ("ocaml_libvirt_network_create_xml_job is unimplemented");
1056 ocaml_libvirt_storage_pool_set_autostart ()
1058 failwith ("ocaml_libvirt_storage_pool_set_autostart is unimplemented");
1062 ocaml_libvirt_storage_pool_get_autostart ()
1064 failwith ("ocaml_libvirt_storage_pool_get_autostart is unimplemented");
1068 ocaml_libvirt_storage_pool_get_info ()
1070 failwith ("ocaml_libvirt_storage_pool_get_info is unimplemented");
1074 ocaml_libvirt_storage_pool_get_uuid_string ()
1076 failwith ("ocaml_libvirt_storage_pool_get_uuid_string is unimplemented");
1080 ocaml_libvirt_storage_pool_get_uuid ()
1082 failwith ("ocaml_libvirt_storage_pool_get_uuid is unimplemented");
1086 ocaml_libvirt_storage_pool_free ()
1088 failwith ("ocaml_libvirt_storage_pool_free is unimplemented");
1092 ocaml_libvirt_storage_pool_destroy ()
1094 failwith ("ocaml_libvirt_storage_pool_destroy is unimplemented");
1098 ocaml_libvirt_storage_pool_define_xml ()
1100 failwith ("ocaml_libvirt_storage_pool_define_xml is unimplemented");
1104 ocaml_libvirt_storage_pool_create_xml ()
1106 failwith ("ocaml_libvirt_storage_pool_create_xml is unimplemented");
1110 ocaml_libvirt_storage_pool_lookup_by_uuid_string ()
1112 failwith ("ocaml_libvirt_storage_pool_lookup_by_uuid_string is unimplemented");
1116 ocaml_libvirt_storage_pool_lookup_by_uuid ()
1118 failwith ("ocaml_libvirt_storage_pool_lookup_by_uuid is unimplemented");
1122 ocaml_libvirt_storage_pool_lookup_by_name ()
1124 failwith ("ocaml_libvirt_storage_pool_lookup_by_name is unimplemented");
1128 ocaml_libvirt_storage_vol_free ()
1130 failwith ("ocaml_libvirt_storage_vol_free is unimplemented");
1134 ocaml_libvirt_storage_vol_destroy ()
1136 failwith ("ocaml_libvirt_storage_vol_destroy is unimplemented");
1140 ocaml_libvirt_storage_vol_create_xml ()
1142 failwith ("ocaml_libvirt_storage_vol_create_xml is unimplemented");
1146 ocaml_libvirt_storage_vol_get_info ()
1148 failwith ("ocaml_libvirt_storage_vol_get_info is unimplemented");
1152 ocaml_libvirt_pool_of_volume ()
1154 failwith ("ocaml_libvirt_pool_of_volume is unimplemented");
1158 ocaml_libvirt_storage_vol_lookup_by_path ()
1160 failwith ("ocaml_libvirt_storage_vol_lookup_by_path is unimplemented");
1164 ocaml_libvirt_storage_vol_lookup_by_key ()
1166 failwith ("ocaml_libvirt_storage_vol_lookup_by_key is unimplemented");
1170 ocaml_libvirt_storage_vol_lookup_by_name ()
1172 failwith ("ocaml_libvirt_storage_vol_lookup_by_name is unimplemented");
1176 ocaml_libvirt_job_cancel ()
1178 failwith ("ocaml_libvirt_job_cancel is unimplemented");
1182 ocaml_libvirt_job_get_network ()
1184 failwith ("ocaml_libvirt_job_get_network is unimplemented");
1188 ocaml_libvirt_job_get_domain ()
1190 failwith ("ocaml_libvirt_job_get_domain is unimplemented");
1194 ocaml_libvirt_job_get_info ()
1196 failwith ("ocaml_libvirt_job_get_info is unimplemented");
1199 #include "libvirt_c_epilogue.c"