1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
|
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.8.15"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>PipeWire: utils.h Source File</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="navtree.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="resize.js"></script>
<script type="text/javascript" src="navtreedata.js"></script>
<script type="text/javascript" src="navtree.js"></script>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&dn=gpl-2.0.txt GPL-v2 */
$(document).ready(initResizable);
/* @license-end */</script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
<tbody>
<tr style="height: 56px;">
<td id="projectalign" style="padding-left: 0.5em;">
<div id="projectname">PipeWire
 <span id="projectnumber">0.2.9</span>
</div>
</td>
</tr>
</tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.15 -->
<script type="text/javascript" src="menudata.js"></script>
<script type="text/javascript" src="menu.js"></script>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&dn=gpl-2.0.txt GPL-v2 */
$(function() {
initMenu('',false,false,'search.php','Search');
});
/* @license-end */</script>
<div id="main-nav"></div>
</div><!-- top -->
<div id="side-nav" class="ui-resizable side-nav-resizable">
<div id="nav-tree">
<div id="nav-tree-contents">
<div id="nav-sync" class="sync"></div>
</div>
</div>
<div id="splitbar" style="-moz-user-select:none;"
class="ui-resizable-handle">
</div>
</div>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&dn=gpl-2.0.txt GPL-v2 */
$(document).ready(function(){initNavTree('utils_8h_source.html','');});
/* @license-end */
</script>
<div id="doc-content">
<div class="header">
<div class="headertitle">
<div class="title">utils.h</div> </div>
</div><!--header-->
<div class="contents">
<a href="utils_8h.html">Go to the documentation of this file.</a><div class="fragment"><div class="line"><a name="l00001"></a><span class="lineno"> 1</span> <span class="comment">/* PipeWire</span></div><div class="line"><a name="l00002"></a><span class="lineno"> 2</span> <span class="comment"> *</span></div><div class="line"><a name="l00003"></a><span class="lineno"> 3</span> <span class="comment"> * Copyright © 2018 Wim Taymans</span></div><div class="line"><a name="l00004"></a><span class="lineno"> 4</span> <span class="comment"> *</span></div><div class="line"><a name="l00005"></a><span class="lineno"> 5</span> <span class="comment"> * Permission is hereby granted, free of charge, to any person obtaining a</span></div><div class="line"><a name="l00006"></a><span class="lineno"> 6</span> <span class="comment"> * copy of this software and associated documentation files (the "Software"),</span></div><div class="line"><a name="l00007"></a><span class="lineno"> 7</span> <span class="comment"> * to deal in the Software without restriction, including without limitation</span></div><div class="line"><a name="l00008"></a><span class="lineno"> 8</span> <span class="comment"> * the rights to use, copy, modify, merge, publish, distribute, sublicense,</span></div><div class="line"><a name="l00009"></a><span class="lineno"> 9</span> <span class="comment"> * and/or sell copies of the Software, and to permit persons to whom the</span></div><div class="line"><a name="l00010"></a><span class="lineno"> 10</span> <span class="comment"> * Software is furnished to do so, subject to the following conditions:</span></div><div class="line"><a name="l00011"></a><span class="lineno"> 11</span> <span class="comment"> *</span></div><div class="line"><a name="l00012"></a><span class="lineno"> 12</span> <span class="comment"> * The above copyright notice and this permission notice (including the next</span></div><div class="line"><a name="l00013"></a><span class="lineno"> 13</span> <span class="comment"> * paragraph) shall be included in all copies or substantial portions of the</span></div><div class="line"><a name="l00014"></a><span class="lineno"> 14</span> <span class="comment"> * Software.</span></div><div class="line"><a name="l00015"></a><span class="lineno"> 15</span> <span class="comment"> *</span></div><div class="line"><a name="l00016"></a><span class="lineno"> 16</span> <span class="comment"> * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR</span></div><div class="line"><a name="l00017"></a><span class="lineno"> 17</span> <span class="comment"> * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,</span></div><div class="line"><a name="l00018"></a><span class="lineno"> 18</span> <span class="comment"> * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL</span></div><div class="line"><a name="l00019"></a><span class="lineno"> 19</span> <span class="comment"> * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER</span></div><div class="line"><a name="l00020"></a><span class="lineno"> 20</span> <span class="comment"> * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING</span></div><div class="line"><a name="l00021"></a><span class="lineno"> 21</span> <span class="comment"> * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER</span></div><div class="line"><a name="l00022"></a><span class="lineno"> 22</span> <span class="comment"> * DEALINGS IN THE SOFTWARE.</span></div><div class="line"><a name="l00023"></a><span class="lineno"> 23</span> <span class="comment"> */</span></div><div class="line"><a name="l00024"></a><span class="lineno"> 24</span> </div><div class="line"><a name="l00025"></a><span class="lineno"> 25</span> <span class="preprocessor">#ifndef PIPEWIRE_UTILS_H</span></div><div class="line"><a name="l00026"></a><span class="lineno"> 26</span> <span class="preprocessor">#define PIPEWIRE_UTILS_H</span></div><div class="line"><a name="l00027"></a><span class="lineno"> 27</span> </div><div class="line"><a name="l00028"></a><span class="lineno"> 28</span> <span class="preprocessor">#ifdef __cplusplus</span></div><div class="line"><a name="l00029"></a><span class="lineno"> 29</span> <span class="keyword">extern</span> <span class="stringliteral">"C"</span> {</div><div class="line"><a name="l00030"></a><span class="lineno"> 30</span> <span class="preprocessor">#endif</span></div><div class="line"><a name="l00031"></a><span class="lineno"> 31</span> </div><div class="line"><a name="l00032"></a><span class="lineno"> 32</span> <span class="preprocessor">#include <spa/utils/defs.h></span></div><div class="line"><a name="l00033"></a><span class="lineno"> 33</span> <span class="preprocessor">#include <spa/pod/pod.h></span></div><div class="line"><a name="l00034"></a><span class="lineno"> 34</span> </div><div class="line"><a name="l00041"></a><span class="lineno"><a class="line" href="classpw__utils.html#a40eebfe720dbba23dbc86347dd95ba0b"> 41</a></span> <span class="keyword">typedef</span> void (*<a class="code" href="classpw__utils.html#a40eebfe720dbba23dbc86347dd95ba0b">pw_destroy_t</a>) (<span class="keywordtype">void</span> *object);</div><div class="line"><a name="l00042"></a><span class="lineno"> 42</span> </div><div class="line"><a name="l00043"></a><span class="lineno"> 43</span> <span class="keyword">const</span> <span class="keywordtype">char</span> *</div><div class="line"><a name="l00044"></a><span class="lineno"> 44</span> <a class="code" href="classpw__utils.html#a3dae48f70b92a377a5ba0bd1060382ce">pw_split_walk</a>(<span class="keyword">const</span> <span class="keywordtype">char</span> *str, <span class="keyword">const</span> <span class="keywordtype">char</span> *delimiter, <span class="keywordtype">size_t</span> *len, <span class="keyword">const</span> <span class="keywordtype">char</span> **state);</div><div class="line"><a name="l00045"></a><span class="lineno"> 45</span> </div><div class="line"><a name="l00046"></a><span class="lineno"> 46</span> <span class="keywordtype">char</span> **</div><div class="line"><a name="l00047"></a><span class="lineno"> 47</span> <a class="code" href="classpw__utils.html#a49b83deb0d19e23830facddb1e03bae1">pw_split_strv</a>(<span class="keyword">const</span> <span class="keywordtype">char</span> *str, <span class="keyword">const</span> <span class="keywordtype">char</span> *delimiter, <span class="keywordtype">int</span> max_tokens, <span class="keywordtype">int</span> *n_tokens);</div><div class="line"><a name="l00048"></a><span class="lineno"> 48</span> </div><div class="line"><a name="l00049"></a><span class="lineno"> 49</span> <span class="keywordtype">void</span></div><div class="line"><a name="l00050"></a><span class="lineno"> 50</span> <a class="code" href="classpw__utils.html#adfbe5fb619ea56867116d16fa27c2076">pw_free_strv</a>(<span class="keywordtype">char</span> **str);</div><div class="line"><a name="l00051"></a><span class="lineno"> 51</span> </div><div class="line"><a name="l00052"></a><span class="lineno"> 52</span> <span class="keywordtype">char</span> *</div><div class="line"><a name="l00053"></a><span class="lineno"> 53</span> <a class="code" href="classpw__utils.html#ac50c6fcfe11d26670d97203e84892f69">pw_strip</a>(<span class="keywordtype">char</span> *str, <span class="keyword">const</span> <span class="keywordtype">char</span> *whitespace);</div><div class="line"><a name="l00054"></a><span class="lineno"> 54</span> </div><div class="line"><a name="l00055"></a><span class="lineno"> 55</span> <span class="preprocessor">#ifdef __cplusplus</span></div><div class="line"><a name="l00056"></a><span class="lineno"> 56</span> } <span class="comment">/* extern "C" */</span></div><div class="line"><a name="l00057"></a><span class="lineno"> 57</span> <span class="preprocessor">#endif</span></div><div class="line"><a name="l00058"></a><span class="lineno"> 58</span> </div><div class="line"><a name="l00059"></a><span class="lineno"> 59</span> <span class="preprocessor">#endif </span><span class="comment">/* PIPEWIRE_UTILS_H */</span><span class="preprocessor"></span></div><div class="ttc" id="classpw__utils_html_a3dae48f70b92a377a5ba0bd1060382ce"><div class="ttname"><a href="classpw__utils.html#a3dae48f70b92a377a5ba0bd1060382ce">pw_utils::pw_split_walk</a></div><div class="ttdeci">SPA_EXPORT const char * pw_split_walk(const char *str, const char *delimiter, size_t *len, const char **state)</div><div class="ttdoc">Split a string based on delimiters.</div><div class="ttdef"><b>Definition:</b> utils.c:45</div></div>
<div class="ttc" id="classpw__utils_html_a40eebfe720dbba23dbc86347dd95ba0b"><div class="ttname"><a href="classpw__utils.html#a40eebfe720dbba23dbc86347dd95ba0b">pw_utils::pw_destroy_t</a></div><div class="ttdeci">void(* pw_destroy_t)(void *object)</div><div class="ttdoc">a function to destroy an item</div><div class="ttdef"><b>Definition:</b> utils.h:41</div></div>
<div class="ttc" id="classpw__utils_html_a49b83deb0d19e23830facddb1e03bae1"><div class="ttname"><a href="classpw__utils.html#a49b83deb0d19e23830facddb1e03bae1">pw_utils::pw_split_strv</a></div><div class="ttdeci">SPA_EXPORT char ** pw_split_strv(const char *str, const char *delimiter, int max_tokens, int *n_tokens)</div><div class="ttdoc">Split a string based on delimiters.</div><div class="ttdef"><b>Definition:</b> utils.c:71</div></div>
<div class="ttc" id="classpw__utils_html_adfbe5fb619ea56867116d16fa27c2076"><div class="ttname"><a href="classpw__utils.html#adfbe5fb619ea56867116d16fa27c2076">pw_utils::pw_free_strv</a></div><div class="ttdeci">SPA_EXPORT void pw_free_strv(char **str)</div><div class="ttdoc">Free a NULL terminated array of strings.</div><div class="ttdef"><b>Definition:</b> utils.c:105</div></div>
<div class="ttc" id="classpw__utils_html_ac50c6fcfe11d26670d97203e84892f69"><div class="ttname"><a href="classpw__utils.html#ac50c6fcfe11d26670d97203e84892f69">pw_utils::pw_strip</a></div><div class="ttdeci">SPA_EXPORT char * pw_strip(char *str, const char *whitespace)</div><div class="ttdoc">Strip all whitespace before and after a string.</div><div class="ttdef"><b>Definition:</b> utils.c:124</div></div>
</div><!-- fragment --></div><!-- contents -->
</div><!-- doc-content -->
<!-- start footer part -->
<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
<ul>
<li class="navelem"><a class="el" href="dir_68267d1309a1af8e8297ef4c3efbcdba.html">src</a></li><li class="navelem"><a class="el" href="dir_7129a66c92fe7beef816c2ac906ef0b3.html">pipewire</a></li><li class="navelem"><a class="el" href="utils_8h.html">utils.h</a></li>
<li class="footer">Generated by
<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.8.15 </li>
</ul>
</div>
</body>
</html>
|