Update NEWS for 1.6.22
[pkg-k5-afs_openafs.git] / src / WINNT / afsapplib / al_admsvr.h
blobd77449dc04edfdb0353f1d988e4bc697749e6d4c
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 AL_ADMSVR_H
11 #define AL_ADMSVR_H
14 * ADMIN SERVER INTERFACE _____________________________________________________
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.
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.
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.
31 * First, note that AfsAppLib exposes its own wrappers for its .LIB:
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);
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);
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);
59 EXPORTED BOOL ADMINAPI AfsAppLib_asc_AdminServerOpen (LPCTSTR pszAddress, UINT_PTR *pidClient, ULONG *pStatus);
60 EXPORTED BOOL ADMINAPI AfsAppLib_asc_AdminServerClose (UINT_PTR idClient, ULONG *pStatus);
62 EXPORTED BOOL ADMINAPI AfsAppLib_asc_CredentialsCrack (UINT_PTR idClient, PVOID hCreds, LPTSTR pszCell, LPTSTR pszUser, SYSTEMTIME *pstExpiration, ULONG *pStatus);
63 EXPORTED UINT_PTR ADMINAPI AfsAppLib_asc_CredentialsGet (UINT_PTR idClient, LPCTSTR pszCell, ULONG *pStatus);
64 EXPORTED UINT_PTR ADMINAPI AfsAppLib_asc_CredentialsSet (UINT_PTR idClient, LPCTSTR pszCell, LPCTSTR pszUser, LPCTSTR pszPassword, ULONG *pStatus);
65 EXPORTED BOOL ADMINAPI AfsAppLib_asc_CredentialsPush (UINT_PTR idClient, PVOID hCreds, ASID idCell, ULONG *pStatus);
67 EXPORTED BOOL ADMINAPI AfsAppLib_asc_LocalCellGet (UINT_PTR idClient, LPTSTR pszCell, ULONG *pStatus);
68 EXPORTED BOOL ADMINAPI AfsAppLib_asc_ErrorCodeTranslate (UINT_PTR idClient, ULONG code, LANGID idLanguage, STRING pszErrorText, ULONG *pStatus);
70 EXPORTED BOOL ADMINAPI AfsAppLib_asc_ActionGet (UINT_PTR idClient, DWORD idAction, LPASACTION pAction, ULONG *pStatus);
71 EXPORTED BOOL ADMINAPI AfsAppLib_asc_ActionGetMultiple (UINT_PTR idClient, UINT_PTR idClientSearch, ASID idCellSearch, LPASACTIONLIST *ppList, ULONG *pStatus);
72 EXPORTED BOOL ADMINAPI AfsAppLib_asc_ActionListen (UINT_PTR idClient, HWND hNotify, ULONG *pStatus);
73 EXPORTED BOOL ADMINAPI AfsAppLib_asc_ActionListenClear (UINT_PTR idClient, HWND hNotify, ULONG *pStatus);
75 EXPORTED BOOL ADMINAPI AfsAppLib_asc_CellOpen (UINT_PTR idClient, PVOID hCreds, LPCTSTR pszCell, DWORD dwScope, ASID *pidCell, ULONG *pStatus);
76 EXPORTED BOOL ADMINAPI AfsAppLib_asc_CellClose (UINT_PTR idClient, ASID idCell, ULONG *pStatus);
77 EXPORTED BOOL ADMINAPI AfsAppLib_asc_CellChange (UINT_PTR idClient, ASID idCell, LPAFSADMSVR_CHANGECELL_PARAMS pChange, ULONG *pStatus);
78 EXPORTED BOOL ADMINAPI AfsAppLib_asc_CellRefreshRateSet (UINT_PTR idClient, ASID idCell, LONG cminRefreshRate, ULONG *pStatus);
80 EXPORTED BOOL ADMINAPI AfsAppLib_asc_ObjectFind (UINT_PTR idClient, ASID idSearchScope, ASOBJTYPE ObjectType, LPCTSTR pszName, ASID *pidObject, ULONG *pStatus);
81 EXPORTED BOOL ADMINAPI AfsAppLib_asc_ObjectFindMultiple (UINT_PTR idClient, ASID idSearchScope, ASOBJTYPE ObjectType, LPCTSTR pszPattern, LPAFSADMSVR_SEARCH_PARAMS pSearchParams, LPASIDLIST *ppList, ULONG *pStatus);
82 EXPORTED BOOL ADMINAPI AfsAppLib_asc_ObjectPropertiesGet (UINT_PTR idClient, AFSADMSVR_GET_LEVEL GetLevel, ASID idCell, ASID idObject, LPASOBJPROP pProperties, ULONG *pStatus);
83 EXPORTED BOOL ADMINAPI AfsAppLib_asc_ObjectPropertiesGetMultiple (UINT_PTR idClient, AFSADMSVR_GET_LEVEL GetLevel, ASID idCell, LPASIDLIST pAsidList, LPASOBJPROPLIST *ppPropertiesList, ULONG *pStatus);
85 EXPORTED BOOL ADMINAPI AfsAppLib_asc_ObjectListen (UINT_PTR idClient, ASID idCell, ASID idObject, HWND hNotify, ULONG *pStatus);
86 EXPORTED BOOL ADMINAPI AfsAppLib_asc_ObjectListenClear (UINT_PTR idClient, HWND hNotify, ULONG *pStatus);
87 EXPORTED BOOL ADMINAPI AfsAppLib_asc_ObjectListenMultiple (UINT_PTR idClient, ASID idCell, LPASIDLIST pAsidList, HWND hNotify, ULONG *pStatus);
89 EXPORTED BOOL ADMINAPI AfsAppLib_asc_ObjectRefresh (UINT_PTR idClient, ASID idCell, ASID idObject, ULONG *pStatus);
90 EXPORTED BOOL ADMINAPI AfsAppLib_asc_ObjectRefreshMultiple (UINT_PTR idClient, ASID idCell, LPASIDLIST pAsidList, ULONG *pStatus);
92 EXPORTED BOOL ADMINAPI AfsAppLib_asc_RandomKeyGet (UINT_PTR idClient, ASID idCell, PBYTE pkey, ULONG *pStatus);
94 EXPORTED BOOL ADMINAPI AfsAppLib_asc_CellNameGet_Fast (UINT_PTR idClient, ASID idCell, LPTSTR pszCell, ULONG *pStatus = NULL);
95 EXPORTED BOOL ADMINAPI AfsAppLib_asc_ObjectNameGet_Fast (UINT_PTR idClient, ASID idCell, ASID idObject, LPTSTR pszObject, ULONG *pStatus = NULL);
96 EXPORTED BOOL ADMINAPI AfsAppLib_asc_ObjectTypeGet_Fast (UINT_PTR idClient, ASID idCell, ASID idObject, ASOBJTYPE *pObjectType, ULONG *pStatus = NULL);
97 EXPORTED BOOL ADMINAPI AfsAppLib_asc_ObjectPropertiesGet_Fast (UINT_PTR idClient, ASID idCell, ASID idObject, LPASOBJPROP pProperties, ULONG *pStatus = NULL);
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);
103 EXPORTED BOOL ADMINAPI AfsAppLib_asc_UserChange (UINT_PTR idClient, ASID idCell, ASID idUser, LPAFSADMSVR_CHANGEUSER_PARAMS pChange, ULONG *pStatus);
104 EXPORTED BOOL ADMINAPI AfsAppLib_asc_UserPasswordSet (UINT_PTR idClient, ASID idCell, ASID idUser, int keyVersion, LPCTSTR pkeyString, PBYTE pkeyData, ULONG *pStatus);
105 EXPORTED BOOL ADMINAPI AfsAppLib_asc_UserUnlock (UINT_PTR idClient, ASID idCell, ASID idUser, ULONG *pStatus);
106 EXPORTED BOOL ADMINAPI AfsAppLib_asc_UserCreate (UINT_PTR idClient, ASID idCell, LPAFSADMSVR_CREATEUSER_PARAMS pCreate, ASID *pidUser, ULONG *pStatus);
107 EXPORTED BOOL ADMINAPI AfsAppLib_asc_UserDelete (UINT_PTR idClient, ASID idCell, ASID idUser, LPAFSADMSVR_DELETEUSER_PARAMS pDelete, ULONG *pStatus);
109 EXPORTED BOOL ADMINAPI AfsAppLib_asc_GroupChange (UINT_PTR idClient, ASID idCell, ASID idGroup, LPAFSADMSVR_CHANGEGROUP_PARAMS pChange, ULONG *pStatus);
110 EXPORTED BOOL ADMINAPI AfsAppLib_asc_GroupMembersGet (UINT_PTR idClient, ASID idCell, ASID idGroup, LPASIDLIST *ppAsidList, ULONG *pStatus);
111 EXPORTED BOOL ADMINAPI AfsAppLib_asc_GroupMemberAdd (UINT_PTR idClient, ASID idCell, ASID idGroup, ASID idMember, ULONG *pStatus);
112 EXPORTED BOOL ADMINAPI AfsAppLib_asc_GroupMemberRemove (UINT_PTR idClient, ASID idCell, ASID idGroup, ASID idMember, ULONG *pStatus);
113 EXPORTED BOOL ADMINAPI AfsAppLib_asc_GroupRename (UINT_PTR idClient, ASID idCell, ASID idGroup, LPCTSTR pszNewName, ULONG *pStatus);
114 EXPORTED BOOL ADMINAPI AfsAppLib_asc_GroupMembershipGet (UINT_PTR idClient, ASID idCell, ASID idMember, LPASIDLIST *ppAsidList, ULONG *pStatus);
115 EXPORTED BOOL ADMINAPI AfsAppLib_asc_GroupOwnershipGet (UINT_PTR idClient, ASID idCell, ASID idOwner, LPASIDLIST *ppAsidList, ULONG *pStatus);
116 EXPORTED BOOL ADMINAPI AfsAppLib_asc_GroupCreate (UINT_PTR idClient, ASID idCell, LPAFSADMSVR_CREATEGROUP_PARAMS pCreate, ASID *pidGroup, ULONG *pStatus);
117 EXPORTED BOOL ADMINAPI AfsAppLib_asc_GroupDelete (UINT_PTR idClient, ASID idCell, ASID idGroup, ULONG *pStatus);
120 * Then, note that AfsAppLib remaps all the asc_* routines to call their
121 * AfsAppLib_ equivalents:
125 #ifndef EXPORT_AFSAPPLIB
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
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
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
151 #define asc_AdminServerOpen AfsAppLib_asc_AdminServerOpen
152 #define asc_AdminServerClose AfsAppLib_asc_AdminServerClose
154 #define asc_CredentialsGet AfsAppLib_asc_CredentialsGet
155 #define asc_CredentialsSet AfsAppLib_asc_CredentialsSet
156 #define asc_CredentialsPush AfsAppLib_asc_CredentialsPush
158 #define asc_LocalCellGet AfsAppLib_asc_LocalCellGet
159 #define asc_ErrorCodeTranslate AfsAppLib_asc_ErrorCodeTranslate
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
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
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
176 #define asc_ObjectListen AfsAppLib_asc_ObjectListen
177 #define asc_ObjectListenClear AfsAppLib_asc_ObjectListenClear
178 #define asc_ObjectListenMultiple AfsAppLib_asc_ObjectListenMultiple
180 #define asc_ObjectRefresh AfsAppLib_asc_ObjectRefresh
181 #define asc_ObjectRefreshMultiple AfsAppLib_asc_ObjectRefreshMultiple
183 #define asc_RandomKeyGet AfsAppLib_asc_RandomKeyGet
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
190 #define asc_Enter AfsAppLib_asc_Enter
191 #define asc_Leave AfsAppLib_asc_Leave
192 #define asc_GetCriticalSection AfsAppLib_asc_GetCriticalSection
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
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
210 #endif // EXPORT_AFSAPPLIB
212 #endif // AL_ADMSVR_H