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