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