Statistics
| Branch: | Tag: | Revision:

root / UEnums.pas

History | View | Annotate | Download (2.1 kB)

1
(*
2
 * CDDL HEADER START
3
 *
4
 * The contents of this file are subject to the terms of the
5
 * Common Development and Distribution License, Version 1.0 only
6
 * (the "License").  You may not use this file except in compliance
7
 * with the License.
8
 *
9
 * You can obtain a copy of the license at
10
 * http://www.opensource.org/licenses/cddl1.php.
11
 * See the License for the specific language governing permissions
12
 * and limitations under the License.
13
 *
14
 * When distributing Covered Code, include this CDDL HEADER in each
15
 * file and include the License file at
16
 * http://www.opensource.org/licenses/cddl1.php.  If applicable,
17
 * add the following below this CDDL HEADER, with the fields enclosed
18
 * by brackets "[]" replaced with your own identifying * information:
19
 *      Portions Copyright [yyyy] [name of copyright owner]
20
 *
21
 * CDDL HEADER END
22
 *
23
 *
24
 *      Portions Copyright 2007 Andreas Schneider
25
 *)
26
unit UEnums;
27
28
{$mode objfpc}{$H+}
29
30
interface
31
32
type
33
  TLoginState = (lsOK              = 0,
34
                 lsInvalidUser     = 1,
35
                 lsInvalidPassword = 2,
36
                 lsAlreadyLoggedIn = 3,
37
                 lsNoAccess        = 4);
38
39
  TServerState = (ssRunning = 0,
40
                  ssFrozen  = 1,
41
                  ssOther   = 2);
42
43
  TAccessLevel = (alNone          = 0,
44
                  alView          = 1,
45
                  alNormal        = 2,
46
                  alAdministrator = 255);
47
48
  TModifyUserStatus = (muInvalidUsername = 0,
49
                       muAdded           = 1,
50
                       muModified        = 2);
51
52
  TDeleteUserStatus = (duNotFound = 0,
53
                       duDeleted  = 1);
54
55
  TModifyRegionStatus = (mrAdded           = 0,
56
                         mrModified        = 1);
57
  TDeleteRegionStatus = (drNotFound = 0,
58
                         drDeleted  = 1);
59
                       
60
function GetAccessLevelString(AAccessLevel: TAccessLevel): string;
61
62
implementation
63
64
function GetAccessLevelString(AAccessLevel: TAccessLevel): string;
65
begin
66
  Result := '';
67
  case AAccessLevel of
68
    alNone: Result := 'None';
69
    alView: Result := 'Viewer';
70
    alNormal: Result := 'Normal';
71
    alAdministrator: Result := 'Administrator';
72
  end;
73
end;
74
75
end.