PipeWire  0.1.4
node-factory.h
Go to the documentation of this file.
1 /* PipeWire
2  * Copyright (C) 2016 Axis Communications AB
3  *
4  * This library is free software; you can redistribute it and/or
5  * modify it under the terms of the GNU Library General Public
6  * License as published by the Free Software Foundation; either
7  * version 2 of the License, or (at your option) any later version.
8  *
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  * Library General Public License for more details.
13  *
14  * You should have received a copy of the GNU Library General Public
15  * License along with this library; if not, write to the
16  * Free Software Foundation, Inc., 51 Franklin St, Fifth Floor,
17  * Boston, MA 02110-1301, USA.
18  */
19 
20 #ifndef __PIPEWIRE_NODE_FACTORY_H__
21 #define __PIPEWIRE_NODE_FACTORY_H__
22 
23 #ifdef __cplusplus
24 extern "C" {
25 #endif
26 
27 #define PW_TYPE_INTERFACE__NodeFactory PW_TYPE_INTERFACE_BASE "NodeFactory"
28 #define PW_TYPE_NODE_FACTORY_BASE PW_TYPE_INTERFACE__NodeFactory ":"
29 
36 struct pw_node_factory;
37 
38 #include <pipewire/core.h>
39 #include <pipewire/client.h>
40 #include <pipewire/global.h>
41 #include <pipewire/properties.h>
42 #include <pipewire/resource.h>
43 
45 #define PW_VERSION_NODE_FACRORY_IMPLEMENTATION 0
46  uint32_t version;
47 
49  struct pw_node *(*create_node) (void *data,
50  struct pw_resource *resource,
51  const char *name,
52  struct pw_properties *properties);
53 };
54 
56  const char *name,
57  size_t user_data_size);
58 
59 void pw_node_factory_export(struct pw_node_factory *factory,
60  struct pw_client *owner,
61  struct pw_global *parent);
62 
63 void pw_node_factory_destroy(struct pw_node_factory *factory);
64 
65 void *pw_node_factory_get_user_data(struct pw_node_factory *factory);
66 
69  void *data);
70 
72  struct pw_resource *resource,
73  const char *name,
74  struct pw_properties *properties);
75 
76 #ifdef __cplusplus
77 }
78 #endif
79 
80 #endif /* __PIPEWIRE_NODE_FACTORY_H__ */
const char * name
the factory name
Definition: private.h:366
A collection of key/value pairs.
Definition: properties.h:38
struct pw_node_factory * pw_node_factory_new(struct pw_core *core, const char *name, size_t user_data_size)
Definition: node-factory.c:24
struct pw_core * core
the core
Definition: private.h:362
const struct pw_node_factory_implementation * implementation
Definition: private.h:368
struct pw_properties * properties
properties of the node
Definition: private.h:211
A global object visible to all clients.
Definition: private.h:87
Client owned objects.
Definition: private.h:284
PipeWire node class.
Definition: private.h:205
void pw_node_factory_destroy(struct pw_node_factory *factory)
Definition: node-factory.c:42
PipeWire client object class.
Definition: private.h:58
PipeWire node factory interface.
Definition: private.h:361
void * pw_node_factory_get_user_data(struct pw_node_factory *factory)
Definition: node-factory.c:65
Definition: node-factory.h:44
uint32_t version
Definition: node-factory.h:46
void pw_node_factory_export(struct pw_node_factory *factory, struct pw_client *owner, struct pw_global *parent)
Definition: node-factory.c:56
void pw_node_factory_set_implementation(struct pw_node_factory *factory, const struct pw_node_factory_implementation *implementation, void *data)
Definition: node-factory.c:70
the core PipeWire object
Definition: private.h:103
struct pw_node * pw_node_factory_create_node(struct pw_node_factory *factory, struct pw_resource *resource, const char *name, struct pw_properties *properties)
Definition: node-factory.c:78