Source code of Windows XP (NT5)
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

293 lines
6.8 KiB

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