aboutsummaryrefslogtreecommitdiffstats
path: root/server
diff options
context:
space:
mode:
authorMarco Ziener <mziener@lavabit.com>2010-10-14 11:44:48 +0200
committerMarco Ziener <mziener@lavabit.com>2010-10-14 11:44:48 +0200
commit7f7862efc17932637234f54e4faa503ed356b4ce (patch)
tree2e13e53a6fdfcb2c42de26a35e37e3dc67f08819 /server
parent45c0805771f78696727741b190787d48f4f0f462 (diff)
parent8bd7f77de295d1d89edb95d6f9f869f1fedfdffc (diff)
downloaderlang-7f7862efc17932637234f54e4faa503ed356b4ce.tar.gz
erlang-7f7862efc17932637234f54e4faa503ed356b4ce.tar.xz
erlang-7f7862efc17932637234f54e4faa503ed356b4ce.zip
Merge branch 'master' of ssh://git.animux.de/erlang
Diffstat (limited to 'server')
-rw-r--r--server/client.erl25
1 files changed, 12 insertions, 13 deletions
diff --git a/server/client.erl b/server/client.erl
index bf8bc22..ce7c99b 100644
--- a/server/client.erl
+++ b/server/client.erl
@@ -20,6 +20,18 @@ loop(Client) ->
Client ! {ok, {foo}},
loop(Client);
+ get_votes ->
+ Client ! {ok, media:getVotes(Client)},
+ loop(Client);
+
+ {vote, Artist, Title} ->
+ Client ! media:vote(Artist, Title),
+ loop(Client);
+
+ {devote, Artist, Title} ->
+ Client ! media:devote(Artist, Title),
+ loop(Client);
+
Cmd ->
Client ! {error, {unknown_command, Cmd}},
loop(Client)
@@ -30,16 +42,3 @@ register(Client, {Name, Password}) ->
login(Client, {Node, Name, Password}) ->
dis ! {Client, {login, {Node, Name, Password}}}.
-
-getVotes() ->
- media:getVotes(self()),
- receive
- Msg ->
- Client ! Msg
- end.
-
-vote(Artist,Title) ->
- media:vote(Artist, Title).
-
-devote(Artist,Title) ->
- media:devote(Artist, Title).