home *** CD-ROM | disk | FTP | other *** search
/ QBasic & Borland Pascal & C / Delphi5.iso / C / BC_502 / RTLWIN32.PAK / LMREPL.H < prev    next >
Encoding:
C/C++ Source or Header  |  1997-05-06  |  6.6 KB  |  280 lines

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