Exemple #1
0
    def create(aList):
        global bus

        GObject.threads_init()
        glib.threads_init()

        dbus_loop = DBusGMainLoop()
        bus = dbus.SessionBus(mainloop=dbus_loop)
        bus_name = dbus.service.BusName(SERVICE_NAME, bus=bus)
        return Script(aList, bus_name, OBJECT_PATH)
Exemple #2
0
 def run(self):
     DBusGMainLoop(set_as_default=True)
     bus = dbus.SystemBus()
     bus.add_signal_receiver(self.callback,
                             path='/com/nokia/csd/call',
                             dbus_interface='com.nokia.csd.Call',
                             signal_name='Coming')
     import gobject
     from dbus import glib
     gobject.threads_init()
     glib.threads_init()
Exemple #3
0
 def run(self):
     DBusGMainLoop(set_as_default=True)
     bus = dbus.SystemBus()
     bus.add_signal_receiver(self.callback,
                             path='/com/nokia/phone/SMS',
                             dbus_interface='Phone.SMS',
                             signal_name='IncomingSegment')
     import gobject
     from dbus import glib
     gobject.threads_init()
     glib.threads_init()
Exemple #4
0
 def run(self):
     DBusGMainLoop(set_as_default=True)
     bus = dbus.SystemBus()
     bus.add_signal_receiver(self.callback,
                             path='/com/nokia/csd/call',
                             dbus_interface='com.nokia.csd.Call',
                             signal_name='Coming')
     import gobject
     from dbus import glib
     gobject.threads_init()
     glib.threads_init()
Exemple #5
0
 def run(self):
     DBusGMainLoop(set_as_default=True)
     bus = dbus.SystemBus()
     bus.add_signal_receiver(self.callback,
                             path='/com/nokia/phone/SMS',
                             dbus_interface='Phone.SMS',
                             signal_name='IncomingSegment')
     import gobject
     from dbus import glib
     gobject.threads_init()
     glib.threads_init()
Exemple #6
0
def get_main_loop():
    global _main_loop, _bus_loop

    if _main_loop is not None:
        return (_main_loop, _bus_loop)
    with _main_loop_lock:
        if _main_loop is not None:
            return (_main_loop, _bus_loop)

        from dbus.mainloop.glib import DBusGMainLoop
        import gobject

        _bus_loop = DBusGMainLoop(set_as_default=True)
        gobject.threads_init()

        from dbus import glib
        glib.threads_init()

        _main_loop = gobject.MainLoop()
        return (_main_loop, _bus_loop)
Exemple #7
0
def get_main_loop():
	global _main_loop, _bus_loop

	if _main_loop is not None:
		return (_main_loop, _bus_loop)
	with _main_loop_lock:
		if _main_loop is not None:
			return (_main_loop, _bus_loop)

		from dbus.mainloop.glib import DBusGMainLoop
		import gobject

		_bus_loop = DBusGMainLoop(set_as_default=True)
		gobject.threads_init()

		from dbus import glib
		glib.threads_init()

		_main_loop = gobject.MainLoop()
		return (_main_loop, _bus_loop)
 def run(self):
     logger.debug("run sms_listener")
     DBusGMainLoop(set_as_default=True)
     bus = dbus.SystemBus()
     bus.add_signal_receiver(self.handle_sms, path='/ril_0',   dbus_interface='org.ofono.MessageManager', signal_name='IncomingMessage')
     glib.threads_init()