s3-librpc: Added dcerpc_binding_vector_create function.
[kai/samba-autobuild/.git] / source3 / librpc / rpc / dcerpc_ep.h
1 /*
2  *  Endpoint Mapper Functions
3  *  DCERPC local endpoint mapper client routines
4  *  Copyright (c) 2010      Andreas Schneider.
5  *
6  *  This program is free software; you can redistribute it and/or modify
7  *  it under the terms of the GNU General Public License as published by
8  *  the Free Software Foundation; either version 3 of the License, or
9  *  (at your option) any later version.
10  *
11  *  This program is distributed in the hope that it will be useful,
12  *  but WITHOUT ANY WARRANTY; without even the implied warranty of
13  *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
14  *  GNU General Public License for more details.
15  *
16  *  You should have received a copy of the GNU General Public License
17  *  along with this program; if not, see <http://www.gnu.org/licenses/>.
18  */
19
20 #ifndef _DCERPC_EP_H_
21 #define _DCERPC_EP_H_
22
23 struct dcerpc_binding_vector {
24     struct dcerpc_binding *bindings;
25     uint32_t count;
26 };
27
28 NTSTATUS dcerpc_binding_vector_create(TALLOC_CTX *mem_ctx,
29                                       const struct ndr_interface_table *iface,
30                                       struct dcerpc_binding_vector **pbvec);
31
32 /**
33  * @brief Adds server address information in the local endpoint map.
34  *
35  * @param[in]  iface    The interface specification to register with the local
36  *                      endpoint map.
37  *
38  * @param[in]  binding  The server binding handles over which the server can
39  *                      receive remote procedure calls.
40  *
41  * @param[in]  object_guid The object GUID that the server offers. The server
42  *                         application constructs this vector.
43  *
44  * @param[in]  annotation  Defines a character string comment applied to the
45  *                         element added to the local endpoint map. The string
46  *                         can be up to 64 characters long, including the null
47  *                         terminating character. Strings longer than 64
48  *                         characters are truncated. The application supplies
49  *                         the value NULL or the string "" to indicate an empty
50  *                         annotation string.
51  *
52  *                         When replacing elements, the annotation string
53  *                         supplied, including an empty annotation string,
54  *                         replaces any existing annotation string.
55  *
56  * @return                 An NTSTATUS error code.
57  */
58 NTSTATUS dcerpc_ep_register(const struct ndr_interface_table *iface,
59                             const struct dcerpc_binding_vector *bind_vec,
60                             const struct GUID *object_guid,
61                             const char *annotation);
62
63 NTSTATUS dcerpc_ep_register_noreplace(const struct ndr_interface_table *iface,
64                                       const struct dcerpc_binding_vector *bind_vec,
65                                       const struct GUID *object_guid,
66                                       const char *annotation);
67
68 NTSTATUS dcerpc_ep_unregister(const struct ndr_interface_table *iface,
69                               const struct dcerpc_binding_vector *bind_vec,
70                               const struct GUID *object_guid);
71
72 #endif /* _DCERPC_EP_H_ */