Listing vmail mailboxes
[hcoop/domtool2.git] / src / msgTypes.sml
CommitLineData
36e42cb8
AC
1(* HCoop Domtool (http://hcoop.sourceforge.net/)
2 * Copyright (c) 2006, Adam Chlipala
3 *
4 * This program is free software; you can redistribute it and/or
5 * modify it under the terms of the GNU General Public License
6 * as published by the Free Software Foundation; either version 2
7 * of the License, or (at your option) any later version.
8 *
9 * This program is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 * GNU General Public License for more details.
13 *
14 * You should have received a copy of the GNU General Public License
15 * along with this program; if not, write to the Free Software
16 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
17 *)
18
19(* Network message data structures *)
20
21structure MsgTypes = struct
22
23datatype msg =
24 MsgOk
25 (* Your request was processed successfully. *)
26 | MsgError of string
27 (* Your request went wrong in some way. *)
28 | MsgConfig of string
29 (* Configuration source code *)
30 | MsgFile of Slave.file_status
31 (* The status of a configuration file has changed. *)
32 | MsgDoFiles
33 (* Perform the actions associated with the MsgFiles sent previously. *)
5ee41dd0 34 | MsgGrant of Acl.acl
411a85f2
AC
35 (* Grant a permission *)
36 | MsgRevoke of Acl.acl
37 (* Revoke a permission *)
08a04eb4
AC
38 | MsgListPerms of string
39 (* List all of a user's permissions *)
40 | MsgPerms of (string * string list) list
41 (* A response to MsgListPerms, giving a permission class and all values
42 * for which the user is authorized in that class *)
094877b1
AC
43 | MsgWhoHas of {class : string, value : string}
44 (* Which users have this permission? *)
45 | MsgWhoHasResponse of string list
46 (* These are the users! *)
c53e82e4
AC
47 | MsgMultiConfig of string list
48 (* Multiple Domtool sources in dependency order *)
e69e60cc
AC
49 | MsgRmdom of string list
50 (* Remove all configuration associated with some domains and revoke
51 * rights to those domains from all users. *)
1824f573
AC
52 | MsgRegenerate
53 (* Make a clean slate of it and reprocess all configuration from scratch. *)
e69e60cc
AC
54 | MsgRmuser of string
55 (* Remove all ACL entries for a user, and remove all domains to which
56 * that user and no one else has rights. *)
21d921a5 57 | MsgCreateDbUser of {dbtype : string, passwd : string option}
d541c618 58 (* Request creation of a user for the named DBMS type *)
90dd48df
AC
59 | MsgCreateDbTable of {dbtype : string, dbname : string}
60 (* Request creation of a DBMS table *)
08688401
AC
61 | MsgNewMailbox of {domain : string, user : string,
62 passwd : string, mailbox : string}
63 (* Request creation of a new vmail mapping *)
64 | MsgPasswdMailbox of {domain : string, user : string, passwd : string}
65 (* Change a vmail account's password *)
66 | MsgRmMailbox of {domain : string, user : string}
67 (* Remove a vmail mapping *)
1d3ef80e
AC
68 | MsgListMailboxes of string
69 (* List all mailboxes for a domain *)
70 | MsgMailboxes of string list
71 (* Reply to MsgListMailboxes *)
36e42cb8
AC
72
73end