#ifndef _LMDFS_H
#define _LMDFS_H

/* NetDfs API definitions */

#include <lmcons.h>

#ifdef __cplusplus
extern "C" {
#endif

#define DFS_VOLUME_STATE_OK  1
#define DFS_VOLUME_STATE_INCONSISTENT  2
#define DFS_VOLUME_STATE_OFFLINE  3
#define DFS_VOLUME_STATE_ONLINE  4

#define DFS_STORAGE_STATE_OFFLINE  1
#define DFS_STORAGE_STATE_ONLINE  2
#define DFS_STORAGE_STATE_ACTIVE  4

#define DFS_ADD_VOLUME  1
#define DFS_RESTORE_VOLUME  2

#define NET_DFS_SETDC_FLAGS  0x00000000
#define NET_DFS_SETDC_TIMEOUT  0x00000001
#define NET_DFS_SETDC_INITPKT  0x00000002

#define DFS_SITE_PRIMARY  0x1

typedef struct _DFS_INFO_1 {
    LPWSTR  EntryPath;
} DFS_INFO_1, *PDFS_INFO_1, *LPDFS_INFO_1;

typedef struct _DFS_INFO_2 {
    LPWSTR EntryPath;
    LPWSTR Comment;
    DWORD State;
    DWORD NumberOfStorages;
} DFS_INFO_2, *PDFS_INFO_2, *LPDFS_INFO_2;

typedef struct _DFS_STORAGE_INFO {
    ULONG State;
    LPWSTR ServerName;
    LPWSTR ShareName;
} DFS_STORAGE_INFO, *PDFS_STORAGE_INFO, *LPDFS_STORAGE_INFO;

typedef struct _DFS_INFO_3 {
    LPWSTR EntryPath;
    LPWSTR Comment;
    DWORD State;
    DWORD NumberOfStorages;
    LPDFS_STORAGE_INFO Storage;
} DFS_INFO_3, *PDFS_INFO_3, *LPDFS_INFO_3;

typedef struct _DFS_INFO_4 {
    LPWSTR EntryPath;
    LPWSTR Comment;
    DWORD State;
    ULONG Timeout;
    GUID Guid;
    DWORD NumberOfStorages;
    LPDFS_STORAGE_INFO Storage;
} DFS_INFO_4, *PDFS_INFO_4, *LPDFS_INFO_4;

typedef struct _DFS_INFO_100 {
    LPWSTR Comment;
} DFS_INFO_100, *PDFS_INFO_100, *LPDFS_INFO_100;

typedef struct _DFS_INFO_101 {
    DWORD State;
} DFS_INFO_101, *PDFS_INFO_101, *LPDFS_INFO_101;

typedef struct _DFS_INFO_102 {
    ULONG Timeout;
} DFS_INFO_102, *PDFS_INFO_102, *LPDFS_INFO_102;

typedef struct _DFS_INFO_200 {
    LPWSTR FtDfsName;
} DFS_INFO_200, *PDFS_INFO_200, *LPDFS_INFO_200;

typedef struct {
    ULONG SiteFlags;
    LPWSTR SiteName;
} DFS_SITENAME_INFO, *PDFS_SITENAME_INFO, *LPDFS_SITENAME_INFO;

typedef struct {
    ULONG cSites;
    DFS_SITENAME_INFO Site[1];
} DFS_SITELIST_INFO, *PDFS_SITELIST_INFO, *LPDFS_SITELIST_INFO;

NET_API_STATUS NET_API_FUNCTION NetDfsAdd(LPWSTR,LPWSTR,LPWSTR,LPWSTR,DWORD);
NET_API_STATUS NET_API_FUNCTION NetDfsAddStdRoot(LPWSTR,LPWSTR,LPWSTR,DWORD);
NET_API_STATUS NET_API_FUNCTION NetDfsRemoveStdRoot(LPWSTR,LPWSTR,DWORD);
NET_API_STATUS NET_API_FUNCTION NetDfsAddFtRoot(LPWSTR,LPWSTR,LPWSTR,LPWSTR,DWORD);
NET_API_STATUS NET_API_FUNCTION NetDfsRemoveFtRoot(LPWSTR,LPWSTR,LPWSTR,DWORD);
NET_API_STATUS NET_API_FUNCTION NetDfsRemoveFtRootForced(LPWSTR,LPWSTR,LPWSTR,LPWSTR,DWORD);
NET_API_STATUS NET_API_FUNCTION NetDfsManagerInitialize(LPWSTR,DWORD);
NET_API_STATUS NET_API_FUNCTION NetDfsAddStdRootForced(LPWSTR,LPWSTR,LPWSTR,LPWSTR);
NET_API_STATUS NET_API_FUNCTION NetDfsGetDcAddress(LPWSTR,LPWSTR*,BOOLEAN*,ULONG*);
NET_API_STATUS NET_API_FUNCTION NetDfsSetDcAddress(LPWSTR,LPWSTR,ULONG,DWORD);
NET_API_STATUS NET_API_FUNCTION NetDfsRemove(LPWSTR,LPWSTR,LPWSTR);
NET_API_STATUS NET_API_FUNCTION NetDfsEnum(LPWSTR,DWORD,DWORD,LPBYTE*,LPDWORD,LPDWORD);
NET_API_STATUS NET_API_FUNCTION NetDfsGetInfo(LPWSTR,LPWSTR,LPWSTR,DWORD,LPBYTE*);
NET_API_STATUS NET_API_FUNCTION NetDfsSetInfo(LPWSTR,LPWSTR,LPWSTR,DWORD,LPBYTE);
NET_API_STATUS NET_API_FUNCTION NetDfsGetClientInfo(LPWSTR,LPWSTR,LPWSTR,DWORD,LPBYTE*);
NET_API_STATUS NET_API_FUNCTION NetDfsSetClientInfo(LPWSTR,LPWSTR,LPWSTR,DWORD,LPBYTE);
NET_API_STATUS NET_API_FUNCTION NetDfsMove(LPWSTR,LPWSTR);
NET_API_STATUS NET_API_FUNCTION NetDfsRename(LPWSTR,LPWSTR);

#ifdef __cplusplus
}
#endif

#endif /* _LMDFS_H */
