Path: blob/master/thirdparty/linuxbsd_headers/pulse/ext-stream-restore.h
9905 views
#ifndef foopulseextstreamrestorehfoo1#define foopulseextstreamrestorehfoo23/***4This file is part of PulseAudio.56Copyright 2008 Lennart Poettering78PulseAudio is free software; you can redistribute it and/or modify9it under the terms of the GNU Lesser General Public License as published10by the Free Software Foundation; either version 2.1 of the License,11or (at your option) any later version.1213PulseAudio is distributed in the hope that it will be useful, but14WITHOUT ANY WARRANTY; without even the implied warranty of15MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU16General Public License for more details.1718You should have received a copy of the GNU Lesser General Public License19along with PulseAudio; if not, see <http://www.gnu.org/licenses/>.20***/2122#include <pulse/cdecl.h>23#include <pulse/context.h>24#include <pulse/version.h>25#include <pulse/volume.h>26#include <pulse/channelmap.h>2728/** \file29*30* Routines for controlling module-stream-restore31*/3233PA_C_DECL_BEGIN3435/** Stores information about one entry in the stream database that is36* maintained by module-stream-restore. \since 0.9.12 */37typedef struct pa_ext_stream_restore_info {38const char *name; /**< Identifier string of the stream. A string like "sink-input-by-role:" or similar followed by some arbitrary property value. */39pa_channel_map channel_map; /**< The channel map for the volume field, if applicable */40pa_cvolume volume; /**< The volume of the stream when it was seen last, if applicable and saved */41const char *device; /**< The sink/source of the stream when it was last seen, if applicable and saved */42int mute; /**< The boolean mute state of the stream when it was last seen, if applicable and saved */43} pa_ext_stream_restore_info;4445/** Callback prototype for pa_ext_stream_restore_test(). \since 0.9.12 */46typedef void (*pa_ext_stream_restore_test_cb_t)(47pa_context *c,48uint32_t version,49void *userdata);5051/** Test if this extension module is available in the server. \since 0.9.12 */52pa_operation *pa_ext_stream_restore_test(53pa_context *c,54pa_ext_stream_restore_test_cb_t cb,55void *userdata);5657/** Callback prototype for pa_ext_stream_restore_read(). \since 0.9.12 */58typedef void (*pa_ext_stream_restore_read_cb_t)(59pa_context *c,60const pa_ext_stream_restore_info *info,61int eol,62void *userdata);6364/** Read all entries from the stream database. \since 0.9.12 */65pa_operation *pa_ext_stream_restore_read(66pa_context *c,67pa_ext_stream_restore_read_cb_t cb,68void *userdata);6970/** Store entries in the stream database. \since 0.9.12 */71pa_operation *pa_ext_stream_restore_write(72pa_context *c,73pa_update_mode_t mode,74const pa_ext_stream_restore_info data[],75unsigned n,76int apply_immediately,77pa_context_success_cb_t cb,78void *userdata);7980/** Delete entries from the stream database. \since 0.9.12 */81pa_operation *pa_ext_stream_restore_delete(82pa_context *c,83const char *const s[],84pa_context_success_cb_t cb,85void *userdata);8687/** Subscribe to changes in the stream database. \since 0.9.12 */88pa_operation *pa_ext_stream_restore_subscribe(89pa_context *c,90int enable,91pa_context_success_cb_t cb,92void *userdata);9394/** Callback prototype for pa_ext_stream_restore_set_subscribe_cb(). \since 0.9.12 */95typedef void (*pa_ext_stream_restore_subscribe_cb_t)(96pa_context *c,97void *userdata);9899/** Set the subscription callback that is called when100* pa_ext_stream_restore_subscribe() was called. \since 0.9.12 */101void pa_ext_stream_restore_set_subscribe_cb(102pa_context *c,103pa_ext_stream_restore_subscribe_cb_t cb,104void *userdata);105106PA_C_DECL_END107108#endif109110111