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:
parent
2a6b04e328
commit
7ffd4e14fd
|
@ -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:
|
||||
|
|
|
@ -7,5 +7,5 @@ def index():
|
|||
return text
|
||||
|
||||
docs = {
|
||||
"index.html":(index, "html")
|
||||
"index.html":(index, "html"),
|
||||
}
|
||||
|
|
|
@ -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,
|
||||
}
|
Loading…
Reference in New Issue