1 /** 2 * @file lmrepl.h 3 * Copyright 2012, 2013 MinGW.org project 4 * 5 * Permission is hereby granted, free of charge, to any person obtaining a 6 * copy of this software and associated documentation files (the "Software"), 7 * to deal in the Software without restriction, including without limitation 8 * the rights to use, copy, modify, merge, publish, distribute, sublicense, 9 * and/or sell copies of the Software, and to permit persons to whom the 10 * Software is furnished to do so, subject to the following conditions: 11 * 12 * The above copyright notice and this permission notice (including the next 13 * paragraph) shall be included in all copies or substantial portions of the 14 * Software. 15 * 16 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 17 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 18 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 19 * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 20 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING 21 * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER 22 * DEALINGS IN THE SOFTWARE. 23 */ 24 #ifndef _LMREPL_H 25 #define _LMREPL_H 26 #pragma GCC system_header 27 #include <_mingw.h> 28 29 #ifdef __cplusplus 30 extern "C" { 31 #endif 32 33 #define REPL_ROLE_EXPORT 1 34 #define REPL_ROLE_IMPORT 2 35 #define REPL_ROLE_BOTH 3 36 #define REPL_INTERVAL_INFOLEVEL (PARMNUM_BASE_INFOLEVEL+0) 37 #define REPL_PULSE_INFOLEVEL (PARMNUM_BASE_INFOLEVEL+1) 38 #define REPL_GUARDTIME_INFOLEVEL (PARMNUM_BASE_INFOLEVEL+2) 39 #define REPL_RANDOM_INFOLEVEL (PARMNUM_BASE_INFOLEVEL+3) 40 #define REPL_UNLOCK_NOFORCE 0 41 #define REPL_UNLOCK_FORCE 1 42 #define REPL_STATE_OK 0 43 #define REPL_STATE_NO_MASTER 1 44 #define REPL_STATE_NO_SYNC 2 45 #define REPL_STATE_NEVER_REPLICATED 3 46 #define REPL_INTEGRITY_FILE 1 47 #define REPL_INTEGRITY_TREE 2 48 #define REPL_EXTENT_FILE 1 49 #define REPL_EXTENT_TREE 2 50 #define REPL_EXPORT_INTEGRITY_INFOLEVEL (PARMNUM_BASE_INFOLEVEL+0) 51 #define REPL_EXPORT_EXTENT_INFOLEVEL (PARMNUM_BASE_INFOLEVEL+1) 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 typedef struct _REPL_INFO_1000 { DWORD rp1000_interval; } REPL_INFO_1000,*PREPL_INFO_1000,*LPREPL_INFO_1000; 65 typedef struct _REPL_INFO_1001 { DWORD rp1001_pulse; } REPL_INFO_1001,*PREPL_INFO_1001,*LPREPL_INFO_1001; 66 typedef struct _REPL_INFO_1002 { DWORD rp1002_guardtime; } REPL_INFO_1002,*PREPL_INFO_1002,*LPREPL_INFO_1002; 67 typedef struct _REPL_INFO_1003 { DWORD rp1003_random; } REPL_INFO_1003,*PREPL_INFO_1003,*LPREPL_INFO_1003; 68 69 NET_API_STATUS WINAPI NetReplGetInfo(LPCWSTR,DWORD,PBYTE*); 70 NET_API_STATUS WINAPI NetReplSetInfo(LPCWSTR,DWORD,PBYTE,PDWORD); 71 typedef struct _REPL_EDIR_INFO_0 { 72 LPWSTR rped0_dirname; 73 } REPL_EDIR_INFO_0,*PREPL_EDIR_INFO_0,*LPREPL_EDIR_INFO_0; 74 typedef struct _REPL_EDIR_INFO_1 { 75 LPWSTR rped1_dirname; 76 DWORD rped1_integrity; 77 DWORD rped1_extent; 78 } REPL_EDIR_INFO_1,*PREPL_EDIR_INFO_1,*LPREPL_EDIR_INFO_1; 79 typedef struct _REPL_EDIR_INFO_2 { 80 LPWSTR rped2_dirname; 81 DWORD rped2_integrity; 82 DWORD rped2_extent; 83 DWORD rped2_lockcount; 84 DWORD rped2_locktime; 85 } REPL_EDIR_INFO_2,*PREPL_EDIR_INFO_2,*LPREPL_EDIR_INFO_2; 86 typedef struct _REPL_EDIR_INFO_1000 { 87 DWORD rped1000_integrity; 88 } REPL_EDIR_INFO_1000,*PREPL_EDIR_INFO_1000,*LPREPL_EDIR_INFO_1000; 89 typedef struct _REPL_EDIR_INFO_1001 { 90 DWORD rped1001_extent; 91 } REPL_EDIR_INFO_1001,*PREPL_EDIR_INFO_1001,*LPREPL_EDIR_INFO_1001; 92 typedef struct _REPL_IDIR_INFO_0 { LPWSTR rpid0_dirname; } REPL_IDIR_INFO_0,*PREPL_IDIR_INFO_0,*LPREPL_IDIR_INFO_0; 93 typedef struct _REPL_IDIR_INFO_1 { 94 LPWSTR rpid1_dirname; 95 DWORD rpid1_state; 96 LPWSTR rpid1_mastername; 97 DWORD rpid1_last_update_time; 98 DWORD rpid1_lockcount; 99 DWORD rpid1_locktime; 100 } REPL_IDIR_INFO_1,*PREPL_IDIR_INFO_1,*LPREPL_IDIR_INFO_1; 101 NET_API_STATUS WINAPI NetReplExportDirAdd(LPCWSTR,DWORD,PBYTE,PDWORD); 102 NET_API_STATUS WINAPI NetReplExportDirDel(LPCWSTR,LPCWSTR); 103 NET_API_STATUS WINAPI NetReplExportDirEnum(LPCWSTR,DWORD,PBYTE*,DWORD,PDWORD,PDWORD,PDWORD); 104 NET_API_STATUS WINAPI NetReplExportDirGetInfo(LPCWSTR,LPCWSTR,DWORD,PBYTE*); 105 NET_API_STATUS WINAPI NetReplExportDirSetInfo(LPCWSTR,LPCWSTR,DWORD,PBYTE,PDWORD); 106 NET_API_STATUS WINAPI NetReplExportDirLock(LPCWSTR,LPCWSTR); 107 NET_API_STATUS WINAPI NetReplExportDirUnlock(LPCWSTR,LPCWSTR,DWORD); 108 NET_API_STATUS WINAPI NetReplImportDirAdd(LPCWSTR,DWORD,PBYTE,PDWORD); 109 NET_API_STATUS WINAPI NetReplImportDirDel(LPCWSTR,LPCWSTR); 110 NET_API_STATUS WINAPI NetReplImportDirEnum(LPCWSTR,DWORD,PBYTE*,DWORD,PDWORD,PDWORD,PDWORD); 111 NET_API_STATUS WINAPI NetReplImportDirGetInfo(LPCWSTR,LPCWSTR,DWORD,PBYTE*); 112 NET_API_STATUS WINAPI NetReplImportDirLock(LPCWSTR,LPCWSTR); 113 NET_API_STATUS WINAPI NetReplImportDirUnlock(LPCWSTR,LPCWSTR,DWORD); 114 115 #ifdef __cplusplus 116 } 117 #endif 118 119 #endif 120