5 This file is part of PulseAudio.
7 Copyright 2006 Lennart Poettering
9 PulseAudio is free software; you can redistribute it and/or modify
10 it under the terms of the GNU Lesser General Public License as
11 published by the Free Software Foundation; either version 2.1 of the
12 License, or (at your option) any later version.
14 PulseAudio is distributed in the hope that it will be useful, but
15 WITHOUT ANY WARRANTY; without even the implied warranty of
16 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
17 Lesser General Public License for more details.
19 You should have received a copy of the GNU Lesser General Public
20 License along with PulseAudio; if not, see <http://www.gnu.org/licenses/>.
23 #include <sys/types.h>
26 #error "Please include config.h before including this file!"
29 #include <pulsecore/socket.h>
32 #define MAX_ANCIL_DATA_FDS 2
34 typedef struct pa_creds pa_creds;
35 typedef struct pa_cmsg_ancil_data pa_cmsg_ancil_data;
37 #if defined(SCM_CREDENTIALS) || defined(SCM_CREDS)
46 /* Struct for handling ancillary data, i e, extra data that can be sent together with a message
47 * over unix pipes. Supports sending and receiving credentials and file descriptors. */
48 struct pa_cmsg_ancil_data {
53 /* Don't close these fds by your own. Check pa_cmsg_ancil_data_close_fds() */
54 int fds[MAX_ANCIL_DATA_FDS];
55 bool close_fds_on_cleanup;
58 void pa_cmsg_ancil_data_close_fds(struct pa_cmsg_ancil_data *ancil);