"Fossies" - the Fresh Open Source Software Archive

Member "dmd2/src/druntime/import/core/sys/windows/lmrepl.d" (20 Nov 2020, 3981 Bytes) of package /linux/misc/dmd.2.094.2.linux.tar.xz:


As a special service "Fossies" has tried to format the requested source page into HTML format using (guessed) D source code syntax highlighting (style: standard) with prefixed line numbers and code folding option. Alternatively you can here view or download the uninterpreted source code file.

    1 /**
    2  * Windows API header module
    3  *
    4  * Translated from MinGW Windows headers
    5  *
    6  * License: $(LINK2 http://www.boost.org/LICENSE_1_0.txt, Boost License 1.0)
    7  * Source: $(DRUNTIMESRC src/core/sys/windows/_lmrepl.d)
    8  */
    9 module core.sys.windows.lmrepl;
   10 version (Windows):
   11 @system:
   12 pragma(lib, "netapi32");
   13 
   14 private import core.sys.windows.lmcons, core.sys.windows.windef;
   15 
   16 enum REPL_ROLE_EXPORT=1;
   17 enum REPL_ROLE_IMPORT=2;
   18 enum REPL_ROLE_BOTH=3;
   19 
   20 enum REPL_INTERVAL_INFOLEVEL  = PARMNUM_BASE_INFOLEVEL+0;
   21 enum REPL_PULSE_INFOLEVEL     = PARMNUM_BASE_INFOLEVEL+1;
   22 enum REPL_GUARDTIME_INFOLEVEL = PARMNUM_BASE_INFOLEVEL+2;
   23 enum REPL_RANDOM_INFOLEVEL    = PARMNUM_BASE_INFOLEVEL+3;
   24 
   25 enum REPL_UNLOCK_NOFORCE=0;
   26 enum REPL_UNLOCK_FORCE=1;
   27 enum REPL_STATE_OK=0;
   28 enum REPL_STATE_NO_MASTER=1;
   29 enum REPL_STATE_NO_SYNC=2;
   30 enum REPL_STATE_NEVER_REPLICATED=3;
   31 enum REPL_INTEGRITY_FILE=1;
   32 enum REPL_INTEGRITY_TREE=2;
   33 enum REPL_EXTENT_FILE=1;
   34 enum REPL_EXTENT_TREE=2;
   35 
   36 enum REPL_EXPORT_INTEGRITY_INFOLEVEL = PARMNUM_BASE_INFOLEVEL+0;
   37 enum 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 }