Huge trailing whitespace cleanup. Let's keep the tree pure from here on,
[profile/ivi/pulseaudio.git] / src / pulsecore / client.h
1 #ifndef foopulseclienthfoo
2 #define foopulseclienthfoo
3
4 /* $Id$ */
5
6 /***
7   This file is part of PulseAudio.
8
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.
13
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.
18
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 ***/
24
25 #include <inttypes.h>
26
27 typedef struct pa_client pa_client;
28
29 #include <pulsecore/core.h>
30 #include <pulsecore/module.h>
31
32 /* Every connection to the server should have a pa_client
33  * attached. That way the user may generate a listing of all connected
34  * clients easily and kill them if he wants.*/
35
36 struct pa_client {
37     uint32_t index;
38
39     pa_module *owner;
40     char *name, *driver;
41     pa_core *core;
42
43     void (*kill)(pa_client *c);
44     void *userdata;
45 };
46
47 pa_client *pa_client_new(pa_core *c, const char *driver, const char *name);
48
49 /* This function should be called only by the code that created the client */
50 void pa_client_free(pa_client *c);
51
52 /* Code that didn't create the client should call this function to
53  * request destruction of the client */
54 void pa_client_kill(pa_client *c);
55
56 /* Rename the client */
57 void pa_client_set_name(pa_client *c, const char *name);
58
59 #endif