diff --git a/libsaria/server/pages/__init__.py b/libsaria/server/pages/__init__.py index 0852f0b5..ef80baa9 100644 --- a/libsaria/server/pages/__init__.py +++ b/libsaria/server/pages/__init__.py @@ -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: diff --git a/libsaria/server/pages/root.py b/libsaria/server/pages/root.py index 4d3e49ee..50bda57d 100644 --- a/libsaria/server/pages/root.py +++ b/libsaria/server/pages/root.py @@ -7,5 +7,5 @@ def index(): return text docs = { - "index.html":(index, "html") + "index.html":(index, "html"), } diff --git a/libsaria/server/pages/rpc.py b/libsaria/server/pages/rpc.py new file mode 100644 index 00000000..43f924fc --- /dev/null +++ b/libsaria/server/pages/rpc.py @@ -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, +}