]> matita.cs.unibo.it Git - helm.git/blob - helm/ocaml/hbugs/hbugs_broker_registry.mli
ocaml 3.09 transition
[helm.git] / helm / ocaml / hbugs / 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 type registry =
39   object
40     method dump: string
41     method purge: unit
42   end
43
44 class clients:
45   object
46       (** 'register client_id client_url' *)
47     method register: client_id -> string -> unit
48     method unregister: client_id -> unit
49     method isAuthenticated: client_id -> bool
50       (** subcribe a client to a set of tutor removing previous subcriptions *)
51     method subscribe: client_id -> tutor_id list -> unit
52     method getUrl: client_id -> string
53     method getSubscription: client_id -> tutor_id list
54
55     method dump: string
56     method purge: unit
57   end
58
59 class tutors:
60   object
61     method register: tutor_id -> string -> hint_type -> string -> unit
62     method unregister: tutor_id -> unit
63     method isAuthenticated: tutor_id -> bool
64     method exists: tutor_id -> bool
65     method getTutor: tutor_id -> string * hint_type * string
66     method getUrl: tutor_id -> string
67     method getHintType: tutor_id -> hint_type
68     method getDescription: tutor_id -> string
69     method index: tutor_dsc list
70
71     method dump: string
72     method purge: unit
73   end
74
75 class musings:
76   object
77     method register: musing_id -> client_id -> tutor_id -> unit
78     method unregister: musing_id -> unit
79     method getByMusingId: musing_id -> client_id * tutor_id
80     method getByClientId: client_id -> musing_id list
81     method getByTutorId: tutor_id -> musing_id list
82     method isActive: musing_id -> bool
83
84     method dump: string
85     method purge: unit
86   end
87