Added Lock class
[fmail.git] / docs / ipc.tex
blob0fa4c07755d89e04a968184109c9495724783881
1 \documentclass{article}
3 \newcounter{paramc}
4 \newenvironment{paramlist}
5 {\begin{list}{\bfseries\upshape \hspace{4em}Parameter \arabic{paramc}:}
6 {\usecounter{paramc}\setlength{\parsep}{0.0ex}\setlength}}
7 {\end{list}}
9 \newcommand{\ipcmsg}[1]{{\raggedleft\bfseries\upshape #1}}
11 \begin{document}
13 \section{Common Messages}
15 \ipcmsg{ok}
17 A positive response to another mensage, should include a return value.
19 \begin{paramlist}
20 \item Return Value
21 \end{paramlist}
23 \ipcmsg{error}
25 An error message.
27 \begin{paramlist}
28 \item Message
29 \end{paramlist}
31 \section{Authentication Server}
32 \subsection{Messages}
34 \ipcmsg{verify}
36 Verify if a user exist, will return "ok" is the user
37 exist, error otherwise.
39 \begin{paramlist}
40 \item Username
41 \end{paramlist}
43 \ipcmsg{auth}
45 Will authenticate a given user, will return ok if the
46 user and password are right, error otherwise.
48 \begin{paramlist}
49 \item Username
50 \item Password
51 \end{paramlist}
53 \section{Mailbox Server}
54 \subsection{Messages}
56 \ipcmsg{listmail}
58 It will return ok message with the amount of emails
59 for a given user, after that it will push n "mailinfo"
60 message. On failture it will return error.
62 \begin{paramlist}
63 \item username
64 \end{paramlist}
66 \ipcmsg{mailinfo}
68 Return message with a given email detail.
70 \begin{paramlist}
71 \item Number
72 \item Size
73 \end{paramlist}
75 \ipcmsg{sendmail}
77 Store an email, it will return ok if successful and
78 begin using raw operations till read 'Data Length'
79 bytes.
81 \begin{paramlist}
82 \item To
83 \item Recipent
84 \item Data Length
85 \end{paramlist}
87 \ipcmsg{retr}
89 Retrieve an email for a given user. Should
90 return ok with the size of the email if the
91 email number is valid and then it will
92 start sending the email using raw operations.
93 If the email number is invalid will return error.
95 \begin{paramlist}
96 \item username
97 \item Number
98 \end{paramlist}
100 \end{document}