windows-pcache-20050310
[openafs.git] / src / WINNT / client_config / afs_config.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 AFS_CONFIG_H
11 #define AFS_CONFIG_H
12
13
14 /*
15  * INCLUSIONS _________________________________________________________________
16  *
17  */
18
19 #include <WINNT/TaLocale.h>
20 #include <windows.h>
21 #include <commctrl.h>
22 #include <regstr.h>
23 #include <ctl_sockaddr.h>
24 #include <ctl_spinner.h>
25 #include <checklist.h>
26 #include <dialog.h>
27 #include <fastlist.h>
28 #include <tab_hosts.h>
29 #include "cellservdb.h"
30 #include "drivemap.h"
31 #include "resource.h"
32 #include "config.h"
33 #include "help.hid"
34 #include <WINNT\afsreg.h>
35
36
37 /*
38  * VARIABLES __________________________________________________________________
39  *
40  */
41
42 typedef struct
43    {
44    HWND hMain;
45    BOOL fIsWinNT;
46    BOOL fIsAdmin;
47    BOOL fIsCCenter;
48    LPPROPSHEET psh;
49
50    struct
51       {
52       TCHAR szGateway[ MAX_PATH ];
53       TCHAR szCell[ MAX_PATH ];
54       TCHAR szSysName[ MAX_PATH ];
55       TCHAR szRootVolume[ MAX_PATH ];
56       TCHAR szMountDir[ MAX_PATH ];
57       TCHAR szCachePath[ MAX_PATH ];
58       BOOL fBeGateway;
59       BOOL fShowTrayIcon;
60       BOOL fLogonAuthent;
61       BOOL fTrapOnPanic;
62       BOOL fFailLoginsSilently;
63       BOOL fReportSessionStartups;
64       DWORD ckCache;
65       DWORD ckChunk;
66       DWORD cStatEntries;
67       DWORD csecProbe;
68       DWORD nThreads;
69       DWORD nDaemons;
70       DWORD nLanAdapter;
71       DWORD nTraceBufSize;
72       DWORD nLoginRetryInterval;
73       PSERVERPREFS pFServers;
74       PSERVERPREFS pVLServers;
75       CELLSERVDB CellServDB;
76       DRIVEMAPLIST NetDrives;
77       DRIVEMAPLIST GlobalDrives;
78       BOOL fChangedPrefs;
79       } Configuration;
80
81    BOOL fNeedRestart;
82    TCHAR szHelpFile[ MAX_PATH ];
83    } GLOBALS;
84
85 extern GLOBALS g;
86
87 /*
88  * MACROS _____________________________________________________________________
89  *
90  */
91
92 #ifndef THIS_HINST
93 #define THIS_HINST  (HINSTANCE)GetModuleHandle(NULL)
94 #endif
95
96 #ifndef REALLOC
97 #define REALLOC(_a,_c,_r,_i) AfsConfigReallocFunction ((LPVOID*)&_a,sizeof(*_a),&_c,_r,_i)
98 #endif
99
100 #ifndef iswhite
101 #define iswhite(_ch) (((_ch)==TEXT(' ')) || ((_ch)==TEXT('\t')))
102 #endif
103 #ifndef iseol
104 #define iseol(_ch) (((_ch)==TEXT('\r')) || ((_ch)==TEXT('\n')))
105 #endif
106 #ifndef iswhiteeol
107 #define iswhiteeol(_ch) (iswhite(_ch) || iseol(_ch))
108 #endif
109
110
111 /*
112  * PROTOTYPES _________________________________________________________________
113  *
114  */
115
116 void Quit (void);
117
118 BOOL AfsConfigReallocFunction (LPVOID *ppTarget, size_t cbElement, size_t *pcTarget, size_t cReq, size_t cInc);
119
120 void Main_OnInitDialog (HWND hMain);
121
122 void Main_RefreshAllTabs (void);
123
124 LPCTSTR GetCautionTitle (void);
125 LPCTSTR GetErrorTitle (void);
126
127
128 #endif
129