|
244 | 244 | /* session.h */ |
245 | 245 |
|
246 | 246 | char* jack_client_get_uuid(jack_client_t* client); |
| 247 | +
|
| 248 | +/* uuid.h */ |
| 249 | +
|
| 250 | +extern int jack_uuid_parse(const char* buf, jack_uuid_t*); |
| 251 | +
|
| 252 | +/* metadata.h */ |
| 253 | +
|
| 254 | +typedef struct { |
| 255 | + const char* key; |
| 256 | + const char* data; |
| 257 | + const char* type; |
| 258 | +} jack_property_t; |
| 259 | +int jack_set_property(jack_client_t*, jack_uuid_t subject, const char* key, const char* value, const char* type); |
| 260 | +int jack_get_property(jack_uuid_t subject, const char* key, char** value, char** type); |
| 261 | +typedef struct { |
| 262 | + jack_uuid_t subject; |
| 263 | + uint32_t property_cnt; |
| 264 | + jack_property_t* properties; |
| 265 | + uint32_t property_size; |
| 266 | +} jack_description_t; |
| 267 | +void jack_free_description(jack_description_t* desc, int free_description_itself); |
| 268 | +int jack_get_properties(jack_uuid_t subject, jack_description_t* desc); |
| 269 | +int jack_get_all_properties(jack_description_t** descs); |
| 270 | +int jack_remove_property(jack_client_t* client, jack_uuid_t subject, const char* key); |
| 271 | +int jack_remove_properties(jack_client_t* client, jack_uuid_t subject); |
| 272 | +int jack_remove_all_properties(jack_client_t* client); |
| 273 | +typedef enum { |
| 274 | + PropertyCreated, |
| 275 | + PropertyChanged, |
| 276 | + PropertyDeleted, |
| 277 | +} jack_property_change_t; |
| 278 | +typedef void (*JackPropertyChangeCallback)(jack_uuid_t subject, const char* key, jack_property_change_t change, void* arg); |
| 279 | +int jack_set_property_change_callback(jack_client_t* client, JackPropertyChangeCallback callback, void* arg); |
| 280 | +extern const char* JACK_METADATA_PRETTY_NAME; |
| 281 | +extern const char* JACK_METADATA_HARDWARE; |
| 282 | +extern const char* JACK_METADATA_CONNECTED; |
| 283 | +extern const char* JACK_METADATA_PORT_GROUP; |
| 284 | +extern const char* JACK_METADATA_ICON_SMALL; |
| 285 | +extern const char* JACK_METADATA_ICON_LARGE; |
247 | 286 | """) |
248 | 287 |
|
249 | 288 | # Packed structure |
|
0 commit comments