Standardize License information
[openafs.git] / src / WINNT / afsapplib / al_dynlink.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_DYNLINK_H
11 #define AL_DYNLINK_H
12
13 extern "C" {
14 #include <afs/afs_Admin.h>
15 #include <afs/afs_utilAdmin.h>
16 #include <afs/afs_kasAdmin.h>
17 #include <afs/afs_clientAdmin.h>
18 } // extern "C"
19
20
21 /*
22  * PROTOTYPES _________________________________________________________________
23  *
24  */
25
26 BOOL OpenUtilLibrary (ULONG *pStatus = NULL);
27 void CloseUtilLibrary (void);
28
29 BOOL OpenKasLibrary (ULONG *pStatus = NULL);
30 void CloseKasLibrary (void);
31
32 BOOL OpenClientLibrary (ULONG *pStatus = NULL);
33 void CloseClientLibrary (void);
34
35
36 /*
37  * INTERFACES _________________________________________________________________
38  *
39  */
40
41 typedef int (ADMINAPI *util_AdminErrorCodeTranslate_t)(afs_status_t errorCode, int langId, const char **errorTextP, afs_status_p st);
42
43 typedef int (ADMINAPI *kas_PrincipalGetBegin_t)(const void *cellHandle, const void *serverHandle, void **iterationIdP, afs_status_p st);
44 typedef int (ADMINAPI *kas_PrincipalGetNext_t)(const void *iterationId, kas_identity_p who, afs_status_p st);
45 typedef int (ADMINAPI *kas_PrincipalGetDone_t)(const void *iterationIdP, afs_status_p st);
46 typedef int (ADMINAPI *kas_PrincipalGet_t) (const void *cellHandle, const void *serverHandle, const kas_identity_p who, kas_principalEntry_p principal, afs_status_p st);
47
48 typedef int (ADMINAPI *afsclient_TokenGetExisting_t)(const char *cellName, void **tokenHandle, afs_status_p st);
49 typedef int (ADMINAPI *afsclient_TokenGetNew_t)(const char *cellName, const char *principal, const char *password, void **tokenHandle, afs_status_p st);
50 typedef int (ADMINAPI *afsclient_TokenClose_t)(const void *tokenHandle, afs_status_p st);
51 typedef int (ADMINAPI *afsclient_TokenQuery_t)(void *tokenHandle, unsigned long *expirationDateP, char *principal, char *identity, char *cellName, int *bHasKasTokenP, afs_status_p st);
52 typedef int (ADMINAPI *afsclient_CellOpen_t)(const char *cellName, const void *tokenHandle, void **cellHandleP, afs_status_p st);
53 typedef int (ADMINAPI *afsclient_CellClose_t)(const void *cellHandle, afs_status_p st);
54 typedef int (ADMINAPI *afsclient_LocalCellGet_t)(char *cellName, afs_status_p st);
55
56
57 extern util_AdminErrorCodeTranslate_t util_AdminErrorCodeTranslateP;
58
59 extern kas_PrincipalGetBegin_t kas_PrincipalGetBeginP;
60 extern kas_PrincipalGetNext_t kas_PrincipalGetNextP;
61 extern kas_PrincipalGetDone_t kas_PrincipalGetDoneP;
62 extern kas_PrincipalGet_t kas_PrincipalGetP;
63
64 extern afsclient_TokenGetExisting_t afsclient_TokenGetExistingP;
65 extern afsclient_TokenGetNew_t afsclient_TokenGetNewP;
66 extern afsclient_TokenClose_t afsclient_TokenCloseP;
67 extern afsclient_TokenQuery_t afsclient_TokenQueryP;
68 extern afsclient_CellOpen_t afsclient_CellOpenP;
69 extern afsclient_CellClose_t afsclient_CellCloseP;
70 extern afsclient_LocalCellGet_t afsclient_LocalCellGetP;
71
72
73 #define util_AdminErrorCodeTranslate (*util_AdminErrorCodeTranslateP)
74
75 #define kas_PrincipalGetBegin (*kas_PrincipalGetBeginP)
76 #define kas_PrincipalGetNext (*kas_PrincipalGetNextP)
77 #define kas_PrincipalGetDone (*kas_PrincipalGetDoneP)
78 #define kas_PrincipalGet (*kas_PrincipalGetP)
79
80 #define afsclient_TokenGetExisting (*afsclient_TokenGetExistingP)
81 #define afsclient_TokenGetNew (*afsclient_TokenGetNewP)
82 #define afsclient_TokenClose (*afsclient_TokenCloseP)
83 #define afsclient_TokenQuery (*afsclient_TokenQueryP)
84 #define afsclient_CellOpen (*afsclient_CellOpenP)
85 #define afsclient_CellClose (*afsclient_CellCloseP)
86 #define afsclient_LocalCellGet (*afsclient_LocalCellGetP)
87
88 #endif
89