fix compile with gcc
[reactos.git] / reactos / w32api / include / objsel.h
1 /*
2 * objsel.h
3 *
4 * Object Picker Dialog
5 *
6 * THIS SOFTWARE IS NOT COPYRIGHTED
7 *
8 * This source code is offered for use in the public domain. You may
9 * use, modify or distribute it freely.
10 *
11 * This code is distributed in the hope that it will be useful but
12 * WITHOUT ANY WARRANTY. ALL WARRANTIES, EXPRESS OR IMPLIED ARE HEREBY
13 * DISCLAIMED. This includes but is not limited to warranties of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
15 *
16 */
17 #ifndef __OBJSEL_H
18 #define __OBJSEL_H
19
20 #ifdef __cplusplus
21 extern "C" {
22 #endif
23
24 #include <unknwn.h>
25 #include <oaidl.h>
26 #include <objidl.h>
27
28 #if defined (_MSC_VER)
29 #define INITGUID
30 #include <initguid.h>
31 #endif
32
33 DEFINE_GUID(CLSID_DsObjectPicker, 0x17d6ccd8, 0x3b7b, 0x11d2, 0x00b9, 0xe0,0x00,0xc0,0x4f,0xd8,0xdb,0xf7);
34 DEFINE_GUID(IID_IDsObjectPicker, 0x0c87e64e, 0x3b7a, 0x11d2, 0x00b9, 0xe0,0x00,0xc0,0x4f,0xd8,0xdb,0xf7);
35
36 #define CFSTR_DSOP_DS_SELECTION_LIST TEXT("CFSTR_DSOP_DS_SELECTION_LIST")
37
38 /* up-level scope filters in the DSOP_UPLEVEL_FILTER_FLAGS structure */
39 #define DSOP_FILTER_INCLUDE_ADVANCED_VIEW (0x1)
40 #define DSOP_FILTER_USERS (0x2)
41 #define DSOP_FILTER_BUILTIN_GROUPS (0x4)
42 #define DSOP_FILTER_WELL_KNOWN_PRINCIPALS (0x8)
43 #define DSOP_FILTER_UNIVERSAL_GROUPS_DL (0x10)
44 #define DSOP_FILTER_UNIVERSAL_GROUPS_SE (0x20)
45 #define DSOP_FILTER_GLOBAL_GROUPS_DL (0x40)
46 #define DSOP_FILTER_GLOBAL_GROUPS_SE (0x80)
47 #define DSOP_FILTER_DOMAIN_LOCAL_GROUPS_DL (0x100)
48 #define DSOP_FILTER_DOMAIN_LOCAL_GROUPS_SE (0x200)
49 #define DSOP_FILTER_CONTACTS (0x400)
50 #define DSOP_FILTER_COMPUTERS (0x800)
51
52 typedef struct _DSOP_UPLEVEL_FILTER_FLAGS
53 {
54 ULONG flBothModes;
55 ULONG flMixedModeOnly;
56 ULONG flNativeModeOnly;
57 } DSOP_UPLEVEL_FILTER_FLAGS, *PDSOP_UPLEVEL_FILTER_FLAGS;
58
59 /* down-level scope filters in the DSOP_FILTER_FLAGS structure */
60 #define DSOP_DOWNLEVEL_FILTER_USERS (0x80000001)
61 #define DSOP_DOWNLEVEL_FILTER_LOCAL_GROUPS (0x80000002)
62 #define DSOP_DOWNLEVEL_FILTER_GLOBAL_GROUPS (0x80000004)
63 #define DSOP_DOWNLEVEL_FILTER_COMPUTERS (0x80000008)
64 #define DSOP_DOWNLEVEL_FILTER_WORLD (0x80000010)
65 #define DSOP_DOWNLEVEL_FILTER_AUTHENTICATED_USER (0x80000020)
66 #define DSOP_DOWNLEVEL_FILTER_ANONYMOUS (0x80000040)
67 #define DSOP_DOWNLEVEL_FILTER_BATCH (0x80000080)
68 #define DSOP_DOWNLEVEL_FILTER_CREATOR_OWNER (0x80000100)
69 #define DSOP_DOWNLEVEL_FILTER_CREATOR_GROUP (0x80000200)
70 #define DSOP_DOWNLEVEL_FILTER_DIALUP (0x80000400)
71 #define DSOP_DOWNLEVEL_FILTER_INTERACTIVE (0x80000800)
72 #define DSOP_DOWNLEVEL_FILTER_NETWORK (0x80001000)
73 #define DSOP_DOWNLEVEL_FILTER_SERVICE (0x80002000)
74 #define DSOP_DOWNLEVEL_FILTER_SYSTEM (0x80004000)
75 #define DSOP_DOWNLEVEL_FILTER_EXCLUDE_BUILTIN_GROUPS (0x80008000)
76 #define DSOP_DOWNLEVEL_FILTER_TERMINAL_SERVER (0x80010000)
77 #define DSOP_DOWNLEVEL_FILTER_ALL_WELLKNOWN_SIDS (0x80020000)
78 #define DSOP_DOWNLEVEL_FILTER_LOCAL_SERVICE (0x80040000)
79 #define DSOP_DOWNLEVEL_FILTER_NETWORK_SERVICE (0x80080000)
80 #define DSOP_DOWNLEVEL_FILTER_REMOTE_LOGON (0x80100000)
81
82 typedef struct _DSOP_FILTER_FLAGS
83 {
84 DSOP_UPLEVEL_FILTER_FLAGS Uplevel;
85 ULONG flDownlevel;
86 } DSOP_FILTER_FLAGS, *PDSOP_FILTER_FLAGS;
87
88 /* ADsPath format flags in the DSOP_SCOPE_INIT_INFO structure */
89 #define DSOP_SCOPE_FLAG_STARTING_SCOPE (0x1)
90 #define DSOP_SCOPE_FLAG_WANT_PROVIDER_WINNT (0x2)
91 #define DSOP_SCOPE_FLAG_WANT_PROVIDER_LDAP (0x4)
92 #define DSOP_SCOPE_FLAG_WANT_PROVIDER_GC (0x8)
93 #define DSOP_SCOPE_FLAG_WANT_SID_PATH (0x10)
94 #define DSOP_SCOPE_FLAG_WANT_DOWNLEVEL_BUILTIN_PATH (0x20)
95 #define DSOP_SCOPE_FLAG_DEFAULT_FILTER_USERS (0x40)
96 #define DSOP_SCOPE_FLAG_DEFAULT_FILTER_GROUPS (0x80)
97 #define DSOP_SCOPE_FLAG_DEFAULT_FILTER_COMPUTERS (0x100)
98 #define DSOP_SCOPE_FLAG_DEFAULT_FILTER_CONTACTS (0x200)
99
100 typedef struct _DSOP_SCOPE_INIT_INFO
101 {
102 ULONG cbSize;
103 ULONG flType;
104 ULONG flScope;
105 DSOP_FILTER_FLAGS FilterFlags;
106 PCWSTR pwzDcName;
107 PCWSTR pwzADsPath;
108 HRESULT hr;
109 } DSOP_SCOPE_INIT_INFO, *PDSOP_SCOPE_INIT_INFO;
110 typedef const DSOP_SCOPE_INIT_INFO *PCDSOP_SCOPE_INIT_INFO;
111
112 /* object picker options in the DSOP_INIT_INFO structure */
113 #define DSOP_FLAG_MULTISELECT (0x1)
114 #define DSOP_FLAG_SKIP_TARGET_COMPUTER_DC_CHECK (0x2)
115
116 typedef struct _DSOP_INIT_INFO
117 {
118 ULONG cbSize;
119 PCWSTR pwzTargetComputer;
120 ULONG cDsScopeInfos;
121 PDSOP_SCOPE_INIT_INFO aDsScopeInfos;
122 ULONG flOptions;
123 ULONG cAttributesToFetch;
124 PCWSTR *apwzAttributeNames;
125 } DSOP_INIT_INFO, *PDSOP_INIT_INFO;
126
127 typedef const DSOP_INIT_INFO *PCDSOP_INIT_INFO;
128
129 /* selection scope types in the DS_SELECTION structure */
130 #define DSOP_SCOPE_TYPE_TARGET_COMPUTER (0x1)
131 #define DSOP_SCOPE_TYPE_UPLEVEL_JOINED_DOMAIN (0x2)
132 #define DSOP_SCOPE_TYPE_DOWNLEVEL_JOINED_DOMAIN (0x4)
133 #define DSOP_SCOPE_TYPE_ENTERPRISE_DOMAIN (0x8)
134 #define DSOP_SCOPE_TYPE_GLOBAL_CATALOG (0x10)
135 #define DSOP_SCOPE_TYPE_EXTERNAL_UPLEVEL_DOMAIN (0x20)
136 #define DSOP_SCOPE_TYPE_EXTERNAL_DOWNLEVEL_DOMAIN (0x40)
137 #define DSOP_SCOPE_TYPE_WORKGROUP (0x80)
138 #define DSOP_SCOPE_TYPE_USER_ENTERED_UPLEVEL_SCOPE (0x100)
139 #define DSOP_SCOPE_TYPE_USER_ENTERED_DOWNLEVEL_SCOPE (0x200)
140
141 typedef struct _DS_SELECTION
142 {
143 PWSTR pwzName;
144 PWSTR pwzADsPath;
145 PWSTR pwzClass;
146 PWSTR pwzUPN;
147 VARIANT *pvarFetchedAttributes;
148 ULONG flScopeType;
149 } DS_SELECTION, *PDS_SELECTION;
150
151 typedef struct _DS_SELECTION_LIST
152 {
153 ULONG cItems;
154 ULONG cFetchedAttributes;
155 DS_SELECTION aDsSelection[ANYSIZE_ARRAY];
156 } DS_SELECTION_LIST, *PDS_SELECTION_LIST;
157
158 /*****************************************************************************
159 * IDsObjectPicker interface
160 */
161 #define INTERFACE IDsObjectPicker
162 DECLARE_INTERFACE_(IDsObjectPicker,IUnknown)
163 {
164 /*** IUnknown methods ***/
165 STDMETHOD_(HRESULT,QueryInterface)(THIS_ REFIID riid, void** ppvObject) PURE;
166 STDMETHOD_(ULONG,AddRef)(THIS) PURE;
167 STDMETHOD_(ULONG,Release)(THIS) PURE;
168 /*** IDsObjectPicker methods ***/
169 STDMETHOD_(HRESULT,Initialize)(THIS_ PDSOP_INIT_INFO pInitInfo) PURE;
170 STDMETHOD_(HRESULT,InvokeDialog)(THIS_ HWND hwndParent, IDataObject** ppdoSelections) PURE;
171 };
172 #undef INTERFACE
173
174
175 #ifdef __cplusplus
176 }
177 #endif
178 #endif /* __OBJSEL_H */