1"""\
2Implements the public API for a D-Bus client. See the dbus.service module
3to export objects or claim well-known names.
4"""
5
6# Copyright (C) 2003, 2004, 2005, 2006 Red Hat Inc. <http://www.redhat.com/>
7# Copyright (C) 2003 David Zeuthen
8# Copyright (C) 2004 Rob Taylor
9# Copyright (C) 2005, 2006 Collabora Ltd. <http://www.collabora.co.uk/>
10#
11# SPDX-License-Identifier: MIT
12#
13# Permission is hereby granted, free of charge, to any person
14# obtaining a copy of this software and associated documentation
15# files (the "Software"), to deal in the Software without
16# restriction, including without limitation the rights to use, copy,
17# modify, merge, publish, distribute, sublicense, and/or sell copies
18# of the Software, and to permit persons to whom the Software is
19# furnished to do so, subject to the following conditions:
20#
21# The above copyright notice and this permission notice shall be
22# included in all copies or substantial portions of the Software.
23#
24# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
25# EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
26# MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
27# NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
28# HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
29# WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
30# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
31# DEALINGS IN THE SOFTWARE.
32
33__all__ = [
34           # from _dbus
35           'Bus', 'SystemBus', 'SessionBus', 'StarterBus',
36
37           # from proxies
38           'Interface',
39
40           # from _dbus_bindings
41           'get_default_main_loop', 'set_default_main_loop',
42
43           'validate_interface_name', 'validate_member_name',
44           'validate_bus_name', 'validate_object_path',
45           'validate_error_name',
46
47           'BUS_DAEMON_NAME', 'BUS_DAEMON_PATH', 'BUS_DAEMON_IFACE',
48           'LOCAL_PATH', 'LOCAL_IFACE', 'PEER_IFACE',
49           'INTROSPECTABLE_IFACE', 'PROPERTIES_IFACE',
50
51           'ObjectPath', 'ByteArray', 'Signature', 'Byte', 'Boolean',
52           'Int16', 'UInt16', 'Int32', 'UInt32', 'Int64', 'UInt64',
53           'Double', 'String', 'Array', 'Struct', 'Dictionary',
54
55           # from exceptions
56           'DBusException',
57           'MissingErrorHandlerException', 'MissingReplyHandlerException',
58           'ValidationException', 'IntrospectionParserException',
59           'UnknownMethodException', 'NameExistsException',
60
61           # submodules
62           'service', 'mainloop', 'lowlevel'
63           ]
64
65from dbus._compat import is_py2
66if is_py2:
67    __all__.append('UTF8String')
68
69__docformat__ = 'restructuredtext'
70
71# OLPC Sugar compatibility
72import dbus.exceptions as exceptions
73import dbus.types as types
74
75from _dbus_bindings import __version__
76version = tuple(map(int, __version__.split('.')))
77
78from _dbus_bindings import (
79    get_default_main_loop, set_default_main_loop, validate_bus_name,
80    validate_error_name, validate_interface_name, validate_member_name,
81    validate_object_path)
82from _dbus_bindings import (
83    BUS_DAEMON_IFACE, BUS_DAEMON_NAME, BUS_DAEMON_PATH, INTROSPECTABLE_IFACE,
84    LOCAL_IFACE, LOCAL_PATH, PEER_IFACE, PROPERTIES_IFACE)
85
86from dbus.exceptions import (
87    DBusException, IntrospectionParserException, MissingErrorHandlerException,
88    MissingReplyHandlerException, NameExistsException, UnknownMethodException,
89    ValidationException)
90from _dbus_bindings import (
91    Array, Boolean, Byte, ByteArray, Dictionary, Double, Int16, Int32, Int64,
92    ObjectPath, Signature, String, Struct, UInt16, UInt32, UInt64)
93
94if is_py2:
95    from _dbus_bindings import UTF8String
96
97from dbus._dbus import Bus, SystemBus, SessionBus, StarterBus
98from dbus.proxies import Interface
99