View Single Post
thp's Avatar
Posts: 1,391 | Thanked: 4,272 times | Joined on Sep 2007 @ Vienna, Austria
#122
Originally Posted by qwerty12 View Post
Both are possible.
Code:
#!/usr/bin/python

import dbus
import gtk
import sys

from dbus.mainloop.glib import DBusGMainLoop

DBusGMainLoop(set_as_default=True)

def callback(state, emergency_state):
    print 'new state is', state
    print '-'*30
    sys.stdout.flush()

bus = dbus.SystemBus()
bus.add_signal_receiver(callback, 'sig_call_state_ind', \
                        'com.nokia.mce.signal', None, \
                        '/com/nokia/mce/signal')

gtk.main()
PoC script to check for the call state (still has to be translated to C and integrated into headphone, with state tracking). I suppose we can enable this by default in headphoned without bad consequences?
 

The Following 2 Users Say Thank You to thp For This Useful Post: