- Properly disable the second hand.
[wine.git] / include / rpcdce.h
blob4b059acc5ca6f8d9451cdc3ca24514b837d63c9d
1 /*
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
22 #ifndef GUID_DEFINED
23 #include <guiddef.h>
24 #endif
26 #ifndef UUID_DEFINED
27 #define UUID_DEFINED
28 typedef GUID UUID;
29 #endif
31 typedef void* RPC_AUTH_IDENTITY_HANDLE;
32 typedef void* RPC_AUTHZ_HANDLE;
33 typedef void* RPC_IF_HANDLE;
34 typedef I_RPC_HANDLE RPC_BINDING_HANDLE;
35 typedef RPC_BINDING_HANDLE handle_t;
36 #define rpc_binding_handle_t RPC_BINDING_HANDLE
37 #define RPC_MGR_EPV void
39 typedef struct _RPC_BINDING_VECTOR
41 unsigned long Count;
42 RPC_BINDING_HANDLE BindingH[1];
43 } RPC_BINDING_VECTOR, *PRPC_BINDING_VECTOR;
44 #define rpc_binding_vector_t RPC_BINDING_VECTOR
46 typedef struct _UUID_VECTOR
48 unsigned long Count;
49 UUID *Uuid[1];
50 } UUID_VECTOR, *PUUID_VECTOR;
51 #define uuid_vector_t UUID_VECTOR
53 typedef struct _RPC_IF_ID
55 UUID Uuid;
56 unsigned short VersMajor;
57 unsigned short VersMinor;
58 } RPC_IF_ID;
60 #define RPC_C_BINDING_INFINITE_TIMEOUT 10
61 #define RPC_C_BINDING_MIN_TIMEOUT 0
62 #define RPC_C_BINDING_DEFAULT_TIMEOUT 5
63 #define RPC_C_BINDING_MAX_TIMEOUT 9
65 #define RPC_C_CANCEL_INFINITE_TIMEOUT -1
67 #define RPC_C_LISTEN_MAX_CALLS_DEFAULT 1234
68 #define RPC_C_PROTSEQ_MAX_REQS_DEFAULT 10
70 /* RPC_POLICY EndpointFlags */
71 #define RPC_C_BIND_TO_ALL_NICS 0x1
72 #define RPC_C_USE_INTERNET_PORT 0x1
73 #define RPC_C_USE_INTRANET_PORT 0x2
74 #define RPC_C_DONT_FAIL 0x4
76 /* RPC_POLICY EndpointFlags specific to the Falcon/RPC transport */
77 #define RPC_C_MQ_TEMPORARY 0x0000
78 #define RPC_C_MQ_PERMANENT 0x0001
79 #define RPC_C_MQ_CLEAR_ON_OPEN 0x0002
80 #define RPC_C_MQ_USE_EXISTING_SECURITY 0x0004
81 #define RPC_C_MQ_AUTHN_LEVEL_NONE 0x0000
82 #define RPC_C_MQ_AUTHN_LEVEL_PKT_INTEGRITY 0x0008
83 #define RPC_C_MQ_AUTHN_LEVEL_PKT_PRIVACY 0x0010
86 typedef RPC_STATUS RPC_ENTRY RPC_IF_CALLBACK_FN( RPC_IF_HANDLE InterfaceUuid, LPVOID Context );
87 typedef void (__RPC_USER *RPC_AUTH_KEY_RETRIEVAL_FN)();
89 typedef struct _RPC_POLICY
91 UINT Length;
92 ULONG EndpointFlags;
93 ULONG NICFlags;
94 } RPC_POLICY, *PRPC_POLICY;
96 /* RpcServerRegisterIfEx Flags */
97 #define RPC_IF_AUTOLISTEN 0x1
98 #define RPC_IF_OLE 0x2
99 #define RPC_IF_ALLOW_UNKNOWN_AUTHORITY 0x4
100 #define RPC_IF_ALLOW_SECURE_ONLY 0x8
102 RPCRTAPI void RPC_ENTRY
103 RpcRaiseException( RPC_STATUS exception );
105 RPCRTAPI RPC_STATUS RPC_ENTRY
106 RpcBindingCopy( RPC_BINDING_HANDLE SourceBinding, RPC_BINDING_HANDLE* DestinationBinding );
108 RPCRTAPI RPC_STATUS RPC_ENTRY
109 RpcBindingFree( RPC_BINDING_HANDLE* Binding );
111 RPCRTAPI RPC_STATUS RPC_ENTRY
112 RpcBindingInqObject( RPC_BINDING_HANDLE Binding, UUID* ObjectUuid );
113 RPCRTAPI RPC_STATUS RPC_ENTRY
114 RpcBindingReset( RPC_BINDING_HANDLE Binding );
115 RPCRTAPI RPC_STATUS RPC_ENTRY
116 RpcBindingSetObject( RPC_BINDING_HANDLE Binding, UUID* ObjectUuid );
117 RPCRTAPI RPC_STATUS RPC_ENTRY
118 RpcObjectSetType( UUID* ObjUuid, UUID* TypeUuid );
120 RPCRTAPI RPC_STATUS RPC_ENTRY
121 RpcBindingFromStringBindingA( LPSTR StringBinding, RPC_BINDING_HANDLE* Binding );
122 RPCRTAPI RPC_STATUS RPC_ENTRY
123 RpcBindingFromStringBindingW( LPWSTR StringBinding, RPC_BINDING_HANDLE* Binding );
124 #define RpcBindingFromStringBinding WINELIB_NAME_AW(RpcBindingFromStringBinding)
126 RPCRTAPI RPC_STATUS RPC_ENTRY
127 RpcBindingToStringBindingA( RPC_BINDING_HANDLE Binding, LPSTR* StringBinding );
128 RPCRTAPI RPC_STATUS RPC_ENTRY
129 RpcBindingToStringBindingW( RPC_BINDING_HANDLE Binding, LPWSTR* StringBinding );
130 #define RpcBindingFromStringBinding WINELIB_NAME_AW(RpcBindingFromStringBinding)
132 RPCRTAPI RPC_STATUS RPC_ENTRY
133 RpcBindingVectorFree( RPC_BINDING_VECTOR** BindingVector );
135 RPCRTAPI RPC_STATUS RPC_ENTRY
136 RpcStringBindingComposeA( LPSTR ObjUuid, LPSTR Protseq, LPSTR NetworkAddr,
137 LPSTR Endpoint, LPSTR Options, LPSTR* StringBinding );
138 RPCRTAPI RPC_STATUS RPC_ENTRY
139 RpcStringBindingComposeW( LPWSTR ObjUuid, LPWSTR Protseq, LPWSTR NetworkAddr,
140 LPWSTR Endpoint, LPWSTR Options, LPWSTR* StringBinding );
141 #define RpcStringBindingCompose WINELIB_NAME_AW(RpcStringBindingCompose)
143 RPCRTAPI RPC_STATUS RPC_ENTRY
144 RpcStringBindingParseA( LPSTR StringBinding, LPSTR* ObjUuid, LPSTR* Protseq,
145 LPSTR* NetworkAddr, LPSTR* Endpoint, LPSTR* NetworkOptions );
146 RPCRTAPI RPC_STATUS RPC_ENTRY
147 RpcStringBindingParseW( LPWSTR StringBinding, LPWSTR* ObjUuid, LPWSTR* Protseq,
148 LPWSTR* NetworkAddr, LPWSTR* Endpoint, LPWSTR* NetworkOptions );
149 #define RpcStringBindingParse WINELIB_NAME_AW(RpcStringBindingParse)
151 RPCRTAPI RPC_STATUS RPC_ENTRY
152 RpcEpResolveBinding( RPC_BINDING_HANDLE Binding, RPC_IF_HANDLE IfSpec );
154 RPCRTAPI RPC_STATUS RPC_ENTRY
155 RpcEpRegisterA( RPC_IF_HANDLE IfSpec, PRPC_BINDING_VECTOR BindingVector,
156 PUUID_VECTOR UuidVector, LPSTR Annotation );
157 RPCRTAPI RPC_STATUS RPC_ENTRY
158 RpcEpRegisterW( RPC_IF_HANDLE IfSpec, PRPC_BINDING_VECTOR BindingVector,
159 PUUID_VECTOR UuidVector, LPWSTR Annotation );
160 #define RpcEpRegister WINELIB_NAME_AW(RpcEpRegister)
162 RPCRTAPI RPC_STATUS RPC_ENTRY
163 RpcEpRegisterNoReplaceA( RPC_IF_HANDLE IfSpec, RPC_BINDING_VECTOR* BindingVector,
164 UUID_VECTOR* UuidVector, LPSTR Annotation );
165 RPCRTAPI RPC_STATUS RPC_ENTRY
166 RpcEpRegisterNoReplaceW( RPC_IF_HANDLE IfSpec, RPC_BINDING_VECTOR* BindingVector,
167 UUID_VECTOR* UuidVector, LPWSTR Annotation );
168 #define RpcEpRegisterNoReplace WINELIB_NAME_AW(RpcEpRegisterNoReplace)
170 RPCRTAPI RPC_STATUS RPC_ENTRY
171 RpcEpUnregister( RPC_IF_HANDLE IfSpec, RPC_BINDING_VECTOR* BindingVector,
172 UUID_VECTOR* UuidVector );
174 RPCRTAPI RPC_STATUS RPC_ENTRY
175 RpcServerInqBindings( RPC_BINDING_VECTOR** BindingVector );
177 RPCRTAPI RPC_STATUS RPC_ENTRY
178 RpcServerListen( UINT MinimumCallThreads, UINT MaxCalls, UINT DontWait );
180 RPCRTAPI RPC_STATUS RPC_ENTRY
181 RpcMgmtWaitServerListen( void );
183 RPCRTAPI RPC_STATUS RPC_ENTRY
184 RpcMgmtStopServerListening( RPC_BINDING_HANDLE Binding );
186 RPCRTAPI RPC_STATUS RPC_ENTRY
187 RpcServerRegisterIf( RPC_IF_HANDLE IfSpec, UUID* MgrTypeUuid, RPC_MGR_EPV* MgrEpv );
189 RPCRTAPI RPC_STATUS RPC_ENTRY
190 RpcServerRegisterIfEx( RPC_IF_HANDLE IfSpec, UUID* MgrTypeUuid, RPC_MGR_EPV* MgrEpv,
191 UINT Flags, UINT MaxCalls, RPC_IF_CALLBACK_FN* IfCallbackFn );
193 RPCRTAPI RPC_STATUS RPC_ENTRY
194 RpcServerRegisterIf2( RPC_IF_HANDLE IfSpec, UUID* MgrTypeUuid, RPC_MGR_EPV* MgrEpv,
195 UINT Flags, UINT MaxCalls, UINT MaxRpcSize, RPC_IF_CALLBACK_FN* IfCallbackFn );
197 RPCRTAPI RPC_STATUS RPC_ENTRY
198 RpcServerUnregisterIf( RPC_IF_HANDLE IfSpec, UUID* MgrTypeUuid, UINT WaitForCallsToComplete );
200 RPCRTAPI RPC_STATUS RPC_ENTRY
201 RpcServerUnregisterIfEx( RPC_IF_HANDLE IfSpec, UUID* MgrTypeUuid, int RundownContextHandles );
204 RPCRTAPI RPC_STATUS RPC_ENTRY
205 RpcServerUseProtseqA(LPSTR Protseq, unsigned int MaxCalls, void *SecurityDescriptor);
206 RPCRTAPI RPC_STATUS RPC_ENTRY
207 RpcServerUseProtseqW(LPWSTR Protseq, unsigned int MaxCalls, void *SecurityDescriptor);
208 #define RpcServerUseProtseq WINELIB_NAME_AW(RpcServerUseProtseq)
210 RPCRTAPI RPC_STATUS RPC_ENTRY
211 RpcServerUseProtseqEpA( LPSTR Protseq, UINT MaxCalls, LPSTR Endpoint, LPVOID SecurityDescriptor );
212 RPCRTAPI RPC_STATUS RPC_ENTRY
213 RpcServerUseProtseqEpW( LPWSTR Protseq, UINT MaxCalls, LPWSTR Endpoint, LPVOID SecurityDescriptor );
214 #define RpcServerUseProtseqEp WINELIB_NAME_AW(RpcServerUseProtseqEp)
216 RPCRTAPI RPC_STATUS RPC_ENTRY
217 RpcServerUseProtseqEpExA( LPSTR Protseq, UINT MaxCalls, LPSTR Endpoint, LPVOID SecurityDescriptor,
218 PRPC_POLICY Policy );
219 RPCRTAPI RPC_STATUS RPC_ENTRY
220 RpcServerUseProtseqEpExW( LPWSTR Protseq, UINT MaxCalls, LPWSTR Endpoint, LPVOID SecurityDescriptor,
221 PRPC_POLICY Policy );
222 #define RpcServerUseProtseqEpEx WINELIB_NAME_AW(RpcServerUseProtseqEpEx)
224 RPCRTAPI RPC_STATUS RPC_ENTRY
225 RpcServerRegisterAuthInfoA( LPSTR ServerPrincName, ULONG AuthnSvc, RPC_AUTH_KEY_RETRIEVAL_FN GetKeyFn,
226 LPVOID Arg );
227 RPCRTAPI RPC_STATUS RPC_ENTRY
228 RpcServerRegisterAuthInfoW( LPWSTR ServerPrincName, ULONG AuthnSvc, RPC_AUTH_KEY_RETRIEVAL_FN GetKeyFn,
229 LPVOID Arg );
230 #define RpcServerRegisterAuthInfo WINELIB_NAME_AW(RpcServerRegisterAuthInfo)
232 RPCRTAPI RPC_STATUS RPC_ENTRY
233 RpcStringBindingComposeA( LPSTR ObjUuid, LPSTR Protseq, LPSTR NetworkAddr, LPSTR Endpoint,
234 LPSTR Options, LPSTR* StringBinding );
235 RPCRTAPI RPC_STATUS RPC_ENTRY
236 RpcStringBindingComposeW( LPWSTR ObjUuid, LPWSTR Protseq, LPWSTR NetworkAddr, LPWSTR Endpoint,
237 LPWSTR Options, LPWSTR* StringBinding );
238 #define RpcStringBindingCompose WINELIB_NAME_AW(RpcStringBindingCompose)
240 RPCRTAPI RPC_STATUS RPC_ENTRY
241 RpcStringFreeA(unsigned char** String);
242 RPCRTAPI RPC_STATUS RPC_ENTRY
243 RpcStringFreeW(unsigned short** String);
244 #define RpcStringFree WINELIB_NAME_AW(RpcStringFree)
246 RPCRTAPI RPC_STATUS RPC_ENTRY
247 UuidToStringA( UUID* Uuid, unsigned char** StringUuid );
248 RPCRTAPI RPC_STATUS RPC_ENTRY
249 UuidToStringW( UUID* Uuid, unsigned short** StringUuid );
250 #define UuidToString WINELIB_NAME_AW(UuidToString)
252 RPCRTAPI RPC_STATUS RPC_ENTRY
253 UuidFromStringA( unsigned char* StringUuid, UUID* Uuid );
254 RPCRTAPI RPC_STATUS RPC_ENTRY
255 UuidFromStringW( unsigned short* StringUuid, UUID* Uuid );
256 #define UuidFromString WINELIB_NAME_AW(UuidFromString)
258 RPCRTAPI RPC_STATUS RPC_ENTRY
259 UuidCreate( UUID* Uuid );
260 RPCRTAPI RPC_STATUS RPC_ENTRY
261 UuidCreateSequential( UUID* Uuid );
262 RPCRTAPI RPC_STATUS RPC_ENTRY
263 UuidCreateNil( UUID* Uuid );
264 RPCRTAPI signed int RPC_ENTRY
265 UuidCompare( UUID* Uuid1, UUID* Uuid2, RPC_STATUS* Status_ );
266 RPCRTAPI int RPC_ENTRY
267 UuidEqual( UUID* Uuid1, UUID* Uuid2, RPC_STATUS* Status_ );
268 RPCRTAPI unsigned short RPC_ENTRY
269 UuidHash(UUID* Uuid, RPC_STATUS* Status_ );
270 RPCRTAPI int RPC_ENTRY
271 UuidIsNil( UUID* Uuid, RPC_STATUS* Status_ );
273 #include <rpcdcep.h>
275 #endif /*__WINE_RPCDCE_H */