home *** CD-ROM | disk | FTP | other *** search
/ PC Plus SuperCD (UK) 2000 May / PCP163A.iso / Runimage / Cbuilder4 / Include / LMREPL.H < prev    next >
Encoding:
C/C++ Source or Header  |  1999-01-26  |  6.6 KB  |  278 lines

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