From e64206c54ce24d2346215c61cc7997b2009e446e Mon Sep 17 00:00:00 2001 From: Jakob Pfender Date: Fri, 15 Oct 2010 10:18:15 +0200 Subject: documentation for client and server --- client/client.erl | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'client') diff --git a/client/client.erl b/client/client.erl index f500fe1..b72b5ee 100644 --- a/client/client.erl +++ b/client/client.erl @@ -2,8 +2,8 @@ -export([register/2, register/3, login/3, list/0, handle/2, getVotes/0, vote/2, devote/2]). checkLogin(Value) -> - %% check if user meets the requirements to be locked in or not by - %% locking in to the registered processes and check if the cli + %% check if user meets the requirements to be logged in or not by + %% logging in to the registered processes and checking if the cli %% process is registered LoggedIn = lists:member(cli, registered()), if LoggedIn == Value -> @@ -35,6 +35,7 @@ register(Name, Password) -> {error, not_logged_in} end. +%register the client with the server register(Server, Name, Password) -> try checkLogin(false) of _ -> @@ -45,6 +46,7 @@ register(Server, Name, Password) -> end, wait_for_reply(). +%login to the server login(Server, Name, Password) -> code:purge(server), code:load_abs("../common/server"), @@ -68,6 +70,7 @@ login(Server, Name, Password) -> {error, logged_in} end. +%request the playlist from the server list() -> try checkLogin(true) of _ -> -- cgit v1.2.3