def connet_to_sys_signals(self): def handle_message(msgpdu, from_number, msg_hash, to_number, *args, **argsv): Loggable.debug("MSGPU: ", msgpdu) pdu = gsmdecode.decode_pdu(msgpdu) Notifiable.info("SMS: %s" % (pdu.get('sender'),), pdu.get('user_data', '')) Loggable.info("SMS: %s" % (pdu.get('sender'),), pdu.get('user_data', '')) #receive new sms self.maemo_sys_bus\ .add_signal_receiver( handle_message, path='/com/nokia/phone/SMS', dbus_interface='Phone.SMS', signal_name='IncomingSegment') def handle_call(objPath, number, *args, **argsv): print args, argsv Notifiable.info("NEW CALL", "Someone calling you") #receive new call self.maemo_sys_bus\ .add_signal_receiver( handle_call, path='/com/nokia/csd/call', dbus_interface='com.nokia.csd.Call', signal_name='Coming') Notifiable.info("Maemo Notify", "Wainting for new messages")
def handle_message(msgpdu, from_number, msg_hash, to_number, *args, **argsv): Loggable.debug("MSGPU: ", msgpdu) pdu = gsmdecode.decode_pdu(msgpdu) Notifiable.info("SMS: %s" % (pdu.get('sender'),), pdu.get('user_data', '')) Loggable.info("SMS: %s" % (pdu.get('sender'),), pdu.get('user_data', ''))
def handle_call(objPath, number, *args, **argsv): print args, argsv Notifiable.info("NEW CALL", "Someone calling you")