Added checks for sys/errno.h, sys/signal.h and sys/mman.h.
[wine] / include / wine / obj_marshal.h
1 /*
2  * Defines the COM interfaces and APIs that allow an interface to 
3  * specify a custom marshaling for its objects.
4  */
5
6 #ifndef __WINE_WINE_OBJ_MARSHAL_H
7 #define __WINE_WINE_OBJ_MARSHAL_H
8
9 #include "wine/obj_base.h"
10 #include "wine/obj_storage.h"
11
12 #ifdef __cplusplus
13 extern "C" {
14 #endif /* defined(__cplusplus) */
15
16 /*****************************************************************************
17  * Predeclare the interfaces
18  */
19 DEFINE_OLEGUID(IID_IMarshal,            0x00000003L, 0, 0);
20 typedef struct IMarshal IMarshal,*LPMARSHAL;
21
22 DEFINE_OLEGUID(IID_IStdMarshalInfo,     0x00000018L, 0, 0);
23 typedef struct IStdMarshalInfo IStdMarshalInfo,*LPSTDMARSHALINFO;
24
25
26 /*****************************************************************************
27  * IMarshal interface
28  */
29 #define ICOM_INTERFACE IMarshal
30 #define IMarshal_METHODS \
31     ICOM_METHOD6(HRESULT,GetUnmarshalClass,  REFIID,riid, void*,pv, DWORD,dwDestContext, void*,pvDestContext, DWORD,mshlflags, CLSID*,pCid) \
32     ICOM_METHOD6(HRESULT,GetMarshalSizeMax,  REFIID,riid, void*,pv, DWORD,dwDestContext, void*,pvDestContext, DWORD,mshlflags, DWORD*,pSize) \
33     ICOM_METHOD6(HRESULT,MarshalInterface,   IStream*,pStm, REFIID,riid, void*,pv, DWORD,dwDestContext, void*,pvDestContext, DWORD,mshlflags) \
34     ICOM_METHOD3(HRESULT,UnmarshalInterface, IStream*,pStm, REFIID,riid, void**,ppv) \
35     ICOM_METHOD1(HRESULT,ReleaseMarshalData, IStream*,pStm) \
36     ICOM_METHOD1(HRESULT,DisconnectObject,   DWORD,dwReserved)
37 #define IMarshal_IMETHODS \
38     IUnknown_IMETHODS \
39     IMarshal_METHODS
40 ICOM_DEFINE(IMarshal,IUnknown)
41 #undef ICOM_INTERFACE
42
43 #ifdef ICOM_CINTERFACE
44 /*** IUnknown methods ***/
45 #define IMarshal_QueryInterface(p,a,b) ICOM_CALL2(QueryInterface,p,a,b)
46 #define IMarshal_AddRef(p)             ICOM_CALL (AddRef,p)
47 #define IMarshal_Release(p)            ICOM_CALL (Release,p)
48 /*** IMarshal methods ***/
49 #define IMarshal_GetUnmarshalClass(p,a,b,c,d,e,f) ICOM_CALL6(GetUnmarshalClass,p,a,b,c,d,e,f)
50 #define IMarshal_GetMarshalSizeMax(p,a,b,c,d,e,f) ICOM_CALL6(GetMarshalSizeMax,p,a,b,c,d,e,f)
51 #define IMarshal_MarshalInterface(p,a,b,c,d,e,f)  ICOM_CALL6(MarshalInterface,p,a,b,c,d,e,f)
52 #define IMarshal_UnmarshalInterface(p,a,b,c)      ICOM_CALL3(UnmarshalInterface,p,a,b,c)
53 #define IMarshal_ReleaseMarshalData(p,a)          ICOM_CALL1(ReleaseMarshalData,p,a)
54 #define IMarshal_DisconnectObject(p,a)            ICOM_CALL1(DisconnectObject,p,a)
55 #endif
56
57
58 /*****************************************************************************
59  * IStdMarshalInfo interface
60  */
61 #define ICOM_INTERFACE IStdMarshalInfo
62 #define IStdMarshalInfo_METHODS \
63     ICOM_METHOD3(HRESULT,GetClassForHandler,  DWORD,dwDestContext, void*,pvDestContext, CLSID*,pClsid)
64 #define IStdMarshalInfo_IMETHODS \
65     IUnknown_IMETHODS \
66     IStdMarshalInfo_METHODS
67 ICOM_DEFINE(IStdMarshalInfo,IUnknown)
68 #undef ICOM_INTERFACE
69
70 #ifdef ICOM_CINTERFACE
71 /*** IUnknown methods ***/
72 #define IStdMarshalInfo_QueryInterface(p,a,b) ICOM_CALL2(QueryInterface,p,a,b)
73 #define IStdMarshalInfo_AddRef(p)             ICOM_CALL (AddRef,p)
74 #define IStdMarshalInfo_Release(p)            ICOM_CALL (Release,p)
75 /*** IStdMarshalInfo methods ***/
76 #define IStdMarshalInfo_GetClassForHandler(p,a,b,c) ICOM_CALL3(GetClassForHandler,p,a,b,c)
77 #endif
78
79
80 /*****************************************************************************
81  * Additional marshalling API
82  */
83
84 /* FIXME: not implemented */
85 HRESULT WINAPI CoCreateFreeThreadedMarshaler(LPUNKNOWN punkOuter, LPUNKNOWN* ppunkMarshal);
86
87 /* FIXME: not implemented */
88 HRESULT WINAPI CoGetInterfaceAndReleaseStream(LPSTREAM pStm, REFIID iid, LPVOID* ppv);
89
90 /* FIXME: not implemented */
91 HRESULT WINAPI CoGetMarshalSizeMax(ULONG* pulSize, REFIID riid, LPUNKNOWN pUnk, DWORD dwDestContext, LPVOID pvDestContext, DWORD mshlflags);
92
93 /* FIXME: not implemented */
94 HRESULT WINAPI CoGetStandardMarshal(REFIID riid, LPUNKNOWN pUnk, DWORD dwDestContext, LPVOID pvDestContext, DWORD mshlflags, LPMARSHAL* ppMarshal);
95
96 /* FIXME: not implemented */
97 HRESULT WINAPI CoMarshalHresult(LPSTREAM pstm, HRESULT hresult);
98
99 /* FIXME: not implemented */
100 HRESULT WINAPI CoMarshalInterface(LPSTREAM pStm, REFIID riid, LPUNKNOWN pUnk, DWORD dwDestContext, LPVOID pvDestContext, DWORD mshlflags);
101
102 /* FIXME: not implemented */
103 HRESULT WINAPI CoMarshalInterThreadInterfaceInStream(REFIID riid, LPUNKNOWN pUnk, LPSTREAM* ppStm);
104
105 /* FIXME: not implemented */
106 HRESULT WINAPI CoReleaseMarshalData(LPSTREAM pStm);
107
108 /* FIXME: not implemented */
109 HRESULT WINAPI CoUnmarshalHresult(LPSTREAM pstm, HRESULT* phresult);
110
111 /* FIXME: not implemented */
112 HRESULT WINAPI CoUnmarshalInterface(LPSTREAM pStm, REFIID riid, LPVOID* ppv);
113
114 #ifdef __cplusplus
115 } /* extern "C" */
116 #endif /* defined(__cplusplus) */
117
118 #endif /* __WINE_WINE_OBJ_MARSHAL_H */