0dc21e48b577de5229e58e417f0132f6ce12ca04
[virt-top.git] / libvirt / libvirt_c.c
1 /* !!! WARNING WARNING WARNING WARNING WARNING WARNING WARNING !!!
2  *
3  * THIS FILE IS AUTOMATICALLY GENERATED BY 'generator.pl'.
4  *
5  * Any changes you make to this file may be overwritten.
6  */
7
8 /* OCaml bindings for libvirt.
9  * (C) Copyright 2007-2008 Richard W.M. Jones, Red Hat Inc.
10  * http://libvirt.org/
11  *
12  * This library is free software; you can redistribute it and/or
13  * modify it under the terms of the GNU Lesser General Public
14  * License as published by the Free Software Foundation; either
15  * version 2 of the License, or (at your option) any later version.
16  *
17  * This library is distributed in the hope that it will be useful,
18  * but WITHOUT ANY WARRANTY; without even the implied warranty of
19  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
20  * Lesser General Public License for more details.
21  *
22  * You should have received a copy of the GNU Lesser General Public
23  * License along with this library; if not, write to the Free Software
24  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301  USA
25  */
26
27 #include "config.h"
28
29 #include <stdio.h>
30 #include <stdlib.h>
31 #include <string.h>
32
33 #include <libvirt/libvirt.h>
34 #include <libvirt/virterror.h>
35
36 #include <caml/config.h>
37 #include <caml/alloc.h>
38 #include <caml/callback.h>
39 #include <caml/custom.h>
40 #include <caml/fail.h>
41 #include <caml/memory.h>
42 #include <caml/misc.h>
43 #include <caml/mlvalues.h>
44 #include <caml/signals.h>
45
46 #include "libvirt_c_prologue.c"
47
48 #include "libvirt_c_oneoffs.c"
49
50 #ifdef HAVE_WEAK_SYMBOLS
51 #ifdef HAVE_VIRCONNECTGETHOSTNAME
52 extern char *virConnectGetHostname (virConnectPtr conn) __attribute__((weak));
53 #endif
54 #endif
55
56 CAMLprim value
57 ocaml_libvirt_connect_get_hostname (value connv)
58 {
59   CAMLparam1 (connv);
60 #ifndef HAVE_VIRCONNECTGETHOSTNAME
61   /* Symbol virConnectGetHostname not found at compile time. */
62   not_supported ("virConnectGetHostname");
63   /* Suppresses a compiler warning. */
64   (void) caml__frame;
65 #else
66   /* Check that the symbol virConnectGetHostname
67    * is in runtime version of libvirt.
68    */
69   WEAK_SYMBOL_CHECK (virConnectGetHostname);
70
71   CAMLlocal1 (rv);
72   virConnectPtr conn = Connect_val (connv);
73   char *r;
74
75   NONBLOCKING (r = virConnectGetHostname (conn));
76   CHECK_ERROR (!r, conn, "virConnectGetHostname");
77
78   rv = caml_copy_string (r);
79   free (r);
80   CAMLreturn (rv);
81 #endif
82 }
83
84 #ifdef HAVE_WEAK_SYMBOLS
85 #ifdef HAVE_VIRCONNECTGETURI
86 extern char *virConnectGetURI (virConnectPtr conn) __attribute__((weak));
87 #endif
88 #endif
89
90 CAMLprim value
91 ocaml_libvirt_connect_get_uri (value connv)
92 {
93   CAMLparam1 (connv);
94 #ifndef HAVE_VIRCONNECTGETURI
95   /* Symbol virConnectGetURI not found at compile time. */
96   not_supported ("virConnectGetURI");
97   /* Suppresses a compiler warning. */
98   (void) caml__frame;
99 #else
100   /* Check that the symbol virConnectGetURI
101    * is in runtime version of libvirt.
102    */
103   WEAK_SYMBOL_CHECK (virConnectGetURI);
104
105   CAMLlocal1 (rv);
106   virConnectPtr conn = Connect_val (connv);
107   char *r;
108
109   NONBLOCKING (r = virConnectGetURI (conn));
110   CHECK_ERROR (!r, conn, "virConnectGetURI");
111
112   rv = caml_copy_string (r);
113   free (r);
114   CAMLreturn (rv);
115 #endif
116 }
117
118 CAMLprim value
119 ocaml_libvirt_connect_get_type (value connv)
120 {
121   CAMLparam1 (connv);
122
123   CAMLlocal1 (rv);
124   virConnectPtr conn = Connect_val (connv);
125   const char *r;
126
127   NONBLOCKING (r = virConnectGetType (conn));
128   CHECK_ERROR (!r, conn, "virConnectGetType");
129
130   rv = caml_copy_string (r);
131   CAMLreturn (rv);
132 }
133
134 CAMLprim value
135 ocaml_libvirt_connect_num_of_domains (value connv)
136 {
137   CAMLparam1 (connv);
138
139   virConnectPtr conn = Connect_val (connv);
140   int r;
141
142   NONBLOCKING (r = virConnectNumOfDomains (conn));
143   CHECK_ERROR (r == -1, conn, "virConnectNumOfDomains");
144
145   CAMLreturn (Val_int (r));
146 }
147
148 CAMLprim value
149 ocaml_libvirt_connect_list_domains (value connv, value iv)
150 {
151   CAMLparam2 (connv, iv);
152
153   CAMLlocal1 (rv);
154   virConnectPtr conn = Connect_val (connv);
155   int i = Int_val (iv);
156   int ids[i], r;
157
158   NONBLOCKING (r = virConnectListDomains (conn, ids, i));
159   CHECK_ERROR (r == -1, conn, "virConnectListDomains");
160
161   rv = caml_alloc (r, 0);
162   for (i = 0; i < r; ++i)
163     Store_field (rv, i, Val_int (ids[i]));
164
165   CAMLreturn (rv);
166 }
167
168 CAMLprim value
169 ocaml_libvirt_connect_num_of_defined_domains (value connv)
170 {
171   CAMLparam1 (connv);
172
173   virConnectPtr conn = Connect_val (connv);
174   int r;
175
176   NONBLOCKING (r = virConnectNumOfDefinedDomains (conn));
177   CHECK_ERROR (r == -1, conn, "virConnectNumOfDefinedDomains");
178
179   CAMLreturn (Val_int (r));
180 }
181
182 CAMLprim value
183 ocaml_libvirt_connect_list_defined_domains (value connv, value iv)
184 {
185   CAMLparam2 (connv, iv);
186
187   CAMLlocal2 (rv, strv);
188   virConnectPtr conn = Connect_val (connv);
189   int i = Int_val (iv);
190   char *names[i];
191   int r;
192
193   NONBLOCKING (r = virConnectListDefinedDomains (conn, names, i));
194   CHECK_ERROR (r == -1, conn, "virConnectListDefinedDomains");
195
196   rv = caml_alloc (r, 0);
197   for (i = 0; i < r; ++i) {
198     strv = caml_copy_string (names[i]);
199     Store_field (rv, i, strv);
200     free (names[i]);
201   }
202
203   CAMLreturn (rv);
204 }
205
206 CAMLprim value
207 ocaml_libvirt_connect_num_of_networks (value connv)
208 {
209   CAMLparam1 (connv);
210
211   virConnectPtr conn = Connect_val (connv);
212   int r;
213
214   NONBLOCKING (r = virConnectNumOfNetworks (conn));
215   CHECK_ERROR (r == -1, conn, "virConnectNumOfNetworks");
216
217   CAMLreturn (Val_int (r));
218 }
219
220 CAMLprim value
221 ocaml_libvirt_connect_list_networks (value connv, value iv)
222 {
223   CAMLparam2 (connv, iv);
224
225   CAMLlocal2 (rv, strv);
226   virConnectPtr conn = Connect_val (connv);
227   int i = Int_val (iv);
228   char *names[i];
229   int r;
230
231   NONBLOCKING (r = virConnectListNetworks (conn, names, i));
232   CHECK_ERROR (r == -1, conn, "virConnectListNetworks");
233
234   rv = caml_alloc (r, 0);
235   for (i = 0; i < r; ++i) {
236     strv = caml_copy_string (names[i]);
237     Store_field (rv, i, strv);
238     free (names[i]);
239   }
240
241   CAMLreturn (rv);
242 }
243
244 CAMLprim value
245 ocaml_libvirt_connect_num_of_defined_networks (value connv)
246 {
247   CAMLparam1 (connv);
248
249   virConnectPtr conn = Connect_val (connv);
250   int r;
251
252   NONBLOCKING (r = virConnectNumOfDefinedNetworks (conn));
253   CHECK_ERROR (r == -1, conn, "virConnectNumOfDefinedNetworks");
254
255   CAMLreturn (Val_int (r));
256 }
257
258 CAMLprim value
259 ocaml_libvirt_connect_list_defined_networks (value connv, value iv)
260 {
261   CAMLparam2 (connv, iv);
262
263   CAMLlocal2 (rv, strv);
264   virConnectPtr conn = Connect_val (connv);
265   int i = Int_val (iv);
266   char *names[i];
267   int r;
268
269   NONBLOCKING (r = virConnectListDefinedNetworks (conn, names, i));
270   CHECK_ERROR (r == -1, conn, "virConnectListDefinedNetworks");
271
272   rv = caml_alloc (r, 0);
273   for (i = 0; i < r; ++i) {
274     strv = caml_copy_string (names[i]);
275     Store_field (rv, i, strv);
276     free (names[i]);
277   }
278
279   CAMLreturn (rv);
280 }
281
282 #ifdef HAVE_WEAK_SYMBOLS
283 #ifdef HAVE_VIRCONNECTNUMOFSTORAGEPOOLS
284 extern int virConnectNumOfStoragePools (virConnectPtr conn) __attribute__((weak));
285 #endif
286 #endif
287
288 CAMLprim value
289 ocaml_libvirt_connect_num_of_storage_pools (value connv)
290 {
291   CAMLparam1 (connv);
292 #ifndef HAVE_VIRCONNECTNUMOFSTORAGEPOOLS
293   /* Symbol virConnectNumOfStoragePools not found at compile time. */
294   not_supported ("virConnectNumOfStoragePools");
295   /* Suppresses a compiler warning. */
296   (void) caml__frame;
297 #else
298   /* Check that the symbol virConnectNumOfStoragePools
299    * is in runtime version of libvirt.
300    */
301   WEAK_SYMBOL_CHECK (virConnectNumOfStoragePools);
302
303   virConnectPtr conn = Connect_val (connv);
304   int r;
305
306   NONBLOCKING (r = virConnectNumOfStoragePools (conn));
307   CHECK_ERROR (r == -1, conn, "virConnectNumOfStoragePools");
308
309   CAMLreturn (Val_int (r));
310 #endif
311 }
312
313 #ifdef HAVE_WEAK_SYMBOLS
314 #ifdef HAVE_VIRCONNECTLISTSTORAGEPOOLS
315 extern int virConnectListStoragePools (virConnectPtr conn, char **const names, int maxnames) __attribute__((weak));
316 #endif
317 #endif
318
319 CAMLprim value
320 ocaml_libvirt_connect_list_storage_pools (value connv, value iv)
321 {
322   CAMLparam2 (connv, iv);
323 #ifndef HAVE_VIRCONNECTLISTSTORAGEPOOLS
324   /* Symbol virConnectListStoragePools not found at compile time. */
325   not_supported ("virConnectListStoragePools");
326   /* Suppresses a compiler warning. */
327   (void) caml__frame;
328 #else
329   /* Check that the symbol virConnectListStoragePools
330    * is in runtime version of libvirt.
331    */
332   WEAK_SYMBOL_CHECK (virConnectListStoragePools);
333
334   CAMLlocal2 (rv, strv);
335   virConnectPtr conn = Connect_val (connv);
336   int i = Int_val (iv);
337   char *names[i];
338   int r;
339
340   NONBLOCKING (r = virConnectListStoragePools (conn, names, i));
341   CHECK_ERROR (r == -1, conn, "virConnectListStoragePools");
342
343   rv = caml_alloc (r, 0);
344   for (i = 0; i < r; ++i) {
345     strv = caml_copy_string (names[i]);
346     Store_field (rv, i, strv);
347     free (names[i]);
348   }
349
350   CAMLreturn (rv);
351 #endif
352 }
353
354 #ifdef HAVE_WEAK_SYMBOLS
355 #ifdef HAVE_VIRCONNECTNUMOFDEFINEDSTORAGEPOOLS
356 extern int virConnectNumOfDefinedStoragePools (virConnectPtr conn) __attribute__((weak));
357 #endif
358 #endif
359
360 CAMLprim value
361 ocaml_libvirt_connect_num_of_defined_storage_pools (value connv)
362 {
363   CAMLparam1 (connv);
364 #ifndef HAVE_VIRCONNECTNUMOFDEFINEDSTORAGEPOOLS
365   /* Symbol virConnectNumOfDefinedStoragePools not found at compile time. */
366   not_supported ("virConnectNumOfDefinedStoragePools");
367   /* Suppresses a compiler warning. */
368   (void) caml__frame;
369 #else
370   /* Check that the symbol virConnectNumOfDefinedStoragePools
371    * is in runtime version of libvirt.
372    */
373   WEAK_SYMBOL_CHECK (virConnectNumOfDefinedStoragePools);
374
375   virConnectPtr conn = Connect_val (connv);
376   int r;
377
378   NONBLOCKING (r = virConnectNumOfDefinedStoragePools (conn));
379   CHECK_ERROR (r == -1, conn, "virConnectNumOfDefinedStoragePools");
380
381   CAMLreturn (Val_int (r));
382 #endif
383 }
384
385 #ifdef HAVE_WEAK_SYMBOLS
386 #ifdef HAVE_VIRCONNECTLISTDEFINEDSTORAGEPOOLS
387 extern int virConnectListDefinedStoragePools (virConnectPtr conn, char **const names, int maxnames) __attribute__((weak));
388 #endif
389 #endif
390
391 CAMLprim value
392 ocaml_libvirt_connect_list_defined_storage_pools (value connv, value iv)
393 {
394   CAMLparam2 (connv, iv);
395 #ifndef HAVE_VIRCONNECTLISTDEFINEDSTORAGEPOOLS
396   /* Symbol virConnectListDefinedStoragePools not found at compile time. */
397   not_supported ("virConnectListDefinedStoragePools");
398   /* Suppresses a compiler warning. */
399   (void) caml__frame;
400 #else
401   /* Check that the symbol virConnectListDefinedStoragePools
402    * is in runtime version of libvirt.
403    */
404   WEAK_SYMBOL_CHECK (virConnectListDefinedStoragePools);
405
406   CAMLlocal2 (rv, strv);
407   virConnectPtr conn = Connect_val (connv);
408   int i = Int_val (iv);
409   char *names[i];
410   int r;
411
412   NONBLOCKING (r = virConnectListDefinedStoragePools (conn, names, i));
413   CHECK_ERROR (r == -1, conn, "virConnectListDefinedStoragePools");
414
415   rv = caml_alloc (r, 0);
416   for (i = 0; i < r; ++i) {
417     strv = caml_copy_string (names[i]);
418     Store_field (rv, i, strv);
419     free (names[i]);
420   }
421
422   CAMLreturn (rv);
423 #endif
424 }
425
426 CAMLprim value
427 ocaml_libvirt_connect_get_capabilities (value connv)
428 {
429   CAMLparam1 (connv);
430
431   CAMLlocal1 (rv);
432   virConnectPtr conn = Connect_val (connv);
433   char *r;
434
435   NONBLOCKING (r = virConnectGetCapabilities (conn));
436   CHECK_ERROR (!r, conn, "virConnectGetCapabilities");
437
438   rv = caml_copy_string (r);
439   free (r);
440   CAMLreturn (rv);
441 }
442
443 CAMLprim value
444 ocaml_libvirt_domain_lookup_by_name (value connv, value strv)
445 {
446   CAMLparam2 (connv, strv);
447
448   CAMLlocal1 (rv);
449   virConnectPtr conn = Connect_val (connv);
450   char *str = String_val (strv);
451   virDomainPtr r;
452
453   NONBLOCKING (r = virDomainLookupByName (conn, str));
454   CHECK_ERROR (!r, conn, "virDomainLookupByName");
455
456   rv = Val_domain (r, connv);
457
458   CAMLreturn (rv);
459 }
460
461 CAMLprim value
462 ocaml_libvirt_domain_lookup_by_uuid_string (value connv, value strv)
463 {
464   CAMLparam2 (connv, strv);
465
466   CAMLlocal1 (rv);
467   virConnectPtr conn = Connect_val (connv);
468   char *str = String_val (strv);
469   virDomainPtr r;
470
471   NONBLOCKING (r = virDomainLookupByUUIDString (conn, str));
472   CHECK_ERROR (!r, conn, "virDomainLookupByUUIDString");
473
474   rv = Val_domain (r, connv);
475
476   CAMLreturn (rv);
477 }
478
479 CAMLprim value
480 ocaml_libvirt_domain_get_name (value domv)
481 {
482   CAMLparam1 (domv);
483
484   CAMLlocal1 (rv);
485   virDomainPtr dom = Domain_val (domv);
486   virConnectPtr conn = Connect_domv (domv);
487   const char *r;
488
489   NONBLOCKING (r = virDomainGetName (dom));
490   CHECK_ERROR (!r, conn, "virDomainGetName");
491
492   rv = caml_copy_string (r);
493   CAMLreturn (rv);
494 }
495
496 CAMLprim value
497 ocaml_libvirt_domain_get_os_type (value domv)
498 {
499   CAMLparam1 (domv);
500
501   CAMLlocal1 (rv);
502   virDomainPtr dom = Domain_val (domv);
503   virConnectPtr conn = Connect_domv (domv);
504   char *r;
505
506   NONBLOCKING (r = virDomainGetOSType (dom));
507   CHECK_ERROR (!r, conn, "virDomainGetOSType");
508
509   rv = caml_copy_string (r);
510   free (r);
511   CAMLreturn (rv);
512 }
513
514 CAMLprim value
515 ocaml_libvirt_domain_get_xml_desc (value domv)
516 {
517   CAMLparam1 (domv);
518
519   CAMLlocal1 (rv);
520   virDomainPtr dom = Domain_val (domv);
521   virConnectPtr conn = Connect_domv (domv);
522   char *r;
523
524   NONBLOCKING (r = virDomainGetXMLDesc (dom, 0));
525   CHECK_ERROR (!r, conn, "virDomainGetXMLDesc");
526
527   rv = caml_copy_string (r);
528   free (r);
529   CAMLreturn (rv);
530 }
531
532 CAMLprim value
533 ocaml_libvirt_domain_suspend (value domv)
534 {
535   CAMLparam1 (domv);
536
537   virDomainPtr dom = Domain_val (domv);
538   virConnectPtr conn = Connect_domv (domv);
539   int r;
540
541   NONBLOCKING (r = virDomainSuspend (dom));
542   CHECK_ERROR (r == -1, conn, "virDomainSuspend");
543
544   CAMLreturn (Val_unit);
545 }
546
547 CAMLprim value
548 ocaml_libvirt_domain_resume (value domv)
549 {
550   CAMLparam1 (domv);
551
552   virDomainPtr dom = Domain_val (domv);
553   virConnectPtr conn = Connect_domv (domv);
554   int r;
555
556   NONBLOCKING (r = virDomainResume (dom));
557   CHECK_ERROR (r == -1, conn, "virDomainResume");
558
559   CAMLreturn (Val_unit);
560 }
561
562 CAMLprim value
563 ocaml_libvirt_domain_shutdown (value domv)
564 {
565   CAMLparam1 (domv);
566
567   virDomainPtr dom = Domain_val (domv);
568   virConnectPtr conn = Connect_domv (domv);
569   int r;
570
571   NONBLOCKING (r = virDomainShutdown (dom));
572   CHECK_ERROR (r == -1, conn, "virDomainShutdown");
573
574   CAMLreturn (Val_unit);
575 }
576
577 CAMLprim value
578 ocaml_libvirt_domain_reboot (value domv)
579 {
580   CAMLparam1 (domv);
581
582   virDomainPtr dom = Domain_val (domv);
583   virConnectPtr conn = Connect_domv (domv);
584   int r;
585
586   NONBLOCKING (r = virDomainReboot (dom, 0));
587   CHECK_ERROR (r == -1, conn, "virDomainReboot");
588
589   CAMLreturn (Val_unit);
590 }
591
592 CAMLprim value
593 ocaml_libvirt_domain_undefine (value domv)
594 {
595   CAMLparam1 (domv);
596
597   virDomainPtr dom = Domain_val (domv);
598   virConnectPtr conn = Connect_domv (domv);
599   int r;
600
601   NONBLOCKING (r = virDomainUndefine (dom));
602   CHECK_ERROR (r == -1, conn, "virDomainUndefine");
603
604   CAMLreturn (Val_unit);
605 }
606
607 CAMLprim value
608 ocaml_libvirt_domain_create (value domv)
609 {
610   CAMLparam1 (domv);
611
612   virDomainPtr dom = Domain_val (domv);
613   virConnectPtr conn = Connect_domv (domv);
614   int r;
615
616   NONBLOCKING (r = virDomainCreate (dom));
617   CHECK_ERROR (r == -1, conn, "virDomainCreate");
618
619   CAMLreturn (Val_unit);
620 }
621
622 CAMLprim value
623 ocaml_libvirt_domain_get_autostart (value domv)
624 {
625   CAMLparam1 (domv);
626
627   virDomainPtr dom = Domain_val (domv);
628   virConnectPtr conn = Connect_domv (domv);
629   int r, b;
630
631   NONBLOCKING (r = virDomainGetAutostart (dom, &b));
632   CHECK_ERROR (r == -1, conn, "virDomainGetAutostart");
633
634   CAMLreturn (b ? Val_true : Val_false);
635 }
636
637 CAMLprim value
638 ocaml_libvirt_domain_set_autostart (value domv, value bv)
639 {
640   CAMLparam2 (domv, bv);
641
642   virDomainPtr dom = Domain_val (domv);
643   virConnectPtr conn = Connect_domv (domv);
644   int r, b;
645
646   b = bv == Val_true ? 1 : 0;
647
648   NONBLOCKING (r = virDomainSetAutostart (dom, b));
649   CHECK_ERROR (r == -1, conn, "virDomainSetAutostart");
650
651   CAMLreturn (Val_unit);
652 }
653
654 CAMLprim value
655 ocaml_libvirt_network_lookup_by_name (value connv, value strv)
656 {
657   CAMLparam2 (connv, strv);
658
659   CAMLlocal1 (rv);
660   virConnectPtr conn = Connect_val (connv);
661   char *str = String_val (strv);
662   virNetworkPtr r;
663
664   NONBLOCKING (r = virNetworkLookupByName (conn, str));
665   CHECK_ERROR (!r, conn, "virNetworkLookupByName");
666
667   rv = Val_network (r, connv);
668
669   CAMLreturn (rv);
670 }
671
672 CAMLprim value
673 ocaml_libvirt_network_lookup_by_uuid_string (value connv, value strv)
674 {
675   CAMLparam2 (connv, strv);
676
677   CAMLlocal1 (rv);
678   virConnectPtr conn = Connect_val (connv);
679   char *str = String_val (strv);
680   virNetworkPtr r;
681
682   NONBLOCKING (r = virNetworkLookupByUUIDString (conn, str));
683   CHECK_ERROR (!r, conn, "virNetworkLookupByUUIDString");
684
685   rv = Val_network (r, connv);
686
687   CAMLreturn (rv);
688 }
689
690 CAMLprim value
691 ocaml_libvirt_network_get_name (value netv)
692 {
693   CAMLparam1 (netv);
694
695   CAMLlocal1 (rv);
696   virNetworkPtr net = Network_val (netv);
697   virConnectPtr conn = Connect_netv (netv);
698   const char *r;
699
700   NONBLOCKING (r = virNetworkGetName (net));
701   CHECK_ERROR (!r, conn, "virNetworkGetName");
702
703   rv = caml_copy_string (r);
704   CAMLreturn (rv);
705 }
706
707 CAMLprim value
708 ocaml_libvirt_network_get_xml_desc (value netv)
709 {
710   CAMLparam1 (netv);
711
712   CAMLlocal1 (rv);
713   virNetworkPtr net = Network_val (netv);
714   virConnectPtr conn = Connect_netv (netv);
715   char *r;
716
717   NONBLOCKING (r = virNetworkGetXMLDesc (net, 0));
718   CHECK_ERROR (!r, conn, "virNetworkGetXMLDesc");
719
720   rv = caml_copy_string (r);
721   free (r);
722   CAMLreturn (rv);
723 }
724
725 CAMLprim value
726 ocaml_libvirt_network_get_bridge_name (value netv)
727 {
728   CAMLparam1 (netv);
729
730   CAMLlocal1 (rv);
731   virNetworkPtr net = Network_val (netv);
732   virConnectPtr conn = Connect_netv (netv);
733   char *r;
734
735   NONBLOCKING (r = virNetworkGetBridgeName (net));
736   CHECK_ERROR (!r, conn, "virNetworkGetBridgeName");
737
738   rv = caml_copy_string (r);
739   free (r);
740   CAMLreturn (rv);
741 }
742
743 CAMLprim value
744 ocaml_libvirt_network_undefine (value netv)
745 {
746   CAMLparam1 (netv);
747
748   virNetworkPtr net = Network_val (netv);
749   virConnectPtr conn = Connect_netv (netv);
750   int r;
751
752   NONBLOCKING (r = virNetworkUndefine (net));
753   CHECK_ERROR (r == -1, conn, "virNetworkUndefine");
754
755   CAMLreturn (Val_unit);
756 }
757
758 CAMLprim value
759 ocaml_libvirt_network_create (value netv)
760 {
761   CAMLparam1 (netv);
762
763   virNetworkPtr net = Network_val (netv);
764   virConnectPtr conn = Connect_netv (netv);
765   int r;
766
767   NONBLOCKING (r = virNetworkCreate (net));
768   CHECK_ERROR (r == -1, conn, "virNetworkCreate");
769
770   CAMLreturn (Val_unit);
771 }
772
773 CAMLprim value
774 ocaml_libvirt_network_get_autostart (value netv)
775 {
776   CAMLparam1 (netv);
777
778   virNetworkPtr net = Network_val (netv);
779   virConnectPtr conn = Connect_netv (netv);
780   int r, b;
781
782   NONBLOCKING (r = virNetworkGetAutostart (net, &b));
783   CHECK_ERROR (r == -1, conn, "virNetworkGetAutostart");
784
785   CAMLreturn (b ? Val_true : Val_false);
786 }
787
788 CAMLprim value
789 ocaml_libvirt_network_set_autostart (value netv, value bv)
790 {
791   CAMLparam2 (netv, bv);
792
793   virNetworkPtr net = Network_val (netv);
794   virConnectPtr conn = Connect_netv (netv);
795   int r, b;
796
797   b = bv == Val_true ? 1 : 0;
798
799   NONBLOCKING (r = virNetworkSetAutostart (net, b));
800   CHECK_ERROR (r == -1, conn, "virNetworkSetAutostart");
801
802   CAMLreturn (Val_unit);
803 }
804
805 #ifdef HAVE_WEAK_SYMBOLS
806 #ifdef HAVE_VIRSTORAGEPOOLLOOKUPBYNAME
807 extern virStoragePoolPtr virStoragePoolLookupByName (virConnectPtr conn, const char *str) __attribute__((weak));
808 #endif
809 #endif
810
811 CAMLprim value
812 ocaml_libvirt_storage_pool_lookup_by_name (value connv, value strv)
813 {
814   CAMLparam2 (connv, strv);
815 #ifndef HAVE_VIRSTORAGEPOOLLOOKUPBYNAME
816   /* Symbol virStoragePoolLookupByName not found at compile time. */
817   not_supported ("virStoragePoolLookupByName");
818   /* Suppresses a compiler warning. */
819   (void) caml__frame;
820 #else
821   /* Check that the symbol virStoragePoolLookupByName
822    * is in runtime version of libvirt.
823    */
824   WEAK_SYMBOL_CHECK (virStoragePoolLookupByName);
825
826   CAMLlocal1 (rv);
827   virConnectPtr conn = Connect_val (connv);
828   char *str = String_val (strv);
829   virStoragePoolPtr r;
830
831   NONBLOCKING (r = virStoragePoolLookupByName (conn, str));
832   CHECK_ERROR (!r, conn, "virStoragePoolLookupByName");
833
834   rv = Val_pool (r, connv);
835
836   CAMLreturn (rv);
837 #endif
838 }
839
840 #ifdef HAVE_WEAK_SYMBOLS
841 #ifdef HAVE_VIRSTORAGEPOOLLOOKUPBYUUIDSTRING
842 extern virStoragePoolPtr virStoragePoolLookupByUUIDString (virConnectPtr conn, const char *str) __attribute__((weak));
843 #endif
844 #endif
845
846 CAMLprim value
847 ocaml_libvirt_storage_pool_lookup_by_uuid_string (value connv, value strv)
848 {
849   CAMLparam2 (connv, strv);
850 #ifndef HAVE_VIRSTORAGEPOOLLOOKUPBYUUIDSTRING
851   /* Symbol virStoragePoolLookupByUUIDString not found at compile time. */
852   not_supported ("virStoragePoolLookupByUUIDString");
853   /* Suppresses a compiler warning. */
854   (void) caml__frame;
855 #else
856   /* Check that the symbol virStoragePoolLookupByUUIDString
857    * is in runtime version of libvirt.
858    */
859   WEAK_SYMBOL_CHECK (virStoragePoolLookupByUUIDString);
860
861   CAMLlocal1 (rv);
862   virConnectPtr conn = Connect_val (connv);
863   char *str = String_val (strv);
864   virStoragePoolPtr r;
865
866   NONBLOCKING (r = virStoragePoolLookupByUUIDString (conn, str));
867   CHECK_ERROR (!r, conn, "virStoragePoolLookupByUUIDString");
868
869   rv = Val_pool (r, connv);
870
871   CAMLreturn (rv);
872 #endif
873 }
874
875 #ifdef HAVE_WEAK_SYMBOLS
876 #ifdef HAVE_VIRSTORAGEPOOLGETNAME
877 extern const char *virStoragePoolGetName (virStoragePoolPtr pool) __attribute__((weak));
878 #endif
879 #endif
880
881 CAMLprim value
882 ocaml_libvirt_storage_pool_get_name (value poolv)
883 {
884   CAMLparam1 (poolv);
885 #ifndef HAVE_VIRSTORAGEPOOLGETNAME
886   /* Symbol virStoragePoolGetName not found at compile time. */
887   not_supported ("virStoragePoolGetName");
888   /* Suppresses a compiler warning. */
889   (void) caml__frame;
890 #else
891   /* Check that the symbol virStoragePoolGetName
892    * is in runtime version of libvirt.
893    */
894   WEAK_SYMBOL_CHECK (virStoragePoolGetName);
895
896   CAMLlocal1 (rv);
897   virStoragePoolPtr pool = Pool_val (poolv);
898   virConnectPtr conn = Connect_polv (poolv);
899   const char *r;
900
901   NONBLOCKING (r = virStoragePoolGetName (pool));
902   CHECK_ERROR (!r, conn, "virStoragePoolGetName");
903
904   rv = caml_copy_string (r);
905   CAMLreturn (rv);
906 #endif
907 }
908
909 #ifdef HAVE_WEAK_SYMBOLS
910 #ifdef HAVE_VIRSTORAGEPOOLGETXMLDESC
911 extern char *virStoragePoolGetXMLDesc (virStoragePoolPtr pool,  int flags) __attribute__((weak));
912 #endif
913 #endif
914
915 CAMLprim value
916 ocaml_libvirt_storage_pool_get_xml_desc (value poolv)
917 {
918   CAMLparam1 (poolv);
919 #ifndef HAVE_VIRSTORAGEPOOLGETXMLDESC
920   /* Symbol virStoragePoolGetXMLDesc not found at compile time. */
921   not_supported ("virStoragePoolGetXMLDesc");
922   /* Suppresses a compiler warning. */
923   (void) caml__frame;
924 #else
925   /* Check that the symbol virStoragePoolGetXMLDesc
926    * is in runtime version of libvirt.
927    */
928   WEAK_SYMBOL_CHECK (virStoragePoolGetXMLDesc);
929
930   CAMLlocal1 (rv);
931   virStoragePoolPtr pool = Pool_val (poolv);
932   virConnectPtr conn = Connect_polv (poolv);
933   char *r;
934
935   NONBLOCKING (r = virStoragePoolGetXMLDesc (pool, 0));
936   CHECK_ERROR (!r, conn, "virStoragePoolGetXMLDesc");
937
938   rv = caml_copy_string (r);
939   free (r);
940   CAMLreturn (rv);
941 #endif
942 }
943
944 #ifdef HAVE_WEAK_SYMBOLS
945 #ifdef HAVE_VIRSTORAGEPOOLUNDEFINE
946 extern int virStoragePoolUndefine (virStoragePoolPtr pool) __attribute__((weak));
947 #endif
948 #endif
949
950 CAMLprim value
951 ocaml_libvirt_storage_pool_undefine (value poolv)
952 {
953   CAMLparam1 (poolv);
954 #ifndef HAVE_VIRSTORAGEPOOLUNDEFINE
955   /* Symbol virStoragePoolUndefine not found at compile time. */
956   not_supported ("virStoragePoolUndefine");
957   /* Suppresses a compiler warning. */
958   (void) caml__frame;
959 #else
960   /* Check that the symbol virStoragePoolUndefine
961    * is in runtime version of libvirt.
962    */
963   WEAK_SYMBOL_CHECK (virStoragePoolUndefine);
964
965   virStoragePoolPtr pool = Pool_val (poolv);
966   virConnectPtr conn = Connect_polv (poolv);
967   int r;
968
969   NONBLOCKING (r = virStoragePoolUndefine (pool));
970   CHECK_ERROR (r == -1, conn, "virStoragePoolUndefine");
971
972   CAMLreturn (Val_unit);
973 #endif
974 }
975
976 #ifdef HAVE_WEAK_SYMBOLS
977 #ifdef HAVE_VIRSTORAGEPOOLCREATE
978 extern int virStoragePoolCreate (virStoragePoolPtr pool) __attribute__((weak));
979 #endif
980 #endif
981
982 CAMLprim value
983 ocaml_libvirt_storage_pool_create (value poolv)
984 {
985   CAMLparam1 (poolv);
986 #ifndef HAVE_VIRSTORAGEPOOLCREATE
987   /* Symbol virStoragePoolCreate not found at compile time. */
988   not_supported ("virStoragePoolCreate");
989   /* Suppresses a compiler warning. */
990   (void) caml__frame;
991 #else
992   /* Check that the symbol virStoragePoolCreate
993    * is in runtime version of libvirt.
994    */
995   WEAK_SYMBOL_CHECK (virStoragePoolCreate);
996
997   virStoragePoolPtr pool = Pool_val (poolv);
998   virConnectPtr conn = Connect_polv (poolv);
999   int r;
1000
1001   NONBLOCKING (r = virStoragePoolCreate (pool));
1002   CHECK_ERROR (r == -1, conn, "virStoragePoolCreate");
1003
1004   CAMLreturn (Val_unit);
1005 #endif
1006 }
1007
1008 #ifdef HAVE_WEAK_SYMBOLS
1009 #ifdef HAVE_VIRSTORAGEPOOLSHUTDOWN
1010 extern int virStoragePoolShutdown (virStoragePoolPtr pool) __attribute__((weak));
1011 #endif
1012 #endif
1013
1014 CAMLprim value
1015 ocaml_libvirt_storage_pool_shutdown (value poolv)
1016 {
1017   CAMLparam1 (poolv);
1018 #ifndef HAVE_VIRSTORAGEPOOLSHUTDOWN
1019   /* Symbol virStoragePoolShutdown not found at compile time. */
1020   not_supported ("virStoragePoolShutdown");
1021   /* Suppresses a compiler warning. */
1022   (void) caml__frame;
1023 #else
1024   /* Check that the symbol virStoragePoolShutdown
1025    * is in runtime version of libvirt.
1026    */
1027   WEAK_SYMBOL_CHECK (virStoragePoolShutdown);
1028
1029   virStoragePoolPtr pool = Pool_val (poolv);
1030   virConnectPtr conn = Connect_polv (poolv);
1031   int r;
1032
1033   NONBLOCKING (r = virStoragePoolShutdown (pool));
1034   CHECK_ERROR (r == -1, conn, "virStoragePoolShutdown");
1035
1036   CAMLreturn (Val_unit);
1037 #endif
1038 }
1039
1040 #ifdef HAVE_WEAK_SYMBOLS
1041 #ifdef HAVE_VIRSTORAGEPOOLREFRESH
1042 extern int virStoragePoolRefresh (virStoragePoolPtr pool, unsigned  int flags) __attribute__((weak));
1043 #endif
1044 #endif
1045
1046 CAMLprim value
1047 ocaml_libvirt_storage_pool_refresh (value poolv)
1048 {
1049   CAMLparam1 (poolv);
1050 #ifndef HAVE_VIRSTORAGEPOOLREFRESH
1051   /* Symbol virStoragePoolRefresh not found at compile time. */
1052   not_supported ("virStoragePoolRefresh");
1053   /* Suppresses a compiler warning. */
1054   (void) caml__frame;
1055 #else
1056   /* Check that the symbol virStoragePoolRefresh
1057    * is in runtime version of libvirt.
1058    */
1059   WEAK_SYMBOL_CHECK (virStoragePoolRefresh);
1060
1061   virStoragePoolPtr pool = Pool_val (poolv);
1062   virConnectPtr conn = Connect_polv (poolv);
1063   int r;
1064
1065   NONBLOCKING (r = virStoragePoolRefresh (pool, 0));
1066   CHECK_ERROR (r == -1, conn, "virStoragePoolRefresh");
1067
1068   CAMLreturn (Val_unit);
1069 #endif
1070 }
1071
1072 #ifdef HAVE_WEAK_SYMBOLS
1073 #ifdef HAVE_VIRSTORAGEPOOLGETAUTOSTART
1074 extern int virStoragePoolGetAutostart (virStoragePoolPtr pool, int *r) __attribute__((weak));
1075 #endif
1076 #endif
1077
1078 CAMLprim value
1079 ocaml_libvirt_storage_pool_get_autostart (value poolv)
1080 {
1081   CAMLparam1 (poolv);
1082 #ifndef HAVE_VIRSTORAGEPOOLGETAUTOSTART
1083   /* Symbol virStoragePoolGetAutostart not found at compile time. */
1084   not_supported ("virStoragePoolGetAutostart");
1085   /* Suppresses a compiler warning. */
1086   (void) caml__frame;
1087 #else
1088   /* Check that the symbol virStoragePoolGetAutostart
1089    * is in runtime version of libvirt.
1090    */
1091   WEAK_SYMBOL_CHECK (virStoragePoolGetAutostart);
1092
1093   virStoragePoolPtr pool = Pool_val (poolv);
1094   virConnectPtr conn = Connect_polv (poolv);
1095   int r, b;
1096
1097   NONBLOCKING (r = virStoragePoolGetAutostart (pool, &b));
1098   CHECK_ERROR (r == -1, conn, "virStoragePoolGetAutostart");
1099
1100   CAMLreturn (b ? Val_true : Val_false);
1101 #endif
1102 }
1103
1104 #ifdef HAVE_WEAK_SYMBOLS
1105 #ifdef HAVE_VIRSTORAGEPOOLSETAUTOSTART
1106 extern int virStoragePoolSetAutostart (virStoragePoolPtr pool, int b) __attribute__((weak));
1107 #endif
1108 #endif
1109
1110 CAMLprim value
1111 ocaml_libvirt_storage_pool_set_autostart (value poolv, value bv)
1112 {
1113   CAMLparam2 (poolv, bv);
1114 #ifndef HAVE_VIRSTORAGEPOOLSETAUTOSTART
1115   /* Symbol virStoragePoolSetAutostart not found at compile time. */
1116   not_supported ("virStoragePoolSetAutostart");
1117   /* Suppresses a compiler warning. */
1118   (void) caml__frame;
1119 #else
1120   /* Check that the symbol virStoragePoolSetAutostart
1121    * is in runtime version of libvirt.
1122    */
1123   WEAK_SYMBOL_CHECK (virStoragePoolSetAutostart);
1124
1125   virStoragePoolPtr pool = Pool_val (poolv);
1126   virConnectPtr conn = Connect_polv (poolv);
1127   int r, b;
1128
1129   b = bv == Val_true ? 1 : 0;
1130
1131   NONBLOCKING (r = virStoragePoolSetAutostart (pool, b));
1132   CHECK_ERROR (r == -1, conn, "virStoragePoolSetAutostart");
1133
1134   CAMLreturn (Val_unit);
1135 #endif
1136 }
1137
1138 #ifdef HAVE_WEAK_SYMBOLS
1139 #ifdef HAVE_VIRSTORAGEVOLLOOKUPBYKEY
1140 extern virStorageVolPtr virStorageVolLookupByKey (virConnectPtr conn, const char *str) __attribute__((weak));
1141 #endif
1142 #endif
1143
1144 CAMLprim value
1145 ocaml_libvirt_storage_vol_lookup_by_key (value connv, value strv)
1146 {
1147   CAMLparam2 (connv, strv);
1148 #ifndef HAVE_VIRSTORAGEVOLLOOKUPBYKEY
1149   /* Symbol virStorageVolLookupByKey not found at compile time. */
1150   not_supported ("virStorageVolLookupByKey");
1151   /* Suppresses a compiler warning. */
1152   (void) caml__frame;
1153 #else
1154   /* Check that the symbol virStorageVolLookupByKey
1155    * is in runtime version of libvirt.
1156    */
1157   WEAK_SYMBOL_CHECK (virStorageVolLookupByKey);
1158
1159   CAMLlocal1 (rv);
1160   virConnectPtr conn = Connect_val (connv);
1161   char *str = String_val (strv);
1162   virStorageVolPtr r;
1163
1164   NONBLOCKING (r = virStorageVolLookupByKey (conn, str));
1165   CHECK_ERROR (!r, conn, "virStorageVolLookupByKey");
1166
1167   rv = Val_volume (r, connv);
1168
1169   CAMLreturn (rv);
1170 #endif
1171 }
1172
1173 #ifdef HAVE_WEAK_SYMBOLS
1174 #ifdef HAVE_VIRSTORAGEVOLLOOKUPBYPATH
1175 extern virStorageVolPtr virStorageVolLookupByPath (virConnectPtr conn, const char *str) __attribute__((weak));
1176 #endif
1177 #endif
1178
1179 CAMLprim value
1180 ocaml_libvirt_storage_vol_lookup_by_path (value connv, value strv)
1181 {
1182   CAMLparam2 (connv, strv);
1183 #ifndef HAVE_VIRSTORAGEVOLLOOKUPBYPATH
1184   /* Symbol virStorageVolLookupByPath not found at compile time. */
1185   not_supported ("virStorageVolLookupByPath");
1186   /* Suppresses a compiler warning. */
1187   (void) caml__frame;
1188 #else
1189   /* Check that the symbol virStorageVolLookupByPath
1190    * is in runtime version of libvirt.
1191    */
1192   WEAK_SYMBOL_CHECK (virStorageVolLookupByPath);
1193
1194   CAMLlocal1 (rv);
1195   virConnectPtr conn = Connect_val (connv);
1196   char *str = String_val (strv);
1197   virStorageVolPtr r;
1198
1199   NONBLOCKING (r = virStorageVolLookupByPath (conn, str));
1200   CHECK_ERROR (!r, conn, "virStorageVolLookupByPath");
1201
1202   rv = Val_volume (r, connv);
1203
1204   CAMLreturn (rv);
1205 #endif
1206 }
1207
1208 #ifdef HAVE_WEAK_SYMBOLS
1209 #ifdef HAVE_VIRSTORAGEVOLGETXMLDESC
1210 extern char *virStorageVolGetXMLDesc (virStorageVolPtr vol,  int flags) __attribute__((weak));
1211 #endif
1212 #endif
1213
1214 CAMLprim value
1215 ocaml_libvirt_storage_vol_get_xml_desc (value volv)
1216 {
1217   CAMLparam1 (volv);
1218 #ifndef HAVE_VIRSTORAGEVOLGETXMLDESC
1219   /* Symbol virStorageVolGetXMLDesc not found at compile time. */
1220   not_supported ("virStorageVolGetXMLDesc");
1221   /* Suppresses a compiler warning. */
1222   (void) caml__frame;
1223 #else
1224   /* Check that the symbol virStorageVolGetXMLDesc
1225    * is in runtime version of libvirt.
1226    */
1227   WEAK_SYMBOL_CHECK (virStorageVolGetXMLDesc);
1228
1229   CAMLlocal1 (rv);
1230   virStorageVolPtr vol = Volume_val (volv);
1231   virConnectPtr conn = Connect_volv (volv);
1232   char *r;
1233
1234   NONBLOCKING (r = virStorageVolGetXMLDesc (vol, 0));
1235   CHECK_ERROR (!r, conn, "virStorageVolGetXMLDesc");
1236
1237   rv = caml_copy_string (r);
1238   free (r);
1239   CAMLreturn (rv);
1240 #endif
1241 }
1242
1243 #ifdef HAVE_WEAK_SYMBOLS
1244 #ifdef HAVE_VIRSTORAGEVOLGETPATH
1245 extern char *virStorageVolGetPath (virStorageVolPtr vol) __attribute__((weak));
1246 #endif
1247 #endif
1248
1249 CAMLprim value
1250 ocaml_libvirt_storage_vol_get_path (value volv)
1251 {
1252   CAMLparam1 (volv);
1253 #ifndef HAVE_VIRSTORAGEVOLGETPATH
1254   /* Symbol virStorageVolGetPath not found at compile time. */
1255   not_supported ("virStorageVolGetPath");
1256   /* Suppresses a compiler warning. */
1257   (void) caml__frame;
1258 #else
1259   /* Check that the symbol virStorageVolGetPath
1260    * is in runtime version of libvirt.
1261    */
1262   WEAK_SYMBOL_CHECK (virStorageVolGetPath);
1263
1264   CAMLlocal1 (rv);
1265   virStorageVolPtr vol = Volume_val (volv);
1266   virConnectPtr conn = Connect_volv (volv);
1267   char *r;
1268
1269   NONBLOCKING (r = virStorageVolGetPath (vol));
1270   CHECK_ERROR (!r, conn, "virStorageVolGetPath");
1271
1272   rv = caml_copy_string (r);
1273   free (r);
1274   CAMLreturn (rv);
1275 #endif
1276 }
1277
1278 #ifdef HAVE_WEAK_SYMBOLS
1279 #ifdef HAVE_VIRSTORAGEVOLGETKEY
1280 extern const char *virStorageVolGetKey (virStorageVolPtr vol) __attribute__((weak));
1281 #endif
1282 #endif
1283
1284 CAMLprim value
1285 ocaml_libvirt_storage_vol_get_key (value volv)
1286 {
1287   CAMLparam1 (volv);
1288 #ifndef HAVE_VIRSTORAGEVOLGETKEY
1289   /* Symbol virStorageVolGetKey not found at compile time. */
1290   not_supported ("virStorageVolGetKey");
1291   /* Suppresses a compiler warning. */
1292   (void) caml__frame;
1293 #else
1294   /* Check that the symbol virStorageVolGetKey
1295    * is in runtime version of libvirt.
1296    */
1297   WEAK_SYMBOL_CHECK (virStorageVolGetKey);
1298
1299   CAMLlocal1 (rv);
1300   virStorageVolPtr vol = Volume_val (volv);
1301   virConnectPtr conn = Connect_volv (volv);
1302   const char *r;
1303
1304   NONBLOCKING (r = virStorageVolGetKey (vol));
1305   CHECK_ERROR (!r, conn, "virStorageVolGetKey");
1306
1307   rv = caml_copy_string (r);
1308   CAMLreturn (rv);
1309 #endif
1310 }
1311
1312 #ifdef HAVE_WEAK_SYMBOLS
1313 #ifdef HAVE_VIRSTORAGEVOLGETNAME
1314 extern const char *virStorageVolGetName (virStorageVolPtr vol) __attribute__((weak));
1315 #endif
1316 #endif
1317
1318 CAMLprim value
1319 ocaml_libvirt_storage_vol_get_name (value volv)
1320 {
1321   CAMLparam1 (volv);
1322 #ifndef HAVE_VIRSTORAGEVOLGETNAME
1323   /* Symbol virStorageVolGetName not found at compile time. */
1324   not_supported ("virStorageVolGetName");
1325   /* Suppresses a compiler warning. */
1326   (void) caml__frame;
1327 #else
1328   /* Check that the symbol virStorageVolGetName
1329    * is in runtime version of libvirt.
1330    */
1331   WEAK_SYMBOL_CHECK (virStorageVolGetName);
1332
1333   CAMLlocal1 (rv);
1334   virStorageVolPtr vol = Volume_val (volv);
1335   virConnectPtr conn = Connect_volv (volv);
1336   const char *r;
1337
1338   NONBLOCKING (r = virStorageVolGetName (vol));
1339   CHECK_ERROR (!r, conn, "virStorageVolGetName");
1340
1341   rv = caml_copy_string (r);
1342   CAMLreturn (rv);
1343 #endif
1344 }
1345
1346 CAMLprim value
1347 ocaml_libvirt_domain_create_job ()
1348 {
1349   failwith ("ocaml_libvirt_domain_create_job is unimplemented");
1350 }
1351
1352 CAMLprim value
1353 ocaml_libvirt_domain_core_dump_job ()
1354 {
1355   failwith ("ocaml_libvirt_domain_core_dump_job is unimplemented");
1356 }
1357
1358 CAMLprim value
1359 ocaml_libvirt_domain_restore_job ()
1360 {
1361   failwith ("ocaml_libvirt_domain_restore_job is unimplemented");
1362 }
1363
1364 CAMLprim value
1365 ocaml_libvirt_domain_save_job ()
1366 {
1367   failwith ("ocaml_libvirt_domain_save_job is unimplemented");
1368 }
1369
1370 CAMLprim value
1371 ocaml_libvirt_connect_create_linux_job ()
1372 {
1373   failwith ("ocaml_libvirt_connect_create_linux_job is unimplemented");
1374 }
1375
1376 CAMLprim value
1377 ocaml_libvirt_network_create_job ()
1378 {
1379   failwith ("ocaml_libvirt_network_create_job is unimplemented");
1380 }
1381
1382 CAMLprim value
1383 ocaml_libvirt_network_create_xml_job ()
1384 {
1385   failwith ("ocaml_libvirt_network_create_xml_job is unimplemented");
1386 }
1387
1388 CAMLprim value
1389 ocaml_libvirt_storage_pool_get_info ()
1390 {
1391   failwith ("ocaml_libvirt_storage_pool_get_info is unimplemented");
1392 }
1393
1394 CAMLprim value
1395 ocaml_libvirt_storage_pool_get_uuid_string ()
1396 {
1397   failwith ("ocaml_libvirt_storage_pool_get_uuid_string is unimplemented");
1398 }
1399
1400 CAMLprim value
1401 ocaml_libvirt_storage_pool_get_uuid ()
1402 {
1403   failwith ("ocaml_libvirt_storage_pool_get_uuid is unimplemented");
1404 }
1405
1406 CAMLprim value
1407 ocaml_libvirt_storage_pool_free ()
1408 {
1409   failwith ("ocaml_libvirt_storage_pool_free is unimplemented");
1410 }
1411
1412 CAMLprim value
1413 ocaml_libvirt_storage_pool_destroy ()
1414 {
1415   failwith ("ocaml_libvirt_storage_pool_destroy is unimplemented");
1416 }
1417
1418 CAMLprim value
1419 ocaml_libvirt_storage_pool_define_xml ()
1420 {
1421   failwith ("ocaml_libvirt_storage_pool_define_xml is unimplemented");
1422 }
1423
1424 CAMLprim value
1425 ocaml_libvirt_storage_pool_create_xml ()
1426 {
1427   failwith ("ocaml_libvirt_storage_pool_create_xml is unimplemented");
1428 }
1429
1430 CAMLprim value
1431 ocaml_libvirt_storage_pool_lookup_by_uuid ()
1432 {
1433   failwith ("ocaml_libvirt_storage_pool_lookup_by_uuid is unimplemented");
1434 }
1435
1436 CAMLprim value
1437 ocaml_libvirt_storage_vol_lookup_by_name ()
1438 {
1439   failwith ("ocaml_libvirt_storage_vol_lookup_by_name is unimplemented");
1440 }
1441
1442 CAMLprim value
1443 ocaml_libvirt_storage_vol_free ()
1444 {
1445   failwith ("ocaml_libvirt_storage_vol_free is unimplemented");
1446 }
1447
1448 CAMLprim value
1449 ocaml_libvirt_storage_vol_destroy ()
1450 {
1451   failwith ("ocaml_libvirt_storage_vol_destroy is unimplemented");
1452 }
1453
1454 CAMLprim value
1455 ocaml_libvirt_storage_vol_create_xml ()
1456 {
1457   failwith ("ocaml_libvirt_storage_vol_create_xml is unimplemented");
1458 }
1459
1460 CAMLprim value
1461 ocaml_libvirt_storage_vol_get_info ()
1462 {
1463   failwith ("ocaml_libvirt_storage_vol_get_info is unimplemented");
1464 }
1465
1466 CAMLprim value
1467 ocaml_libvirt_pool_of_volume ()
1468 {
1469   failwith ("ocaml_libvirt_pool_of_volume is unimplemented");
1470 }
1471
1472 CAMLprim value
1473 ocaml_libvirt_job_cancel ()
1474 {
1475   failwith ("ocaml_libvirt_job_cancel is unimplemented");
1476 }
1477
1478 CAMLprim value
1479 ocaml_libvirt_job_get_network ()
1480 {
1481   failwith ("ocaml_libvirt_job_get_network is unimplemented");
1482 }
1483
1484 CAMLprim value
1485 ocaml_libvirt_job_get_domain ()
1486 {
1487   failwith ("ocaml_libvirt_job_get_domain is unimplemented");
1488 }
1489
1490 CAMLprim value
1491 ocaml_libvirt_job_get_info ()
1492 {
1493   failwith ("ocaml_libvirt_job_get_info is unimplemented");
1494 }
1495
1496 #include "libvirt_c_epilogue.c"
1497
1498 /* EOF */