Leaked source code of windows server 2003
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.

279 lines
6.6 KiB

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