Initial IBM OpenAFS 1.0 tree
[openafs.git] / src / WINNT / afsapplib / al_admsvr.h
1 #ifndef AL_ADMSVR_H
2 #define AL_ADMSVR_H
3
4 /*
5  * ADMIN SERVER INTERFACE _____________________________________________________
6  *
7  * The AfsAppLib .DLL links with the admin server client library,
8  * TaAfsAdmSvrClient.lib. Moreover, when you call AfsAppLib_OpenAdminServer(),
9  * it's AfsAppLib's instance of that .LIB which gets initialized and used
10  * by AfsAppLib.
11  *
12  * Ah, but the problem is: if you want your app to access the asc_* functions
13  * as well (aside from just indirectly using them by calling AfsAppLib_*
14  * functions), you'll have to magically access the .LIB inside of AfsAppLib--
15  * if you just link your app with the .LIB, you'll find your copy of the .LIB
16  * never is initialized.
17  *
18  * So for those of you who want to use the asc_* routines directly AND want
19  * to the AfsAppLib library, including this header file remaps all asc_*
20  * routines to ensure they'll call within al_admsvr.cpp.
21  *
22  * First, note that AfsAppLib exposes its own wrappers for its .LIB:
23  *
24  */
25
26 EXPORTED BOOL ADMINAPI AfsAppLib_asc_AsidListCreate (LPASIDLIST *ppList);
27 EXPORTED BOOL ADMINAPI AfsAppLib_asc_AsidListCopy (LPASIDLIST *ppListTarget, LPASIDLIST *ppListSource);
28 EXPORTED BOOL ADMINAPI AfsAppLib_asc_AsidListAddEntry (LPASIDLIST *ppList, ASID idObject, LPARAM lp);
29 EXPORTED BOOL ADMINAPI AfsAppLib_asc_AsidListRemoveEntry (LPASIDLIST *ppList, ASID idObject);
30 EXPORTED BOOL ADMINAPI AfsAppLib_asc_AsidListRemoveEntryByIndex (LPASIDLIST *ppList, size_t iIndex);
31 EXPORTED BOOL ADMINAPI AfsAppLib_asc_AsidListSetEntryParam (LPASIDLIST *ppList, ASID idObject, LPARAM lp);
32 EXPORTED BOOL ADMINAPI AfsAppLib_asc_AsidListSetEntryParamByIndex (LPASIDLIST *ppList, size_t iIndex, LPARAM lp);
33 EXPORTED BOOL ADMINAPI AfsAppLib_asc_AsidListTest (LPASIDLIST *ppList, ASID idObject, LPARAM *pParam = NULL);
34 EXPORTED BOOL ADMINAPI AfsAppLib_asc_AsidListFree (LPASIDLIST *ppList);
35
36 EXPORTED BOOL ADMINAPI AfsAppLib_asc_ObjPropListCreate (LPASOBJPROPLIST *ppList);
37 EXPORTED BOOL ADMINAPI AfsAppLib_asc_ObjPropListCopy (LPASOBJPROPLIST *ppListTarget, LPASOBJPROPLIST *ppListSource);
38 EXPORTED BOOL ADMINAPI AfsAppLib_asc_ObjPropListAddEntry (LPASOBJPROPLIST *ppList, LPASOBJPROP pProperties, LPARAM lp);
39 EXPORTED BOOL ADMINAPI AfsAppLib_asc_ObjPropListRemoveEntry (LPASOBJPROPLIST *ppList, ASID idObject);
40 EXPORTED BOOL ADMINAPI AfsAppLib_asc_ObjPropListTest (LPASOBJPROPLIST *ppList, ASID idObject, LPASOBJPROP pProperties = NULL, LPARAM *pParam = NULL);
41 EXPORTED BOOL ADMINAPI AfsAppLib_asc_ObjPropListFree (LPASOBJPROPLIST *ppList);
42
43 EXPORTED BOOL ADMINAPI AfsAppLib_asc_ActionListCreate (LPASACTIONLIST *ppList);
44 EXPORTED BOOL ADMINAPI AfsAppLib_asc_ActionListCopy (LPASACTIONLIST *ppListTarget, LPASACTIONLIST *ppListSource);
45 EXPORTED BOOL ADMINAPI AfsAppLib_asc_ActionListAddEntry (LPASACTIONLIST *ppList, LPASACTION pAction);
46 EXPORTED BOOL ADMINAPI AfsAppLib_asc_ActionListRemoveEntry (LPASACTIONLIST *ppList, DWORD idAction);
47 EXPORTED BOOL ADMINAPI AfsAppLib_asc_ActionListTest (LPASACTIONLIST *ppList, DWORD idAction, LPASACTION pAction = NULL);
48 EXPORTED BOOL ADMINAPI AfsAppLib_asc_ActionListFree (LPASACTIONLIST *ppList);
49
50 EXPORTED BOOL ADMINAPI AfsAppLib_asc_AdminServerOpen (LPCTSTR pszAddress, DWORD *pidClient, ULONG *pStatus);
51 EXPORTED BOOL ADMINAPI AfsAppLib_asc_AdminServerClose (DWORD idClient, ULONG *pStatus);
52
53 EXPORTED BOOL ADMINAPI AfsAppLib_asc_CredentialsCrack (DWORD idClient, PVOID hCreds, LPTSTR pszCell, LPTSTR pszUser, SYSTEMTIME *pstExpiration, ULONG *pStatus);
54 EXPORTED PVOID ADMINAPI AfsAppLib_asc_CredentialsGet (DWORD idClient, LPCTSTR pszCell, ULONG *pStatus);
55 EXPORTED PVOID ADMINAPI AfsAppLib_asc_CredentialsSet (DWORD idClient, LPCTSTR pszCell, LPCTSTR pszUser, LPCTSTR pszPassword, ULONG *pStatus);
56 EXPORTED BOOL ADMINAPI AfsAppLib_asc_CredentialsPush (DWORD idClient, PVOID hCreds, ASID idCell, ULONG *pStatus);
57
58 EXPORTED BOOL ADMINAPI AfsAppLib_asc_LocalCellGet (DWORD idClient, LPTSTR pszCell, ULONG *pStatus);
59 EXPORTED BOOL ADMINAPI AfsAppLib_asc_ErrorCodeTranslate (DWORD idClient, ULONG code, LANGID idLanguage, STRING pszErrorText, ULONG *pStatus);
60
61 EXPORTED BOOL ADMINAPI AfsAppLib_asc_ActionGet (DWORD idClient, DWORD idAction, LPASACTION pAction, ULONG *pStatus);
62 EXPORTED BOOL ADMINAPI AfsAppLib_asc_ActionGetMultiple (DWORD idClient, DWORD idClientSearch, ASID idCellSearch, LPASACTIONLIST *ppList, ULONG *pStatus);
63 EXPORTED BOOL ADMINAPI AfsAppLib_asc_ActionListen (DWORD idClient, HWND hNotify, ULONG *pStatus);
64 EXPORTED BOOL ADMINAPI AfsAppLib_asc_ActionListenClear (DWORD idClient, HWND hNotify, ULONG *pStatus);
65
66 EXPORTED BOOL ADMINAPI AfsAppLib_asc_CellOpen (DWORD idClient, PVOID hCreds, LPCTSTR pszCell, DWORD dwScope, ASID *pidCell, ULONG *pStatus);
67 EXPORTED BOOL ADMINAPI AfsAppLib_asc_CellClose (DWORD idClient, ASID idCell, ULONG *pStatus);
68 EXPORTED BOOL ADMINAPI AfsAppLib_asc_CellChange (DWORD idClient, ASID idCell, LPAFSADMSVR_CHANGECELL_PARAMS pChange, ULONG *pStatus);
69 EXPORTED BOOL ADMINAPI AfsAppLib_asc_CellRefreshRateSet (DWORD idClient, ASID idCell, LONG cminRefreshRate, ULONG *pStatus);
70
71 EXPORTED BOOL ADMINAPI AfsAppLib_asc_ObjectFind (DWORD idClient, ASID idSearchScope, ASOBJTYPE ObjectType, LPCTSTR pszName, ASID *pidObject, ULONG *pStatus);
72 EXPORTED BOOL ADMINAPI AfsAppLib_asc_ObjectFindMultiple (DWORD idClient, ASID idSearchScope, ASOBJTYPE ObjectType, LPCTSTR pszPattern, LPAFSADMSVR_SEARCH_PARAMS pSearchParams, LPASIDLIST *ppList, ULONG *pStatus);
73 EXPORTED BOOL ADMINAPI AfsAppLib_asc_ObjectPropertiesGet (DWORD idClient, AFSADMSVR_GET_LEVEL GetLevel, ASID idCell, ASID idObject, LPASOBJPROP pProperties, ULONG *pStatus);
74 EXPORTED BOOL ADMINAPI AfsAppLib_asc_ObjectPropertiesGetMultiple (DWORD idClient, AFSADMSVR_GET_LEVEL GetLevel, ASID idCell, LPASIDLIST pAsidList, LPASOBJPROPLIST *ppPropertiesList, ULONG *pStatus);
75
76 EXPORTED BOOL ADMINAPI AfsAppLib_asc_ObjectListen (DWORD idClient, ASID idCell, ASID idObject, HWND hNotify, ULONG *pStatus);
77 EXPORTED BOOL ADMINAPI AfsAppLib_asc_ObjectListenClear (DWORD idClient, HWND hNotify, ULONG *pStatus);
78 EXPORTED BOOL ADMINAPI AfsAppLib_asc_ObjectListenMultiple (DWORD idClient, ASID idCell, LPASIDLIST pAsidList, HWND hNotify, ULONG *pStatus);
79
80 EXPORTED BOOL ADMINAPI AfsAppLib_asc_ObjectRefresh (DWORD idClient, ASID idCell, ASID idObject, ULONG *pStatus);
81 EXPORTED BOOL ADMINAPI AfsAppLib_asc_ObjectRefreshMultiple (DWORD idClient, ASID idCell, LPASIDLIST pAsidList, ULONG *pStatus);
82
83 EXPORTED BOOL ADMINAPI AfsAppLib_asc_RandomKeyGet (DWORD idClient, ASID idCell, PBYTE pkey, ULONG *pStatus);
84
85 EXPORTED BOOL ADMINAPI AfsAppLib_asc_CellNameGet_Fast (DWORD idClient, ASID idCell, LPTSTR pszCell, ULONG *pStatus = NULL);
86 EXPORTED BOOL ADMINAPI AfsAppLib_asc_ObjectNameGet_Fast (DWORD idClient, ASID idCell, ASID idObject, LPTSTR pszObject, ULONG *pStatus = NULL);
87 EXPORTED BOOL ADMINAPI AfsAppLib_asc_ObjectTypeGet_Fast (DWORD idClient, ASID idCell, ASID idObject, ASOBJTYPE *pObjectType, ULONG *pStatus = NULL);
88 EXPORTED BOOL ADMINAPI AfsAppLib_asc_ObjectPropertiesGet_Fast (DWORD idClient, ASID idCell, ASID idObject, LPASOBJPROP pProperties, ULONG *pStatus = NULL);
89
90 EXPORTED void ADMINAPI AfsAppLib_asc_Enter (void);
91 EXPORTED void ADMINAPI AfsAppLib_asc_Leave (void);
92 EXPORTED LPCRITICAL_SECTION ADMINAPI AfsAppLib_asc_GetCriticalSection (void);
93
94 EXPORTED BOOL ADMINAPI AfsAppLib_asc_UserChange (DWORD idClient, ASID idCell, ASID idUser, LPAFSADMSVR_CHANGEUSER_PARAMS pChange, ULONG *pStatus);
95 EXPORTED BOOL ADMINAPI AfsAppLib_asc_UserPasswordSet (DWORD idClient, ASID idCell, ASID idUser, int keyVersion, LPCTSTR pkeyString, PBYTE pkeyData, ULONG *pStatus);
96 EXPORTED BOOL ADMINAPI AfsAppLib_asc_UserUnlock (DWORD idClient, ASID idCell, ASID idUser, ULONG *pStatus);
97 EXPORTED BOOL ADMINAPI AfsAppLib_asc_UserCreate (DWORD idClient, ASID idCell, LPAFSADMSVR_CREATEUSER_PARAMS pCreate, ASID *pidUser, ULONG *pStatus);
98 EXPORTED BOOL ADMINAPI AfsAppLib_asc_UserDelete (DWORD idClient, ASID idCell, ASID idUser, LPAFSADMSVR_DELETEUSER_PARAMS pDelete, ULONG *pStatus);
99
100 EXPORTED BOOL ADMINAPI AfsAppLib_asc_GroupChange (DWORD idClient, ASID idCell, ASID idGroup, LPAFSADMSVR_CHANGEGROUP_PARAMS pChange, ULONG *pStatus);
101 EXPORTED BOOL ADMINAPI AfsAppLib_asc_GroupMembersGet (DWORD idClient, ASID idCell, ASID idGroup, LPASIDLIST *ppAsidList, ULONG *pStatus);
102 EXPORTED BOOL ADMINAPI AfsAppLib_asc_GroupMemberAdd (DWORD idClient, ASID idCell, ASID idGroup, ASID idMember, ULONG *pStatus);
103 EXPORTED BOOL ADMINAPI AfsAppLib_asc_GroupMemberRemove (DWORD idClient, ASID idCell, ASID idGroup, ASID idMember, ULONG *pStatus);
104 EXPORTED BOOL ADMINAPI AfsAppLib_asc_GroupRename (DWORD idClient, ASID idCell, ASID idGroup, LPCTSTR pszNewName, ULONG *pStatus);
105 EXPORTED BOOL ADMINAPI AfsAppLib_asc_GroupMembershipGet (DWORD idClient, ASID idCell, ASID idMember, LPASIDLIST *ppAsidList, ULONG *pStatus);
106 EXPORTED BOOL ADMINAPI AfsAppLib_asc_GroupOwnershipGet (DWORD idClient, ASID idCell, ASID idOwner, LPASIDLIST *ppAsidList, ULONG *pStatus);
107 EXPORTED BOOL ADMINAPI AfsAppLib_asc_GroupCreate (DWORD idClient, ASID idCell, LPAFSADMSVR_CREATEGROUP_PARAMS pCreate, ASID *pidGroup, ULONG *pStatus);
108 EXPORTED BOOL ADMINAPI AfsAppLib_asc_GroupDelete (DWORD idClient, ASID idCell, ASID idGroup, ULONG *pStatus);
109
110 /*
111  * Then, note that AfsAppLib remaps all the asc_* routines to call their
112  * AfsAppLib_ equivalents:
113  *
114  */
115
116 #ifndef EXPORT_AFSAPPLIB
117
118 #define asc_AsidListCreate AfsAppLib_asc_AsidListCreate
119 #define asc_AsidListCopy AfsAppLib_asc_AsidListCopy
120 #define asc_AsidListAddEntry AfsAppLib_asc_AsidListAddEntry
121 #define asc_AsidListRemoveEntry AfsAppLib_asc_AsidListRemoveEntry
122 #define asc_AsidListRemoveEntryByIndex AfsAppLib_asc_AsidListRemoveEntryByIndex
123 #define asc_AsidListSetEntryParam AfsAppLib_asc_AsidListSetEntryParam
124 #define asc_AsidListSetEntryParamByIndex AfsAppLib_asc_AsidListSetEntryParamByIndex
125 #define asc_AsidListTest AfsAppLib_asc_AsidListTest
126 #define asc_AsidListFree AfsAppLib_asc_AsidListFree
127
128 #define asc_ObjPropListCreate AfsAppLib_asc_ObjPropListCreate
129 #define asc_ObjPropListCopy AfsAppLib_asc_ObjPropListCopy
130 #define asc_ObjPropListAddEntry AfsAppLib_asc_ObjPropListAddEntry
131 #define asc_ObjPropListRemoveEntry AfsAppLib_asc_ObjPropListRemoveEntry
132 #define asc_ObjPropListTest AfsAppLib_asc_ObjPropListTest
133 #define asc_ObjPropListFree AfsAppLib_asc_ObjPropListFree
134
135 #define asc_ActionListCreate AfsAppLib_asc_ActionListCreate
136 #define asc_ActionListCopy AfsAppLib_asc_ActionListCopy
137 #define asc_ActionListAddEntry AfsAppLib_asc_ActionListAddEntry
138 #define asc_ActionListRemoveEntry AfsAppLib_asc_ActionListRemoveEntry
139 #define asc_ActionListTest AfsAppLib_asc_ActionListTest
140 #define asc_ActionListFree AfsAppLib_asc_ActionListFree
141
142 #define asc_AdminServerOpen AfsAppLib_asc_AdminServerOpen
143 #define asc_AdminServerClose AfsAppLib_asc_AdminServerClose
144
145 #define asc_CredentialsGet AfsAppLib_asc_CredentialsGet
146 #define asc_CredentialsSet AfsAppLib_asc_CredentialsSet
147 #define asc_CredentialsPush AfsAppLib_asc_CredentialsPush
148
149 #define asc_LocalCellGet AfsAppLib_asc_LocalCellGet
150 #define asc_ErrorCodeTranslate AfsAppLib_asc_ErrorCodeTranslate
151
152 #define asc_ActionGet AfsAppLib_asc_ActionGet
153 #define asc_ActionGetMultiple AfsAppLib_asc_ActionGetMultiple
154 #define asc_ActionListen AfsAppLib_asc_ActionListen
155 #define asc_ActionListenClear AfsAppLib_asc_ActionListenClear
156
157 #define asc_CellOpen AfsAppLib_asc_CellOpen
158 #define asc_CellClose AfsAppLib_asc_CellClose
159 #define asc_CellChange AfsAppLib_asc_CellChange
160 #define asc_CellRefreshRateSet AfsAppLib_asc_CellRefreshRateSet
161
162 #define asc_ObjectFind AfsAppLib_asc_ObjectFind
163 #define asc_ObjectFindMultiple AfsAppLib_asc_ObjectFindMultiple
164 #define asc_ObjectPropertiesGet AfsAppLib_asc_ObjectPropertiesGet
165 #define asc_ObjectPropertiesGetMultiple AfsAppLib_asc_ObjectPropertiesGetMultiple
166
167 #define asc_ObjectListen AfsAppLib_asc_ObjectListen
168 #define asc_ObjectListenClear AfsAppLib_asc_ObjectListenClear
169 #define asc_ObjectListenMultiple AfsAppLib_asc_ObjectListenMultiple
170
171 #define asc_ObjectRefresh AfsAppLib_asc_ObjectRefresh
172 #define asc_ObjectRefreshMultiple AfsAppLib_asc_ObjectRefreshMultiple
173
174 #define asc_RandomKeyGet AfsAppLib_asc_RandomKeyGet
175
176 #define asc_CellNameGet_Fast AfsAppLib_asc_CellNameGet_Fast
177 #define asc_ObjectNameGet_Fast AfsAppLib_asc_ObjectNameGet_Fast
178 #define asc_ObjectTypeGet_Fast AfsAppLib_asc_ObjectTypeGet_Fast
179 #define asc_ObjectPropertiesGet_Fast AfsAppLib_asc_ObjectPropertiesGet_Fast
180
181 #define asc_Enter AfsAppLib_asc_Enter
182 #define asc_Leave AfsAppLib_asc_Leave
183 #define asc_GetCriticalSection AfsAppLib_asc_GetCriticalSection
184
185 #define asc_UserChange AfsAppLib_asc_UserChange
186 #define asc_UserPasswordSet AfsAppLib_asc_UserPasswordSet
187 #define asc_UserUnlock AfsAppLib_asc_UserUnlock
188 #define asc_UserCreate AfsAppLib_asc_UserCreate
189 #define asc_UserDelete AfsAppLib_asc_UserDelete
190
191 #define asc_GroupChange AfsAppLib_asc_GroupChange
192 #define asc_GroupMembersGet AfsAppLib_asc_GroupMembersGet
193 #define asc_GroupMemberAdd AfsAppLib_asc_GroupMemberAdd
194 #define asc_GroupMemberRemove AfsAppLib_asc_GroupMemberRemove
195 #define asc_GroupRename AfsAppLib_asc_GroupRename
196 #define asc_GroupOwnershipGet AfsAppLib_asc_GroupOwnershipGet
197 #define asc_GroupMembershipGet AfsAppLib_asc_GroupMembershipGet
198 #define asc_GroupCreate AfsAppLib_asc_GroupCreate
199 #define asc_GroupDelete AfsAppLib_asc_GroupDelete
200
201 #endif // EXPORT_AFSAPPLIB
202
203 #endif // AL_ADMSVR_H
204