1
0
mirror of https://github.com/samba-team/samba.git synced 2025-01-19 10:03:58 +03:00
Jelmer Vernooij 50d2bf0066 r7029: Make array support in pidl similar to that in other IDL compilers. We should
now able to use constructions like these:

[size_is(20)] int *x; -> Pointer to array of 20 ints
[size_is(20)] int x[]; -> Array of 20 ints
[size_is(20)] int *x[]; -> Array of 20 pointers to ints
[size_is(20,)] int *x[] -> Array of 20 pointers to ints
[size_is(,20)] int *x[]; -> Pointer to array of 20 ints
[size_is(,20)] int **x; -> Pointer to pointer to array of 20 ints
[size_is(20)] int x[][30]; -> 20 blocks of 30 ints
(This used to be commit ecf583da71c2f80be124c17fccdcb284b47e0695)
2007-10-10 13:17:07 -05:00

328 lines
7.3 KiB
Plaintext

#include "idl_types.h"
/**
DCOM interfaces
http://www.grimes.demon.co.uk/DCOM/DCOMSpec.htm
*/
#define OLESTR unistr
[
uuid("18f70770-8e64-11cf-9af1-0020af6e72f4"),
pointer_default(unique),
pointer_default_top(unique),
version(0.0)
] interface dcom_Unknown
{
void UseProtSeq();
void GetCustomProtseqInfo();
void UpdateResolverBindings();
}
[
object,
uuid("00000000-0000-0000-C000-000000000046"),
pointer_default(unique),
pointer_default_top(unique),
helpstring("Base interface for all COM interfaces")
]
interface IUnknown
{
/*****************/
/* Function 0x00 */
/* Returns the interface with the specified IID
if implemented by this object */
[local] WERROR QueryInterface([in] GUID *iid,
[out,iid_is(riid),ref] IUnknown **data);
/*****************/
/* Function 0x01 */
[local] uint32 AddRef();
/*****************/
/* Function 0x02 */
[local] uint32 Release();
}
[
object,
uuid("00000001-0000-0000-C000-000000000046"),
pointer_default_top(unique),
pointer_default(unique)
] interface IClassFactory : IUnknown
{
[local] WERROR CreateInstance([in] MInterfacePointer *pUnknown,
[in] GUID *iid,
[out, iid_is(riid)] MInterfacePointer *ppv);
[call_as(CreateInstance)] WERROR RemoteCreateInstance();
/* Set lock to TRUE when you want to do a lock
and set it to FALSE when you want to unlock */
[local] WERROR LockServer([in] uint8 lock);
[call_as(LockServer)] WERROR RemoteLockServer();
}
/* The remote version of IUnknown. This interface exists on every */
/* OXID (whether an OXID represents either a thread or a process is */
/* implementation specific). It is used by clients to query for new */
/* interfaces, get additional references (for marshaling), and release */
/* outstanding references. */
/* This interface is passed along during OXID resolution. */
/* */
[
uuid("00000131-0000-0000-C000-000000000046"),
object,
pointer_default_top(unique),
pointer_default(unique),
helpstring("Remote version of IUnknown")
]
interface IRemUnknown : IUnknown
{
typedef [public] struct
{
WERROR hResult; /* result of call */
STDOBJREF std; /* data for returned interface */
}
REMQIRESULT;
[call_as(QueryInterface)] WERROR RemQueryInterface (
[in] GUID *ripid, /* interface to QI on */
[in] uint32 cRefs, /* count of AddRefs requested */
[in] uint16 cIids, /* count of IIDs that follow */
[in, size_is(cIids)] GUID *iids, /* IIDs to QI for */
[out, size_is(cIids)] MInterfacePointer *ip
);
typedef struct
{
GUID ipid; /* ipid to AddRef/Release */
uint32 cPublicRefs;
uint32 cPrivateRefs;
} REMINTERFACEREF;
[call_as(AddRef)] WERROR RemAddRef (
[in] uint16 cInterfaceRefs,
[in, size_is(cInterfaceRefs)] REMINTERFACEREF InterfaceRefs[],
[out, size_is(cInterfaceRefs)] WERROR *pResults
);
[call_as(Release)] WERROR RemRelease (
[in] uint16 cInterfaceRefs,
[in, size_is(cInterfaceRefs)] REMINTERFACEREF InterfaceRefs[]
);
}
[
uuid("00000140-0000-0000-c000-000000000046"),
pointer_default_top(unique),
pointer_default(unique),
object
] interface IClassActivator : IUnknown
{
void GetClassObject([in] GUID clsid,
[in] uint32 context,
[in] uint32 locale,
[in] GUID iid,
[out, iid_is(iid)] MInterfacePointer data);
}
[
uuid("00000136-0000-0000-c000-000000000046"),
pointer_default_top(unique),
pointer_default(unique),
object
] interface ISCMLocalActivator : IClassActivator
{
WERROR ISCMLocalActivator_CreateInstance( );
}
[
pointer_default(unique),
pointer_default_top(unique),
uuid("c6f3ee72-ce7e-11d1-b71e-00c04fc3111a")
] interface IMachineLocalActivator
{
WERROR IMachineLocalActivator_foo();
}
[
pointer_default(unique),
pointer_default_top(unique),
uuid("e60c73e6-88f9-11cf-9af1-0020af6e72f4")
] interface ILocalObjectExporter
{
WERROR ILocalObjectExporter_Foo();
}
/* Looks like this is the equivalent of .NET's
System.Activator class */
[
uuid("000001a0-0000-0000-c000-000000000046"),
pointer_default(unique),
pointer_default_top(unique),
object
]
interface ISystemActivator : IClassActivator
{
WERROR ISystemActivatorRemoteCreateInstance([in] hyper unknown1, /* OXID ? */
[in] MInterfacePointer iface1,
[in] hyper unknown2,
[out] uint32 unknown3,
[out] MInterfacePointer iface2);
}
/* Derived from IRemUnknown, this interface supports Remote Query interface */
/* for objects that supply additional data beyond the STDOBJREF in their */
/* marshaled interface packets. */
[
object,
pointer_default(unique),
pointer_default_top(unique),
uuid("00000143-0000-0000-C000-000000000046")
]
interface IRemUnknown2 : IRemUnknown
{
[call_as(QueryInterface2)] WERROR RemQueryInterface2 (
[in] GUID *ripid,
[in] uint16 cIids,
[in, size_is(cIids)] GUID *iids,
[out, size_is(cIids)] WERROR *phr,
[out, size_is(cIids)] MInterfacePointer *ppMIF
);
}
[
object,
pointer_default(unique),
pointer_default_top(unique),
uuid("00000136-0000-0000-C000-000000000046")
] interface ISCMActivator : IClassActivator
{
WERROR SCMActivator_CreateInstance();
}
[
object,
pointer_default(unique),
pointer_default_top(unique),
uuid("00020400-0000-0000-C000-000000000046")
] interface IDispatch : IUnknown
{
/*****************/
/* Function 0x03 */
WERROR GetTypeInfoCount(
[out] uint16 *pctinfo);
typedef struct {
} REF_ITypeInfo;
/*****************/
/* Function 0x04 */
WERROR GetTypeInfo (
[in] uint16 iTInfo,
[in] uint32 lcid,
[out] REF_ITypeInfo *ppTInfo);
/*****************/
/* Function 0x05 */
WERROR GetIDsOfNames(
[in] GUID *riid,
/*FIXME[in,size_is(cNames)] OLESTR *rgszNames[], */
[in] uint16 cNames,
[in] uint32 lcid,
[out,size_is(cNames)] uint32 *rgDispId);
typedef struct {
uint16 vartype;
uint16 FIXME;
} VARIANT;
typedef struct {
uint16 FIXME;
} DISPPARAMS;
/* Exception ? */
typedef struct {
uint16 FIXME;
} EXCEPINFO;
/*****************/
/* Function 0x06 */
WERROR Invoke(
[in] uint32 dispIdMember,
[in] GUID *riid,
[in] uint32 lcid,
[in] uint16 wFlags,
[out,in] DISPPARAMS *pDispParams,
[out] VARIANT *pVarResult,
[out] EXCEPINFO *pExcepInfo,
[out] uint16 *puArgErr);
}
[
object,
local,
uuid("00000003-0000-0000-C000-000000000046")
] interface IMarshal : IUnknown
{
WERROR MarshalInterface();
WERROR UnMarshalInterface();
}
[
uuid(DA23F6DB-6F45-466C-9EED-0B65286F2D78),
helpstring("ICoffeeMachine Interface"),
pointer_default(unique),
pointer_default_top(unique),
object
] interface ICoffeeMachine : IUnknown
{
[helpstring("method MakeCoffee")] WERROR MakeCoffee([in] unistr *flavor);
}
[
uuid("db7c21f8-fe33-4c11-aea5-ceb56f076fbb"),
helpstring("coffeemachine class")
] coclass coffeemachine
{
interface icoffeemachine;
}
[
object,
pointer_default(unique),
pointer_default_top(unique),
uuid("0000000C-0000-0000-C000-000000000046"),
helpstring("Stream")
]
interface IStream : IUnknown
{
WERROR Read(
[out, size_is(num_requested), length_is(num_read)] uint8 pv[],
[in] uint32 num_requested,
[in] uint32 *num_readx,
[out] uint32 num_read
);
WERROR Write(
[in,size_is(num_requested)] uint8 *data,
[in] uint32 num_requested,
[out] uint32 num_written);
}
[
uuid("5e9ddec7-5767-11cf-beab-00aa006c3606"),
progid("Samba.Simple"),
helpstring("simple class"),
internal
] coclass simple
{
interface IStream;
}