aboutsummaryrefslogtreecommitdiff
blob: 6f5014020e391132321df749ab6a4905ea08fdf4 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
#	vim:fileencoding=utf-8
# (c) 2011 Michał Górny <mgorny@gentoo.org>
# Released under the terms of the 2-clause BSD license.

import dbus
from dbus.mainloop.glib import DBusGMainLoop

dbus_interface_name = 'org.gentoo.pmstestsuite'
dbus_bus_name = dbus_interface_name
dbus_object_prefix = '/org/gentoo/pmstestsuite'

class DBusHandler(object):
	""" A class handling all D-Bus interaction for PMS Test Suite. """

	def __init__(self):
		""" Initialize DBusHandler. Add it to main GLib loop. """
		DBusGMainLoop(set_as_default=True)
		self.bus = dbus.SystemBus()
		self.busname = dbus.service.BusName(dbus_bus_name, self.bus)