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