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.

275 lines
6.3 KiB

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