00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00027 #ifndef __jack_metadata_h__
00028 #define __jack_metadata_h__
00029
00030 #include <jack/types.h>
00031
00032 #ifdef __cplusplus
00033 extern "C" {
00034 #endif
00035
00044 typedef struct {
00046 const char* key;
00047
00049 const char* data;
00050
00068 const char* type;
00069 } jack_property_t;
00070
00082 int
00083 jack_set_property(jack_client_t*,
00084 jack_uuid_t subject,
00085 const char* key,
00086 const char* value,
00087 const char* type);
00088
00102 int
00103 jack_get_property(jack_uuid_t subject,
00104 const char* key,
00105 char** value,
00106 char** type);
00107
00111 typedef struct {
00112 jack_uuid_t subject;
00113 uint32_t property_cnt;
00114 jack_property_t* properties;
00115 uint32_t property_size;
00116 } jack_description_t;
00117
00124 void
00125 jack_free_description (jack_description_t* desc, int free_description_itself);
00126
00134 int
00135 jack_get_properties (jack_uuid_t subject,
00136 jack_description_t* desc);
00137
00145 int
00146 jack_get_all_properties (jack_description_t** descs);
00147
00157 int jack_remove_property (jack_client_t* client, jack_uuid_t subject, const char* key);
00158
00167 int jack_remove_properties (jack_client_t* client, jack_uuid_t subject);
00168
00180 int jack_remove_all_properties (jack_client_t* client);
00181
00182 typedef enum {
00183 PropertyCreated,
00184 PropertyChanged,
00185 PropertyDeleted
00186 } jack_property_change_t;
00187
00188 typedef void (*JackPropertyChangeCallback)(jack_uuid_t subject,
00189 const char* key,
00190 jack_property_change_t change,
00191 void* arg);
00192
00203 int jack_set_property_change_callback (jack_client_t* client,
00204 JackPropertyChangeCallback callback,
00205 void* arg);
00206
00207 #ifdef __cplusplus
00208 }
00209 #endif
00210
00215 extern const char* JACK_METADATA_PRETTY_NAME;
00216 extern const char* JACK_METADATA_HARDWARE;
00217 extern const char* JACK_METADATA_CONNECTED;
00218 extern const char* JACK_METADATA_PORT_GROUP;
00219 extern const char* JACK_METADATA_ICON_SMALL;
00220 extern const char* JACK_METADATA_ICON_LARGE;
00221
00222 #endif