28 lines
461 B
Python
28 lines
461 B
Python
# Bryan Schumaker (11/13/2010)
|
|
|
|
import remote
|
|
from remote.gui.buttons import set_state_playing, set_state_paused
|
|
|
|
send = remote.send
|
|
encode = remote.encode
|
|
|
|
def remote_call(func):
|
|
msg = encode(func)
|
|
res = send(msg)
|
|
print "Encoded message: %s" % msg
|
|
|
|
def play():
|
|
remote_call("play()")
|
|
set_state_playing()
|
|
|
|
def pause():
|
|
remote_call("pause()")
|
|
set_state_paused()
|
|
|
|
def stop():
|
|
remote_call("stop()")
|
|
set_state_paused()
|
|
|
|
def next():
|
|
remote_call("next()")
|