<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> <html><head><meta http-equiv="Content-Type" content="text/html;charset=UTF-8"> <title>PulseAudio: thread-mainloop.h Source File</title> <link href="doxygen.css" rel="stylesheet" type="text/css"> <link href="tabs.css" rel="stylesheet" type="text/css"> </head><body> <!-- Generated by Doxygen 1.5.5 --> <div class="navigation" id="top"> <div class="tabs"> <ul> <li><a href="main.html"><span>Main Page</span></a></li> <li><a href="pages.html"><span>Related Pages</span></a></li> <li><a href="classes.html"><span>Data Structures</span></a></li> <li class="current"><a href="files.html"><span>Files</span></a></li> <li><a href="examples.html"><span>Examples</span></a></li> </ul> </div> <h1>thread-mainloop.h</h1><a href="thread-mainloop_8h.html">Go to the documentation of this file.</a><div class="fragment"><pre class="fragment"><a name="l00001"></a>00001 <span class="preprocessor">#ifndef foothreadmainloophfoo</span> <a name="l00002"></a>00002 <span class="preprocessor"></span><span class="preprocessor">#define foothreadmainloophfoo</span> <a name="l00003"></a>00003 <span class="preprocessor"></span> <a name="l00004"></a>00004 <span class="comment">/* $Id: thread-mainloop.h 1971 2007-10-28 19:13:50Z lennart $ */</span> <a name="l00005"></a>00005 <a name="l00006"></a>00006 <span class="comment">/***</span> <a name="l00007"></a>00007 <span class="comment"> This file is part of PulseAudio.</span> <a name="l00008"></a>00008 <span class="comment"></span> <a name="l00009"></a>00009 <span class="comment"> Copyright 2006 Lennart Poettering</span> <a name="l00010"></a>00010 <span class="comment"> Copyright 2006 Pierre Ossman <ossman@cendio.se> for Cendio AB</span> <a name="l00011"></a>00011 <span class="comment"></span> <a name="l00012"></a>00012 <span class="comment"> PulseAudio is free software; you can redistribute it and/or modify</span> <a name="l00013"></a>00013 <span class="comment"> it under the terms of the GNU Lesser General Public License as published</span> <a name="l00014"></a>00014 <span class="comment"> by the Free Software Foundation; either version 2 of the License,</span> <a name="l00015"></a>00015 <span class="comment"> or (at your option) any later version.</span> <a name="l00016"></a>00016 <span class="comment"></span> <a name="l00017"></a>00017 <span class="comment"> PulseAudio is distributed in the hope that it will be useful, but</span> <a name="l00018"></a>00018 <span class="comment"> WITHOUT ANY WARRANTY; without even the implied warranty of</span> <a name="l00019"></a>00019 <span class="comment"> MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU</span> <a name="l00020"></a>00020 <span class="comment"> General Public License for more details.</span> <a name="l00021"></a>00021 <span class="comment"></span> <a name="l00022"></a>00022 <span class="comment"> You should have received a copy of the GNU Lesser General Public License</span> <a name="l00023"></a>00023 <span class="comment"> along with PulseAudio; if not, write to the Free Software</span> <a name="l00024"></a>00024 <span class="comment"> Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307</span> <a name="l00025"></a>00025 <span class="comment"> USA.</span> <a name="l00026"></a>00026 <span class="comment">***/</span> <a name="l00027"></a>00027 <a name="l00028"></a>00028 <span class="preprocessor">#include <<a class="code" href="mainloop-api_8h.html" title="Main loop abstraction layer.">pulse/mainloop-api.h</a>></span> <a name="l00029"></a>00029 <span class="preprocessor">#include <pulse/cdecl.h></span> <a name="l00030"></a>00030 <a name="l00031"></a>00031 PA_C_DECL_BEGIN <a name="l00032"></a>00032 <a name="l00242"></a><a class="code" href="thread-mainloop_8h.html#40393b9b64dc8213bcd5f017344baf74">00242</a> <span class="keyword">typedef</span> <span class="keyword">struct </span><a class="code" href="thread-mainloop_8h.html#40393b9b64dc8213bcd5f017344baf74" title="An opaque threaded main loop object.">pa_threaded_mainloop</a> <a class="code" href="thread-mainloop_8h.html#40393b9b64dc8213bcd5f017344baf74" title="An opaque threaded main loop object.">pa_threaded_mainloop</a>; <a name="l00243"></a>00243 <a name="l00247"></a>00247 <a class="code" href="thread-mainloop_8h.html#40393b9b64dc8213bcd5f017344baf74" title="An opaque threaded main loop object.">pa_threaded_mainloop</a> *<a class="code" href="thread-mainloop_8h.html#3b8bf5f49d7eb9d6fe6ea008eb6482f2" title="Allocate a new threaded main loop object.">pa_threaded_mainloop_new</a>(<span class="keywordtype">void</span>); <a name="l00248"></a>00248 <a name="l00252"></a>00252 <span class="keywordtype">void</span> <a class="code" href="thread-mainloop_8h.html#00afff8173668f12e19d574cd4e4134b" title="Free a threaded main loop object.">pa_threaded_mainloop_free</a>(<a class="code" href="thread-mainloop_8h.html#40393b9b64dc8213bcd5f017344baf74" title="An opaque threaded main loop object.">pa_threaded_mainloop</a>* m); <a name="l00253"></a>00253 <a name="l00255"></a>00255 <span class="keywordtype">int</span> <a class="code" href="thread-mainloop_8h.html#2faf4ddb9a94f74d6e7ef80843e73d30" title="Start the event loop thread.">pa_threaded_mainloop_start</a>(<a class="code" href="thread-mainloop_8h.html#40393b9b64dc8213bcd5f017344baf74" title="An opaque threaded main loop object.">pa_threaded_mainloop</a> *m); <a name="l00256"></a>00256 <a name="l00259"></a>00259 <span class="keywordtype">void</span> <a class="code" href="thread-mainloop_8h.html#2a017a59832e81a44aa8989c403fb70e" title="Terminate the event loop thread cleanly.">pa_threaded_mainloop_stop</a>(<a class="code" href="thread-mainloop_8h.html#40393b9b64dc8213bcd5f017344baf74" title="An opaque threaded main loop object.">pa_threaded_mainloop</a> *m); <a name="l00260"></a>00260 <a name="l00267"></a>00267 <span class="keywordtype">void</span> <a class="code" href="thread-mainloop_8h.html#2fd002f510ed24cabacb63a26bf4c977" title="Lock the event loop object, effectively blocking the event loop thread from processing...">pa_threaded_mainloop_lock</a>(<a class="code" href="thread-mainloop_8h.html#40393b9b64dc8213bcd5f017344baf74" title="An opaque threaded main loop object.">pa_threaded_mainloop</a> *m); <a name="l00268"></a>00268 <a name="l00270"></a>00270 <span class="keywordtype">void</span> <a class="code" href="thread-mainloop_8h.html#b2b2beaa3a66135da67d61db211f0829" title="Unlock the event loop object, inverse of pa_threaded_mainloop_lock().">pa_threaded_mainloop_unlock</a>(<a class="code" href="thread-mainloop_8h.html#40393b9b64dc8213bcd5f017344baf74" title="An opaque threaded main loop object.">pa_threaded_mainloop</a> *m); <a name="l00271"></a>00271 <a name="l00279"></a>00279 <span class="keywordtype">void</span> <a class="code" href="thread-mainloop_8h.html#c96d19260567d0406350f1b3a14c4bed" title="Wait for an event to be signalled by the event loop thread.">pa_threaded_mainloop_wait</a>(<a class="code" href="thread-mainloop_8h.html#40393b9b64dc8213bcd5f017344baf74" title="An opaque threaded main loop object.">pa_threaded_mainloop</a> *m); <a name="l00280"></a>00280 <a name="l00286"></a>00286 <span class="keywordtype">void</span> <a class="code" href="thread-mainloop_8h.html#d253b70911af81c04417793841a15766" title="Signal all threads waiting for a signalling event in pa_threaded_mainloop_wait()...">pa_threaded_mainloop_signal</a>(<a class="code" href="thread-mainloop_8h.html#40393b9b64dc8213bcd5f017344baf74" title="An opaque threaded main loop object.">pa_threaded_mainloop</a> *m, <span class="keywordtype">int</span> wait_for_accept); <a name="l00287"></a>00287 <a name="l00292"></a>00292 <span class="keywordtype">void</span> <a class="code" href="thread-mainloop_8h.html#254b0862e30845a4b0427a7a74b3db91" title="Accept a signal from the event thread issued with pa_threaded_mainloop_signal().">pa_threaded_mainloop_accept</a>(<a class="code" href="thread-mainloop_8h.html#40393b9b64dc8213bcd5f017344baf74" title="An opaque threaded main loop object.">pa_threaded_mainloop</a> *m); <a name="l00293"></a>00293 <a name="l00295"></a>00295 <span class="keywordtype">int</span> <a class="code" href="thread-mainloop_8h.html#487aaf9946ccddbd54c68a6c3fb3fe39" title="Return the return value as specified with the main loop&#39;s quit() routine.">pa_threaded_mainloop_get_retval</a>(<a class="code" href="thread-mainloop_8h.html#40393b9b64dc8213bcd5f017344baf74" title="An opaque threaded main loop object.">pa_threaded_mainloop</a> *m); <a name="l00296"></a>00296 <a name="l00298"></a>00298 <a class="code" href="structpa__mainloop__api.html" title="An abstract mainloop API vtable.">pa_mainloop_api</a>* <a class="code" href="thread-mainloop_8h.html#ab3c05099eafa9947aa7894af2f79fda" title="Return the abstract main loop abstraction layer vtable for this main loop.">pa_threaded_mainloop_get_api</a>(<a class="code" href="thread-mainloop_8h.html#40393b9b64dc8213bcd5f017344baf74" title="An opaque threaded main loop object.">pa_threaded_mainloop</a>*m); <a name="l00299"></a>00299 <a name="l00301"></a>00301 <span class="keywordtype">int</span> <a class="code" href="thread-mainloop_8h.html#7a5f04b51cc3011de90e1490c8baacd0" title="Returns non-zero when called from withing the event loop thread.">pa_threaded_mainloop_in_thread</a>(<a class="code" href="thread-mainloop_8h.html#40393b9b64dc8213bcd5f017344baf74" title="An opaque threaded main loop object.">pa_threaded_mainloop</a> *m); <a name="l00302"></a>00302 <a name="l00303"></a>00303 PA_C_DECL_END <a name="l00304"></a>00304 <a name="l00305"></a>00305 <span class="preprocessor">#endif</span> </pre></div></div> <hr size="1"><address style="text-align: right;"><small>Generated on Wed Mar 26 12:02:40 2008 for PulseAudio by <a href="http://www.doxygen.org/index.html"> <img src="doxygen.png" alt="doxygen" align="middle" border="0"></a> 1.5.5 </small></address> </body> </html>