Path: blob/master/thirdparty/linuxbsd_headers/pulse/ext-device-manager.h
9905 views
#ifndef foopulseextdevicemanagerhfoo1#define foopulseextdevicemanagerhfoo23/***4This file is part of PulseAudio.56Copyright 2008 Lennart Poettering7Copyright 2009 Colin Guthrie89PulseAudio is free software; you can redistribute it and/or modify10it under the terms of the GNU Lesser General Public License as published11by the Free Software Foundation; either version 2.1 of the License,12or (at your option) any later version.1314PulseAudio is distributed in the hope that it will be useful, but15WITHOUT ANY WARRANTY; without even the implied warranty of16MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU17General Public License for more details.1819You should have received a copy of the GNU Lesser General Public License20along with PulseAudio; if not, see <http://www.gnu.org/licenses/>.21***/2223#include <pulse/cdecl.h>24#include <pulse/context.h>25#include <pulse/version.h>2627/** \file28*29* Routines for controlling module-device-manager30*/3132PA_C_DECL_BEGIN3334/* Don't extend this struct! It will break binary compatibility, because35* pa_ext_device_manager_info.role_priorities points to an array of structs36* instead of an array of pointers to structs. */37typedef struct pa_ext_device_manager_role_priority_info {38const char *role;39uint32_t priority;40} pa_ext_device_manager_role_priority_info;4142/** Stores information about one device in the device database that is43* maintained by module-device-manager. \since 0.9.21 */44typedef struct pa_ext_device_manager_info {45const char *name; /**< Identifier string of the device. A string like "sink:" or similar followed by the name of the device. */46const char *description; /**< The description of the device when it was last seen, if applicable and saved */47const char *icon; /**< The icon given to the device */48uint32_t index; /**< The device index if it is currently available or PA_INVALID_INDEX */49uint32_t n_role_priorities; /**< How many role priorities do we have? */50pa_ext_device_manager_role_priority_info *role_priorities; /**< An array of role priority structures or NULL */51} pa_ext_device_manager_info;5253/** Callback prototype for pa_ext_device_manager_test(). \since 0.9.21 */54typedef void (*pa_ext_device_manager_test_cb_t)(55pa_context *c,56uint32_t version,57void *userdata);5859/** Test if this extension module is available in the server. \since 0.9.21 */60pa_operation *pa_ext_device_manager_test(61pa_context *c,62pa_ext_device_manager_test_cb_t cb,63void *userdata);6465/** Callback prototype for pa_ext_device_manager_read(). \since 0.9.21 */66typedef void (*pa_ext_device_manager_read_cb_t)(67pa_context *c,68const pa_ext_device_manager_info *info,69int eol,70void *userdata);7172/** Read all entries from the device database. \since 0.9.21 */73pa_operation *pa_ext_device_manager_read(74pa_context *c,75pa_ext_device_manager_read_cb_t cb,76void *userdata);7778/** Sets the description for a device. \since 0.9.21 */79pa_operation *pa_ext_device_manager_set_device_description(80pa_context *c,81const char* device,82const char* description,83pa_context_success_cb_t cb,84void *userdata);8586/** Delete entries from the device database. \since 0.9.21 */87pa_operation *pa_ext_device_manager_delete(88pa_context *c,89const char *const s[],90pa_context_success_cb_t cb,91void *userdata);9293/** Enable the role-based device-priority routing mode. \since 0.9.21 */94pa_operation *pa_ext_device_manager_enable_role_device_priority_routing(95pa_context *c,96int enable,97pa_context_success_cb_t cb,98void *userdata);99100/** Prefer a given device in the priority list. \since 0.9.21 */101pa_operation *pa_ext_device_manager_reorder_devices_for_role(102pa_context *c,103const char* role,104const char** devices,105pa_context_success_cb_t cb,106void *userdata);107108/** Subscribe to changes in the device database. \since 0.9.21 */109pa_operation *pa_ext_device_manager_subscribe(110pa_context *c,111int enable,112pa_context_success_cb_t cb,113void *userdata);114115/** Callback prototype for pa_ext_device_manager_set_subscribe_cb(). \since 0.9.21 */116typedef void (*pa_ext_device_manager_subscribe_cb_t)(117pa_context *c,118void *userdata);119120/** Set the subscription callback that is called when121* pa_ext_device_manager_subscribe() was called. \since 0.9.21 */122void pa_ext_device_manager_set_subscribe_cb(123pa_context *c,124pa_ext_device_manager_subscribe_cb_t cb,125void *userdata);126127PA_C_DECL_END128129#endif130131132