1 /* PipeWire
2  *
3  * Copyright © 2019 Collabora Ltd.
4  *   @author George Kiagiadakis <george.kiagiadakis@collabora.com>
5  *
6  * Permission is hereby granted, free of charge, to any person obtaining a
7  * copy of this software and associated documentation files (the "Software"),
8  * to deal in the Software without restriction, including without limitation
9  * the rights to use, copy, modify, merge, publish, distribute, sublicense,
10  * and/or sell copies of the Software, and to permit persons to whom the
11  * Software is furnished to do so, subject to the following conditions:
12  *
13  * The above copyright notice and this permission notice (including the next
14  * paragraph) shall be included in all copies or substantial portions of the
15  * Software.
16  *
17  * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
18  * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
19  * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL
20  * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
21  * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
22  * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
23  * DEALINGS IN THE SOFTWARE.
24  */
25 
26 #ifndef MODULE_SESSION_MANAGER_ENDPOINT_H
27 #define MODULE_SESSION_MANAGER_ENDPOINT_H
28 
29 #ifdef __cplusplus
30 extern "C" {
31 #endif
32 
33 struct client_endpoint;
34 
35 struct endpoint {
36 	struct client_endpoint *client_ep;
37 	struct pw_global *global;
38 	uint32_t n_params;
39 	struct spa_pod **params;
40 	struct pw_endpoint_info info;
41 	struct pw_properties *props;	/* wrapper of info.props */
42 };
43 
44 int endpoint_init(struct endpoint *this,
45 		struct client_endpoint *client_ep,
46 		struct pw_context *context,
47 		struct pw_properties *properties);
48 
49 void endpoint_clear(struct endpoint *this);
50 
51 int endpoint_update(struct endpoint *this,
52 			uint32_t change_mask,
53 			uint32_t n_params,
54 			const struct spa_pod **params,
55 			const struct pw_endpoint_info *info);
56 
57 #ifdef __cplusplus
58 }  /* extern "C" */
59 #endif
60 
61 #endif /* MODULE_SESSION_MANAGER_ENDPOINT_H */
62