]> matita.cs.unibo.it Git - helm.git/blob - helm/hbugs/broker/hbugs_broker_registry.mli
- fixed helm web page url and copyright notice
[helm.git] / helm / hbugs / broker / hbugs_broker_registry.mli
1 (*
2  * Copyright (C) 2003:
3  *    Stefano Zacchiroli <zack@cs.unibo.it>
4  *    for the HELM Team http://helm.cs.unibo.it/
5  *
6  *  This file is part of HELM, an Hypertextual, Electronic
7  *  Library of Mathematics, developed at the Computer Science
8  *  Department, University of Bologna, Italy.
9  *
10  *  HELM is free software; you can redistribute it and/or
11  *  modify it under the terms of the GNU General Public License
12  *  as published by the Free Software Foundation; either version 2
13  *  of the License, or (at your option) any later version.
14  *
15  *  HELM is distributed in the hope that it will be useful,
16  *  but WITHOUT ANY WARRANTY; without even the implied warranty of
17  *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
18  *  GNU General Public License for more details.
19  *
20  *  You should have received a copy of the GNU General Public License
21  *  along with HELM; if not, write to the Free Software
22  *  Foundation, Inc., 59 Temple Place - Suite 330, Boston,
23  *  MA  02111-1307, USA.
24  *
25  *  For details, see the HELM World-Wide-Web page,
26  *  http://helm.cs.unibo.it/
27  *)
28
29 open Hbugs_types;;
30
31 exception Client_already_in of client_id
32 exception Client_not_found of client_id
33 exception Musing_already_in of musing_id
34 exception Musing_not_found of musing_id
35 exception Tutor_already_in of tutor_id
36 exception Tutor_not_found of tutor_id
37
38 class clients:
39   object
40       (** 'register client_id client_url' *)
41     method register: client_id -> string -> unit
42     method unregister: client_id -> unit
43     method isAuthenticated: client_id -> bool
44       (** subcribe a client to a set of tutor removing previous subcriptions *)
45     method subscribe: client_id -> tutor_id list -> unit
46     method getUrl: client_id -> string
47     method getSubscription: client_id -> tutor_id list
48   end
49
50 class tutors:
51   object
52     method register: tutor_id -> string -> hint_type -> string -> unit
53     method unregister: tutor_id -> unit
54     method isAuthenticated: tutor_id -> bool
55     method exists: tutor_id -> bool
56     method getTutor: tutor_id -> string * hint_type * string
57     method getUrl: tutor_id -> string
58     method getHintType: tutor_id -> hint_type
59     method getDescription: tutor_id -> string
60     method index: tutor_dsc list
61   end
62
63 class musings:
64   object
65     method register: musing_id -> client_id -> tutor_id -> unit
66     method unregister: musing_id -> unit
67     method getByMusingId: musing_id -> client_id * tutor_id
68     method getByClientId: client_id -> musing_id list
69     method getByTutorId: tutor_id -> musing_id list
70   end
71