|
|
1.1 root 1: /*++ BUILD Version: 0004 // Increment this if a change has global effects
2:
3: Copyright (c) 1991-1993 Microsoft Corporation
4:
5: Module Name:
6:
7: LmRepl.h
8:
9: Abstract:
10:
11: This file contains structures, function prototypes, and definitions
12: for the replicator APIs.
13:
14: Author:
15:
16: John Rogers (JohnRo) 17-Dec-1991
17:
18: Environment:
19:
20: User Mode - Win32
21: Portable to any flat, 32-bit environment. (Uses Win32 typedefs.)
22: Requires ANSI C extensions: slash-slash comments, long external names.
23:
24: Notes:
25:
26: You must include LmCons.h before this file.
27:
28: Revision History:
29:
30: 17-Dec-1991 JohnRo
31: Created from RitaW's replicator API spec.
32: 26-Dec-1991 JohnRo
33: Added REPL_EDIR_INFO_2 and subsetted REPL_EDIR_INFO_1.
34: Added INFOLEVEL equates.
35: Changed values of REPL_EXTENT_FILE and REPL_EXTENT_TREE.
36: 07-Jan-1992 JohnRo
37: Corrected typedef name (LPREPL_INFO_100 s.b. LPREPL_INFO_0).
38: 24-Jan-1992 JohnRo
39: Changed to use LPTSTR etc.
40: 27-Feb-1992 JohnRo
41: Changed state not started to state never replicated.
42:
43: --*/
44:
45: #ifndef _LMREPL_
46: #define _LMREPL_
47:
48: #ifdef __cplusplus
49: extern "C" {
50: #endif
51:
52: //
53: // Replicator Configuration APIs
54: //
55:
56: #define REPL_ROLE_EXPORT 1
57: #define REPL_ROLE_IMPORT 2
58: #define REPL_ROLE_BOTH 3
59:
60:
61: #define REPL_INTERVAL_INFOLEVEL (PARMNUM_BASE_INFOLEVEL + 0)
62: #define REPL_PULSE_INFOLEVEL (PARMNUM_BASE_INFOLEVEL + 1)
63: #define REPL_GUARDTIME_INFOLEVEL (PARMNUM_BASE_INFOLEVEL + 2)
64: #define REPL_RANDOM_INFOLEVEL (PARMNUM_BASE_INFOLEVEL + 3)
65:
66:
67: typedef struct _REPL_INFO_0 {
68: DWORD rp0_role;
69: LPTSTR rp0_exportpath;
70: LPTSTR rp0_exportlist;
71: LPTSTR rp0_importpath;
72: LPTSTR rp0_importlist;
73: LPTSTR rp0_logonusername;
74: DWORD rp0_interval;
75: DWORD rp0_pulse;
76: DWORD rp0_guardtime;
77: DWORD rp0_random;
78: } REPL_INFO_0, *PREPL_INFO_0, *LPREPL_INFO_0;
79:
80: typedef struct _REPL_INFO_1000 {
81: DWORD rp1000_interval;
82: } REPL_INFO_1000, *PREPL_INFO_1000, *LPREPL_INFO_1000;
83:
84: typedef struct _REPL_INFO_1001 {
85: DWORD rp1001_pulse;
86: } REPL_INFO_1001, *PREPL_INFO_1001, *LPREPL_INFO_1001;
87:
88: typedef struct _REPL_INFO_1002 {
89: DWORD rp1002_guardtime;
90: } REPL_INFO_1002, *PREPL_INFO_1002, *LPREPL_INFO_1002;
91:
92: typedef struct _REPL_INFO_1003 {
93: DWORD rp1003_random;
94: } REPL_INFO_1003, *PREPL_INFO_1003, *LPREPL_INFO_1003;
95:
96:
97: NET_API_STATUS NET_API_FUNCTION
98: NetReplGetInfo (
99: IN LPTSTR servername OPTIONAL,
100: IN DWORD level,
101: OUT LPBYTE * bufptr
102: );
103:
104: NET_API_STATUS NET_API_FUNCTION
105: NetReplSetInfo (
106: IN LPTSTR servername OPTIONAL,
107: IN DWORD level,
108: IN LPBYTE buf,
109: OUT LPDWORD parm_err OPTIONAL
110: );
111:
112:
113: //
114: // Replicator Export Directory APIs
115: //
116:
117: #define REPL_INTEGRITY_FILE 1
118: #define REPL_INTEGRITY_TREE 2
119:
120:
121: #define REPL_EXTENT_FILE 1
122: #define REPL_EXTENT_TREE 2
123:
124:
125: #define REPL_EXPORT_INTEGRITY_INFOLEVEL (PARMNUM_BASE_INFOLEVEL + 0)
126: #define REPL_EXPORT_EXTENT_INFOLEVEL (PARMNUM_BASE_INFOLEVEL + 1)
127:
128:
129: typedef struct _REPL_EDIR_INFO_0 {
130: LPTSTR rped0_dirname;
131: } REPL_EDIR_INFO_0, *PREPL_EDIR_INFO_0, *LPREPL_EDIR_INFO_0;
132:
133: typedef struct _REPL_EDIR_INFO_1 {
134: LPTSTR rped1_dirname;
135: DWORD rped1_integrity;
136: DWORD rped1_extent;
137: } REPL_EDIR_INFO_1, *PREPL_EDIR_INFO_1, *LPREPL_EDIR_INFO_1;
138:
139: typedef struct _REPL_EDIR_INFO_2 {
140: LPTSTR rped2_dirname;
141: DWORD rped2_integrity;
142: DWORD rped2_extent;
143: DWORD rped2_lockcount;
144: DWORD rped2_locktime;
145: } REPL_EDIR_INFO_2, *PREPL_EDIR_INFO_2, *LPREPL_EDIR_INFO_2;
146:
147: typedef struct _REPL_EDIR_INFO_1000 {
148: DWORD rped1000_integrity;
149: } REPL_EDIR_INFO_1000, *PREPL_EDIR_INFO_1000, *LPREPL_EDIR_INFO_1000;
150:
151: typedef struct _REPL_EDIR_INFO_1001 {
152: DWORD rped1001_extent;
153: } REPL_EDIR_INFO_1001, *PREPL_EDIR_INFO_1001, *LPREPL_EDIR_INFO_1001;
154:
155:
156: NET_API_STATUS NET_API_FUNCTION
157: NetReplExportDirAdd (
158: IN LPTSTR servername OPTIONAL,
159: IN DWORD level,
160: IN LPBYTE buf,
161: OUT LPDWORD parm_err OPTIONAL
162: );
163:
164: NET_API_STATUS NET_API_FUNCTION
165: NetReplExportDirDel (
166: IN LPTSTR servername OPTIONAL,
167: IN LPTSTR dirname
168: );
169:
170: NET_API_STATUS NET_API_FUNCTION
171: NetReplExportDirEnum (
172: IN LPTSTR servername OPTIONAL,
173: IN DWORD level,
174: OUT LPBYTE * bufptr,
175: IN DWORD prefmaxlen,
176: OUT LPDWORD entriesread,
177: OUT LPDWORD totalentries,
178: IN OUT LPDWORD resumehandle OPTIONAL
179: );
180:
181: NET_API_STATUS NET_API_FUNCTION
182: NetReplExportDirGetInfo (
183: IN LPTSTR servername OPTIONAL,
184: IN LPTSTR dirname,
185: IN DWORD level,
186: OUT LPBYTE * bufptr
187: );
188:
189: NET_API_STATUS NET_API_FUNCTION
190: NetReplExportDirSetInfo (
191: IN LPTSTR servername OPTIONAL,
192: IN LPTSTR dirname,
193: IN DWORD level,
194: IN LPBYTE buf,
195: OUT LPDWORD parm_err OPTIONAL
196: );
197:
198: NET_API_STATUS NET_API_FUNCTION
199: NetReplExportDirLock (
200: IN LPTSTR servername OPTIONAL,
201: IN LPTSTR dirname
202: );
203:
204: NET_API_STATUS NET_API_FUNCTION
205: NetReplExportDirUnlock (
206: IN LPTSTR servername OPTIONAL,
207: IN LPTSTR dirname,
208: IN DWORD unlockforce
209: );
210:
211:
212: #define REPL_UNLOCK_NOFORCE 0
213: #define REPL_UNLOCK_FORCE 1
214:
215:
216: //
217: // Replicator Import Directory APIs
218: //
219:
220:
221: typedef struct _REPL_IDIR_INFO_0 {
222: LPTSTR rpid0_dirname;
223: } REPL_IDIR_INFO_0, *PREPL_IDIR_INFO_0, *LPREPL_IDIR_INFO_0;
224:
225: typedef struct _REPL_IDIR_INFO_1 {
226: LPTSTR rpid1_dirname;
227: DWORD rpid1_state;
228: LPTSTR rpid1_mastername;
229: DWORD rpid1_last_update_time;
230: DWORD rpid1_lockcount;
231: DWORD rpid1_locktime;
232: } REPL_IDIR_INFO_1, *PREPL_IDIR_INFO_1, *LPREPL_IDIR_INFO_1;
233:
234:
235: NET_API_STATUS NET_API_FUNCTION
236: NetReplImportDirAdd (
237: IN LPTSTR servername OPTIONAL,
238: IN DWORD level,
239: IN LPBYTE buf,
240: OUT LPDWORD parm_err OPTIONAL
241: );
242:
243: NET_API_STATUS NET_API_FUNCTION
244: NetReplImportDirDel (
245: IN LPTSTR servername OPTIONAL,
246: IN LPTSTR dirname
247: );
248:
249: NET_API_STATUS NET_API_FUNCTION
250: NetReplImportDirEnum (
251: IN LPTSTR servername OPTIONAL,
252: IN DWORD level,
253: OUT LPBYTE * bufptr,
254: IN DWORD prefmaxlen,
255: OUT LPDWORD entriesread,
256: OUT LPDWORD totalentries,
257: IN OUT LPDWORD resumehandle OPTIONAL
258: );
259:
260: NET_API_STATUS NET_API_FUNCTION
261: NetReplImportDirGetInfo (
262: IN LPTSTR servername OPTIONAL,
263: IN LPTSTR dirname,
264: IN DWORD level,
265: OUT LPBYTE * bufptr
266: );
267:
268: NET_API_STATUS NET_API_FUNCTION
269: NetReplImportDirLock (
270: IN LPTSTR servername OPTIONAL,
271: IN LPTSTR dirname
272: );
273:
274:
275: NET_API_STATUS NET_API_FUNCTION
276: NetReplImportDirUnlock (
277: IN LPTSTR servername OPTIONAL,
278: IN LPTSTR dirname,
279: IN DWORD unlockforce
280: );
281:
282:
283: #define REPL_STATE_OK 0
284: #define REPL_STATE_NO_MASTER 1
285: #define REPL_STATE_NO_SYNC 2
286: #define REPL_STATE_NEVER_REPLICATED 3
287:
288:
289: #ifdef __cplusplus
290: }
291: #endif
292:
293: #endif //_LMREPL_
This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.