Exemple #1
0
	def check_new_sms(class_, newmap):
		class_.notify.PlayTone('sms')
		res = dedbusmap(newmap)
		for n in res:
			sm = object_by_url(n)
			content = dedbusmap(sm.GetContent(dbus_interface=DIN_ENTRY, timeout=200))
			DatabaseController.insert_new_sms('REC UNREAD', content['from_msisdn'], content['text'].encode('utf-8'), content['time'])
			print '--- NEW SMS:', content['from_msisdn'], content['time'], content['text'].encode('utf-8')
Exemple #2
0
	def first_check_new_sms(class_):
		try:
			res = class_.gsm_sms.ListAll(dbus_interface=DIN_STORAGE)
			for n in res:
				sm = object_by_url(n)
				content = dedbusmap(sm.GetContent(dbus_interface=DIN_ENTRY))
				DatabaseController.insert_new_sms('REC UNREAD', content['from_msisdn'], content['text'].encode('utf-8'), content['time'])
		except:
			print '--- NULL new sms'