blob: 14b5731ffe1841caccd4451083b11f3cf198c2af [file] [log] [blame]
Paul Vriens45f0e062005-11-29 12:00:19 +01001/*
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
Jonathan Ernst360a3f92006-05-18 14:49:52 +020018 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
Paul Vriens45f0e062005-11-29 12:00:19 +010019 */
20
21#ifndef __WINE_DSROLE_H
22#define __WINE_DSROLE_H
23
Francois Gougeteb5d62c2011-12-13 21:10:50 +010024#ifdef __cplusplus
25extern "C" {
26#endif
27
Paul Vriens45f0e062005-11-29 12:00:19 +010028#define DSROLE_PRIMARY_DS_RUNNING 0x00000001
29#define DSROLE_PRIMARY_DS_MIXED_MODE 0x00000002
30#define DSROLE_UPGRADE_IN_PROGRESS 0x00000004
31#define DSROLE_PRIMARY_DOMAIN_GUID_PRESENT 0x01000000
32
33typedef enum _DSROLE_PRIMARY_DOMAIN_INFO_LEVEL
34{
35 DsRolePrimaryDomainInfoBasic = 1,
36 DsRoleUpgradeStatus,
37 DsRoleOperationState
38} DSROLE_PRIMARY_DOMAIN_INFO_LEVEL;
39
40typedef enum _DSROLE_MACHINE_ROLE
41{
42 DsRole_RoleStandaloneWorkstation = 0,
43 DsRole_RoleMemberWorkstation,
44 DsRole_RoleStandaloneServer,
45 DsRole_RoleMemberServer,
46 DsRole_RoleBackupDomainController,
47 DsRole_RolePrimaryDomainController
48} DSROLE_MACHINE_ROLE;
49
50typedef enum _DSROLE_SERVER_STATE
51{
52 DsRoleServerUnknown = 0,
53 DsRoleServerPrimary,
54 DsRoleServerBackup
55} DSROLE_SERVER_STATE;
56
57typedef enum _DSROLE_OPERATION_STATE
58{
59 DsRoleOperationIdle = 0,
60 DsRoleOperationActive,
61 DsRoleOperationNeedReboot
62} DSROLE_OPERATION_STATE;
63
64typedef struct _DSROLE_PRIMARY_DOMAIN_INFO_BASIC
65{
66 DSROLE_MACHINE_ROLE MachineRole;
67 ULONG Flags;
68 LPWSTR DomainNameFlat;
69 LPWSTR DomainNameDns;
70 LPWSTR DomainForestName;
71 GUID DomainGuid;
72} DSROLE_PRIMARY_DOMAIN_INFO_BASIC, *PDSROLE_PRIMARY_DOMAIN_INFO_BASIC;
73
74typedef struct _DSROLE_UPGRADE_STATUS_INFO
75{
76 ULONG OperationState;
77 DSROLE_SERVER_STATE PreviousServerState;
78} DSROLE_UPGRADE_STATUS_INFO, *PDSROLE_UPGRADE_STATUS_INFO;
79
80typedef struct _DSROLE_OPERATION_STATE_INFO
81{
82 DSROLE_OPERATION_STATE OperationState;
83} DSROLE_OPERATION_STATE_INFO, *PDSROLE_OPERATION_STATE_INFO;
84
85VOID WINAPI DsRoleFreeMemory(IN PVOID Buffer);
86DWORD WINAPI DsRoleGetPrimaryDomainInformation(IN LPCWSTR lpServer OPTIONAL, IN DSROLE_PRIMARY_DOMAIN_INFO_LEVEL InfoLevel, OUT PBYTE *Buffer);
87
Francois Gougeteb5d62c2011-12-13 21:10:50 +010088#ifdef __cplusplus
89}
90#endif
91
Paul Vriens45f0e062005-11-29 12:00:19 +010092#endif /* __WINE_DSROLE_H */