s4-samr: merge samr_GetGroupsForUser from s3 idl. (fixme: python)
[amitay/samba.git] / librpc / idl / dcom.idl
1 /**
2   DCOM interfaces
3   http://www.ietf.org/internet-drafts/draft-brown-dcom-v1-spec-04.txt
4  */
5
6 import "misc.idl";
7
8 [
9         uuid("18f70770-8e64-11cf-9af1-0020af6e72f4"),
10         pointer_default(unique),
11         version(0.0)
12 ] interface dcom_Unknown
13 {
14         void UseProtSeq();
15         void GetCustomProtseqInfo();
16         void UpdateResolverBindings();
17 }
18
19 [
20         object,
21         uuid("00000000-0000-0000-C000-000000000046"),
22         pointer_default(unique),
23         helpstring("Base interface for all COM interfaces")
24 ]
25 interface IUnknown
26 {
27         /*****************/
28         /* Function 0x00 */
29         /* Returns the interface with the specified IID 
30            if implemented by this object */
31         [local] WERROR QueryInterface([in,unique] GUID *iid,
32            [out,iid_is(riid)] IUnknown **data);
33
34         /*****************/
35         /* Function 0x01 */
36         [local] uint32 AddRef();
37
38         /*****************/
39         /* Function 0x02 */
40         [local] uint32 Release();
41 }
42
43
44 [
45         object,
46         uuid("00000001-0000-0000-C000-000000000046"),
47         pointer_default(unique)
48 ] interface IClassFactory : IUnknown
49 {
50         [local] WERROR CreateInstance([in,unique] MInterfacePointer *pUnknown, 
51                                [in,unique] GUID *iid,
52                                [out, iid_is(riid),unique] MInterfacePointer *ppv);
53
54         [call_as(CreateInstance)] WERROR RemoteCreateInstance();
55
56         /* Set lock to TRUE when you want to do a lock
57         and set it to FALSE when you want to unlock */
58         [local] WERROR LockServer([in] uint8 lock);
59
60         [call_as(LockServer)] WERROR RemoteLockServer();
61 }
62
63 /* The remote version of IUnknown. This interface exists on every */
64 /* OXID (whether an OXID represents either a thread or a process is */
65 /* implementation specific). It is used by clients to query for new */
66 /* interfaces, get additional references (for marshaling), and release */
67 /* outstanding references. */
68 /* This interface is passed along during OXID resolution. */
69 /* */
70 [
71         uuid("00000131-0000-0000-C000-000000000046"),
72         object,
73         pointer_default(unique),
74         helpstring("Remote version of IUnknown")
75 ]
76 interface IRemUnknown : IUnknown
77 {
78         typedef [public] struct 
79         {
80                 WERROR hResult; /* result of call */
81                 STDOBJREF std; /* data for returned interface */
82         }
83         REMQIRESULT;
84
85         [call_as(QueryInterface)] WERROR RemQueryInterface (
86                 [in,unique] GUID *ripid, /* interface to QI on */
87                 [in] uint32 cRefs, /* count of AddRefs requested */
88                 [in] uint16 cIids, /* count of IIDs that follow */
89                 [in, unique, size_is(cIids)] GUID *iids, /* IIDs to QI for */
90                 [out, size_is(cIids), unique] MInterfacePointer *ip
91                 );
92
93         typedef struct 
94         {
95                 GUID ipid; /* ipid to AddRef/Release */
96                 uint32 cPublicRefs;
97                 uint32 cPrivateRefs;
98         } REMINTERFACEREF;
99
100         [call_as(AddRef)] WERROR RemAddRef (
101                  [in] uint16 cInterfaceRefs,
102                  [in, size_is(cInterfaceRefs)] REMINTERFACEREF InterfaceRefs[],
103                  [out, size_is(cInterfaceRefs), unique] WERROR *pResults
104                 );
105
106         [call_as(Release)] WERROR RemRelease (
107                  [in] uint16 cInterfaceRefs,
108                  [in, size_is(cInterfaceRefs)] REMINTERFACEREF InterfaceRefs[]
109                 );
110 }
111
112 [
113         uuid("00000140-0000-0000-c000-000000000046"),
114         pointer_default(unique),
115         object
116 ] interface IClassActivator : IUnknown
117 {
118         void GetClassObject([in] GUID clsid, 
119                                 [in] uint32 context,
120                                                 [in] uint32 locale,
121                                                 [in] GUID iid,
122                                                 [out, iid_is(iid)] MInterfacePointer data);
123 }
124
125 [
126         uuid("00000136-0000-0000-c000-000000000046"),
127         pointer_default(unique),
128         object
129 ] interface ISCMLocalActivator : IClassActivator
130 {
131         WERROR ISCMLocalActivator_CreateInstance( );
132 }
133
134 [
135         pointer_default(unique),
136         uuid("c6f3ee72-ce7e-11d1-b71e-00c04fc3111a")
137 ] interface IMachineLocalActivator 
138 {
139         WERROR IMachineLocalActivator_foo();
140 }
141
142 [
143         pointer_default(unique),
144         uuid("e60c73e6-88f9-11cf-9af1-0020af6e72f4")
145 ] interface ILocalObjectExporter
146 {
147         WERROR ILocalObjectExporter_Foo();
148 }
149
150 /* Looks like this is the equivalent of .NET's 
151    System.Activator class */
152 [
153         uuid("000001a0-0000-0000-c000-000000000046"),
154         pointer_default(unique),
155         object
156 ]
157         interface ISystemActivator : IClassActivator
158 {
159         WERROR ISystemActivatorRemoteCreateInstance([in] hyper unknown1,  /* OXID ? */
160                                                                                           [in] MInterfacePointer iface1,
161                                                                                           [in] hyper unknown2,
162                                                                                           [out] uint32 unknown3, 
163                                                                                           [out] MInterfacePointer iface2);
164 }
165
166
167
168 /* Derived from IRemUnknown, this interface supports Remote Query interface */
169 /* for objects that supply additional data beyond the STDOBJREF in their */
170 /* marshaled interface packets. */
171 [
172         object,
173         pointer_default(unique),
174         uuid("00000143-0000-0000-C000-000000000046")
175 ]
176
177 interface IRemUnknown2 : IRemUnknown
178 {
179         [call_as(QueryInterface2)] WERROR RemQueryInterface2 (
180                  [in, unique] GUID *ripid,
181                  [in] uint16 cIids,
182                  [in, size_is(cIids), unique] GUID *iids,
183                  [out, size_is(cIids), unique] WERROR *phr,
184                  [out, size_is(cIids), unique] MInterfacePointer *ppMIF
185                 );
186 }
187
188 [
189         object,
190         pointer_default(unique),
191         uuid("00020400-0000-0000-C000-000000000046")
192 ] interface IDispatch : IUnknown
193 {
194         /*****************/
195         /* Function 0x03 */
196         WERROR GetTypeInfoCount(
197                         [out, unique] uint16 *pctinfo);
198
199         typedef struct {
200         } REF_ITypeInfo;
201
202         /*****************/
203         /* Function 0x04 */
204         WERROR GetTypeInfo (
205                         [in] uint16 iTInfo,
206                         [in] uint32 lcid,
207                         [out, unique] REF_ITypeInfo *ppTInfo);
208
209         /*****************/
210         /* Function 0x05 */
211         WERROR GetIDsOfNames(
212                         [in, unique] GUID *riid,
213                         /*FIXME[in,size_is(cNames)] OLESTR *rgszNames[], */
214                         [in] uint16 cNames,
215                         [in] uint32 lcid,
216                         [out,size_is(cNames), unique] uint32 *rgDispId);
217
218         typedef struct {
219                 uint16 vartype;
220                 uint16 FIXME;
221         } VARIANT;
222
223         typedef struct {
224                 uint16 FIXME;
225         } DISPPARAMS;
226
227         /* Exception ? */
228         typedef struct {
229                 uint16 FIXME;
230         } EXCEPINFO;
231
232         /*****************/
233         /* Function 0x06 */
234         WERROR Invoke(
235                         [in] uint32 dispIdMember,
236                         [in, unique] GUID *riid,
237                         [in] uint32 lcid,
238                         [in] uint16 wFlags,
239                         [out,in, unique] DISPPARAMS *pDispParams,
240                         [out, unique] VARIANT *pVarResult,
241                         [out, unique] EXCEPINFO *pExcepInfo,
242                         [out, unique] uint16 *puArgErr);
243 }
244
245 [
246         object,
247         local,
248         uuid("00000003-0000-0000-C000-000000000046")
249 ] interface IMarshal : IUnknown
250 {
251         WERROR MarshalInterface();
252         WERROR UnMarshalInterface();
253 }
254
255 [
256         uuid(DA23F6DB-6F45-466C-9EED-0B65286F2D78),
257         helpstring("ICoffeeMachine Interface"),
258         pointer_default(unique),
259         object
260 ] interface ICoffeeMachine : IUnknown
261 {
262         WERROR MakeCoffee([in,string,charset(UTF16)] uint16 *flavor);
263 }
264
265 [
266         uuid("db7c21f8-fe33-4c11-aea5-ceb56f076fbb"),
267         helpstring("coffeemachine class")
268 ] coclass coffeemachine
269 {
270         interface icoffeemachine;
271 }
272
273 [
274         object,
275         pointer_default(unique),
276         uuid("0000000C-0000-0000-C000-000000000046"),
277         helpstring("Stream")
278 ]
279 interface IStream : IUnknown
280 {
281         WERROR Read(
282                                 [out, size_is(num_requested), length_is(num_read)] uint8 pv[],
283                                 [in] uint32 num_requested, 
284                                 [in, unique] uint32 *num_readx,
285                                 [out] uint32 num_read
286                                 );
287
288         WERROR Write(
289                                 [in,size_is(num_requested),unique] uint8 *data,
290                                  [in] uint32 num_requested,
291                                  [out] uint32 num_written);
292 }
293
294 [
295         uuid("5e9ddec7-5767-11cf-beab-00aa006c3606"),
296         progid("Samba.Simple"),
297         helpstring("simple class"),
298         internal
299 ] coclass simple 
300 {
301         interface IStream;
302 }