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 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358
|
<!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=11"/>
<meta name="generator" content="Doxygen 1.9.4"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>libkate: kate_comment access</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="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 id="projectrow">
<td id="projectalign">
<div id="projectname">libkate<span id="projectnumber"> 0.4.3</span>
</div>
</td>
</tr>
</tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.9.4 -->
<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:d3d9a9a6595521f9666a5e94cc830dab83b65699&dn=expat.txt MIT */
$(function() {
initMenu('',false,false,'search.php','Search');
});
/* @license-end */
</script>
<div id="main-nav"></div>
</div><!-- top -->
<div class="header">
<div class="summary">
<a href="#func-members">Functions</a> </div>
<div class="headertitle"><div class="title">kate_comment access</div></div>
</div><!--header-->
<div class="contents">
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a id="func-members" name="func-members"></a>
Functions</h2></td></tr>
<tr class="memitem:ga4f717746ed53e557e57bb1e2b40dbd84"><td class="memItemLeft" align="right" valign="top">int </td><td class="memItemRight" valign="bottom"><a class="el" href="group__comments.html#ga4f717746ed53e557e57bb1e2b40dbd84">kate_comment_init</a> (<a class="el" href="structkate__comment.html">kate_comment</a> *kc)</td></tr>
<tr class="separator:ga4f717746ed53e557e57bb1e2b40dbd84"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:ga92e532be93459a5b1d6835b64c1129da"><td class="memItemLeft" align="right" valign="top">int </td><td class="memItemRight" valign="bottom"><a class="el" href="group__comments.html#ga92e532be93459a5b1d6835b64c1129da">kate_comment_clear</a> (<a class="el" href="structkate__comment.html">kate_comment</a> *kc)</td></tr>
<tr class="separator:ga92e532be93459a5b1d6835b64c1129da"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:ga337da40d0b1797656f4f8b9201fb4629"><td class="memItemLeft" align="right" valign="top">int </td><td class="memItemRight" valign="bottom"><a class="el" href="group__comments.html#ga337da40d0b1797656f4f8b9201fb4629">kate_comment_add_length</a> (<a class="el" href="structkate__comment.html">kate_comment</a> *kc, const char *comment, size_t len)</td></tr>
<tr class="separator:ga337da40d0b1797656f4f8b9201fb4629"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:ga788d04e42f01305f88b3e6d4ba93e743"><td class="memItemLeft" align="right" valign="top">int </td><td class="memItemRight" valign="bottom"><a class="el" href="group__comments.html#ga788d04e42f01305f88b3e6d4ba93e743">kate_comment_add</a> (<a class="el" href="structkate__comment.html">kate_comment</a> *kc, const char *comment)</td></tr>
<tr class="separator:ga788d04e42f01305f88b3e6d4ba93e743"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:ga8d0af9117470d1bfefd5128055e55dac"><td class="memItemLeft" align="right" valign="top">int </td><td class="memItemRight" valign="bottom"><a class="el" href="group__comments.html#ga8d0af9117470d1bfefd5128055e55dac">kate_comment_add_tag</a> (<a class="el" href="structkate__comment.html">kate_comment</a> *kc, const char *tag, const char *value)</td></tr>
<tr class="separator:ga8d0af9117470d1bfefd5128055e55dac"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:ga5403c47fac0c98955fc006de4ea3f00a"><td class="memItemLeft" align="right" valign="top">const char * </td><td class="memItemRight" valign="bottom"><a class="el" href="group__comments.html#ga5403c47fac0c98955fc006de4ea3f00a">kate_comment_query</a> (const <a class="el" href="structkate__comment.html">kate_comment</a> *kc, const char *tag, int count)</td></tr>
<tr class="separator:ga5403c47fac0c98955fc006de4ea3f00a"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:ga27f193c35d8224539319801a9bfe9033"><td class="memItemLeft" align="right" valign="top">int </td><td class="memItemRight" valign="bottom"><a class="el" href="group__comments.html#ga27f193c35d8224539319801a9bfe9033">kate_comment_query_count</a> (const <a class="el" href="structkate__comment.html">kate_comment</a> *kc, const char *tag)</td></tr>
<tr class="separator:ga27f193c35d8224539319801a9bfe9033"><td class="memSeparator" colspan="2"> </td></tr>
</table>
<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
<h2 class="groupheader">Function Documentation</h2>
<a id="ga788d04e42f01305f88b3e6d4ba93e743" name="ga788d04e42f01305f88b3e6d4ba93e743"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ga788d04e42f01305f88b3e6d4ba93e743">◆ </a></span>kate_comment_add()</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">int kate_comment_add </td>
<td>(</td>
<td class="paramtype"><a class="el" href="structkate__comment.html">kate_comment</a> * </td>
<td class="paramname"><em>kc</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">const char * </td>
<td class="paramname"><em>comment</em> </td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td>
</tr>
</table>
</div><div class="memdoc">
<p >Adds a comment to the <a class="el" href="structkate__comment.html">kate_comment</a> structure. The comment must be of the form "tag=value" The comment tag must be 7 bit ASCII, and may not contain embedded NULs The comment value is UTF-8 and may not contain embedded NULs as the comments ends at the first NUL encountered </p><dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramname">kc</td><td>the <a class="el" href="structkate__comment.html">kate_comment</a> structure to add the comment to </td></tr>
<tr><td class="paramname">comment</td><td>the comment to add, NUL terminated </td></tr>
</table>
</dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>0 success </dd>
<dd>
KATE_E_* error </dd></dl>
<p class="reference">References <a class="el" href="group__comments.html#ga337da40d0b1797656f4f8b9201fb4629">kate_comment_add_length()</a>, and <a class="el" href="kate_8h.html#ae8ebebffaa4e6519c307a079d6d13107">KATE_E_INVALID_PARAMETER</a>.</p>
<p class="reference">Referenced by <a class="el" href="group__comments.html#ga8d0af9117470d1bfefd5128055e55dac">kate_comment_add_tag()</a>.</p>
</div>
</div>
<a id="ga337da40d0b1797656f4f8b9201fb4629" name="ga337da40d0b1797656f4f8b9201fb4629"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ga337da40d0b1797656f4f8b9201fb4629">◆ </a></span>kate_comment_add_length()</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">int kate_comment_add_length </td>
<td>(</td>
<td class="paramtype"><a class="el" href="structkate__comment.html">kate_comment</a> * </td>
<td class="paramname"><em>kc</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">const char * </td>
<td class="paramname"><em>comment</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">size_t </td>
<td class="paramname"><em>len</em> </td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td>
</tr>
</table>
</div><div class="memdoc">
<p >Adds a comment to the <a class="el" href="structkate__comment.html">kate_comment</a> structure. The comment must be of the form "tag=value" The comment tag must be 7 bit ASCII, and may not contain embedded NULs The comment value is UTF-8 and may contain embedded NULs </p><dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramname">kc</td><td>the <a class="el" href="structkate__comment.html">kate_comment</a> structure to add the comment to </td></tr>
<tr><td class="paramname">comment</td><td>the comment to add (a stream of len bytes) </td></tr>
<tr><td class="paramname">len</td><td>the number of bytes in the comment </td></tr>
</table>
</dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>0 success </dd>
<dd>
KATE_E_* error </dd></dl>
<p class="reference">References <a class="el" href="structkate__comment.html#a95c003d2dd55fee72f9c8ef9fb399027">kate_comment::comment_lengths</a>, <a class="el" href="structkate__comment.html#a28cd4aa68c9fc468869b3c3c16e84abc">kate_comment::comments</a>, <a class="el" href="kate_8h.html#adc1762d48cfad15755f6a26cf2686c65">KATE_E_BAD_TAG</a>, <a class="el" href="kate_8h.html#ae8ebebffaa4e6519c307a079d6d13107">KATE_E_INVALID_PARAMETER</a>, <a class="el" href="kate_8h.html#ace0a2017701cecf1b747df1744f02412">KATE_E_OUT_OF_MEMORY</a>, <a class="el" href="group__text.html#gaf039cd8bf94f2ad66ad65443e3aa5525">kate_text_validate()</a>, <a class="el" href="kate_8h.html#a9e8a915382d068016312baad10053902a61dbcfdc52bafaf6cb731a793b46ff77">kate_utf8</a>, and <a class="el" href="structkate__comment.html#abb1537740364cc060254f06efc9a9dab">kate_comment::user_comments</a>.</p>
<p class="reference">Referenced by <a class="el" href="group__comments.html#ga788d04e42f01305f88b3e6d4ba93e743">kate_comment_add()</a>.</p>
</div>
</div>
<a id="ga8d0af9117470d1bfefd5128055e55dac" name="ga8d0af9117470d1bfefd5128055e55dac"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ga8d0af9117470d1bfefd5128055e55dac">◆ </a></span>kate_comment_add_tag()</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">int kate_comment_add_tag </td>
<td>(</td>
<td class="paramtype"><a class="el" href="structkate__comment.html">kate_comment</a> * </td>
<td class="paramname"><em>kc</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">const char * </td>
<td class="paramname"><em>tag</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">const char * </td>
<td class="paramname"><em>value</em> </td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td>
</tr>
</table>
</div><div class="memdoc">
<p >Adds a comment to the <a class="el" href="structkate__comment.html">kate_comment</a> structure, formatted as "tag=value". The tag must be 7 bit ASCII and comply with Vorbis comment tag rules. The value must be valid UTF-8 text. Neither tag nor value may contain embedded NULs. To embed comments with embedded NUL in the payload, see kate_comment_add_length. </p><dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramname">kc</td><td>the <a class="el" href="structkate__comment.html">kate_comment</a> structure to add the comment to </td></tr>
<tr><td class="paramname">tag</td><td>the tag of the comment to add </td></tr>
<tr><td class="paramname">value</td><td>the contents of the comment to add </td></tr>
</table>
</dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>0 success </dd>
<dd>
KATE_E_* error </dd></dl>
<p class="reference">References <a class="el" href="group__comments.html#ga788d04e42f01305f88b3e6d4ba93e743">kate_comment_add()</a>, <a class="el" href="kate_8h.html#ae8ebebffaa4e6519c307a079d6d13107">KATE_E_INVALID_PARAMETER</a>, and <a class="el" href="kate_8h.html#ace0a2017701cecf1b747df1744f02412">KATE_E_OUT_OF_MEMORY</a>.</p>
</div>
</div>
<a id="ga92e532be93459a5b1d6835b64c1129da" name="ga92e532be93459a5b1d6835b64c1129da"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ga92e532be93459a5b1d6835b64c1129da">◆ </a></span>kate_comment_clear()</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">int kate_comment_clear </td>
<td>(</td>
<td class="paramtype"><a class="el" href="structkate__comment.html">kate_comment</a> * </td>
<td class="paramname"><em>kc</em></td><td>)</td>
<td></td>
</tr>
</table>
</div><div class="memdoc">
<p >Destroys a <a class="el" href="structkate__comment.html">kate_comment</a> structure, it must be initialized again before being used. </p><dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramname">kc</td><td>the structure to clear </td></tr>
</table>
</dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>0 success </dd>
<dd>
KATE_E_* error </dd></dl>
<p class="reference">References <a class="el" href="structkate__comment.html#a95c003d2dd55fee72f9c8ef9fb399027">kate_comment::comment_lengths</a>, <a class="el" href="structkate__comment.html#a28cd4aa68c9fc468869b3c3c16e84abc">kate_comment::comments</a>, <a class="el" href="kate_8h.html#ae8ebebffaa4e6519c307a079d6d13107">KATE_E_INVALID_PARAMETER</a>, <a class="el" href="structkate__comment.html#abb1537740364cc060254f06efc9a9dab">kate_comment::user_comments</a>, and <a class="el" href="structkate__comment.html#aa8a4c2d988b68d15f732f4a1f02c2176">kate_comment::vendor</a>.</p>
</div>
</div>
<a id="ga4f717746ed53e557e57bb1e2b40dbd84" name="ga4f717746ed53e557e57bb1e2b40dbd84"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ga4f717746ed53e557e57bb1e2b40dbd84">◆ </a></span>kate_comment_init()</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">int kate_comment_init </td>
<td>(</td>
<td class="paramtype"><a class="el" href="structkate__comment.html">kate_comment</a> * </td>
<td class="paramname"><em>kc</em></td><td>)</td>
<td></td>
</tr>
</table>
</div><div class="memdoc">
<p >Initializes a <a class="el" href="structkate__comment.html">kate_comment</a> structure. </p><dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramname">kc</td><td>the structure to initialize </td></tr>
</table>
</dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>0 success </dd>
<dd>
KATE_E_* error </dd></dl>
<p class="reference">References <a class="el" href="structkate__comment.html#a95c003d2dd55fee72f9c8ef9fb399027">kate_comment::comment_lengths</a>, <a class="el" href="structkate__comment.html#a28cd4aa68c9fc468869b3c3c16e84abc">kate_comment::comments</a>, <a class="el" href="kate_8h.html#ae8ebebffaa4e6519c307a079d6d13107">KATE_E_INVALID_PARAMETER</a>, <a class="el" href="structkate__comment.html#abb1537740364cc060254f06efc9a9dab">kate_comment::user_comments</a>, and <a class="el" href="structkate__comment.html#aa8a4c2d988b68d15f732f4a1f02c2176">kate_comment::vendor</a>.</p>
<p class="reference">Referenced by <a class="el" href="group__high.html#ga810984fb4ec910632c250672d39feee4">kate_high_decode_init()</a>.</p>
</div>
</div>
<a id="ga5403c47fac0c98955fc006de4ea3f00a" name="ga5403c47fac0c98955fc006de4ea3f00a"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ga5403c47fac0c98955fc006de4ea3f00a">◆ </a></span>kate_comment_query()</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">const char * kate_comment_query </td>
<td>(</td>
<td class="paramtype">const <a class="el" href="structkate__comment.html">kate_comment</a> * </td>
<td class="paramname"><em>kc</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">const char * </td>
<td class="paramname"><em>tag</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">int </td>
<td class="paramname"><em>count</em> </td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td>
</tr>
</table>
</div><div class="memdoc">
<p >Queries the value of a comment that has the given tag. The tags are case insensitive, so "tag", "TAG", "Tag", and "TaG" are all equivalent. If there are multiple comments with the same tag, count may be used to select which one to return. The number of comments with a given tag may be retrieved using kate_comment_query_count. </p><dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramname">kc</td><td>the <a class="el" href="structkate__comment.html">kate_comment</a> structure to look into </td></tr>
<tr><td class="paramname">tag</td><td>the title of the comment to look for </td></tr>
<tr><td class="paramname">count</td><td>the index of the matching comment to return (if there are several) </td></tr>
</table>
</dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>0 success </dd>
<dd>
KATE_E_* error </dd></dl>
<p class="reference">References <a class="el" href="structkate__comment.html#a28cd4aa68c9fc468869b3c3c16e84abc">kate_comment::comments</a>, and <a class="el" href="structkate__comment.html#abb1537740364cc060254f06efc9a9dab">kate_comment::user_comments</a>.</p>
</div>
</div>
<a id="ga27f193c35d8224539319801a9bfe9033" name="ga27f193c35d8224539319801a9bfe9033"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ga27f193c35d8224539319801a9bfe9033">◆ </a></span>kate_comment_query_count()</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">int kate_comment_query_count </td>
<td>(</td>
<td class="paramtype">const <a class="el" href="structkate__comment.html">kate_comment</a> * </td>
<td class="paramname"><em>kc</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">const char * </td>
<td class="paramname"><em>tag</em> </td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td>
</tr>
</table>
</div><div class="memdoc">
<p >Returns the number of comments with the given tag. The tags are case insensitive, so "tag", "TAG", "Tag", and "TaG" are all equivalent. </p><dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramname">kc</td><td>the <a class="el" href="structkate__comment.html">kate_comment</a> structure to look into </td></tr>
<tr><td class="paramname">tag</td><td>the title of the comment to look for </td></tr>
</table>
</dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>0 success </dd>
<dd>
KATE_E_* error </dd></dl>
<p class="reference">References <a class="el" href="structkate__comment.html#a28cd4aa68c9fc468869b3c3c16e84abc">kate_comment::comments</a>, <a class="el" href="kate_8h.html#ae8ebebffaa4e6519c307a079d6d13107">KATE_E_INVALID_PARAMETER</a>, and <a class="el" href="structkate__comment.html#abb1537740364cc060254f06efc9a9dab">kate_comment::user_comments</a>.</p>
</div>
</div>
</div><!-- contents -->
<!-- start footer part -->
<hr class="footer"/><address class="footer"><small>
Generated by <a href="https://www.doxygen.org/index.html"><img class="footer" src="doxygen.svg" width="104" height="31" alt="doxygen"/></a> 1.9.4
</small></address>
</body>
</html>
|