home *** CD-ROM | disk | FTP | other *** search
/ C Programming Starter Kit 2.0 / SamsPublishing-CProgrammingStarterKit-v2.0-Win31.iso / bc45 / msinc.pak / LMREPL.H < prev    next >
C/C++ Source or Header  |  1997-07-23  |  7KB  |  301 lines

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