59e8b5ab48037d31c7e4c0ee80501cd067ad52bf
[openafs.git] / src / WINNT / afsclass / afsclass.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 AFSCLASS_H
11 #define AFSCLASS_H
12
13 #include <WINNT/afsapplib.h>
14
15
16 /*
17  * DEFINITIONS ________________________________________________________________
18  *
19  */
20
21 #define cchNAME   256
22
23 #define GHOST_HAS_VLDB_ENTRY   0x01
24 #define GHOST_HAS_SERVER_ENTRY 0x02
25 #define GHOST_HAS_KAS_ENTRY    0x04
26 #define GHOST_HAS_PTS_ENTRY    0x08
27 #define GHOST_HAS_ALL_ENTRIES  (GHOST_HAS_VLDB_ENTRY | GHOST_HAS_SERVER_ENTRY)
28
29 #define AFSCLASS_WANT_VOLUMES  0x00000001
30 #define AFSCLASS_WANT_USERS    0x00000002
31
32
33 /*
34  * TYPEDEFS ___________________________________________________________________
35  *
36  */
37
38 typedef enum ACCOUNTACCESS
39    {
40    aaOWNER_ONLY,
41    aaGROUP_ONLY,
42    aaANYONE,
43    } ACCOUNTACCESS;
44
45 typedef LPENUMERATION HENUM;
46
47 typedef unsigned int VOLUMEID, *LPVOLUMEID;
48
49 typedef class NOTIFYCALLBACK NOTIFYCALLBACK, *LPNOTIFYCALLBACK;
50
51 typedef class CELL      CELL,      *LPCELL;
52 typedef class SERVER    SERVER,    *LPSERVER;
53 typedef class SERVICE   SERVICE,   *LPSERVICE;
54 typedef class AGGREGATE AGGREGATE, *LPAGGREGATE;
55 typedef class FILESET   FILESET,   *LPFILESET;
56 typedef class USER      USER,      *LPUSER;
57 typedef class PTSGROUP  PTSGROUP,  *LPPTSGROUP;
58 typedef class IDENT     IDENT,     *LPIDENT;
59 typedef class IDENTLIST IDENTLIST, *LPIDENTLIST;
60
61
62 /*
63  * INCLUSIONS _________________________________________________________________
64  *
65  */
66
67 #include <WINNT/c_debug.h>      // debugging utility functions
68 #include <WINNT/c_notify.h>     // NOTIFYCALLBACK class
69 #include <WINNT/c_ident.h>      // IDENT class
70 #include <WINNT/c_identlist.h>  // IDENTLIST class
71 #include <WINNT/c_cell.h>       // CELL class
72 #include <WINNT/c_svr.h>        // SERVER class
73 #include <WINNT/c_svc.h>        // SERVICE class
74 #include <WINNT/c_agg.h>        // AGGREGATE class
75 #include <WINNT/c_set.h>        // FILESET class
76 #include <WINNT/c_usr.h>        // USER class
77 #include <WINNT/c_grp.h>        // PTSGROUP class
78
79 #include <WINNT/afsclassfn.h>   // AfsClass_* cell-manipulation routines
80
81
82 /*
83  * PROTOTYPES _________________________________________________________________
84  *
85  */
86
87 BOOL AfsClass_Initialize (ULONG *pStatus = NULL);
88
89 void AfsClass_SpecifyRefreshDomain (DWORD dwWant); // AFSCLASS_WANT_*
90
91 void AfsClass_Enter (void);
92 void AfsClass_Leave (void);
93 int AfsClass_GetEnterCount (void);
94
95 void AfsClass_RequestLongServerNames (BOOL fWantLongNames);
96
97 void AfsClass_UnixTimeToSystemTime (LPSYSTEMTIME pst, ULONG ut, BOOL fElapsed = FALSE);
98 ULONG AfsClass_SystemTimeToUnixTime (LPSYSTEMTIME pst);
99
100 #ifndef REALLOC
101 #define REALLOC(_a,_c,_r,_i) AfsClass_ReallocFunction ((LPVOID*)&_a,sizeof(*_a),&_c,_r,_i)
102 BOOL AfsClass_ReallocFunction (LPVOID *ppTarget, size_t cbElement, size_t *pcTarget, size_t cReq, size_t cInc);
103 #endif
104
105 void AfsClass_SkipRefresh (int idSection); // ID from evtRefreshAllSectionStart
106
107 void AfsClass_IntToAddress (LPSOCKADDR_IN pAddr, int IntAddr);
108 void AfsClass_AddressToInt (int *pIntAddr, LPSOCKADDR_IN pAddr);
109
110
111 #endif
112