JACK-AUDIO-CONNECTION-KIT: metadata.h Source File

JACK-AUDIO-CONNECTION-KIT 0.125.0

metadata.h
Go to the documentation of this file.
1/*
2 Copyright (C) 2011 David Robillard
3 Copyright (C) 2013 Paul Davis
4
5 This program is free software; you can redistribute it and/or modify it
6 under the terms of the GNU Lesser General Public License as published by
7 the Free Software Foundation; either version 2.1 of the License, or (at
8 your option) any later version.
9
10 This program is distributed in the hope that it will be useful, but WITHOUT
11 ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
12 FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public
13 License for more details.
14
15 You should have received a copy of the GNU Lesser General Public License
16 along with this program; if not, write to the Free Software Foundation,
17 Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
18*/
19
27#ifndef __jack_metadata_h__
28#define __jack_metadata_h__
29
30#include <jack/types.h>
31
32#ifdef __cplusplus
33extern "C" {
34#endif
35
44 typedef struct {
46 const char* key;
47
49 const char* data;
50
68 const char* type;
69} jack_property_t;
70
82int
83jack_set_property(jack_client_t*,
84 jack_uuid_t subject,
85 const char* key,
86 const char* value,
87 const char* type);
88
102int
103jack_get_property(jack_uuid_t subject,
104 const char* key,
105 char** value,
106 char** type);
107
111 typedef struct {
112 jack_uuid_t subject;
113 uint32_t property_cnt;
114 jack_property_t* properties;
115 uint32_t property_size;
116} jack_description_t;
117
124void
125jack_free_description (jack_description_t* desc, int free_description_itself);
126
134int
135jack_get_properties (jack_uuid_t subject,
136 jack_description_t* desc);
137
145int
146jack_get_all_properties (jack_description_t** descs);
147
157 int jack_remove_property (jack_client_t* client, jack_uuid_t subject, const char* key);
158
167 int jack_remove_properties (jack_client_t* client, jack_uuid_t subject);
168
180 int jack_remove_all_properties (jack_client_t* client);
181
182 typedef enum {
183 PropertyCreated,
184 PropertyChanged,
185 PropertyDeleted
186} jack_property_change_t;
187
188 typedef void (*JackPropertyChangeCallback)(jack_uuid_t subject,
189 const char* key,
190 jack_property_change_t change,
191 void* arg);
192
203 int jack_set_property_change_callback (jack_client_t* client,
204 JackPropertyChangeCallback callback,
205 void* arg);
206
207#ifdef __cplusplus
208} /* namespace */
209#endif
210
215extern const char* JACK_METADATA_PRETTY_NAME;
216extern const char* JACK_METADATA_HARDWARE;
217extern const char* JACK_METADATA_CONNECTED;
218extern const char* JACK_METADATA_PORT_GROUP;
219extern const char* JACK_METADATA_ICON_SMALL;
220extern const char* JACK_METADATA_ICON_LARGE;
221
222#endif /* __jack_metadata_h__ */
jack_get_property
int jack_get_property(jack_uuid_t subject, const char *key, char **value, char **type)
JackPropertyChangeCallback
void(* JackPropertyChangeCallback)(jack_uuid_t subject, const char *key, jack_property_change_t change, void *arg)
Definition metadata.h:188
jack_remove_all_properties
int jack_remove_all_properties(jack_client_t *client)
jack_property_change_t
jack_property_change_t
Definition metadata.h:182
jack_get_all_properties
int jack_get_all_properties(jack_description_t **descs)
jack_get_properties
int jack_get_properties(jack_uuid_t subject, jack_description_t *desc)
jack_remove_properties
int jack_remove_properties(jack_client_t *client, jack_uuid_t subject)
jack_free_description
void jack_free_description(jack_description_t *desc, int free_description_itself)
jack_remove_property
int jack_remove_property(jack_client_t *client, jack_uuid_t subject, const char *key)
jack_set_property
int jack_set_property(jack_client_t *, jack_uuid_t subject, const char *key, const char *value, const char *type)
jack_set_property_change_callback
int jack_set_property_change_callback(jack_client_t *client, JackPropertyChangeCallback callback, void *arg)
PropertyDeleted
@ PropertyDeleted
Definition metadata.h:185
PropertyChanged
@ PropertyChanged
Definition metadata.h:184
PropertyCreated
@ PropertyCreated
Definition metadata.h:183
JACK_METADATA_PORT_GROUP
const char * JACK_METADATA_PORT_GROUP
JACK_METADATA_HARDWARE
const char * JACK_METADATA_HARDWARE
JACK_METADATA_PRETTY_NAME
const char * JACK_METADATA_PRETTY_NAME
JACK_METADATA_ICON_SMALL
const char * JACK_METADATA_ICON_SMALL
JACK_METADATA_CONNECTED
const char * JACK_METADATA_CONNECTED
JACK_METADATA_ICON_LARGE
const char * JACK_METADATA_ICON_LARGE
client
jack_client_t * client
Definition simple_client.c:17
jack_description_t
Definition metadata.h:111
jack_description_t::subject
jack_uuid_t subject
Definition metadata.h:112
jack_description_t::properties
jack_property_t * properties
Definition metadata.h:114
jack_description_t::property_size
uint32_t property_size
Definition metadata.h:115
jack_description_t::property_cnt
uint32_t property_cnt
Definition metadata.h:113
jack_property_t
Definition metadata.h:44
jack_property_t::type
const char * type
Definition metadata.h:68
jack_property_t::key
const char * key
Definition metadata.h:46
jack_property_t::data
const char * data
Definition metadata.h:49
types.h
jack_uuid_t
uint64_t jack_uuid_t
Definition types.h:27
jack_client_t
struct _jack_client jack_client_t
Definition types.h:89