![]() |
2008-03-07
, 19:55
|
|
Posts: 4,783 |
Thanked: 1,253 times |
Joined on Aug 2007
@ norway
|
#11
|
![]() |
2008-03-07
, 22:23
|
|
Posts: 693 |
Thanked: 502 times |
Joined on Jul 2007
|
#12
|
![]() |
2008-03-07
, 23:19
|
|
Moderator |
Posts: 7,109 |
Thanked: 8,820 times |
Joined on Oct 2007
@ Vancouver, BC, Canada
|
#13
|
![]() |
2008-03-07
, 23:33
|
|
Posts: 4,783 |
Thanked: 1,253 times |
Joined on Aug 2007
@ norway
|
#14
|
![]() |
2008-03-08
, 17:10
|
|
Moderator |
Posts: 7,109 |
Thanked: 8,820 times |
Joined on Oct 2007
@ Vancouver, BC, Canada
|
#15
|
![]() |
2008-03-08
, 19:23
|
|
Posts: 693 |
Thanked: 502 times |
Joined on Jul 2007
|
#16
|
![]() |
2008-03-08
, 22:13
|
|
Moderator |
Posts: 7,109 |
Thanked: 8,820 times |
Joined on Oct 2007
@ Vancouver, BC, Canada
|
#17
|
![]() |
2008-03-08
, 22:21
|
|
Posts: 4,783 |
Thanked: 1,253 times |
Joined on Aug 2007
@ norway
|
#18
|
![]() |
2008-03-09
, 23:57
|
|
Posts: 693 |
Thanked: 502 times |
Joined on Jul 2007
|
#19
|
#!/usr/bin/python2.5 import osso import gtk import os def callback_func(interface, method, arguments, user_data): print "RPC received" osso_c = user_data print "osso_test_receiver: Received an RPC to %s." % method print "osso_test_receiver: RPC had arguments %s." % arguments #convert common hex encodings, and format and wrap in single quotes argstr = "%s" % arguments argstr = argstr.replace("%5B", "[") argstr = argstr.replace("%5D", "]") argstr = argstr.replace("%2B", "+") argstr = argstr.replace("%20", " ") argstr = argstr.replace("file:///", "/") argstr = "'" + argstr + "'" if argstr.find(".torrent") <> -1: osso_sysnote = osso.SystemNote(osso_c) osso_sysnote.system_note_infoprint("Launching Transmission...") print "launching torrent..." print "/usr/bin/run-standalone.sh /usr/lib/transmission/transmission %s" % argstr os.system("/usr/bin/run-standalone.sh /usr/lib/transmission/transmission %s" % argstr ) if argstr.find(".avi") <> -1: osso_sysnote = osso.SystemNote(osso_c) osso_sysnote.system_note_infoprint("Launching MPlayer...") print "launching mplayer..." print "/usr/bin/run-standalone.sh /usr/bin/mplayer %s" % argstr os.system("/usr/bin/run-standalone.sh /usr/bin/mplayer %s" % argstr ) if argstr.find(".mpg") <> -1: osso_sysnote = osso.SystemNote(osso_c) osso_sysnote.system_note_infoprint("Launching MPlayer...") print "launching mplayer..." print "/usr/bin/run-standalone.sh /usr/bin/mplayer %s" % argstr os.system("/usr/bin/run-standalone.sh /usr/bin/mplayer %s" % argstr ) if argstr.find(".wmv") <> -1: osso_sysnote = osso.SystemNote(osso_c) osso_sysnote.system_note_infoprint("Launching MPlayer...") print "launching mplayer..." print "/usr/bin/run-standalone.sh /usr/bin/mplayer %s" % argstr os.system("/usr/bin/run-standalone.sh /usr/bin/mplayer %s" % argstr ) osso_c = osso.Context("dbus-switchboard", "0.0.1", False) print "dbus-switchboard started" osso_rpc = osso.Rpc(osso_c) osso_rpc.set_rpc_callback("org.dbus.switchsvc", "/org/dbus/switchservice", "org.dbus.switchsvc", callback_func, osso_c) gtk.main()
[D-BUS Service] Name=org.dbus.switchsvc Exec=/usr/bin/dbus-switchboard.py
[Desktop Entry] NoDisplay=true Version=1.0 Encoding=UTF-8 Name=dbus switchboard Exec=/usr/bin/python /usr/bin/dbus-switchboard.py Type=Application X-Osso-Service=org.dbus.switchsvc X-Osso-Type=application/x-executable
#torrents application/x-bittorrent=hildon-dbus-switchboard.desktop
The Following User Says Thank You to pipeline For This Useful Post: | ||
![]() |
2008-03-10
, 12:22
|
|
Posts: 693 |
Thanked: 502 times |
Joined on Jul 2007
|
#20
|
The Following 3 Users Say Thank You to pipeline For This Useful Post: | ||