Detailed DescriptionPurpose of this API is to allow arbitrary data of any type to be shared between JACK clients. Data which would be out of the scope of the JACK system itself. It is especially handy on sandboxed environments like iOS, where all apps have their own, private and isolated file system, which prevents data to be shared easily between individual, independent apps. See also section "Publish client Icon" on article Getting Started for an important use case of this API part.
Typedef Documentation
Prototype of a client supplied function that is called when any custom data of foreign JACK clients appear, were replaced or removed. A client may implement such a callback to efficiently react on clients publishing and unpublishing any custom data.
Function Documentation
Makes the passed data publicly available for every JACK client to be read. The passed data will be copied into the JACK server process and kept in RAM by the server for the life-time of the calling client. The data will be available to be read by any JACK client under the given name (given by key). Every JACK client has its own name space for custom data. Since the data is copied by the server, the calling client may i.e. free the data from its memory immediately after this call. As soon as the client was closed, all custom data created by him will be unpublished automatically. In case some custom data with name key already exists in the client's name space, it will simply be replaced. It is also valid to pass a NULL pointer for data, to publish some "empty" data. The latter might be used as kind of flag variables.
Retrieve the custom data named by key from client given by client_name. The data returned by this function is a copy, so it can be modified by the caller of this function, without the original data to be modified in any way. Since every JACK client has its own name space for custom data, the actual unique ID of a specific custom data is identified by the combination of client_name and key. The caller is responsible for calling jack_free() on any non-NULL returned data at a later point.
Allows to lookup all custom data currently published by the foreign JACK client given by client_name. The caller will get a NULL-terminated list of all data object names of the foreign JACK client reflected by client_name. The caller may then pass one of the returned names to jack_custom_get_data() to get the actual custom data. The caller is responsible for calling jack_free() on any non-NULL returned result value !
If a client wants some of its custom data to explicitly disappear during the life-time of its JACK client, it may do so by calling this function.
Tell the JACK server to call callback whenever new custom data appears publicly or whenever some existing custom data was replaced or removed (unpublished). The callback is only called for custom data published by foreign JACK clients, not for any custom data published by the calling client itself (given by client). All "notification events" are received in a seperated non RT thread, the code in the supplied function does not need to be suitable for real-time execution. NOTE: this function cannot be called while the client is activated (after jack_activate has been called.)
Generated by |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|