aboutsummaryrefslogtreecommitdiff
blob: e508d18faf413ecb93bb5d3d1fe43d05cc86e72f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
#	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_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_interface_name, self.bus)