1 /***********************************************************************\ 2 * lmrepl.d * 3 * * 4 * Windows API header module * 5 * * 6 * Translated from MinGW Windows headers * 7 * * 8 * Placed into public domain * 9 \***********************************************************************/ 10 module win32.lmrepl; 11 version(Windows): 12 pragma(lib, "netapi32"); 13 14 private import win32.lmcons, win32.windef; 15 16 const REPL_ROLE_EXPORT=1; 17 const REPL_ROLE_IMPORT=2; 18 const REPL_ROLE_BOTH=3; 19 20 const REPL_INTERVAL_INFOLEVEL = PARMNUM_BASE_INFOLEVEL+0; 21 const REPL_PULSE_INFOLEVEL = PARMNUM_BASE_INFOLEVEL+1; 22 const REPL_GUARDTIME_INFOLEVEL = PARMNUM_BASE_INFOLEVEL+2; 23 const REPL_RANDOM_INFOLEVEL = PARMNUM_BASE_INFOLEVEL+3; 24 25 const REPL_UNLOCK_NOFORCE=0; 26 const REPL_UNLOCK_FORCE=1; 27 const REPL_STATE_OK=0; 28 const REPL_STATE_NO_MASTER=1; 29 const REPL_STATE_NO_SYNC=2; 30 const REPL_STATE_NEVER_REPLICATED=3; 31 const REPL_INTEGRITY_FILE=1; 32 const REPL_INTEGRITY_TREE=2; 33 const REPL_EXTENT_FILE=1; 34 const REPL_EXTENT_TREE=2; 35 36 const REPL_EXPORT_INTEGRITY_INFOLEVEL = PARMNUM_BASE_INFOLEVEL+0; 37 const REPL_EXPORT_EXTENT_INFOLEVEL = PARMNUM_BASE_INFOLEVEL+1; 38 39 struct REPL_INFO_0 { 40 DWORD rp0_role; 41 LPWSTR rp0_exportpath; 42 LPWSTR rp0_exportlist; 43 LPWSTR rp0_importpath; 44 LPWSTR rp0_importlist; 45 LPWSTR rp0_logonusername; 46 DWORD rp0_interval; 47 DWORD rp0_pulse; 48 DWORD rp0_guardtime; 49 DWORD rp0_random; 50 } 51 alias REPL_INFO_0* PREPL_INFO_0, LPREPL_INFO_0; 52 53 struct REPL_INFO_1000 { 54 DWORD rp1000_interval; 55 } 56 alias REPL_INFO_1000* PREPL_INFO_1000, LPREPL_INFO_1000; 57 58 struct REPL_INFO_1001 { 59 DWORD rp1001_pulse; 60 } 61 alias REPL_INFO_1001* PREPL_INFO_1001, LPREPL_INFO_1001; 62 63 struct REPL_INFO_1002 { 64 DWORD rp1002_guardtime; 65 } 66 alias REPL_INFO_1002* PREPL_INFO_1002, LPREPL_INFO_1002; 67 68 struct REPL_INFO_1003 { 69 DWORD rp1003_random; 70 } 71 alias REPL_INFO_1003* PREPL_INFO_1003, LPREPL_INFO_1003; 72 73 struct REPL_EDIR_INFO_0 { 74 LPWSTR rped0_dirname; 75 } 76 alias REPL_EDIR_INFO_0* PREPL_EDIR_INFO_0, LPREPL_EDIR_INFO_0; 77 78 struct REPL_EDIR_INFO_1 { 79 LPWSTR rped1_dirname; 80 DWORD rped1_integrity; 81 DWORD rped1_extent; 82 } 83 alias REPL_EDIR_INFO_1* PREPL_EDIR_INFO_1, LPREPL_EDIR_INFO_1; 84 85 struct REPL_EDIR_INFO_2 { 86 LPWSTR rped2_dirname; 87 DWORD rped2_integrity; 88 DWORD rped2_extent; 89 DWORD rped2_lockcount; 90 DWORD rped2_locktime; 91 } 92 alias REPL_EDIR_INFO_2* PREPL_EDIR_INFO_2, LPREPL_EDIR_INFO_2; 93 94 struct REPL_EDIR_INFO_1000 { 95 DWORD rped1000_integrity; 96 } 97 alias REPL_EDIR_INFO_1000* PREPL_EDIR_INFO_1000, LPREPL_EDIR_INFO_1000; 98 99 struct REPL_EDIR_INFO_1001 { 100 DWORD rped1001_extent; 101 } 102 alias REPL_EDIR_INFO_1001* PREPL_EDIR_INFO_1001, LPREPL_EDIR_INFO_1001; 103 104 struct REPL_IDIR_INFO_0 { 105 LPWSTR rpid0_dirname; 106 } 107 alias REPL_IDIR_INFO_0* PREPL_IDIR_INFO_0, LPREPL_IDIR_INFO_0; 108 109 struct REPL_IDIR_INFO_1 { 110 LPWSTR rpid1_dirname; 111 DWORD rpid1_state; 112 LPWSTR rpid1_mastername; 113 DWORD rpid1_last_update_time; 114 DWORD rpid1_lockcount; 115 DWORD rpid1_locktime; 116 } 117 alias REPL_IDIR_INFO_1* PREPL_IDIR_INFO_1, LPREPL_IDIR_INFO_1; 118 119 extern (Windows) { 120 NET_API_STATUS NetReplGetInfo(LPCWSTR,DWORD,PBYTE*); 121 NET_API_STATUS NetReplSetInfo(LPCWSTR,DWORD,PBYTE,PDWORD); 122 NET_API_STATUS NetReplExportDirAdd(LPCWSTR,DWORD,PBYTE,PDWORD); 123 NET_API_STATUS NetReplExportDirDel(LPCWSTR,LPCWSTR); 124 NET_API_STATUS NetReplExportDirEnum(LPCWSTR,DWORD,PBYTE*,DWORD,PDWORD,PDWORD,PDWORD); 125 NET_API_STATUS NetReplExportDirGetInfo(LPCWSTR,LPCWSTR,DWORD,PBYTE*); 126 NET_API_STATUS NetReplExportDirSetInfo(LPCWSTR,LPCWSTR,DWORD,PBYTE,PDWORD); 127 NET_API_STATUS NetReplExportDirLock(LPCWSTR,LPCWSTR); 128 NET_API_STATUS NetReplExportDirUnlock(LPCWSTR,LPCWSTR,DWORD); 129 NET_API_STATUS NetReplImportDirAdd(LPCWSTR,DWORD,PBYTE,PDWORD); 130 NET_API_STATUS NetReplImportDirDel(LPCWSTR,LPCWSTR); 131 NET_API_STATUS NetReplImportDirEnum(LPCWSTR,DWORD,PBYTE*,DWORD,PDWORD,PDWORD,PDWORD); 132 NET_API_STATUS NetReplImportDirGetInfo(LPCWSTR,LPCWSTR,DWORD,PBYTE*); 133 NET_API_STATUS NetReplImportDirLock(LPCWSTR,LPCWSTR); 134 NET_API_STATUS NetReplImportDirUnlock(LPCWSTR,LPCWSTR,DWORD); 135 }