| 1 | /* $Id: obj_clientserver.h,v 1.5 1999-08-22 22:52:06 sandervl Exp $ */
|
|---|
| 2 | /*
|
|---|
| 3 | * Defines the COM interfaces and APIs related to client/server aspects.
|
|---|
| 4 | */
|
|---|
| 5 |
|
|---|
| 6 | #ifndef __WINE_WINE_OBJ_CLIENTSERVER_H
|
|---|
| 7 | #define __WINE_WINE_OBJ_CLIENTSERVER_H
|
|---|
| 8 |
|
|---|
| 9 | #include "wine/obj_base.h"
|
|---|
| 10 |
|
|---|
| 11 | #ifdef __cplusplus
|
|---|
| 12 | extern "C" {
|
|---|
| 13 | #endif /* defined(__cplusplus) */
|
|---|
| 14 |
|
|---|
| 15 | /*****************************************************************************
|
|---|
| 16 | * Predeclare the interfaces
|
|---|
| 17 | */
|
|---|
| 18 | DEFINE_OLEGUID(IID_IClientSecurity, 0x0000013dL, 0, 0);
|
|---|
| 19 | typedef struct IClientSecurity IClientSecurity,*LPCLIENTSECURITY;
|
|---|
| 20 |
|
|---|
| 21 | DEFINE_OLEGUID(IID_IExternalConnection, 0x00000019L, 0, 0);
|
|---|
| 22 | typedef struct IExternalConnection IExternalConnection,*LPEXTERNALCONNECTION;
|
|---|
| 23 |
|
|---|
| 24 | DEFINE_OLEGUID(IID_IMessageFilter, 0x00000016L, 0, 0);
|
|---|
| 25 | typedef struct IMessageFilter IMessageFilter,*LPMESSAGEFILTER;
|
|---|
| 26 |
|
|---|
| 27 | DEFINE_OLEGUID(IID_IServerSecurity, 0x0000013eL, 0, 0);
|
|---|
| 28 | typedef struct IServerSecurity IServerSecurity,*LPSERVERSECURITY;
|
|---|
| 29 |
|
|---|
| 30 |
|
|---|
| 31 | /*****************************************************************************
|
|---|
| 32 | * IClientSecurity interface
|
|---|
| 33 | */
|
|---|
| 34 | typedef struct tagSOLE_AUTHENTICATION_SERVICE
|
|---|
| 35 | {
|
|---|
| 36 | DWORD dwAuthnSvc;
|
|---|
| 37 | DWORD dwAuthzSvc;
|
|---|
| 38 | OLECHAR* pPrincipalName;
|
|---|
| 39 | HRESULT hr;
|
|---|
| 40 | } SOLE_AUTHENTICATION_SERVICE, *PSOLE_AUTHENTICATION_SERVICE;
|
|---|
| 41 |
|
|---|
| 42 | typedef enum tagEOLE_AUTHENTICATION_CAPABILITIES
|
|---|
| 43 | {
|
|---|
| 44 | EOAC_NONE = 0x0,
|
|---|
| 45 | EOAC_MUTUAL_AUTH = 0x1,
|
|---|
| 46 | EOAC_SECURE_REFS = 0x2,
|
|---|
| 47 | EOAC_ACCESS_CONTROL = 0x4
|
|---|
| 48 | } EOLE_AUTHENTICATION_CAPABILITIES;
|
|---|
| 49 |
|
|---|
| 50 | #define ICOM_INTERFACE IClientSecurity
|
|---|
| 51 | #define IClientSecurity_METHODS \
|
|---|
| 52 | ICOM_METHOD8(HRESULT,QueryBlanket, IUnknown*,pProxy, DWORD*,pAuthnSvc, DWORD*,pAuthzSvc, OLECHAR**,pServerPrincName, DWORD*,pAuthnLevel, DWORD*,pImpLevel, void**,pAuthInfo, DWORD*,pCapabilites) \
|
|---|
| 53 | ICOM_METHOD8(HRESULT,SetBlanket, IUnknown*,pProxy, DWORD,pAuthnSvc, DWORD,pAuthzSvc, OLECHAR*,pServerPrincName, DWORD,pAuthnLevel, DWORD,pImpLevel, void*,pAuthInfo, DWORD,pCapabilites) \
|
|---|
| 54 | ICOM_METHOD2(HRESULT,CopyProxy, IUnknown*,pProxy, IUnknown**,ppCopy)
|
|---|
| 55 | #define IClientSecurity_IMETHODS \
|
|---|
| 56 | IUnknown_IMETHODS \
|
|---|
| 57 | IClientSecurity_METHODS
|
|---|
| 58 | ICOM_DEFINE(IClientSecurity,IUnknown)
|
|---|
| 59 | #undef ICOM_INTERFACE
|
|---|
| 60 |
|
|---|
| 61 | #ifdef ICOM_CINTERFACE
|
|---|
| 62 | /*** IUnknown methods ***/
|
|---|
| 63 | #define IClientSecurity_QueryInterface(p,a,b) ICOM_CALL2(QueryInterface,p,a,b)
|
|---|
| 64 | #define IClientSecurity_AddRef(p) ICOM_CALL (AddRef,p)
|
|---|
| 65 | #define IClientSecurity_Release(p) ICOM_CALL (Release,p)
|
|---|
| 66 | /*** IClientSecurity methods ***/
|
|---|
| 67 | #define IClientSecurity_QueryBlanket(p,a,b,c,d,e,f,g,h) ICOM_CALL8(QueryBlanket,p,a,b,c,d,e,f,g,h)
|
|---|
| 68 | #define IClientSecurity_SetBlanket(p,a,b,c,d,e,f,g,h) ICOM_CALL8(SetBlanket,p,a,b,c,d,e,f,g,h)
|
|---|
| 69 | #define IClientSecurity_CopyProxy(p,a,b) ICOM_CALL2(CopyProxy,p,a,b)
|
|---|
| 70 | #endif
|
|---|
| 71 |
|
|---|
| 72 |
|
|---|
| 73 | /*****************************************************************************
|
|---|
| 74 | * IExternalConnection interface
|
|---|
| 75 | */
|
|---|
| 76 | typedef enum tagEXTCONN
|
|---|
| 77 | {
|
|---|
| 78 | EXTCONN_STRONG = 0x1,
|
|---|
| 79 | EXTCONN_WEAK = 0x2,
|
|---|
| 80 | EXTCONN_CALLABLE = 0x4
|
|---|
| 81 | } EXTCONN;
|
|---|
| 82 |
|
|---|
| 83 | #define ICOM_INTERFACE IExternalConnection
|
|---|
| 84 | #define IExternalConnection_METHODS \
|
|---|
| 85 | ICOM_METHOD2(DWORD,AddConnection, DWORD,extconn, DWORD,reserved) \
|
|---|
| 86 | ICOM_METHOD3(DWORD,ReleaseConnection, DWORD,extconn, DWORD,reserved, BOOL,fLastReleaseCloses)
|
|---|
| 87 | #define IExternalConnection_IMETHODS \
|
|---|
| 88 | IUnknown_IMETHODS \
|
|---|
| 89 | IExternalConnection_METHODS
|
|---|
| 90 | ICOM_DEFINE(IExternalConnection,IUnknown)
|
|---|
| 91 | #undef ICOM_INTERFACE
|
|---|
| 92 |
|
|---|
| 93 | #ifdef ICOM_CINTERFACE
|
|---|
| 94 | /*** IUnknown methods ***/
|
|---|
| 95 | #define IExternalConnection_QueryInterface(p,a,b) ICOM_CALL2(QueryInterface,p,a,b)
|
|---|
| 96 | #define IExternalConnection_AddRef(p) ICOM_CALL (AddRef,p)
|
|---|
| 97 | #define IExternalConnection_Release(p) ICOM_CALL (Release,p)
|
|---|
| 98 | /*** IExternalConnection methods ***/
|
|---|
| 99 | #define IExternalConnection_AddConnection(p,a,b) ICOM_CALL8(AddConnection,p,a,b)
|
|---|
| 100 | #define IExternalConnection_ReleaseConnection(p,a,b,c) ICOM_CALL8(ReleaseConnection,p,a,b,c)
|
|---|
| 101 | #endif
|
|---|
| 102 |
|
|---|
| 103 |
|
|---|
| 104 | HRESULT WINAPI CoDisconnectObject(LPUNKNOWN lpUnk, DWORD reserved);
|
|---|
| 105 |
|
|---|
| 106 |
|
|---|
| 107 | /*****************************************************************************
|
|---|
| 108 | * IMessageFilter interface
|
|---|
| 109 | */
|
|---|
| 110 | typedef enum tagCALLTYPE
|
|---|
| 111 | {
|
|---|
| 112 | CALLTYPE_TOPLEVEL = 1,
|
|---|
| 113 | CALLTYPE_NESTED = 2,
|
|---|
| 114 | CALLTYPE_ASYNC = 3,
|
|---|
| 115 | CALLTYPE_TOPLEVEL_CALLPENDING = 4,
|
|---|
| 116 | CALLTYPE_ASYNC_CALLPENDING = 5
|
|---|
| 117 | } CALLTYPE;
|
|---|
| 118 |
|
|---|
| 119 | typedef enum tagSERVERCALL
|
|---|
| 120 | {
|
|---|
| 121 | SERVERCALL_ISHANDLED = 0,
|
|---|
| 122 | SERVERCALL_REJECTED = 1,
|
|---|
| 123 | SERVERCALL_RETRYLATER = 2
|
|---|
| 124 | } SERVERCALL;
|
|---|
| 125 |
|
|---|
| 126 | typedef enum tagPENDINGTYPE
|
|---|
| 127 | {
|
|---|
| 128 | PENDINGTYPE_TOPLEVEL = 1,
|
|---|
| 129 | PENDINGTYPE_NESTED = 2
|
|---|
| 130 | } PENDINGTYPE;
|
|---|
| 131 |
|
|---|
| 132 | typedef enum tagPENDINGMSG
|
|---|
| 133 | {
|
|---|
| 134 | PENDINGMSG_CANCELCALL = 0,
|
|---|
| 135 | PENDINGMSG_WAITNOPROCESS = 1,
|
|---|
| 136 | PENDINGMSG_WAITDEFPROCESS = 2
|
|---|
| 137 | } PENDINGMSG;
|
|---|
| 138 |
|
|---|
| 139 | typedef struct tagINTERFACEINFO
|
|---|
| 140 | {
|
|---|
| 141 | IUnknown* pUnk;
|
|---|
| 142 | IID iid;
|
|---|
| 143 | WORD wMethod;
|
|---|
| 144 | } INTERFACEINFO,*LPINTERFACEINFO;
|
|---|
| 145 |
|
|---|
| 146 | #define ICOM_INTERFACE IMessageFilter
|
|---|
| 147 | #define IMessageFilter_METHODS \
|
|---|
| 148 | ICOM_METHOD4(DWORD,HandleInComingCall, DWORD,dwCallType, HTASK,htaskCaller, DWORD,dwTickCount, LPINTERFACEINFO,lpInterfaceInfo) \
|
|---|
| 149 | ICOM_METHOD3(DWORD,RetryRejectedCall, HTASK,htaskCallee, DWORD,dwTickCount, DWORD,dwRejectType) \
|
|---|
| 150 | ICOM_METHOD3(DWORD,MessagePending, HTASK,htaskCallee, DWORD,dwTickCount, DWORD,dwRejectType)
|
|---|
| 151 | #define IMessageFilter_IMETHODS \
|
|---|
| 152 | IUnknown_IMETHODS \
|
|---|
| 153 | IMessageFilter_METHODS
|
|---|
| 154 | ICOM_DEFINE(IMessageFilter,IUnknown)
|
|---|
| 155 | #undef ICOM_INTERFACE
|
|---|
| 156 |
|
|---|
| 157 | #ifdef ICOM_CINTERFACE
|
|---|
| 158 | /*** IUnknown methods ***/
|
|---|
| 159 | #define IMessageFilter_QueryInterface(p,a,b) ICOM_CALL2(QueryInterface,p,a,b)
|
|---|
| 160 | #define IMessageFilter_AddRef(p) ICOM_CALL (AddRef,p)
|
|---|
| 161 | #define IMessageFilter_Release(p) ICOM_CALL (Release,p)
|
|---|
| 162 | /*** IMessageFilter methods ***/
|
|---|
| 163 | #define IMessageFilter_HandleInComingCall(p,a,b,c,d) ICOM_CALL4(HandleInComingCall,p,a,b,c,d)
|
|---|
| 164 | #define IMessageFilter_RetryRejectedCall(p,a,b,c) ICOM_CALL3(RetryRejectedCall,p,a,b,c)
|
|---|
| 165 | #define IMessageFilter_MessagePending(p,a,b,c) ICOM_CALL3(MessagePending,p,a,b,c)
|
|---|
| 166 | #endif
|
|---|
| 167 |
|
|---|
| 168 |
|
|---|
| 169 | HRESULT WINAPI CoRegisterMessageFilter16(LPMESSAGEFILTER lpMessageFilter,LPMESSAGEFILTER *lplpMessageFilter);
|
|---|
| 170 | HRESULT WINAPI CoRegisterMessageFilter(LPMESSAGEFILTER lpMessageFilter,LPMESSAGEFILTER *lplpMessageFilter);
|
|---|
| 171 |
|
|---|
| 172 |
|
|---|
| 173 | /*****************************************************************************
|
|---|
| 174 | * IServerSecurity interface
|
|---|
| 175 | */
|
|---|
| 176 | #define ICOM_INTERFACE IServerSecurity
|
|---|
| 177 | #define IServerSecurity_METHODS \
|
|---|
| 178 | ICOM_METHOD7(HRESULT,QueryBlanket, DWORD*,pAuthnSvc, DWORD*,pAuthzSvc, OLECHAR**,pServerPrincName, DWORD*,pAuthnLevel, DWORD*,pImpLevel, void**,pPrivs, DWORD*,pCapabilities) \
|
|---|
| 179 | ICOM_METHOD (HRESULT,ImpersonateClient) \
|
|---|
| 180 | ICOM_METHOD (HRESULT,RevertToSelf) \
|
|---|
| 181 | ICOM_METHOD (BOOL, IsImpersonating)
|
|---|
| 182 | #define IServerSecurity_IMETHODS \
|
|---|
| 183 | IUnknown_IMETHODS \
|
|---|
| 184 | IServerSecurity_METHODS
|
|---|
| 185 | ICOM_DEFINE(IServerSecurity,IUnknown)
|
|---|
| 186 | #undef ICOM_INTERFACE
|
|---|
| 187 |
|
|---|
| 188 | #ifdef ICOM_CINTERFACE
|
|---|
| 189 | /*** IUnknown methods ***/
|
|---|
| 190 | #define IServerSecurity_QueryInterface(p,a,b) ICOM_CALL2(QueryInterface,p,a,b)
|
|---|
| 191 | #define IServerSecurity_AddRef(p) ICOM_CALL (AddRef,p)
|
|---|
| 192 | #define IServerSecurity_Release(p) ICOM_CALL (Release,p)
|
|---|
| 193 | /*** IServerSecurity methods ***/
|
|---|
| 194 | #define IServerSecurity_QueryBlanket(p,a,b,c,d,e,f,g) ICOM_CALL7(QueryBlanket,p,a,b,c,d,e,f,g)
|
|---|
| 195 | #define IServerSecurity_ImpersonateClient(p) ICOM_CALL (ImpersonateClient,p)
|
|---|
| 196 | #define IServerSecurity_RevertToSelf(p) ICOM_CALL (RevertToSelf,p)
|
|---|
| 197 | #define IServerSecurity_IsImpersonating(p) ICOM_CALL (IsImpersonating,p)
|
|---|
| 198 | #endif
|
|---|
| 199 |
|
|---|
| 200 |
|
|---|
| 201 | /*****************************************************************************
|
|---|
| 202 | * Additional client API
|
|---|
| 203 | */
|
|---|
| 204 |
|
|---|
| 205 | /* FIXME: not implemented */
|
|---|
| 206 | HRESULT WINAPI CoCopyProxy(IUnknown* pProxy, IUnknown** ppCopy);
|
|---|
| 207 |
|
|---|
| 208 | /* FIXME: not implemented */
|
|---|
| 209 | HRESULT WINAPI CoQueryProxyBlanket(IUnknown* pProxy, DWORD* pwAuthnSvc, DWORD* pAuthzSvc, OLECHAR** pServerPrincName, DWORD* pAuthnLevel, DWORD* pImpLevel, RPC_AUTH_IDENTITY_HANDLE* pAuthInfo, DWORD* pCapabilites);
|
|---|
| 210 |
|
|---|
| 211 | /* FIXME: not implemented */
|
|---|
| 212 | HRESULT WINAPI CoSetProxyBlanket(IUnknown* pProxy, DWORD dwAuthnSvc, DWORD dwAuthzSvc, OLECHAR* pServerPrincName, DWORD dwAuthnLevel, DWORD dwImpLevel, RPC_AUTH_IDENTITY_HANDLE pAuthInfo, DWORD dwCapabilities);
|
|---|
| 213 |
|
|---|
| 214 |
|
|---|
| 215 | /*****************************************************************************
|
|---|
| 216 | * Additional server API
|
|---|
| 217 | */
|
|---|
| 218 |
|
|---|
| 219 | /* FIXME: not implemented */
|
|---|
| 220 | ULONG WINAPI CoAddRefServerProcess(void);
|
|---|
| 221 |
|
|---|
| 222 | /* FIXME: not implemented */
|
|---|
| 223 | HRESULT WINAPI CoImpersonateClient(void);
|
|---|
| 224 |
|
|---|
| 225 | /* FIXME: not implemented */
|
|---|
| 226 | HRESULT WINAPI CoQueryClientBlanket(DWORD* pAuthnSvc, DWORD* pAuthzSvc, OLECHAR16** pServerPrincName, DWORD* pAuthnLevel, DWORD* pImpLevel, RPC_AUTHZ_HANDLE* pPrivs, DWORD* pCapabilities);
|
|---|
| 227 |
|
|---|
| 228 | /* FIXME: not implemented */
|
|---|
| 229 | HRESULT WINAPI CoReleaseServerProcess(void);
|
|---|
| 230 |
|
|---|
| 231 | /* FIXME: not implemented */
|
|---|
| 232 | HRESULT WINAPI CoRevertToSelf(void);
|
|---|
| 233 |
|
|---|
| 234 | /* FIXME: not implemented */
|
|---|
| 235 | HRESULT WINAPI CoSuspendClassObjects(void);
|
|---|
| 236 |
|
|---|
| 237 |
|
|---|
| 238 | /*****************************************************************************
|
|---|
| 239 | * Additional API
|
|---|
| 240 | */
|
|---|
| 241 |
|
|---|
| 242 | /* FIXME: not implemented */
|
|---|
| 243 | HRESULT WINAPI CoGetCallContext(REFIID riid, void** ppInterface);
|
|---|
| 244 |
|
|---|
| 245 | /* FIXME: not implemented */
|
|---|
| 246 | HRESULT WINAPI CoGetPSClsid(REFIID riid, CLSID* pClsid);
|
|---|
| 247 |
|
|---|
| 248 | /* FIXME: not implemented */
|
|---|
| 249 | HRESULT WINAPI CoInitializeSecurity(PSECURITY_DESCRIPTOR pSecDesc, LONG cAuthSvc, SOLE_AUTHENTICATION_SERVICE* asAuthSvc, void* pReserved1, DWORD dwAuthnLevel, DWORD dwImpLevel, void* pReserved2, DWORD dwCapabilities, void* pReserved3);
|
|---|
| 250 |
|
|---|
| 251 | /* FIXME: not implemented */
|
|---|
| 252 | BOOL WINAPI CoIsHandlerConnected(LPUNKNOWN pUnk);
|
|---|
| 253 |
|
|---|
| 254 | /* FIXME: not implemented */
|
|---|
| 255 | HRESULT WINAPI CoQueryAuthenticationServices(DWORD* pcAuthSvc, SOLE_AUTHENTICATION_SERVICE** asAuthSvc);
|
|---|
| 256 |
|
|---|
| 257 | /* FIXME: not implemented */
|
|---|
| 258 | HRESULT WINAPI CoRegisterPSClsid(REFIID riid, REFCLSID rclsid);
|
|---|
| 259 |
|
|---|
| 260 | /* FIXME: not implemented */
|
|---|
| 261 | HRESULT WINAPI CoResumeClassObjects(void);
|
|---|
| 262 |
|
|---|
| 263 | #ifdef __cplusplus
|
|---|
| 264 | } /* extern "C" */
|
|---|
| 265 | #endif /* defined(__cplusplus) */
|
|---|
| 266 |
|
|---|
| 267 | #endif /* __WINE_WINE_OBJ_CLIENTSERVER_H */
|
|---|