1Sys::Virt::Event(3) User Contributed Perl Documentation Sys::Virt::Event(3)
2
3
4
6 Sys::Virt::Event - An event loop contract
7
9 The "Sys::Virt::Event" module represents the contract for integrating
10 libvirt with an event loop. This package is abstract and intended to be
11 subclassed to provide an actual implementation.
12
14 register($impl)
15 Register an event loop implementation. The implementation should be
16 a instance of a sub-class of the "Sys::Virt::Event" package.
17
18 $self->_run_handle_callback($watch, $fd, $events, $cb, $opaque)
19 A helper method for executing a callback in response to one of more
20 $events on the file handle $fd. The $watch number is the unique
21 idenifier associated with the file descriptor. The $cb and $opaque
22 parameters are the callback and data registered for the handle.
23
24 $self->_run_timeout_callback($timer, $cb, $opaque)
25 A helper method for executing a callback in response to the expiry
26 of a timeout identified by $timer. The $cb and $opaque parameters
27 are the callback and data registered for the timeout.
28
29 $self->_free_callback_opaque($ff, $opaque)
30 A helper method for freeing the data associated with a callback.
31 The $ff and $opaque parameters are the callback and data registered
32 for the handle/timeout.
33
35 FILE HANDLE EVENTS
36 When integrating with an event loop the following constants define the
37 file descriptor events
38
39 Sys::Virt::Event::HANDLE_READABLE
40 The file descriptor has data available for read without blocking
41
42 Sys::Virt::Event::HANDLE_WRITABLE
43 The file descriptor has ability to write data without blocking
44
45 Sys::Virt::Event::HANDLE_ERROR
46 An error occurred on the file descriptor
47
48 Sys::Virt::Event::HANDLE_HANGUP
49 The remote end of the file descriptor closed
50
52 Daniel P. Berrange <berrange@redhat.com>
53
55 Copyright (C) 2006-2009 Red Hat Copyright (C) 2006-2009 Daniel P.
56 Berrange
57
59 This program is free software; you can redistribute it and/or modify it
60 under the terms of either the GNU General Public License as published
61 by the Free Software Foundation (either version 2 of the License, or at
62 your option any later version), or, the Artistic License, as specified
63 in the Perl README file.
64
66 Sys::Virt, "http://libvirt.org"
67
68
69
70perl v5.12.3 2010-05-19 Sys::Virt::Event(3)