PulseAudio 16.1

ext-device-restore.h
Go to the documentation of this file.
1#ifndef foopulseextdevicerestorehfoo
2#define foopulseextdevicerestorehfoo
3
4/***
5 This file is part of PulseAudio.
6
7 Copyright 2008 Lennart Poettering
8 Copyright 2011 Colin Guthrie
9
10 PulseAudio is free software; you can redistribute it and/or modify
11 it under the terms of the GNU Lesser General Public License as published
12 by the Free Software Foundation; either version 2.1 of the License,
13 or (at your option) any later version.
14
15 PulseAudio is distributed in the hope that it will be useful, but
16 WITHOUT ANY WARRANTY; without even the implied warranty of
17 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
18 General Public License for more details.
19
20 You should have received a copy of the GNU Lesser General Public License
21 along with PulseAudio; if not, see <http://www.gnu.org/licenses/>.
22***/
23
24#include <pulse/context.h>
25#include <pulse/format.h>
26#include <pulse/version.h>
27
33PA_C_DECL_BEGIN
34
37 typedef struct pa_ext_device_restore_info {
38 pa_device_type_t type;
39 uint32_t index;
40 uint8_t n_formats;
41 pa_format_info **formats;
42} pa_ext_device_restore_info;
43
45 typedef void (*pa_ext_device_restore_test_cb_t)(
46 pa_context *c,
47 uint32_t version,
48 void *userdata);
49
51 pa_operation *pa_ext_device_restore_test(
52 pa_context *c,
53 pa_ext_device_restore_test_cb_t cb,
54 void *userdata);
55
57 pa_operation *pa_ext_device_restore_subscribe(
58 pa_context *c,
59 int enable,
60 pa_context_success_cb_t cb,
61 void *userdata);
62
64 typedef void (*pa_ext_device_restore_subscribe_cb_t)(
65 pa_context *c,
66 pa_device_type_t type,
67 uint32_t idx,
68 void *userdata);
69
72 void pa_ext_device_restore_set_subscribe_cb(
73 pa_context *c,
74 pa_ext_device_restore_subscribe_cb_t cb,
75 void *userdata);
76
78 typedef void (*pa_ext_device_restore_read_device_formats_cb_t)(
79 pa_context *c,
80 const pa_ext_device_restore_info *info,
81 int eol,
82 void *userdata);
83
85 pa_operation *pa_ext_device_restore_read_formats_all(
86 pa_context *c,
87 pa_ext_device_restore_read_device_formats_cb_t cb,
88 void *userdata);
89
91 pa_operation *pa_ext_device_restore_read_formats(
92 pa_context *c,
93 pa_device_type_t type,
94 uint32_t idx,
95 pa_ext_device_restore_read_device_formats_cb_t cb,
96 void *userdata);
97
99 pa_operation *pa_ext_device_restore_save_formats(
100 pa_context *c,
101 pa_device_type_t type,
102 uint32_t idx,
103 uint8_t n_formats,
104 pa_format_info **formats,
105 pa_context_success_cb_t cb,
106 void *userdata);
107
108PA_C_DECL_END
109
110#endif
context.h
Connection contexts for asynchronous communication with a server.
pa_context_success_cb_t
void(* pa_context_success_cb_t)(pa_context *c, int success, void *userdata)
A generic callback for operation completion.
Definition: context.h:160
pa_context
struct pa_context pa_context
An opaque connection context to a daemon.
Definition: context.h:154
pa_device_type_t
enum pa_device_type pa_device_type_t
The type of device we are dealing with.
pa_ext_device_restore_test
pa_operation * pa_ext_device_restore_test(pa_context *c, pa_ext_device_restore_test_cb_t cb, void *userdata)
Test if this extension module is available in the server.
pa_ext_device_restore_info
struct pa_ext_device_restore_info pa_ext_device_restore_info
Stores information about one device in the device database that is maintained by module-device-manage...
pa_ext_device_restore_read_device_formats_cb_t
void(* pa_ext_device_restore_read_device_formats_cb_t)(pa_context *c, const pa_ext_device_restore_info *info, int eol, void *userdata)
Callback prototype for pa_ext_device_restore_read_formats().
Definition: ext-device-restore.h:78
pa_ext_device_restore_read_formats
pa_operation * pa_ext_device_restore_read_formats(pa_context *c, pa_device_type_t type, uint32_t idx, pa_ext_device_restore_read_device_formats_cb_t cb, void *userdata)
Read an entry from the device database.
pa_ext_device_restore_set_subscribe_cb
void pa_ext_device_restore_set_subscribe_cb(pa_context *c, pa_ext_device_restore_subscribe_cb_t cb, void *userdata)
Set the subscription callback that is called when pa_ext_device_restore_subscribe() was called.
pa_ext_device_restore_subscribe
pa_operation * pa_ext_device_restore_subscribe(pa_context *c, int enable, pa_context_success_cb_t cb, void *userdata)
Subscribe to changes in the device database.
pa_ext_device_restore_subscribe_cb_t
void(* pa_ext_device_restore_subscribe_cb_t)(pa_context *c, pa_device_type_t type, uint32_t idx, void *userdata)
Callback prototype for pa_ext_device_restore_set_subscribe_cb().
Definition: ext-device-restore.h:64
pa_ext_device_restore_read_formats_all
pa_operation * pa_ext_device_restore_read_formats_all(pa_context *c, pa_ext_device_restore_read_device_formats_cb_t cb, void *userdata)
Read the formats for all present devices from the device database.
pa_ext_device_restore_save_formats
pa_operation * pa_ext_device_restore_save_formats(pa_context *c, pa_device_type_t type, uint32_t idx, uint8_t n_formats, pa_format_info **formats, pa_context_success_cb_t cb, void *userdata)
Read an entry from the device database.
pa_ext_device_restore_test_cb_t
void(* pa_ext_device_restore_test_cb_t)(pa_context *c, uint32_t version, void *userdata)
Callback prototype for pa_ext_device_restore_test().
Definition: ext-device-restore.h:45
format.h
Utility functions for handling a stream or sink format.
pa_operation
struct pa_operation pa_operation
An asynchronous operation object.
Definition: operation.h:33
pa_ext_device_restore_info
Stores information about one device in the device database that is maintained by module-device-manage...
Definition: ext-device-restore.h:37
pa_ext_device_restore_info::type
pa_device_type_t type
Device type sink or source?
Definition: ext-device-restore.h:38
pa_ext_device_restore_info::formats
pa_format_info ** formats
An array of formats (may be NULL if n_formats == 0)
Definition: ext-device-restore.h:41
pa_ext_device_restore_info::index
uint32_t index
The device index.
Definition: ext-device-restore.h:39
pa_ext_device_restore_info::n_formats
uint8_t n_formats
How many formats do we have?
Definition: ext-device-restore.h:40
pa_format_info
Represents the format of data provided in a stream or processed by a sink.
Definition: format.h:98