2 * Copyright (C) 2000 Francois Gouget
4 * This library is free software; you can redistribute it and/or
5 * modify it under the terms of the GNU Lesser General Public
6 * License as published by the Free Software Foundation; either
7 * version 2.1 of the License, or (at your option) any later version.
9 * This library is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12 * Lesser General Public License for more details.
14 * You should have received a copy of the GNU Lesser General Public
15 * License along with this library; if not, write to the Free Software
16 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
19 #ifndef __WINE_RPCDCE_H
20 #define __WINE_RPCDCE_H
24 /* avoid delving into windows.h ifndef __WINESRC__; this
25 would pull in rpcndr.h, which needs rpcdcep.h, which
26 needs us, in turn, causing a compile failure */
27 #ifndef RPC_NO_WINDOWS_H
28 #define __NO_HAD_RPC_NO_WINDOWS_H
29 #define RPC_NO_WINDOWS_H
34 #ifdef __NO_HAD_RPC_NO_WINDOWS_H
35 #undef RPC_NO_WINDOWS_H
36 #undef __NO_HAD_RPC_NO_WINDOWS_H
48 typedef void* RPC_AUTH_IDENTITY_HANDLE
;
49 typedef void* RPC_AUTHZ_HANDLE
;
50 typedef void* RPC_IF_HANDLE
;
51 typedef I_RPC_HANDLE RPC_BINDING_HANDLE
;
52 typedef RPC_BINDING_HANDLE handle_t
;
53 #define rpc_binding_handle_t RPC_BINDING_HANDLE
54 #define RPC_MGR_EPV void
56 typedef struct _RPC_BINDING_VECTOR
59 RPC_BINDING_HANDLE BindingH
[1];
60 } RPC_BINDING_VECTOR
, *PRPC_BINDING_VECTOR
;
61 #define rpc_binding_vector_t RPC_BINDING_VECTOR
63 typedef struct _UUID_VECTOR
67 } UUID_VECTOR
, *PUUID_VECTOR
;
68 #define uuid_vector_t UUID_VECTOR
70 typedef struct _RPC_IF_ID
73 unsigned short VersMajor
;
74 unsigned short VersMinor
;
77 #define RPC_C_BINDING_INFINITE_TIMEOUT 10
78 #define RPC_C_BINDING_MIN_TIMEOUT 0
79 #define RPC_C_BINDING_DEFAULT_TIMEOUT 5
80 #define RPC_C_BINDING_MAX_TIMEOUT 9
82 #define RPC_C_CANCEL_INFINITE_TIMEOUT -1
84 #define RPC_C_LISTEN_MAX_CALLS_DEFAULT 1234
85 #define RPC_C_PROTSEQ_MAX_REQS_DEFAULT 10
87 /* RPC_POLICY EndpointFlags */
88 #define RPC_C_BIND_TO_ALL_NICS 0x1
89 #define RPC_C_USE_INTERNET_PORT 0x1
90 #define RPC_C_USE_INTRANET_PORT 0x2
91 #define RPC_C_DONT_FAIL 0x4
93 /* RPC_POLICY EndpointFlags specific to the Falcon/RPC transport */
94 #define RPC_C_MQ_TEMPORARY 0x0000
95 #define RPC_C_MQ_PERMANENT 0x0001
96 #define RPC_C_MQ_CLEAR_ON_OPEN 0x0002
97 #define RPC_C_MQ_USE_EXISTING_SECURITY 0x0004
98 #define RPC_C_MQ_AUTHN_LEVEL_NONE 0x0000
99 #define RPC_C_MQ_AUTHN_LEVEL_PKT_INTEGRITY 0x0008
100 #define RPC_C_MQ_AUTHN_LEVEL_PKT_PRIVACY 0x0010
103 typedef RPC_STATUS RPC_ENTRY
RPC_IF_CALLBACK_FN( RPC_IF_HANDLE InterfaceUuid
, LPVOID Context
);
104 typedef void (__RPC_USER
*RPC_AUTH_KEY_RETRIEVAL_FN
)();
106 typedef struct _RPC_POLICY
111 } RPC_POLICY
, *PRPC_POLICY
;
113 /* RpcServerRegisterIfEx Flags */
114 #define RPC_IF_AUTOLISTEN 0x1
115 #define RPC_IF_OLE 0x2
116 #define RPC_IF_ALLOW_UNKNOWN_AUTHORITY 0x4
117 #define RPC_IF_ALLOW_SECURE_ONLY 0x8
119 RPCRTAPI
void RPC_ENTRY
120 RpcRaiseException( RPC_STATUS exception
);
122 RPCRTAPI RPC_STATUS RPC_ENTRY
123 RpcBindingCopy( RPC_BINDING_HANDLE SourceBinding
, RPC_BINDING_HANDLE
* DestinationBinding
);
125 RPCRTAPI RPC_STATUS RPC_ENTRY
126 RpcBindingFree( RPC_BINDING_HANDLE
* Binding
);
128 RPCRTAPI RPC_STATUS RPC_ENTRY
129 RpcBindingInqObject( RPC_BINDING_HANDLE Binding
, UUID
* ObjectUuid
);
130 RPCRTAPI RPC_STATUS RPC_ENTRY
131 RpcBindingReset( RPC_BINDING_HANDLE Binding
);
132 RPCRTAPI RPC_STATUS RPC_ENTRY
133 RpcBindingSetObject( RPC_BINDING_HANDLE Binding
, UUID
* ObjectUuid
);
135 RPCRTAPI RPC_STATUS RPC_ENTRY
136 RpcBindingFromStringBindingA( LPSTR StringBinding
, RPC_BINDING_HANDLE
* Binding
);
137 RPCRTAPI RPC_STATUS RPC_ENTRY
138 RpcBindingFromStringBindingW( LPWSTR StringBinding
, RPC_BINDING_HANDLE
* Binding
);
139 #define RpcBindingFromStringBinding WINELIB_NAME_AW(RpcBindingFromStringBinding)
141 RPCRTAPI RPC_STATUS RPC_ENTRY
142 RpcBindingToStringBindingA( RPC_BINDING_HANDLE Binding
, LPSTR
* StringBinding
);
143 RPCRTAPI RPC_STATUS RPC_ENTRY
144 RpcBindingToStringBindingW( RPC_BINDING_HANDLE Binding
, LPWSTR
* StringBinding
);
145 #define RpcBindingFromStringBinding WINELIB_NAME_AW(RpcBindingFromStringBinding)
147 RPCRTAPI RPC_STATUS RPC_ENTRY
148 RpcBindingVectorFree( RPC_BINDING_VECTOR
** BindingVector
);
150 RPCRTAPI RPC_STATUS RPC_ENTRY
151 RpcStringBindingComposeA( LPSTR ObjUuid
, LPSTR Protseq
, LPSTR NetworkAddr
,
152 LPSTR Endpoint
, LPSTR Options
, LPSTR
* StringBinding
);
153 RPCRTAPI RPC_STATUS RPC_ENTRY
154 RpcStringBindingComposeW( LPWSTR ObjUuid
, LPWSTR Protseq
, LPWSTR NetworkAddr
,
155 LPWSTR Endpoint
, LPWSTR Options
, LPWSTR
* StringBinding
);
156 #define RpcStringBindingCompose WINELIB_NAME_AW(RpcStringBindingCompose)
158 RPCRTAPI RPC_STATUS RPC_ENTRY
159 RpcStringBindingParseA( LPSTR StringBinding
, LPSTR
* ObjUuid
, LPSTR
* Protseq
,
160 LPSTR
* NetworkAddr
, LPSTR
* Endpoint
, LPSTR
* NetworkOptions
);
161 RPCRTAPI RPC_STATUS RPC_ENTRY
162 RpcStringBindingParseW( LPWSTR StringBinding
, LPWSTR
* ObjUuid
, LPWSTR
* Protseq
,
163 LPWSTR
* NetworkAddr
, LPWSTR
* Endpoint
, LPWSTR
* NetworkOptions
);
164 #define RpcStringBindingParse WINELIB_NAME_AW(RpcStringBindingParse)
166 RPCRTAPI RPC_STATUS RPC_ENTRY
167 RpcEpResolveBinding( RPC_BINDING_HANDLE Binding
, RPC_IF_HANDLE IfSpec
);
169 RPCRTAPI RPC_STATUS RPC_ENTRY
170 RpcEpRegisterA( RPC_IF_HANDLE IfSpec
, PRPC_BINDING_VECTOR BindingVector
,
171 PUUID_VECTOR UuidVector
, LPSTR Annotation
);
172 RPCRTAPI RPC_STATUS RPC_ENTRY
173 RpcEpRegisterW( RPC_IF_HANDLE IfSpec
, PRPC_BINDING_VECTOR BindingVector
,
174 PUUID_VECTOR UuidVector
, LPWSTR Annotation
);
175 #define RpcEpRegister WINELIB_NAME_AW(RpcEpRegister)
177 RPCRTAPI RPC_STATUS RPC_ENTRY
178 RpcEpRegisterNoReplaceA( RPC_IF_HANDLE IfSpec
, RPC_BINDING_VECTOR
* BindingVector
,
179 UUID_VECTOR
* UuidVector
, LPSTR Annotation
);
180 RPCRTAPI RPC_STATUS RPC_ENTRY
181 RpcEpRegisterNoReplaceW( RPC_IF_HANDLE IfSpec
, RPC_BINDING_VECTOR
* BindingVector
,
182 UUID_VECTOR
* UuidVector
, LPWSTR Annotation
);
183 #define RpcEpRegisterNoReplace WINELIB_NAME_AW(RpcEpRegisterNoReplace)
185 RPCRTAPI RPC_STATUS RPC_ENTRY
186 RpcEpUnregister( RPC_IF_HANDLE IfSpec
, RPC_BINDING_VECTOR
* BindingVector
,
187 UUID_VECTOR
* UuidVector
);
189 RPCRTAPI RPC_STATUS RPC_ENTRY
190 RpcServerInqBindings( RPC_BINDING_VECTOR
** BindingVector
);
192 RPCRTAPI RPC_STATUS RPC_ENTRY
193 RpcServerListen( UINT MinimumCallThreads
, UINT MaxCalls
, UINT DontWait
);
195 RPCRTAPI RPC_STATUS RPC_ENTRY
196 RpcMgmtWaitServerListen( void );
198 RPCRTAPI RPC_STATUS RPC_ENTRY
199 RpcMgmtStopServerListening( RPC_BINDING_HANDLE Binding
);
201 RPCRTAPI RPC_STATUS RPC_ENTRY
202 RpcServerRegisterIf( RPC_IF_HANDLE IfSpec
, UUID
* MgrTypeUuid
, RPC_MGR_EPV
* MgrEpv
);
204 RPCRTAPI RPC_STATUS RPC_ENTRY
205 RpcServerRegisterIfEx( RPC_IF_HANDLE IfSpec
, UUID
* MgrTypeUuid
, RPC_MGR_EPV
* MgrEpv
,
206 UINT Flags
, UINT MaxCalls
, RPC_IF_CALLBACK_FN
* IfCallbackFn
);
208 RPCRTAPI RPC_STATUS RPC_ENTRY
209 RpcServerRegisterIf2( RPC_IF_HANDLE IfSpec
, UUID
* MgrTypeUuid
, RPC_MGR_EPV
* MgrEpv
,
210 UINT Flags
, UINT MaxCalls
, UINT MaxRpcSize
, RPC_IF_CALLBACK_FN
* IfCallbackFn
);
212 RPCRTAPI RPC_STATUS RPC_ENTRY
213 RpcServerUnregisterIf( RPC_IF_HANDLE IfSpec
, UUID
* MgrTypeUuid
, UINT WaitForCallsToComplete
);
215 RPCRTAPI RPC_STATUS RPC_ENTRY
216 RpcServerUnregisterIfEx( RPC_IF_HANDLE IfSpec
, UUID
* MgrTypeUuid
, int RundownContextHandles
);
219 RPCRTAPI RPC_STATUS RPC_ENTRY
220 RpcServerUseProtseqA(LPSTR Protseq
, unsigned int MaxCalls
, void *SecurityDescriptor
);
221 RPCRTAPI RPC_STATUS RPC_ENTRY
222 RpcServerUseProtseqW(LPWSTR Protseq
, unsigned int MaxCalls
, void *SecurityDescriptor
);
223 #define RpcServerUseProtseq WINELIB_NAME_AW(RpcServerUseProtseq)
225 RPCRTAPI RPC_STATUS RPC_ENTRY
226 RpcServerUseProtseqEpA( LPSTR Protseq
, UINT MaxCalls
, LPSTR Endpoint
, LPVOID SecurityDescriptor
);
227 RPCRTAPI RPC_STATUS RPC_ENTRY
228 RpcServerUseProtseqEpW( LPWSTR Protseq
, UINT MaxCalls
, LPWSTR Endpoint
, LPVOID SecurityDescriptor
);
229 #define RpcServerUseProtseqEp WINELIB_NAME_AW(RpcServerUseProtseqEp)
231 RPCRTAPI RPC_STATUS RPC_ENTRY
232 RpcServerUseProtseqEpExA( LPSTR Protseq
, UINT MaxCalls
, LPSTR Endpoint
, LPVOID SecurityDescriptor
,
233 PRPC_POLICY Policy
);
234 RPCRTAPI RPC_STATUS RPC_ENTRY
235 RpcServerUseProtseqEpExW( LPWSTR Protseq
, UINT MaxCalls
, LPWSTR Endpoint
, LPVOID SecurityDescriptor
,
236 PRPC_POLICY Policy
);
237 #define RpcServerUseProtseqEpEx WINELIB_NAME_AW(RpcServerUseProtseqEpEx)
239 RPCRTAPI RPC_STATUS RPC_ENTRY
240 RpcServerRegisterAuthInfoA( LPSTR ServerPrincName
, ULONG AuthnSvc
, RPC_AUTH_KEY_RETRIEVAL_FN GetKeyFn
,
242 RPCRTAPI RPC_STATUS RPC_ENTRY
243 RpcServerRegisterAuthInfoW( LPWSTR ServerPrincName
, ULONG AuthnSvc
, RPC_AUTH_KEY_RETRIEVAL_FN GetKeyFn
,
245 #define RpcServerRegisterAuthInfo WINELIB_NAME_AW(RpcServerRegisterAuthInfo)
247 RPCRTAPI RPC_STATUS RPC_ENTRY
248 RpcStringBindingComposeA( LPSTR ObjUuid
, LPSTR Protseq
, LPSTR NetworkAddr
, LPSTR Endpoint
,
249 LPSTR Options
, LPSTR
* StringBinding
);
250 RPCRTAPI RPC_STATUS RPC_ENTRY
251 RpcStringBindingComposeW( LPWSTR ObjUuid
, LPWSTR Protseq
, LPWSTR NetworkAddr
, LPWSTR Endpoint
,
252 LPWSTR Options
, LPWSTR
* StringBinding
);
253 #define RpcStringBindingCompose WINELIB_NAME_AW(RpcStringBindingCompose)
255 RPCRTAPI RPC_STATUS RPC_ENTRY
256 RpcStringFreeA(unsigned char** String
);
257 RPCRTAPI RPC_STATUS RPC_ENTRY
258 RpcStringFreeW(unsigned short** String
);
259 #define RpcStringFree WINELIB_NAME_AW(RpcStringFree)
261 RPCRTAPI RPC_STATUS RPC_ENTRY
262 UuidToStringA( UUID
* Uuid
, unsigned char** StringUuid
);
263 RPCRTAPI RPC_STATUS RPC_ENTRY
264 UuidToStringW( UUID
* Uuid
, unsigned short** StringUuid
);
265 #define UuidToString WINELIB_NAME_AW(UuidToString)
267 RPCRTAPI RPC_STATUS RPC_ENTRY
268 UuidFromStringA( unsigned char* StringUuid
, UUID
* Uuid
);
269 RPCRTAPI RPC_STATUS RPC_ENTRY
270 UuidFromStringW( unsigned short* StringUuid
, UUID
* Uuid
);
271 #define UuidFromString WINELIB_NAME_AW(UuidFromString)
273 RPCRTAPI RPC_STATUS RPC_ENTRY
274 UuidCreate( UUID
* Uuid
);
275 RPCRTAPI RPC_STATUS RPC_ENTRY
276 UuidCreateSequential( UUID
* Uuid
);
277 RPCRTAPI RPC_STATUS RPC_ENTRY
278 UuidCreateNil( UUID
* Uuid
);
279 RPCRTAPI
signed int RPC_ENTRY
280 UuidCompare( UUID
* Uuid1
, UUID
* Uuid2
, RPC_STATUS
* Status_
);
281 RPCRTAPI
int RPC_ENTRY
282 UuidEqual( UUID
* Uuid1
, UUID
* Uuid2
, RPC_STATUS
* Status_
);
283 RPCRTAPI
unsigned short RPC_ENTRY
284 UuidHash(UUID
* Uuid
, RPC_STATUS
* Status_
);
285 RPCRTAPI
int RPC_ENTRY
286 UuidIsNil( UUID
* Uuid
, RPC_STATUS
* Status_
);
290 #endif /*__WINE_RPCDCE_H */