1 /* 2 * lmrepl.h 3 * 4 * This file is part of the ReactOS PSDK package. 5 * 6 * THIS SOFTWARE IS NOT COPYRIGHTED 7 * 8 * This source code is offered for use in the public domain. You may 9 * use, modify or distribute it freely. 10 * 11 * This code is distributed in the hope that it will be useful but 12 * WITHOUT ANY WARRANTY. ALL WARRANTIES, EXPRESS OR IMPLIED ARE HEREBY 13 * DISCLAIMED. This includes but is not limited to warranties of 14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 15 * 16 */ 17 18 #pragma once 19 #define _LMREPL_ 20 21 #ifdef __cplusplus 22 extern "C" { 23 #endif 24 25 #define REPL_ROLE_EXPORT 1 26 #define REPL_ROLE_IMPORT 2 27 #define REPL_ROLE_BOTH 3 28 29 #define REPL_INTERVAL_INFOLEVEL (PARMNUM_BASE_INFOLEVEL+0) 30 #define REPL_PULSE_INFOLEVEL (PARMNUM_BASE_INFOLEVEL+1) 31 #define REPL_GUARDTIME_INFOLEVEL (PARMNUM_BASE_INFOLEVEL+2) 32 #define REPL_RANDOM_INFOLEVEL (PARMNUM_BASE_INFOLEVEL+3) 33 34 #define REPL_UNLOCK_NOFORCE 0 35 #define REPL_UNLOCK_FORCE 1 36 37 #define REPL_STATE_OK 0 38 #define REPL_STATE_NO_MASTER 1 39 #define REPL_STATE_NO_SYNC 2 40 #define REPL_STATE_NEVER_REPLICATED 3 41 42 #define REPL_INTEGRITY_FILE 1 43 #define REPL_INTEGRITY_TREE 2 44 45 #define REPL_EXTENT_FILE 1 46 #define REPL_EXTENT_TREE 2 47 48 #define REPL_EXPORT_INTEGRITY_INFOLEVEL (PARMNUM_BASE_INFOLEVEL+0) 49 #define REPL_EXPORT_EXTENT_INFOLEVEL (PARMNUM_BASE_INFOLEVEL+1) 50 51 typedef struct _REPL_INFO_0 52 { 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 { 67 DWORD rp1000_interval; 68 } REPL_INFO_1000,*PREPL_INFO_1000,*LPREPL_INFO_1000; 69 70 typedef struct _REPL_INFO_1001 71 { 72 DWORD rp1001_pulse; 73 } REPL_INFO_1001,*PREPL_INFO_1001,*LPREPL_INFO_1001; 74 75 typedef struct _REPL_INFO_1002 76 { 77 DWORD rp1002_guardtime; 78 } REPL_INFO_1002,*PREPL_INFO_1002,*LPREPL_INFO_1002; 79 80 typedef struct _REPL_INFO_1003 81 { 82 DWORD rp1003_random; 83 } REPL_INFO_1003,*PREPL_INFO_1003,*LPREPL_INFO_1003; 84 85 NET_API_STATUS 86 NET_API_FUNCTION 87 NetReplGetInfo( 88 _In_ LPCWSTR servername OPTIONAL, 89 _In_ DWORD level, 90 _Out_ LPBYTE* bufptr); 91 92 NET_API_STATUS 93 WINAPI 94 NetReplSetInfo( 95 _In_opt_ LPCWSTR servername, 96 _In_ DWORD level, 97 _In_ const LPBYTE buf, 98 _Out_opt_ LPDWORD parm_err); 99 100 typedef struct _REPL_EDIR_INFO_0 101 { 102 LPWSTR rped0_dirname; 103 } REPL_EDIR_INFO_0, * PREPL_EDIR_INFO_0, * LPREPL_EDIR_INFO_0; 104 105 typedef struct _REPL_EDIR_INFO_1 106 { 107 LPWSTR rped1_dirname; 108 DWORD rped1_integrity; 109 DWORD rped1_extent; 110 } REPL_EDIR_INFO_1, * PREPL_EDIR_INFO_1, * LPREPL_EDIR_INFO_1; 111 112 typedef struct _REPL_EDIR_INFO_2 113 { 114 LPWSTR rped2_dirname; 115 DWORD rped2_integrity; 116 DWORD rped2_extent; 117 DWORD rped2_lockcount; 118 DWORD rped2_locktime; 119 } REPL_EDIR_INFO_2, * PREPL_EDIR_INFO_2, * LPREPL_EDIR_INFO_2; 120 121 typedef struct _REPL_EDIR_INFO_1000 122 { 123 DWORD rped1000_integrity; 124 } REPL_EDIR_INFO_1000, * PREPL_EDIR_INFO_1000, * LPREPL_EDIR_INFO_1000; 125 126 typedef struct _REPL_EDIR_INFO_1001 127 { 128 DWORD rped1001_extent; 129 } REPL_EDIR_INFO_1001, * PREPL_EDIR_INFO_1001, * LPREPL_EDIR_INFO_1001; 130 131 typedef struct _REPL_IDIR_INFO_0 132 { 133 LPWSTR rpid0_dirname; 134 } REPL_IDIR_INFO_0, * PREPL_IDIR_INFO_0, * LPREPL_IDIR_INFO_0; 135 136 typedef struct _REPL_IDIR_INFO_1 137 { 138 LPWSTR rpid1_dirname; 139 DWORD rpid1_state; 140 LPWSTR rpid1_mastername; 141 DWORD rpid1_last_update_time; 142 DWORD rpid1_lockcount; 143 DWORD rpid1_locktime; 144 } REPL_IDIR_INFO_1, * PREPL_IDIR_INFO_1, * LPREPL_IDIR_INFO_1; 145 146 NET_API_STATUS 147 NET_API_FUNCTION 148 NetReplExportDirAdd( 149 _In_opt_ LPCWSTR servername, 150 _In_ DWORD level, 151 _In_ const LPBYTE buf, 152 _Out_opt_ LPDWORD parm_err); 153 154 NET_API_STATUS 155 NET_API_FUNCTION 156 NetReplExportDirDel( 157 _In_opt_ LPCWSTR servername, 158 _In_ LPCWSTR dirname); 159 160 NET_API_STATUS 161 NET_API_FUNCTION 162 NetReplExportDirEnum( 163 _In_opt_ LPCWSTR servername, 164 _In_ DWORD level, 165 _Out_ LPBYTE* bufptr, 166 _In_ DWORD prefmaxlen, 167 _Out_ LPDWORD entriesread, 168 _Out_ LPDWORD totalentries, 169 _Inout_opt_ LPDWORD resumehandle); 170 171 NET_API_STATUS 172 NET_API_FUNCTION 173 NetReplExportDirGetInfo( 174 _In_opt_ LPCWSTR servername, 175 _In_ LPCWSTR dirname, 176 _In_ DWORD level, 177 _Out_ LPBYTE* bufptr); 178 179 NET_API_STATUS 180 NET_API_FUNCTION 181 NetReplExportDirSetInfo( 182 _In_opt_ LPCWSTR servername, 183 _In_ LPCWSTR dirname, 184 _In_ DWORD level, 185 _In_ const LPBYTE buf, 186 _Out_opt_ LPDWORD parm_err); 187 188 NET_API_STATUS 189 NET_API_FUNCTION 190 NetReplExportDirLock( 191 _In_opt_ LPCWSTR servername, 192 _In_ LPCWSTR dirname); 193 194 NET_API_STATUS 195 NET_API_FUNCTION 196 NetReplExportDirUnlock( 197 _In_opt_ LPCWSTR servername, 198 _In_ LPCWSTR dirname, 199 _In_ DWORD unlockforce); 200 201 NET_API_STATUS 202 NET_API_FUNCTION 203 NetReplImportDirAdd( 204 _In_opt_ LPCWSTR servername, 205 _In_ DWORD level, 206 _In_ const LPBYTE buf, 207 _Out_opt_ LPDWORD parm_err); 208 209 NET_API_STATUS 210 NET_API_FUNCTION 211 NetReplImportDirDel( 212 _In_opt_ LPCWSTR servername, 213 _In_ LPCWSTR dirname); 214 215 NET_API_STATUS 216 NET_API_FUNCTION 217 NetReplImportDirEnum( 218 _In_opt_ LPCWSTR servername, 219 _In_ DWORD level, 220 _Out_ LPBYTE* bufptr, 221 _In_ DWORD prefmaxlen, 222 _Out_ LPDWORD entriesread, 223 _Out_ LPDWORD totalentries, 224 _Inout_opt_ LPDWORD resumehandle); 225 226 NET_API_STATUS 227 NET_API_FUNCTION 228 NetReplImportDirGetInfo( 229 _In_opt_ LPCWSTR servername, 230 _In_ LPCWSTR dirname, 231 _In_ DWORD level, 232 _Out_ LPBYTE* bufptr); 233 234 NET_API_STATUS 235 NET_API_FUNCTION 236 NetReplImportDirLock( 237 _In_opt_ LPCWSTR servername, 238 _In_ LPCWSTR dirname); 239 240 NET_API_STATUS 241 NET_API_FUNCTION 242 NetReplImportDirUnlock( 243 _In_opt_ LPCWSTR servername, 244 _In_ LPCWSTR dirname, 245 _In_ DWORD unlockforce); 246 247 #ifdef __cplusplus 248 } 249 #endif 250