![]() |
2010-11-12
, 16:04
|
|
Posts: 1,637 |
Thanked: 4,424 times |
Joined on Apr 2009
@ Germany
|
#2
|
import dbus import gobject from dbus.mainloop.glib import DBusGMainLoop def handle_call_state_ind(call_state, em_state): print call_state, em_state DBusGMainLoop(set_as_default=True) bus = dbus.SystemBus() bus.add_signal_receiver(handle_call_state_ind, path='/com/nokia/mce/signal', dbus_interface='com.nokia.mce.signal', signal_name='sig_call_state_ind') gobject.MainLoop().run()
The Following User Says Thank You to nicolai For This Useful Post: | ||
![]() |
2010-11-12
, 16:48
|
Posts: 187 |
Thanked: 41 times |
Joined on May 2010
|
#3
|
The call_state_ind return parameters are describedCode:import dbus import gobject from dbus.mainloop.glib import DBusGMainLoop def handle_call_state_ind(call_state, em_state): print call_state, em_state DBusGMainLoop(set_as_default=True) bus = dbus.SystemBus() bus.add_signal_receiver(handle_call_state_ind, path='/com/nokia/mce/signal', dbus_interface='com.nokia.mce.signal', signal_name='sig_call_state_ind') gobject.MainLoop().run()
here:
mce-dev
regards
Nicolai
MYPROGRAM * * com.nokia.mce.signal sig_call_state_ind none *
Anyone know how can i listen for that event using python like the example below?
self.bus.add_signal_receiver(self.update_widget, path='/com/nokia/phone/SMS', dbus_interface='Phone.SMS', signal_name='IncomingSegment')
what would be the parameters in python ?
thanks