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
28 typedef void* RPC_AUTH_IDENTITY_HANDLE
;
29 typedef void* RPC_AUTHZ_HANDLE
;
30 typedef void* RPC_IF_HANDLE
;
31 typedef I_RPC_HANDLE RPC_BINDING_HANDLE
;
32 typedef RPC_BINDING_HANDLE handle_t
;
33 #define rpc_binding_handle_t RPC_BINDING_HANDLE
34 #define RPC_MGR_EPV void
36 typedef struct _RPC_BINDING_VECTOR
39 RPC_BINDING_HANDLE BindingH
[1];
41 #define rpc_binding_vector_t RPC_BINDING_VECTOR
43 typedef struct _UUID_VECTOR
48 #define uuid_vector_t UUID_VECTOR
50 typedef struct _RPC_IF_ID
53 unsigned short VersMajor
;
54 unsigned short VersMinor
;
57 #define RPC_C_BINDING_INFINITE_TIMEOUT 10
58 #define RPC_C_BINDING_MIN_TIMEOUT 0
59 #define RPC_C_BINDING_DEFAULT_TIMEOUT 5
60 #define RPC_C_BINDING_MAX_TIMEOUT 9
62 #define RPC_C_CANCEL_INFINITE_TIMEOUT -1
64 #define RPC_C_LISTEN_MAX_CALLS_DEFAULT 1234
65 #define RPC_C_PROTSEQ_MAX_REQS_DEFAULT 10
67 /* RPC_POLICY EndpointFlags */
68 #define RPC_C_BIND_TO_ALL_NICS 0x1
69 #define RPC_C_USE_INTERNET_PORT 0x1
70 #define RPC_C_USE_INTRANET_PORT 0x2
71 #define RPC_C_DONT_FAIL 0x4
73 /* RPC_POLICY EndpointFlags specific to the Falcon/RPC transport */
74 #define RPC_C_MQ_TEMPORARY 0x0000
75 #define RPC_C_MQ_PERMANENT 0x0001
76 #define RPC_C_MQ_CLEAR_ON_OPEN 0x0002
77 #define RPC_C_MQ_USE_EXISTING_SECURITY 0x0004
78 #define RPC_C_MQ_AUTHN_LEVEL_NONE 0x0000
79 #define RPC_C_MQ_AUTHN_LEVEL_PKT_INTEGRITY 0x0008
80 #define RPC_C_MQ_AUTHN_LEVEL_PKT_PRIVACY 0x0010
83 typedef RPC_STATUS RPC_ENTRY
RPC_IF_CALLBACK_FN( RPC_IF_HANDLE InterfaceUuid
, LPVOID Context
);
84 typedef void (__RPC_USER
*RPC_AUTH_KEY_RETRIEVAL_FN
)();
86 typedef struct _RPC_POLICY
91 } RPC_POLICY
, *PRPC_POLICY
;
93 /* RpcServerRegisterIfEx Flags */
94 #define RPC_IF_AUTOLISTEN 0x1
95 #define RPC_IF_OLE 0x2
96 #define RPC_IF_ALLOW_UNKNOWN_AUTHORITY 0x4
97 #define RPC_IF_ALLOW_SECURE_ONLY 0x8
99 RPCRTAPI RPC_STATUS RPC_ENTRY
100 RpcBindingCopy( RPC_BINDING_HANDLE SourceBinding
, RPC_BINDING_HANDLE
* DestinationBinding
);
102 RPCRTAPI RPC_STATUS RPC_ENTRY
103 RpcBindingFree( RPC_BINDING_HANDLE
* Binding
);
105 RPCRTAPI RPC_STATUS RPC_ENTRY
106 RpcBindingInqObject( RPC_BINDING_HANDLE Binding
, UUID
* ObjectUuid
);
107 RPCRTAPI RPC_STATUS RPC_ENTRY
108 RpcBindingReset( RPC_BINDING_HANDLE Binding
);
109 RPCRTAPI RPC_STATUS RPC_ENTRY
110 RpcBindingSetObject( RPC_BINDING_HANDLE Binding
, UUID
* ObjectUuid
);
112 RPCRTAPI RPC_STATUS RPC_ENTRY
113 RpcBindingFromStringBindingA( LPSTR StringBinding
, RPC_BINDING_HANDLE
* Binding
);
114 RPCRTAPI RPC_STATUS RPC_ENTRY
115 RpcBindingFromStringBindingW( LPWSTR StringBinding
, RPC_BINDING_HANDLE
* Binding
);
116 #define RpcBindingFromStringBinding WINELIB_NAME_AW(RpcBindingFromStringBinding)
118 RPCRTAPI RPC_STATUS RPC_ENTRY
119 RpcBindingToStringBindingA( RPC_BINDING_HANDLE Binding
, LPSTR
* StringBinding
);
120 RPCRTAPI RPC_STATUS RPC_ENTRY
121 RpcBindingToStringBindingW( RPC_BINDING_HANDLE Binding
, LPWSTR
* StringBinding
);
122 #define RpcBindingFromStringBinding WINELIB_NAME_AW(RpcBindingFromStringBinding)
124 RPCRTAPI RPC_STATUS RPC_ENTRY
125 RpcBindingVectorFree( RPC_BINDING_VECTOR
** BindingVector
);
127 RPCRTAPI RPC_STATUS RPC_ENTRY
128 RpcStringBindingComposeA( LPSTR ObjUuid
, LPSTR Protseq
, LPSTR NetworkAddr
,
129 LPSTR Endpoint
, LPSTR Options
, LPSTR
* StringBinding
);
130 RPCRTAPI RPC_STATUS RPC_ENTRY
131 RpcStringBindingComposeW( LPWSTR ObjUuid
, LPWSTR Protseq
, LPWSTR NetworkAddr
,
132 LPWSTR Endpoint
, LPWSTR Options
, LPWSTR
* StringBinding
);
133 #define RpcStringBindingCompose WINELIB_NAME_AW(RpcStringBindingCompose)
135 RPCRTAPI RPC_STATUS RPC_ENTRY
136 RpcStringBindingParseA( LPSTR StringBinding
, LPSTR
* ObjUuid
, LPSTR
* Protseq
,
137 LPSTR
* NetworkAddr
, LPSTR
* Endpoint
, LPSTR
* NetworkOptions
);
138 RPCRTAPI RPC_STATUS RPC_ENTRY
139 RpcStringBindingParseW( LPWSTR StringBinding
, LPWSTR
* ObjUuid
, LPWSTR
* Protseq
,
140 LPWSTR
* NetworkAddr
, LPWSTR
* Endpoint
, LPWSTR
* NetworkOptions
);
141 #define RpcStringBindingParse WINELIB_NAME_AW(RpcStringBindingParse)
143 RPCRTAPI RPC_STATUS RPC_ENTRY
144 RpcEpResolveBinding( RPC_BINDING_HANDLE Binding
, RPC_IF_HANDLE IfSpec
);
146 RPCRTAPI RPC_STATUS RPC_ENTRY
147 RpcEpRegisterA( RPC_IF_HANDLE IfSpec
, RPC_BINDING_VECTOR
* BindingVector
,
148 UUID_VECTOR
* UuidVector
, LPSTR Annotation
);
149 RPCRTAPI RPC_STATUS RPC_ENTRY
150 RpcEpRegisterW( RPC_IF_HANDLE IfSpec
, RPC_BINDING_VECTOR
* BindingVector
,
151 UUID_VECTOR
* UuidVector
, LPWSTR Annotation
);
152 #define RpcEpRegister WINELIB_NAME_AW(RpcEpRegister)
154 RPCRTAPI RPC_STATUS RPC_ENTRY
155 RpcEpRegisterNoReplaceA( RPC_IF_HANDLE IfSpec
, RPC_BINDING_VECTOR
* BindingVector
,
156 UUID_VECTOR
* UuidVector
, LPSTR Annotation
);
157 RPCRTAPI RPC_STATUS RPC_ENTRY
158 RpcEpRegisterNoReplaceW( RPC_IF_HANDLE IfSpec
, RPC_BINDING_VECTOR
* BindingVector
,
159 UUID_VECTOR
* UuidVector
, LPWSTR Annotation
);
160 #define RpcEpRegisterNoReplace WINELIB_NAME_AW(RpcEpRegisterNoReplace)
162 RPCRTAPI RPC_STATUS RPC_ENTRY
163 RpcEpUnregister( RPC_IF_HANDLE IfSpec
, RPC_BINDING_VECTOR
* BindingVector
,
164 UUID_VECTOR
* UuidVector
);
166 RPCRTAPI RPC_STATUS RPC_ENTRY
167 RpcServerInqBindings( RPC_BINDING_VECTOR
** BindingVector
);
169 RPCRTAPI RPC_STATUS RPC_ENTRY
170 RpcServerListen( UINT MinimumCallThreads
, UINT MaxCalls
, UINT DontWait
);
172 RPCRTAPI RPC_STATUS RPC_ENTRY
173 RpcServerRegisterIf( RPC_IF_HANDLE IfSpec
, UUID
* MgrTypeUuid
, RPC_MGR_EPV
* MgrEpv
);
175 RPCRTAPI RPC_STATUS RPC_ENTRY
176 RpcServerRegisterIfEx( RPC_IF_HANDLE IfSpec
, UUID
* MgrTypeUuid
, RPC_MGR_EPV
* MgrEpv
,
177 UINT Flags
, UINT MaxCalls
, RPC_IF_CALLBACK_FN
* IfCallbackFn
);
179 RPCRTAPI RPC_STATUS RPC_ENTRY
180 RpcServerRegisterIf2( RPC_IF_HANDLE IfSpec
, UUID
* MgrTypeUuid
, RPC_MGR_EPV
* MgrEpv
,
181 UINT Flags
, UINT MaxCalls
, UINT MaxRpcSize
, RPC_IF_CALLBACK_FN
* IfCallbackFn
);
183 RPCRTAPI RPC_STATUS RPC_ENTRY
184 RpcServerUseProtseqEpA( LPSTR Protseq
, UINT MaxCalls
, LPSTR Endpoint
, LPVOID SecurityDescriptor
);
185 RPCRTAPI RPC_STATUS RPC_ENTRY
186 RpcServerUseProtseqEpW( LPWSTR Protseq
, UINT MaxCalls
, LPWSTR Endpoint
, LPVOID SecurityDescriptor
);
187 #define RpcServerUseProtseqEp WINELIB_NAME_AW(RpcServerUseProtseqEp)
189 RPCRTAPI RPC_STATUS RPC_ENTRY
190 RpcServerUseProtseqEpExA( LPSTR Protseq
, UINT MaxCalls
, LPSTR Endpoint
, LPVOID SecurityDescriptor
,
191 PRPC_POLICY Policy
);
192 RPCRTAPI RPC_STATUS RPC_ENTRY
193 RpcServerUseProtseqEpExW( LPWSTR Protseq
, UINT MaxCalls
, LPWSTR Endpoint
, LPVOID SecurityDescriptor
,
194 PRPC_POLICY Policy
);
195 #define RpcServerUseProtseqEpEx WINELIB_NAME_AW(RpcServerUseProtseqEpEx)
197 RPCRTAPI RPC_STATUS RPC_ENTRY
198 RpcServerRegisterAuthInfoA( LPSTR ServerPrincName
, ULONG AuthnSvc
, RPC_AUTH_KEY_RETRIEVAL_FN GetKeyFn
,
200 RPCRTAPI RPC_STATUS RPC_ENTRY
201 RpcServerRegisterAuthInfoW( LPWSTR ServerPrincName
, ULONG AuthnSvc
, RPC_AUTH_KEY_RETRIEVAL_FN GetKeyFn
,
203 #define RpcServerRegisterAuthInfo WINELIB_NAME_AW(RpcServerRegisterAuthInfo)
205 RPCRTAPI RPC_STATUS RPC_ENTRY
206 RpcServerListen( UINT MinimumCallThreads
, UINT MaxCalls
, UINT DontWait
);
208 RPCRTAPI RPC_STATUS RPC_ENTRY
209 RpcStringBindingComposeA( LPSTR ObjUuid
, LPSTR Protseq
, LPSTR NetworkAddr
, LPSTR Endpoint
,
210 LPSTR Options
, LPSTR
* StringBinding
);
211 RPCRTAPI RPC_STATUS RPC_ENTRY
212 RpcStringBindingComposeW( LPWSTR ObjUuid
, LPWSTR Protseq
, LPWSTR NetworkAddr
, LPWSTR Endpoint
,
213 LPWSTR Options
, LPWSTR
* StringBinding
);
214 #define RpcStringBindingCompose WINELIB_NAME_AW(RpcStringBindingCompose)
216 RPCRTAPI RPC_STATUS RPC_ENTRY
217 RpcStringFreeA(LPSTR
* String
);
218 RPCRTAPI RPC_STATUS RPC_ENTRY
219 RpcStringFreeW(LPWSTR
* String
);
220 #define RpcStringFree WINELIB_NAME_AW(RpcStringFree)
222 RPCRTAPI RPC_STATUS RPC_ENTRY
223 UuidToStringA( UUID
* Uuid
, LPSTR
* StringUuid
);
224 RPCRTAPI RPC_STATUS RPC_ENTRY
225 UuidToStringW( UUID
* Uuid
, LPWSTR
* StringUuid
);
226 #define UuidToString WINELIB_NAME_AW(UuidToString)
228 RPCRTAPI RPC_STATUS RPC_ENTRY
229 UuidFromStringA( LPSTR StringUuid
, UUID
* Uuid
);
230 RPCRTAPI RPC_STATUS RPC_ENTRY
231 UuidFromStringW( LPWSTR StringUuid
, UUID
* Uuid
);
232 #define UuidFromString WINELIB_NAME_AW(UuidFromString)
234 RPCRTAPI RPC_STATUS RPC_ENTRY
235 UuidCreate( UUID
* Uuid
);
236 RPCRTAPI RPC_STATUS RPC_ENTRY
237 UuidCreateSequential( UUID
* Uuid
);
238 RPCRTAPI RPC_STATUS RPC_ENTRY
239 UuidCreateNil( UUID
* Uuid
);
240 RPCRTAPI
signed int RPC_ENTRY
241 UuidCompare( UUID
* Uuid1
, UUID
* Uuid2
, RPC_STATUS
* Status_
);
242 RPCRTAPI
int RPC_ENTRY
243 UuidEqual( UUID
* Uuid1
, UUID
* Uuid2
, RPC_STATUS
* Status_
);
244 RPCRTAPI
unsigned short RPC_ENTRY
245 UuidHash(UUID
* Uuid
, RPC_STATUS
* Status_
);
246 RPCRTAPI
int RPC_ENTRY
247 UuidIsNil( UUID
* Uuid
, RPC_STATUS
* Status_
);
251 #endif /*__WINE_RPCDCE_H */