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