Adding access hooks

Just like the pulse hooks mechanism created for modules, hooks for access control are created.

All the hooks are listed in access.h:

typedef enum pa_access_hook {
    PA_ACCESS_HOOK_EXIT_DAEMON,
    PA_ACCESS_HOOK_SET_DEFAULT_SINK,
    PA_ACCESS_HOOK_SET_DEFAULT_SOURCE,
    ...
    PA_ACCESS_HOOK_GET_SINK_INFO,
    PA_ACCESS_HOOK_SET_SINK_VOLUME,
    PA_ACCESS_HOOK_SET_SINK_MUTE,
    ...
    PA_ACCESS_HOOK_GET_SOURCE_INFO,
    PA_ACCESS_HOOK_SET_SOURCE_VOLUME,
    PA_ACCESS_HOOK_SET_SOURCE_MUTE,
    ...
    PA_ACCESS_HOOK_GET_MODULE_INFO,
    PA_ACCESS_HOOK_LOAD_MODULE,
    PA_ACCESS_HOOK_UNLOAD_MODULE,
    ...
    PA_ACCESS_HOOK_GET_CLIENT_INFO,
    PA_ACCESS_HOOK_KILL_CLIENT,
    ...
    PA_ACCESS_HOOK_GET_CARD_INFO,
    PA_ACCESS_HOOK_SET_CARD_PROFILE,
    PA_ACCESS_HOOK_SET_PORT_LATENCY_OFFSET,
    ...
} pa_access_hook_t;

And just like the modules hooks, they are are stored in pa_core, at core.h:

/* The core structure of PulseAudio. Every PulseAudio daemon contains
 * exactly one of these. It is used for storing kind of global
 * variables for the daemon. */

struct pa_core {
    pa_msgobject parent;
    ...
    /* hooks */
    pa_hook hooks[PA_CORE_HOOK_MAX];
    /* access hooks */
    pa_hook access[PA_ACCESS_HOOK_MAX];

results matching ""

    No results matching ""