Reactos
1/*
2 * Directory Services definitions
3 *
4 * Copyright 2005 Paul Vriens
5 *
6 * This library is free software; you can redistribute it and/or
7 * modify it under the terms of the GNU Lesser General Public
8 * License as published by the Free Software Foundation; either
9 * version 2.1 of the License, or (at your option) any later version.
10 *
11 * This library is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 * Lesser General Public License for more details.
15 *
16 * You should have received a copy of the GNU Lesser General Public
17 * License along with this library; if not, write to the Free Software
18 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
19 */
20
21#ifndef __WINE_DSROLE_H
22#define __WINE_DSROLE_H
23
24#define DSROLE_PRIMARY_DS_RUNNING 0x00000001
25#define DSROLE_PRIMARY_DS_MIXED_MODE 0x00000002
26#define DSROLE_UPGRADE_IN_PROGRESS 0x00000004
27#define DSROLE_PRIMARY_DS_READONLY 0x00000008
28#define DSROLE_PRIMARY_DOMAIN_GUID_PRESENT 0x01000000
29
30typedef enum _DSROLE_PRIMARY_DOMAIN_INFO_LEVEL
31{
32 DsRolePrimaryDomainInfoBasic = 1,
33 DsRoleUpgradeStatus,
34 DsRoleOperationState
35} DSROLE_PRIMARY_DOMAIN_INFO_LEVEL;
36
37typedef enum _DSROLE_MACHINE_ROLE
38{
39 DsRole_RoleStandaloneWorkstation = 0,
40 DsRole_RoleMemberWorkstation,
41 DsRole_RoleStandaloneServer,
42 DsRole_RoleMemberServer,
43 DsRole_RoleBackupDomainController,
44 DsRole_RolePrimaryDomainController
45} DSROLE_MACHINE_ROLE;
46
47typedef enum _DSROLE_SERVER_STATE
48{
49 DsRoleServerUnknown = 0,
50 DsRoleServerPrimary,
51 DsRoleServerBackup
52} DSROLE_SERVER_STATE;
53
54typedef enum _DSROLE_OPERATION_STATE
55{
56 DsRoleOperationIdle = 0,
57 DsRoleOperationActive,
58 DsRoleOperationNeedReboot
59} DSROLE_OPERATION_STATE;
60
61typedef struct _DSROLE_PRIMARY_DOMAIN_INFO_BASIC
62{
63 DSROLE_MACHINE_ROLE MachineRole;
64 ULONG Flags;
65 LPWSTR DomainNameFlat;
66 LPWSTR DomainNameDns;
67 LPWSTR DomainForestName;
68 GUID DomainGuid;
69} DSROLE_PRIMARY_DOMAIN_INFO_BASIC, *PDSROLE_PRIMARY_DOMAIN_INFO_BASIC;
70
71typedef struct _DSROLE_UPGRADE_STATUS_INFO
72{
73 ULONG OperationState;
74 DSROLE_SERVER_STATE PreviousServerState;
75} DSROLE_UPGRADE_STATUS_INFO, *PDSROLE_UPGRADE_STATUS_INFO;
76
77typedef struct _DSROLE_OPERATION_STATE_INFO
78{
79 DSROLE_OPERATION_STATE OperationState;
80} DSROLE_OPERATION_STATE_INFO, *PDSROLE_OPERATION_STATE_INFO;
81
82VOID WINAPI DsRoleFreeMemory(IN PVOID Buffer);
83DWORD WINAPI DsRoleGetPrimaryDomainInformation(IN LPCWSTR lpServer OPTIONAL, IN DSROLE_PRIMARY_DOMAIN_INFO_LEVEL InfoLevel, OUT PBYTE *Buffer);
84
85#endif /* __WINE_DSROLE_H */