- Add endpoint mapping and DCE types IDL from Wine.

svn path=/trunk/; revision=37224
This commit is contained in:
Aleksey Bragin 2008-11-06 12:23:44 +00:00
parent c15d69d936
commit ab7c1ded60
2 changed files with 210 additions and 0 deletions

View file

@ -0,0 +1,88 @@
/*
* Common DCE Types
*
* Copyright 2006 Robert Shearman (for CodeWeavers)
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
*/
/* pull in GUID type */
import "wtypes.idl";
typedef unsigned small unsigned8;
typedef unsigned short unsigned16;
typedef unsigned long unsigned32;
typedef small signed8;
typedef short signed16;
typedef long signed32;
typedef unsigned32 boolean32;
typedef unsigned hyper u_int64;
typedef unsigned long u_int32;
typedef unsigned short u_int16;
typedef unsigned small u_int8;
typedef [ptr] GUID *uuid_p_t;
typedef struct twr_t
{
unsigned32 tower_length;
[size_is(tower_length)] byte tower_octet_string[];
} twr_t;
typedef [ptr] twr_t *twr_p_t;
typedef struct ndr_context_handle
{
unsigned32 context_handle_attributes;
GUID context_handle_uuid;
} ndr_context_handle;
const long ndr_c_int_big_endian = 0;
const long ndr_c_int_little_endian = 1;
const long ndr_c_float_ieee = 0;
const long ndr_c_float_vax = 1;
const long ndr_c_float_cray = 2;
const long ndr_c_float_ibm = 3;
const long ndr_c_char_ascii = 0;
const long ndr_c_char_ebcdic = 1;
typedef struct
{
unsigned8 int_rep;
unsigned8 char_rep;
unsigned8 float_rep;
byte reserved;
} ndr_format_t, *ndr_format_p_t;
typedef struct
{
GUID uuid;
unsigned16 vers_major;
unsigned16 vers_minor;
} rpc_if_id_t;
typedef [unique] rpc_if_id_t *rpc_if_id_p_t;
typedef struct
{
unsigned32 count;
[size_is(count)]
rpc_if_id_p_t if_id[*];
} rpc_if_id_vector_t;
typedef [unique] rpc_if_id_vector_t *rpc_if_id_vector_p_t;
typedef struct
{
unsigned32 count;
unsigned32 stats[1]; /* length_is (count) */
} rpc_stats_vector_t, *rpc_stats_vector_p_t;

View file

@ -0,0 +1,122 @@
/*
* Endpoint Mapper
*
* Copyright 2006 Robert Shearman (for CodeWeavers)
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
*/
/* FIXME: should be import */
#include "dcetypes.idl"
cpp_quote("RPC_STATUS WINAPI TowerExplode(")
cpp_quote(" const twr_t *tower, PRPC_SYNTAX_IDENTIFIER object, PRPC_SYNTAX_IDENTIFIER syntax,")
cpp_quote(" char **protseq, char **endpoint, char **address);")
cpp_quote("RPC_STATUS WINAPI TowerConstruct(")
cpp_quote(" const RPC_SYNTAX_IDENTIFIER *object, const RPC_SYNTAX_IDENTIFIER *syntax,")
cpp_quote(" const char *protseq, const char *endpoint, const char *address,")
cpp_quote(" twr_t **tower);")
[
uuid(e1af8308-5d1f-11c9-91a4-08002b14a0fa),
version(3.0),
pointer_default(ref)
]
interface epm
{
const long ept_max_annotation_size = 64;
typedef struct
{
GUID object;
twr_t *tower;
[string] char annotation[ept_max_annotation_size];
} ept_entry_t, *ept_entry_p_t;
typedef [context_handle] void *ept_lookup_handle_t;
/* Adds entries to an endpoint map */
void ept_insert(
[in] handle_t h,
[in] unsigned32 num_ents,
[in, size_is(num_ents)]
ept_entry_t entries[],
[in] boolean32 replace,
[out] error_status_t *status
);
/* Removes entries from an endpoint map */
void ept_delete(
[in] handle_t h,
[in] unsigned32 num_ents,
[in, size_is(num_ents)]
ept_entry_t entries[],
[out] error_status_t *status
);
/* Lookup entries in an endpoint map */
[idempotent]
void ept_lookup(
[in] handle_t h,
[in] unsigned32 inquiry_type,
[in] uuid_p_t object,
[in] rpc_if_id_p_t interface_id,
[in] unsigned32 vers_option,
[in, out] ept_lookup_handle_t *entry_handle,
[in] unsigned32 max_ents,
[out] unsigned32 *num_ents,
[out, length_is(*num_ents), size_is(max_ents)]
ept_entry_t entries[],
[out] error_status_t *status
);
/* Lookup entries in an endpoint map using the given input pattern */
[idempotent]
void ept_map(
[in] handle_t h,
[in] uuid_p_t object,
[in] twr_p_t map_tower,
[in, out] ept_lookup_handle_t *entry_handle,
[in] unsigned32 max_towers,
[out] unsigned32 *num_towers,
[out, length_is(*num_towers), size_is(max_towers)]
twr_p_t *towers,
[out] error_status_t *status
);
/* Free the context handle returned by ept_lookup or ept_map */
void ept_lookup_handle_free(
[in] handle_t h,
[in, out] ept_lookup_handle_t *entry_handle,
[out] error_status_t *status
);
/* Inquires as to the endpoint map's object identifier */
[idempotent]
void ept_inq_object(
[in] handle_t h,
[out] GUID *ept_object,
[out] error_status_t *status
);
/* Deletes matching entries in the endpoint map */
void ept_mgmt_delete(
[in] handle_t h,
[in] boolean32 object_speced,
[in] uuid_p_t object,
[in] twr_p_t tower,
[out] error_status_t *status
);
}