Update NEWS for 1.6.22
[pkg-k5-afs_openafs.git] / src / WINNT / afssvrmgr / svrmgr.h
blob7f8dd927e167d470db8e5b6a58a6429702c02ebc
1 /*
2 * Copyright 2000, International Business Machines Corporation and others.
3 * All Rights Reserved.
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 */
10 #ifndef SVRMGR_H
11 #define SVRMGR_H
15 * COMMON HEADERS _____________________________________________________________
19 #include <windows.h>
20 #include <WINNT/AfsAppLib.h>
21 #include <WINNT/AfsClass.h>
25 * DEFINITIONS ________________________________________________________________
29 #ifdef _DEBUG
30 #ifndef DEBUG
31 #define DEBUG
32 #endif
33 #endif
35 #ifndef cb1KB
36 #define cb1KB 1024L
37 #endif
39 #ifndef ck1MB
40 #define ck1MB 1024L
41 #endif
43 #ifndef cb1MB
44 #define cb1MB 1048576L
45 #endif
47 #ifndef ck1GB
48 #define ck1GB 1048576L
49 #endif
51 #ifndef ck1TB
52 #define ck1TB (unsigned long)0x40000000 // 1073741824L == 1024^3
53 #endif
55 #define cszENDING_REPLICA TEXT(".readonly")
56 #define cszENDING_CLONE TEXT(".clone")
58 #define REGSTR_SETTINGS_BASE HKCU
59 #define REGSTR_SETTINGS_PATH TEXT("Software\\OpenAFS\\AFS Server Manager")
60 #define REGVAL_SETTINGS TEXT("Settings")
61 #define REGSTR_SETTINGS_PREFS TEXT("Software\\OpenAFS\\AFS Server Manager\\Preferences")
62 #define REGSTR_SETTINGS_CELLS REGSTR_SETTINGS_PREFS
66 * INCLUSIONS _________________________________________________________________
70 #include "resource.h"
71 #include "window.h"
72 #include "dispatch.h"
73 #include "alert.h"
74 #include "general.h"
75 #include "subset.h"
76 #include "prefs.h"
78 #include "help.hid"
79 #define cszHELPFILENAME TEXT("TaAfsSvrMgr.hlp")
83 * STRUCTURES _________________________________________________________________
87 typedef enum // CHILDTAB
89 tabINVALID = -1,
90 tabFILESETS = 0,
91 tabAGGREGATES,
92 tabSERVICES
93 } CHILDTAB;
95 typedef struct // DISPLAYINFO
97 LONG cSplitter; // splitter between servers and tabs
98 VIEWINFO viewSvr;
99 } DISPLAYINFO;
101 typedef struct // SERVER_PREF
103 OBJECTALERTS oa;
105 short perWarnAggFull; // ==0 to disable warning
106 short perWarnSetFull; // ==0 to disable warning
107 BOOL fWarnSvcStop; // ==FALSE to disable warning
108 BOOL fWarnSvrTimeout; // ==FALSE to disable warning
109 BOOL fWarnSetNoVLDB; // ==FALSE to disable warning
110 BOOL fWarnSetNoServ; // ==FALSE to disable warning
111 BOOL fWarnAggNoServ; // ==FALSE to disable warning
112 BOOL fWarnAggAlloc; // ==FALSE to disable warning
114 RECT rLast;
115 BOOL fOpen;
116 BOOL fIsMonitored;
117 BOOL fExpandTree;
118 SERVERSTATUS ssLast;
119 } SERVER_PREF, *LPSERVER_PREF;
121 #define wVerSERVER_PREF MAKEVERSION(2,1)
124 typedef struct // SERVICE_PREF
126 OBJECTALERTS oa;
128 BOOL fWarnSvcStop;
129 TCHAR szLogFile[ MAX_PATH ];
131 SERVICESTATUS ssLast;
132 } SERVICE_PREF, *LPSERVICE_PREF;
134 #define wVerSERVICE_PREF MAKEVERSION(1,0)
137 typedef struct // AGGREGATE_PREF
139 OBJECTALERTS oa;
140 short perWarnAggFull; // ==0 to disable, ==-1 for svr default
141 BOOL fWarnAggAlloc; // ==FALSE to disable warning
143 TCHAR szDevice[ cchNAME ];
144 AGGREGATESTATUS asLast;
145 BOOL fExpandTree;
146 } AGGREGATE_PREF, *LPAGGREGATE_PREF;
148 #define wVerAGGREGATE_PREF MAKEVERSION(2,1)
151 typedef struct // FILESET_PREF
153 OBJECTALERTS oa;
154 short perWarnSetFull; // ==0 to disable, ==-1 for svr default
156 FILESETSTATUS fsLast;
157 LPIDENT lpiRW;
158 } FILESET_PREF, *LPFILESET_PREF;
160 #define wVerFILESET_PREF MAKEVERSION(1,1)
163 typedef enum // ICONVIEW
165 ivTWOICONS,
166 ivONEICON,
167 ivSTATUS
168 } ICONVIEW, *LPICONVIEW;
170 typedef struct
172 HINSTANCE hInst;
173 HWND hMain;
174 HWND hAction;
175 HACCEL hAccel;
176 int rc;
177 LPIDENT lpiCell;
179 LPSUBSET sub;
180 UINT_PTR hCreds;
181 } GLOBALS;
183 typedef struct
185 // Window placement
187 RECT rMain;
188 RECT rMainPreview;
189 RECT rServerLast;
190 RECT rActions;
191 BOOL fPreview;
192 BOOL fVert;
193 BOOL fActions;
195 // How is information viewed?
197 CHILDTAB tabLast;
198 VIEWINFO viewSvc;
199 VIEWINFO viewAgg;
200 VIEWINFO viewSet;
201 VIEWINFO viewRep;
202 VIEWINFO viewAggMove;
203 VIEWINFO viewAggCreate;
204 VIEWINFO viewAggRestore;
205 VIEWINFO viewAct;
206 VIEWINFO viewKey;
207 DISPLAYINFO diHorz;
208 DISPLAYINFO diVert;
209 RECT rViewLog;
210 size_t cbQuotaUnits;
211 BOOL fOpenMonitors;
212 BOOL fCloseUnmonitors;
213 BOOL fServerLongNames;
214 BOOL fDoubleClickOpens; // 0=Properties, 1=Open, 2=Depends (PreviewPane)
215 BOOL fWarnBadCreds;
216 ICONVIEW ivSvr;
217 ICONVIEW ivAgg;
218 ICONVIEW ivSet;
219 ICONVIEW ivSvc;
220 } GLOBALS_RESTORED;
222 #define wVerGLOBALS_RESTORED MAKEVERSION(2,3)
225 extern GLOBALS g;
226 extern GLOBALS_RESTORED gr;
229 * OTHER INCLUSIONS ___________________________________________________________
233 #include "task.h"
234 #include "helpfunc.h"
238 * PROTOTYPES _________________________________________________________________
242 void Quit (int rc);
244 void PumpMessage (MSG *lpm);
246 // StartThread() accepts any 32-bit quantity as its second parameter;
247 // it uses '...' so you won't have to cast the thing regardless of what it
248 // is--an HWND fits through just as easily as an LPIDENT.
250 BOOL cdecl StartThread (DWORD (WINAPI *lpfnStart)(PVOID lp), ...);
253 #endif