death to trailing whitespace
[openafs.git] / src / WINNT / afsusrmgr / TaAfsUsrMgr.h
1 /*
2  * Copyright 2000, International Business Machines Corporation and others.
3  * All Rights Reserved.
4  *
5  * This software has been released under the terms of the IBM Public
6  * License.  For details, see the LICENSE file in the top-level source
7  * directory or online at http://www.openafs.org/dl/license10.html
8  */
9
10 #ifndef TAAFSUSRMGR_H
11 #define TAAFSUSRMGR_H
12
13 #include <WINNT/TaLocale.h>
14 #include <WINNT/TaAfsAdmSvrClient.h>
15 #include <WINNT/AfsAppLib.h>
16
17
18 /*
19  * DEFINITIONS ________________________________________________________________
20  *
21  */
22
23 #ifdef _DEBUG
24 #ifndef DEBUG
25 #define DEBUG
26 #endif
27 #endif
28
29 #ifndef cb1KB
30 #define cb1KB  1024L
31 #endif
32
33 #ifndef ck1MB
34 #define ck1MB  1024L
35 #endif
36
37 #ifndef cb1MB
38 #define cb1MB  1048576L
39 #endif
40
41 #ifndef ck1GB
42 #define ck1GB  1048576L
43 #endif
44
45 #ifndef ck1TB
46 #define ck1TB  (unsigned long)0x40000000  // 1073741824L == 1024^3
47 #endif
48
49 #define REGSTR_SETTINGS_BASE  HKCU
50 #define REGSTR_SETTINGS_PATH  TEXT("Software\\OpenAFS\\AFS Account Manager")
51 #define REGVAL_SETTINGS       TEXT("Settings")
52 #define REGSTR_SETTINGS_PREFS TEXT("Software\\OpenAFS\\AFS Account Manager\\Preferences")
53 #define REGSTR_SETTINGS_CELLS REGSTR_SETTINGS_PREFS
54
55
56 /*
57  * INCLUSIONS _________________________________________________________________
58  *
59  */
60
61 #include "resource.h"
62
63 #include "help.hid"
64 #define cszHELPFILENAME  TEXT("TaAfsUsrMgr.hlp")
65
66 #include "usr_prop.h"
67 #include "grp_prop.h"
68
69
70 /*
71  * STRUCTURES _________________________________________________________________
72  *
73  */
74
75 typedef enum // ICONVIEW
76    {
77    ivTWOICONS,
78    ivONEICON,
79    ivSTATUS
80    } ICONVIEW, *LPICONVIEW;
81
82 typedef struct
83    {
84    HINSTANCE hInst;
85    HWND hMain;
86    HWND hAction;
87    HACCEL hAccel;
88    int rc;
89
90    UINT_PTR idClient;
91    ASID idCell;
92    UINT_PTR hCreds;
93
94    TCHAR szPatternUsers[ cchNAME ];
95    TCHAR szPatternGroups[ cchNAME ];
96    TCHAR szPatternMachines[ cchNAME ];
97    } GLOBALS;
98
99 typedef struct
100    {
101    // Window placement
102    //
103    RECT rMain;
104    RECT rActions;
105
106    // How is information viewed?
107    //
108    VIEWINFO viewAct;
109    VIEWINFO viewUsr;
110    VIEWINFO viewGrp;
111    VIEWINFO viewMch;
112    ICONVIEW ivUsr;
113    ICONVIEW ivGrp;
114    ICONVIEW ivMch;
115
116    BOOL fWarnBadCreds;
117    BOOL fShowActions;
118    BOOL fWindowsRegexp;
119    DWORD cminRefreshRate;
120
121    size_t iTabLast;
122
123    // What user preferences have been chosen?
124    //
125    USERPROPINFO CreateUser;
126    GROUPPROPINFO CreateGroup;
127    USERPROPINFO CreateMachine;
128
129    AFSADMSVR_SEARCH_PARAMS SearchUsers;
130
131    } GLOBALS_RESTORED;
132
133 #define wVerGLOBALS_RESTORED  MAKEVERSION(1,0)
134
135
136 extern GLOBALS g;
137 extern GLOBALS_RESTORED gr;
138
139 /*
140  * OTHER INCLUSIONS ___________________________________________________________
141  *
142  */
143
144 #include "task.h"
145 #include "helpfunc.h"
146 #include "display.h"
147 #include "general.h"
148 #include "errdata.h"
149
150
151 /*
152  * PROTOTYPES _________________________________________________________________
153  *
154  */
155
156 void Quit (int rc);
157
158 void PumpMessage (MSG *lpm);
159
160 // StartThread() accepts any 32-bit quantity as its second parameter;
161 // it uses '...' so you won't have to cast the thing regardless of what it
162 // is--an HWND fits through just as easily as an LPIDENT.
163 //
164 BOOL cdecl StartThread (DWORD (WINAPI *lpfnStart)(PVOID lp), ...);
165
166
167 #endif
168