25045c587959e32482c8133fc1143f8ebed32020
[samba.git] / source4 / librpc / idl / dssetup.idl
1 #include "idl_types.h"
2
3 /*
4   dssetup interface definition
5 */
6
7 [
8         uuid("3919286a-b10c-11d0-9ba8-00c04fd92ef5"),
9         version(0.0),
10         endpoint("ncacn_np:[\\pipe\\lsarpc]","ncacn_np:[\\pipe\\lsass]"),
11         pointer_default(unique),
12         helpstring("Active Directory Setup")
13 ] interface dssetup
14 {
15         /**********************************************/
16         /* Function 0x00                              */
17
18         typedef enum {
19                 DS_ROLE_STANDALONE_WORKSTATION = 0,
20                 DS_ROLE_MEMBER_WORKSTATION     = 1,
21                 DS_ROLE_STANDALONE_SERVER      = 2,
22                 DS_ROLE_MEMBER_SERVER          = 3,
23                 DS_ROLE_BACKUP_DC              = 4,
24                 DS_ROLE_PRIMARY_DC             = 5
25         } ds_Role;
26
27         typedef struct {
28                 uint16    role;
29                 uint32    flags;
30                 unistr    *domain;
31                 unistr    *dns_domain;
32                 unistr    *forest;
33                 GUID domain_guid;
34         } ds_DomainBasicInformation;
35
36         typedef enum {
37                 DS_NOT_UPGRADING = 0,
38                 DS_UPGRADING     = 1
39         } ds_UpgradeStatus;
40
41         typedef enum {
42                 DS_PREVIOUS_UNKNOWN = 0,
43                 DS_PREVIOUS_PRIMARY = 1,
44                 DS_PREVIOUS_BACKUP  = 2
45         } ds_PreviousStatus;
46
47         typedef struct {
48                 uint32 upgrading;
49                 uint16 previous_role;
50         } ds_DomainUpgradeStatus;
51
52         typedef enum {
53                 DS_STATUS_IDLE         = 0,
54                 DS_STATUS_ACTIVE       = 1,
55                 DS_STATUS_NEEDS_REBOOT = 2
56         } ds_Status;
57
58         typedef struct {
59                 uint16 status;
60         } ds_RoleOpStatus;
61         
62         typedef enum {
63                 DS_BASIC_INFORMATION = 1,
64                 DS_UPGRADE_STATUS    = 2,
65                 DS_ROLE_OP_STATUS    = 3
66         } ds_InformationLevel;
67
68         typedef union {
69                 [case(DS_BASIC_INFORMATION)] ds_DomainBasicInformation basic;
70                 [case(DS_UPGRADE_STATUS)]    ds_DomainUpgradeStatus    upgrade;
71                 [case(DS_ROLE_OP_STATUS)]    ds_RoleOpStatus           status;
72         } ds_DomainInformation;
73
74         WERROR ds_RolerGetPrimaryDomainInformation(
75                 [in] uint16 level,
76                 [out,switch_is(level)] ds_DomainInformation *info
77                 );
78
79         /*
80           w2k3 has removed all the calls below from their implementation.
81           These stubs are left here only as a way of documenting the names
82           of the calls in case they ever turn up on the wire.
83         */
84         WERROR ds_RolerDnsNameToFlatName();
85         WERROR ds_RolerDcAsDc();
86         WERROR ds_RolerDcAsReplica();
87         WERROR ds_RolerDemoteDc();
88         WERROR ds_RolerGetDcOperationProgress();
89         WERROR ds_RolerGetDcOperationResults();
90         WERROR ds_RolerCancel();
91         WERROR ds_RolerServerSaveStateForUpgrade();
92         WERROR ds_RolerUpgradeDownlevelServer();
93         WERROR ds_RolerAbortDownlevelServerUpgrade();
94 }