1 #!/usr/bin/env python2.5
2 # -*- coding: utf-8 -*-
5 @author: Nick Leppänen Larsson <frals@frals.se>
10 import dbus.mainloop.glib
13 from wappushhandler import PushHandler
15 class MMSHandler(dbus.service.Object):
17 # Here the service name
18 bus_name = dbus.service.BusName('se.frals.mms', bus=dbus.SystemBus())
19 # Here the object path
20 dbus.service.Object.__init__(self, bus_name, '/se/frals/mms')
23 # TODO: This should filter by bearer and not number of arguments, really, it should.
24 # Here the interface name, and the method is named same as on dbus.
25 """ According to wappushd.h SMS PUSH is one less argument """
26 @dbus.service.method(dbus_interface='com.nokia.WAPPushHandler')
27 def HandleWAPPush(self, bearer, source, srcport, dstport, header, payload):
28 handler = PushHandler()
29 ret = handler._incoming_sms_push(source, srcport, dstport, header, payload)
32 """ According to wappushd.h IP PUSH is one more argument
33 @dbus.service.method(dbus_interface='com.nokia.WAPPushHandler')
34 def HandleWAPPush(self, bearer, source, dest, srcport, dstport, header, payload):
35 handler = PushHandler()
36 ret = handler._incoming_ip_push(source, dest, srcport, dstport, header, payload)
40 dbus.mainloop.glib.DBusGMainLoop(set_as_default=True)
41 bus = dbus.SystemBus()
42 loop = gobject.MainLoop()