Loading...
Searching...
No Matches
metadata.h
Go to the documentation of this file.
/*
Copyright (C) 2011-2014 David Robillard
Copyright (C) 2013 Paul Davis
This program 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 program 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 program; if not, write to the Free Software Foundation,
Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/
#ifndef __jack_metadata_h__
#define __jack_metadata_h__
#include <jack/types.h>
#ifdef __cplusplus
extern "C" {
#endif
typedef struct {
const char* key;
const char* data;
const char* type;
} jack_property_t;
int
jack_set_property(jack_client_t*,
jack_uuid_t subject,
const char* key,
const char* value,
const char* type);
int
jack_get_property(jack_uuid_t subject,
const char* key,
char** value,
char** type);
typedef struct {
jack_uuid_t subject;
uint32_t property_cnt;
jack_property_t* properties;
uint32_t property_size;
} jack_description_t;
void
jack_free_description (jack_description_t* desc, int free_description_itself);
int
jack_get_properties (jack_uuid_t subject,
jack_description_t* desc);
int
jack_get_all_properties (jack_description_t** descs);
int jack_remove_property (jack_client_t* client, jack_uuid_t subject, const char* key);
int jack_remove_properties (jack_client_t* client, jack_uuid_t subject);
int jack_remove_all_properties (jack_client_t* client);
typedef enum {
PropertyCreated,
PropertyChanged,
PropertyDeleted
} jack_property_change_t;
typedef void (*JackPropertyChangeCallback)(jack_uuid_t subject,
const char* key,
jack_property_change_t change,
void* arg);
int jack_set_property_change_callback (jack_client_t* client,
JackPropertyChangeCallback callback,
void* arg);
extern const char* JACK_METADATA_CONNECTED;
extern const char* JACK_METADATA_EVENT_TYPES;
extern const char* JACK_METADATA_HARDWARE;
extern const char* JACK_METADATA_ICON_LARGE;
extern const char* JACK_METADATA_ICON_NAME;
extern const char* JACK_METADATA_ICON_SMALL;
extern const char* JACK_METADATA_ORDER;
extern const char* JACK_METADATA_PRETTY_NAME;
extern const char* JACK_METADATA_PORT_GROUP;
extern const char* JACK_METADATA_SIGNAL_TYPE;
#ifdef __cplusplus
} /* namespace */
#endif
#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:209
JACK_METADATA_SIGNAL_TYPE
const char * JACK_METADATA_SIGNAL_TYPE
jack_remove_all_properties
int jack_remove_all_properties(jack_client_t *client)
jack_property_change_t
jack_property_change_t
Definition metadata.h:191
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_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_remove_properties
int jack_remove_properties(jack_client_t *client, jack_uuid_t subject)
JACK_METADATA_EVENT_TYPES
const char * JACK_METADATA_EVENT_TYPES
JACK_METADATA_ICON_SMALL
const char * JACK_METADATA_ICON_SMALL
JACK_METADATA_ORDER
const char * JACK_METADATA_ORDER
JACK_METADATA_CONNECTED
const char * JACK_METADATA_CONNECTED
jack_free_description
void jack_free_description(jack_description_t *desc, int free_description_itself)
JACK_METADATA_ICON_NAME
const char * JACK_METADATA_ICON_NAME
jack_remove_property
int jack_remove_property(jack_client_t *client, jack_uuid_t subject, const char *key)
JACK_METADATA_ICON_LARGE
const char * JACK_METADATA_ICON_LARGE
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:194
PropertyChanged
@ PropertyChanged
Definition metadata.h:193
PropertyCreated
@ PropertyCreated
Definition metadata.h:192
jack_description_t
Definition metadata.h:120
jack_description_t::subject
jack_uuid_t subject
Definition metadata.h:121
jack_description_t::properties
jack_property_t * properties
Definition metadata.h:123
jack_description_t::property_size
uint32_t property_size
Definition metadata.h:124
jack_description_t::property_cnt
uint32_t property_cnt
Definition metadata.h:122
jack_property_t
Definition metadata.h:53
jack_property_t::type
const char * type
Definition metadata.h:77
jack_property_t::key
const char * key
Definition metadata.h:55
jack_property_t::data
const char * data
Definition metadata.h:58
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