d330d9b8 |
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 | |
21 | structure MsgTypes = struct |
22 | |
e5f8cb7b |
23 | datatype query = |
24 | QApt of string |
25 | (* Is this apt package installed? *) |
891b033c |
26 | | QCron of string |
27 | (* Is this user allowed to use cron? *) |
28 | | QFtp of string |
29 | (* Is this user allowed to use FTP? *) |
4ee81d53 |
30 | | QTrustedPath of string |
31 | (* Is this user restricted to trusted-path executables? *) |
e5f8cb7b |
32 | |
d330d9b8 |
33 | datatype msg = |
34 | MsgOk |
35 | (* Your request was processed successfully. *) |
36 | | MsgError of string |
37 | (* Your request went wrong in some way. *) |
38 | | MsgConfig of string |
39 | (* Configuration source code *) |
40 | | MsgFile of Slave.file_status |
41 | (* The status of a configuration file has changed. *) |
42 | | MsgDoFiles |
43 | (* Perform the actions associated with the MsgFiles sent previously. *) |
e2130d9c |
44 | | MsgGrant of Acl.acl |
d1aa6a21 |
45 | (* Grant a permission *) |
46 | | MsgRevoke of Acl.acl |
47 | (* Revoke a permission *) |
646381db |
48 | | MsgListPerms of string |
49 | (* List all of a user's permissions *) |
50 | | MsgPerms of (string * string list) list |
51 | (* A response to MsgListPerms, giving a permission class and all values |
52 | * for which the user is authorized in that class *) |
d0e75410 |
53 | | MsgWhoHas of {class : string, value : string} |
54 | (* Which users have this permission? *) |
55 | | MsgWhoHasResponse of string list |
56 | (* These are the users! *) |
c8a739af |
57 | | MsgMultiConfig of string list |
58 | (* Multiple Domtool sources in dependency order *) |
aba1f07e |
59 | | MsgRmdom of string list |
60 | (* Remove all configuration associated with some domains and revoke |
61 | * rights to those domains from all users. *) |
f92c6883 |
62 | | MsgRegenerate |
63 | (* Make a clean slate of it and reprocess all configuration from scratch. *) |
aba1f07e |
64 | | MsgRmuser of string |
65 | (* Remove all ACL entries for a user, and remove all domains to which |
66 | * that user and no one else has rights. *) |
2bc895e7 |
67 | | MsgCreateDbUser of {dbtype : string, passwd : string option} |
634d7082 |
68 | (* Request creation of a user for the named DBMS type *) |
d34cbcb8 |
69 | | MsgCreateDbTable of {dbtype : string, dbname : string} |
70 | (* Request creation of a DBMS table *) |
c45f1662 |
71 | | MsgNewMailbox of {domain : string, user : string, |
72 | passwd : string, mailbox : string} |
73 | (* Request creation of a new vmail mapping *) |
74 | | MsgPasswdMailbox of {domain : string, user : string, passwd : string} |
75 | (* Change a vmail account's password *) |
76 | | MsgRmMailbox of {domain : string, user : string} |
77 | (* Remove a vmail mapping *) |
0a58b2f3 |
78 | | MsgListMailboxes of string |
79 | (* List all mailboxes for a domain *) |
1850d85f |
80 | | MsgMailboxes of {user : string, mailbox : string} list |
0a58b2f3 |
81 | (* Reply to MsgListMailboxes *) |
bb8cc8c9 |
82 | | MsgSaQuery of string |
83 | (* Check on the SpamAsssassin filtering status of a user or e-mail address *) |
84 | | MsgSaStatus of bool |
85 | (* Response to MsgSaQuery *) |
86 | | MsgSaSet of string * bool |
87 | (* Set the filtering status of a user or e-mail address *) |
c685120e |
88 | | MsgSmtpLogReq of string |
89 | (* Request all current SMTP log lines about a domain *) |
90 | | MsgSmtpLogRes of string |
91 | (* One line of a response to MsgSmtpLogReq *) |
dc6789fc |
92 | | MsgDbPasswd of {dbtype : string, passwd : string} |
93 | (* Change a DBMS user's password *) |
4c68bd31 |
94 | | MsgShutdown |
95 | (* Halt the server *) |
8301e970 |
96 | | MsgYes |
97 | | MsgNo |
98 | (* Answers to boolean queries *) |
e5f8cb7b |
99 | | MsgQuery of query |
100 | (* Ask for host-specific information *) |
d330d9b8 |
101 | |
102 | end |