don't send SCM_CREDENTIALS on every sendmsg(), instead do it only on handshake
[pulseaudio.git] / src / pulsecore / client.h
blob1e72baf77ffa0ea43ebf438c1a88bdd706463bd1
1 #ifndef fooclienthfoo
2 #define fooclienthfoo
4 /* $Id$ */
6 /***
7 This file is part of PulseAudio.
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 published
11 by the Free Software Foundation; either version 2 of the License,
12 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 General Public License for more details.
19 You should have received a copy of the GNU Lesser General Public License
20 along with PulseAudio; if not, write to the Free Software
21 Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
22 USA.
23 ***/
25 #include <pulsecore/core.h>
26 #include <pulsecore/module.h>
28 /* Every connection to the server should have a pa_client
29 * attached. That way the user may generate a listing of all connected
30 * clients easily and kill them if he wants.*/
32 typedef struct pa_client pa_client;
34 struct pa_client {
35 uint32_t index;
37 pa_module *owner;
38 char *name, *driver;
39 pa_core *core;
41 void (*kill)(pa_client *c);
42 void *userdata;
45 pa_client *pa_client_new(pa_core *c, const char *driver, const char *name);
47 /* This function should be called only by the code that created the client */
48 void pa_client_free(pa_client *c);
50 /* Code that didn't create the client should call this function to
51 * request destruction of the client */
52 void pa_client_kill(pa_client *c);
54 /* Rename the client */
55 void pa_client_set_name(pa_client *c, const char *name);
57 #endif