Relicense Collabora code under the MIT/X11 license proposed for dbus core, removing...
[dbus-python-phuang.git] / dbus / mainloop / __init__.py
blobdfaeefbeab275368738b8923219c4a69bc168f68
1 # Copyright (C) 2006 Collabora Ltd. <http://www.collabora.co.uk/>
3 # Permission is hereby granted, free of charge, to any person
4 # obtaining a copy of this software and associated documentation
5 # files (the "Software"), to deal in the Software without
6 # restriction, including without limitation the rights to use, copy,
7 # modify, merge, publish, distribute, sublicense, and/or sell copies
8 # of the Software, and to permit persons to whom the Software is
9 # furnished to do so, subject to the following conditions:
11 # The above copyright notice and this permission notice shall be
12 # included in all copies or substantial portions of the Software.
14 # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
15 # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
16 # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
17 # NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
18 # HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
19 # WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20 # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
21 # DEALINGS IN THE SOFTWARE.
23 """Base definitions, etc. for main loop integration.
25 """
27 import _dbus_bindings
29 NativeMainLoop = _dbus_bindings.NativeMainLoop
31 NULL_MAIN_LOOP = _dbus_bindings.NULL_MAIN_LOOP
32 """A null mainloop which doesn't actually do anything.
34 For advanced users who want to dispatch events by hand. This is almost
35 certainly a bad idea - if in doubt, use the GLib main loop found in
36 `dbus.mainloop.glib`.
37 """
39 WATCH_READABLE = _dbus_bindings.WATCH_READABLE
40 """Represents a file descriptor becoming readable.
41 Used to implement file descriptor watches."""
43 WATCH_WRITABLE = _dbus_bindings.WATCH_WRITABLE
44 """Represents a file descriptor becoming readable.
45 Used to implement file descriptor watches."""
47 WATCH_HANGUP = _dbus_bindings.WATCH_HANGUP
48 """Represents a file descriptor reaching end-of-file.
49 Used to implement file descriptor watches."""
51 WATCH_ERROR = _dbus_bindings.WATCH_ERROR
52 """Represents an error condition on a file descriptor.
53 Used to implement file descriptor watches."""
55 __all__ = (
56 # Imported into this module
57 'NativeMainLoop', 'WATCH_READABLE', 'WATCH_WRITABLE',
58 'WATCH_HANGUP', 'WATCH_ERROR', 'NULL_MAIN_LOOP',
60 # Submodules
61 'glib'