dbus/__init__.py: Add well-known interface, path, bus-name constants
[dbus-python-phuang.git] / dbus / __init__.py
blobeff5f7d151070784a68ef6ec1183f268299ba452
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',
38 'Interface',
40 # from _dbus_bindings
41 'get_default_main_loop', 'set_default_main_loop',
43 'validate_interface_name', 'validate_member_name',
44 'validate_bus_name', 'validate_object_path',
45 'validate_error_name',
47 'BUS_DAEMON_NAME', 'BUS_DAEMON_PATH', 'BUS_DAEMON_IFACE',
48 'LOCAL_PATH', 'LOCAL_IFACE', 'PEER_IFACE',
49 'INTROSPECTABLE_IFACE', 'PROPERTIES_IFACE',
51 'DBusException',
53 'ObjectPath', 'ByteArray', 'Signature', 'Byte', 'Boolean',
54 'Int16', 'UInt16', 'Int32', 'UInt32', 'Int64', 'UInt64',
55 'Double', 'String', 'Array', 'Struct', 'Dictionary', 'UTF8String',
57 # from exceptions
58 'MissingErrorHandlerException', 'MissingReplyHandlerException',
59 'ValidationException', 'IntrospectionParserException',
60 'UnknownMethodException', 'NameExistsException',
62 # submodules
63 'service', 'mainloop', 'lowlevel'
65 __docformat__ = 'restructuredtext'
67 try:
68 from dbus._version import version, __version__
69 except ImportError:
70 pass
72 # OLPC Sugar compatibility
73 import dbus.exceptions as exceptions
74 import dbus.types as types
76 from _dbus_bindings import get_default_main_loop, set_default_main_loop,\
77 validate_interface_name, validate_member_name,\
78 validate_bus_name, validate_object_path,\
79 validate_error_name
80 from _dbus_bindings import BUS_DAEMON_NAME, BUS_DAEMON_PATH, BUS_DAEMON_IFACE,\
81 LOCAL_PATH, LOCAL_IFACE, PEER_IFACE,\
82 INTROSPECTABLE_IFACE, PROPERTIES_IFACE
83 from _dbus_bindings import DBusException
85 from dbus.exceptions import MissingErrorHandlerException, \
86 MissingReplyHandlerException, \
87 ValidationException, \
88 IntrospectionParserException, \
89 UnknownMethodException, \
90 NameExistsException
91 from _dbus_bindings import ObjectPath, ByteArray, Signature, Byte, Boolean,\
92 Int16, UInt16, Int32, UInt32, Int64, UInt64,\
93 Double, String, Array, Struct, Dictionary, \
94 UTF8String
95 from dbus._dbus import Bus, SystemBus, SessionBus, StarterBus, Interface
98 if 'DBUS_PYTHON_NO_DEPRECATED' not in os.environ:
99 from dbus._dbus import dbus_bindings # for backwards compat