libsaria: Added RPC pages

For now, I can play and pause.  I'll eventually add more operations to
the list.
This commit is contained in:
Bryan Schumaker 2011-05-15 13:49:02 -04:00
parent 2a6b04e328
commit 7ffd4e14fd
3 changed files with 24 additions and 3 deletions

View File

@ -1,17 +1,18 @@
# Bryan Schumaker (5 / 15 / 2011)
import root
import rpc
docs = {}
docs.update(root.docs)
docs.update(rpc.docs)
types = {
"html":"text/html"
"html":"text/html",
}
def lookup(file):
doc = docs
print doc, file, doc.get(file[0], None)
for cmp in file:
doc = doc.get(cmp, None)
if doc == None:

View File

@ -7,5 +7,5 @@ def index():
return text
docs = {
"index.html":(index, "html")
"index.html":(index, "html"),
}

View File

@ -0,0 +1,20 @@
# Bryan Schumaker (5 / 15 / 2011)
from libsaria import controls
def play():
controls.play()
return ""
def pause():
controls.pause()
return ""
rpc = {
"play.html":(play, "html"),
"pause.html":(pause, "html"),
}
docs = {
"RPC":rpc,
}