dbus.service: Don't assume that exceptions passed to asynchronous callbacks are the...
[dbus-python-phuang.git] / dbus / __init__.py
blob9ad884b958bccfc1381d859a009229f5765a4722
1 """\
2 Implements the public API for a D-Bus client. See the dbus.service module
3 to export objects or claim well-known names.
5 ..
6 for epydoc's benefit
8 :NewField SupportedUsage: Supported usage
9 :NewField Constructor: Constructor
10 """
12 # Copyright (C) 2003, 2004, 2005, 2006 Red Hat Inc. <http://www.redhat.com/>
13 # Copyright (C) 2003 David Zeuthen
14 # Copyright (C) 2004 Rob Taylor
15 # Copyright (C) 2005, 2006 Collabora Ltd. <http://www.collabora.co.uk/>
17 # Licensed under the Academic Free License version 2.1
19 # This program is free software; you can redistribute it and/or modify
20 # it under the terms of the GNU General Public License as published by
21 # the Free Software Foundation; either version 2 of the License, or
22 # (at your option) any later version.
24 # This program is distributed in the hope that it will be useful,
25 # but WITHOUT ANY WARRANTY; without even the implied warranty of
26 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
27 # GNU General Public License for more details.
29 # You should have received a copy of the GNU General Public License
30 # along with this program; if not, write to the Free Software
31 # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
33 import os
35 __all__ = (
36 # from _dbus
37 'Bus', 'SystemBus', 'SessionBus', 'StarterBus',
39 # from proxies
40 'Interface',
42 # from _dbus_bindings
43 'get_default_main_loop', 'set_default_main_loop',
45 'validate_interface_name', 'validate_member_name',
46 'validate_bus_name', 'validate_object_path',
47 'validate_error_name',
49 'BUS_DAEMON_NAME', 'BUS_DAEMON_PATH', 'BUS_DAEMON_IFACE',
50 'LOCAL_PATH', 'LOCAL_IFACE', 'PEER_IFACE',
51 'INTROSPECTABLE_IFACE', 'PROPERTIES_IFACE',
53 'ObjectPath', 'ByteArray', 'Signature', 'Byte', 'Boolean',
54 'Int16', 'UInt16', 'Int32', 'UInt32', 'Int64', 'UInt64',
55 'Double', 'String', 'Array', 'Struct', 'Dictionary', 'UTF8String',
57 # from exceptions
58 'DBusException',
59 'MissingErrorHandlerException', 'MissingReplyHandlerException',
60 'ValidationException', 'IntrospectionParserException',
61 'UnknownMethodException', 'NameExistsException',
63 # submodules
64 'service', 'mainloop', 'lowlevel'
66 __docformat__ = 'restructuredtext'
68 try:
69 from dbus._version import version, __version__
70 except ImportError:
71 pass
73 # OLPC Sugar compatibility
74 import dbus.exceptions as exceptions
75 import dbus.types as types
77 from _dbus_bindings import get_default_main_loop, set_default_main_loop,\
78 validate_interface_name, validate_member_name,\
79 validate_bus_name, validate_object_path,\
80 validate_error_name
81 from _dbus_bindings import BUS_DAEMON_NAME, BUS_DAEMON_PATH, BUS_DAEMON_IFACE,\
82 LOCAL_PATH, LOCAL_IFACE, PEER_IFACE,\
83 INTROSPECTABLE_IFACE, PROPERTIES_IFACE
85 from dbus.exceptions import MissingErrorHandlerException, \
86 MissingReplyHandlerException, \
87 ValidationException, \
88 IntrospectionParserException, \
89 UnknownMethodException, \
90 NameExistsException, \
91 DBusException
92 from _dbus_bindings import ObjectPath, ByteArray, Signature, Byte, Boolean,\
93 Int16, UInt16, Int32, UInt32, Int64, UInt64,\
94 Double, String, Array, Struct, Dictionary, \
95 UTF8String
96 from dbus._dbus import Bus, SystemBus, SessionBus, StarterBus
97 from dbus.proxies import Interface
100 if 'DBUS_PYTHON_NO_DEPRECATED' not in os.environ:
101 from dbus._dbus import dbus_bindings # for backwards compat