Documentation for the threaded main loop API.
[profile/ivi/pulseaudio.git] / src / polyp / polypaudio.h
1 #ifndef foopolypaudiohfoo
2 #define foopolypaudiohfoo
3
4 /* $Id$ */
5
6 /***
7   This file is part of polypaudio.
8  
9   polypaudio 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.
13  
14   polypaudio 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.
18  
19   You should have received a copy of the GNU Lesser General Public
20   License along with polypaudio; 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 <polyp/mainloop-api.h>
26 #include <polyp/sample.h>
27 #include <polyp/def.h>
28 #include <polyp/context.h>
29 #include <polyp/stream.h>
30 #include <polyp/introspect.h>
31 #include <polyp/subscribe.h>
32 #include <polyp/scache.h>
33 #include <polyp/version.h>
34 #include <polyp/error.h>
35 #include <polyp/operation.h>
36 #include <polyp/channelmap.h>
37 #include <polyp/volume.h>
38
39 /** \file
40  * Include all polyplib header file at once. The following
41  * files are included: \ref mainloop-api.h, \ref sample.h, \ref def.h,
42  * \ref context.h, \ref stream.h, \ref introspect.h, \ref subscribe.h,
43  * \ref scache.h, \ref version.h, \ref error.h, \ref channelmap.h,
44  * \ref operation.h and \ref volume.h at once */
45
46 /** \mainpage
47  *
48  * \section intro_sec Introduction
49  * 
50  * This document describes the client API for the polypaudio sound
51  * server. The API comes in two flavours to accomodate different styles
52  * of applications and different needs in complexity:
53  * 
54  * \li The complete but somewhat complicated to use asynchronous API
55  * \li The simplified, easy to use, but limited synchronous API
56  *
57  * \section simple_sec Simple API
58  *
59  * Use this if you develop your program in synchronous style and just
60  * need a way to play or record data on the sound server. See
61  * \subpage simple for more details.
62  *
63  * \section async_sec Asynchronous API
64  *
65  * Use this if you develop your programs in asynchronous, event loop
66  * based style or if you want to use the advanced features of the
67  * polypaudio API. A guide can be found in \subpage async.
68  *
69  * By using the built-in threaded main loop, it is possible to acheive a
70  * pseudo-synchronous API, which can be useful in synchronous applications
71  * where the simple API is insufficient. See the \ref async page for
72  * details.
73  *
74  * \section thread_sec Threads
75  *
76  * The polypaudio client libraries are not designed to be used in a
77  * heavily threaded environment. They are however designed to be reentrant
78  * safe.
79  *
80  * To use a the libraries in a threaded environment, you must assure that
81  * all objects are only used in one thread at a time. Normally, this means
82  * that all objects belonging to a single context must be accessed from the
83  * same thread.
84  *
85  * The included main loop implementation is also not thread safe. Take care
86  * to make sure event lists are not manipulated when any other code is
87  * using the main loop.
88  *
89  * \section pkgconfig pkg-config
90  *
91  * The polypaudio libraries provide pkg-config snippets for the different
92  * modules:
93  *
94  * \li polyplib - The asynchronous API and the internal main loop
95  *                implementation.
96  * \li polyplib-glib12-mainloop - GLIB 1.2 main loop bindings.
97  * \li polyplib-glib-mainloop - GLIB 2.x main loop bindings.
98  * \li polyplib-simple - The simple polypaudio API.
99  */
100
101 #endif