Registers a libvirt event loop implementation that is backed
by the default
GMain context. If invoked more
than once this method will be a no-op. Applications should,
however, take care not to register any another non-GLib
event loop with libvirt.
After invoking this method, it is mandatory to run the
default GMain event loop. Typically this can be satisfied
in the application's main thread. Failure to run the event
loop will mean no libvirt events get dispatched, and the
libvirt keepalive timer will kill off libvirt connections
Call this function before using any other Libvirt GLib functions in your applications. It will initialize everything needed to operate the toolkit and parses some standard command line options.
Although you are expected to pass the
argv parameters from main() to this
function, it is possible to pass NULL if
argv is not available or commandline
handling is not required.
argv are adjusted accordingly so your own code will never see those
This method will also turn on debug logging of the library if the
This function will terminate your program if it was unable to initialize
for some reason. If you want the program to fall back to an alternate
mode of operation call
Address of the
This function does the same work as gvir_init() with only a single change: It does not terminate the program if the Libvirt GLib library can't be initialized. Instead it returns %FALSE on failure.
This way the application can fall back to some other mode of operation.
Address of the
error is NULL this does nothing. Otherwise it
creates a new #GError and stores it in
message is not a printf()-style
format string. Use this function if
text you don't have control over, that could include
printf() escape sequences.
pointer to error location
Creates a new #GError; unlike gvir_error_new(),
messageis not a printf()-style format string. Use this function if
messagecontains text you don't have control over, that could include printf() escape sequences.