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 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561
|
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Module - Accessor: liblangtag Documentation</title>
<meta name="generator" content="DocBook XSL Stylesheets Vsnapshot">
<link rel="home" href="index.html" title="liblangtag Documentation">
<link rel="up" href="Module.html" title="Module APIs">
<link rel="prev" href="Module.html" title="Module APIs">
<link rel="next" href="liblangtag-Module---Data.html" title="Module - Data">
<meta name="generator" content="GTK-Doc V1.34.0 (XML mode)">
<link rel="stylesheet" href="style.css" type="text/css">
</head>
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
<table class="navigation" id="top" width="100%" summary="Navigation header" cellpadding="2" cellspacing="5"><tr valign="middle">
<td width="100%" align="left" class="shortcuts">
<a href="#" class="shortcut">Top</a><span id="nav_description"> <span class="dim">|</span>
<a href="#liblangtag-Module---Accessor.description" class="shortcut">Description</a></span>
</td>
<td><a accesskey="h" href="index.html"><img src="home.png" width="16" height="16" border="0" alt="Home"></a></td>
<td><a accesskey="u" href="Module.html"><img src="up.png" width="16" height="16" border="0" alt="Up"></a></td>
<td><a accesskey="p" href="Module.html"><img src="left.png" width="16" height="16" border="0" alt="Prev"></a></td>
<td><a accesskey="n" href="liblangtag-Module---Data.html"><img src="right.png" width="16" height="16" border="0" alt="Next"></a></td>
</tr></table>
<div class="refentry">
<a name="liblangtag-Module---Accessor"></a><div class="titlepage"></div>
<div class="refnamediv"><table width="100%"><tr>
<td valign="top">
<h2><span class="refentrytitle"><a name="liblangtag-Module---Accessor.top_of_page"></a>Module - Accessor</span></h2>
<p>Module - Accessor — A module class to extend features in <a class="link" href="liblangtag-Container---Extension.html#lt-extension-t" title="lt_extension_t"><span class="type">lt_extension_t</span></a>.</p>
</td>
<td class="gallery_image" valign="top" align="right"></td>
</tr></table></div>
<div class="refsect1">
<a name="liblangtag-Module---Accessor.functions"></a><h2>Functions</h2>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="functions_proto_type">
<col class="functions_proto_name">
</colgroup>
<tbody>
<tr>
<td class="function_type">
<span class="returnvalue">int</span>
</td>
<td class="function_name">
<span class="c_punctuation">(</span><a class="link" href="liblangtag-Module---Accessor.html#lt-ext-module-version-func-t" title="lt_ext_module_version_func_t ()">*lt_ext_module_version_func_t</a><span class="c_punctuation">)</span> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">const <a class="link" href="liblangtag-Module---Accessor.html#lt-ext-module-funcs-t" title="struct lt_ext_module_funcs_t"><span class="returnvalue">lt_ext_module_funcs_t</span></a> *
</td>
<td class="function_name">
<span class="c_punctuation">(</span><a class="link" href="liblangtag-Module---Accessor.html#lt-ext-module-get-funcs-func-t" title="lt_ext_module_get_funcs_func_t ()">*lt_ext_module_get_funcs_func_t</a><span class="c_punctuation">)</span> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<span class="returnvalue">char</span>
</td>
<td class="function_name">
<span class="c_punctuation">(</span><a class="link" href="liblangtag-Module---Accessor.html#lt-ext-module-singleton-func-t" title="lt_ext_module_singleton_func_t ()">*lt_ext_module_singleton_func_t</a><span class="c_punctuation">)</span> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<a class="link" href="liblangtag-Module---Data.html#lt-ext-module-data-t" title="lt_ext_module_data_t"><span class="returnvalue">lt_ext_module_data_t</span></a> *
</td>
<td class="function_name">
<span class="c_punctuation">(</span><a class="link" href="liblangtag-Module---Accessor.html#lt-ext-module-data-new-func-t" title="lt_ext_module_data_new_func_t ()">*lt_ext_module_data_new_func_t</a><span class="c_punctuation">)</span> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<a class="link" href="liblangtag-Miscellaneous-Macros.html#lt-bool-t" title="lt_bool_t"><span class="returnvalue">lt_bool_t</span></a>
</td>
<td class="function_name">
<span class="c_punctuation">(</span><a class="link" href="liblangtag-Module---Accessor.html#lt-ext-module-precheck-func-t" title="lt_ext_module_precheck_func_t ()">*lt_ext_module_precheck_func_t</a><span class="c_punctuation">)</span> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<a class="link" href="liblangtag-Miscellaneous-Macros.html#lt-bool-t" title="lt_bool_t"><span class="returnvalue">lt_bool_t</span></a>
</td>
<td class="function_name">
<span class="c_punctuation">(</span><a class="link" href="liblangtag-Module---Accessor.html#lt-ext-module-parse-func-t" title="lt_ext_module_parse_func_t ()">*lt_ext_module_parse_func_t</a><span class="c_punctuation">)</span> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<span class="returnvalue">char</span> *
</td>
<td class="function_name">
<span class="c_punctuation">(</span><a class="link" href="liblangtag-Module---Accessor.html#lt-ext-module-get-tag-func-t" title="lt_ext_module_get_tag_func_t ()">*lt_ext_module_get_tag_func_t</a><span class="c_punctuation">)</span> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<a class="link" href="liblangtag-Miscellaneous-Macros.html#lt-bool-t" title="lt_bool_t"><span class="returnvalue">lt_bool_t</span></a>
</td>
<td class="function_name">
<span class="c_punctuation">(</span><a class="link" href="liblangtag-Module---Accessor.html#lt-ext-module-validate-func-t" title="lt_ext_module_validate_func_t ()">*lt_ext_module_validate_func_t</a><span class="c_punctuation">)</span> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<span class="returnvalue">void</span>
</td>
<td class="function_name">
<a class="link" href="liblangtag-Module---Accessor.html#lt-ext-modules-load" title="lt_ext_modules_load ()">lt_ext_modules_load</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<span class="returnvalue">void</span>
</td>
<td class="function_name">
<a class="link" href="liblangtag-Module---Accessor.html#lt-ext-modules-unload" title="lt_ext_modules_unload ()">lt_ext_modules_unload</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<a class="link" href="liblangtag-Module---Accessor.html#lt-ext-module-t" title="lt_ext_module_t"><span class="returnvalue">lt_ext_module_t</span></a> *
</td>
<td class="function_name">
<a class="link" href="liblangtag-Module---Accessor.html#lt-ext-module-ref" title="lt_ext_module_ref ()">lt_ext_module_ref</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<span class="returnvalue">void</span>
</td>
<td class="function_name">
<a class="link" href="liblangtag-Module---Accessor.html#lt-ext-module-unref" title="lt_ext_module_unref ()">lt_ext_module_unref</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="define_keyword">#define</td>
<td class="function_name">
<a class="link" href="liblangtag-Module---Accessor.html#LT-MODULE-SYMBOL:CAPS" title="LT_MODULE_SYMBOL()">LT_MODULE_SYMBOL</a><span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="define_keyword">#define</td>
<td class="function_name">
<a class="link" href="liblangtag-Module---Accessor.html#LT-MODULE-SYMBOL-:CAPS" title="LT_MODULE_SYMBOL_()">LT_MODULE_SYMBOL_</a><span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="define_keyword">#define</td>
<td class="function_name">
<a class="link" href="liblangtag-Module---Accessor.html#LT-MODULE-SYMBOL--:CAPS" title="LT_MODULE_SYMBOL__()">LT_MODULE_SYMBOL__</a><span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<span class="returnvalue">int</span>
</td>
<td class="function_name">
<a class="link" href="liblangtag-Module---Accessor.html#module-get-version" title="module_get_version ()">module_get_version</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">const <a class="link" href="liblangtag-Module---Accessor.html#lt-ext-module-funcs-t" title="struct lt_ext_module_funcs_t"><span class="returnvalue">lt_ext_module_funcs_t</span></a> *
</td>
<td class="function_name">
<a class="link" href="liblangtag-Module---Accessor.html#module-get-funcs" title="module_get_funcs ()">module_get_funcs</a> <span class="c_punctuation">()</span>
</td>
</tr>
</tbody>
</table></div>
</div>
<div class="refsect1">
<a name="liblangtag-Module---Accessor.other"></a><h2>Types and Values</h2>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="other_proto_type">
<col class="other_proto_name">
</colgroup>
<tbody>
<tr>
<td class="define_keyword">#define</td>
<td class="function_name"><a class="link" href="liblangtag-Module---Accessor.html#LT-EXT-MODULE-VERSION:CAPS" title="LT_EXT_MODULE_VERSION">LT_EXT_MODULE_VERSION</a></td>
</tr>
<tr>
<td class="define_keyword">#define</td>
<td class="function_name"><a class="link" href="liblangtag-Module---Accessor.html#LT-CONST-DECL:CAPS" title="LT_CONST_DECL">LT_CONST_DECL</a></td>
</tr>
<tr>
<td class="datatype_keyword">struct</td>
<td class="function_name"><a class="link" href="liblangtag-Module---Accessor.html#lt-ext-module-funcs-t" title="struct lt_ext_module_funcs_t">lt_ext_module_funcs_t</a></td>
</tr>
<tr>
<td class="datatype_keyword"> </td>
<td class="function_name"><a class="link" href="liblangtag-Module---Accessor.html#lt-ext-module-t" title="lt_ext_module_t">lt_ext_module_t</a></td>
</tr>
</tbody>
</table></div>
</div>
<div class="refsect1">
<a name="liblangtag-Module---Accessor.description"></a><h2>Description</h2>
<p>This class provides functionality to extend features in <a class="link" href="liblangtag-Container---Extension.html#lt-extension-t" title="lt_extension_t"><span class="type">lt_extension_t</span></a>,
such as validating tags more strictly.</p>
</div>
<div class="refsect1">
<a name="liblangtag-Module---Accessor.functions_details"></a><h2>Functions</h2>
<div class="refsect2">
<a name="lt-ext-module-version-func-t"></a><h3>lt_ext_module_version_func_t ()</h3>
<pre class="programlisting"><span class="returnvalue">int</span>
<span class="c_punctuation">(</span>*lt_ext_module_version_func_t<span class="c_punctuation">)</span> (<em class="parameter"><code><span class="type">void</span></code></em>);</pre>
<p>The type of the <a class="link" href="liblangtag-Module---Accessor.html#module-get-version" title="module_get_version ()"><code class="function">module_get_version()</code></a> that is required to implement
an extension module.</p>
<div class="refsect3">
<a name="lt-ext-module-version-func-t.returns"></a><h4>Returns</h4>
<p> a version number. this is the same to <a class="link" href="liblangtag-Module---Accessor.html#LT-EXT-MODULE-VERSION:CAPS" title="LT_EXT_MODULE_VERSION"><span class="type">LT_EXT_MODULE_VERSION</span></a>
when the module was built.</p>
</div>
</div>
<hr>
<div class="refsect2">
<a name="lt-ext-module-get-funcs-func-t"></a><h3>lt_ext_module_get_funcs_func_t ()</h3>
<pre class="programlisting">const <a class="link" href="liblangtag-Module---Accessor.html#lt-ext-module-funcs-t" title="struct lt_ext_module_funcs_t"><span class="returnvalue">lt_ext_module_funcs_t</span></a> *
<span class="c_punctuation">(</span>*lt_ext_module_get_funcs_func_t<span class="c_punctuation">)</span> (<em class="parameter"><code><span class="type">void</span></code></em>);</pre>
<p>The type of the <a class="link" href="liblangtag-Module---Accessor.html#module-get-funcs" title="module_get_funcs ()"><code class="function">module_get_funcs()</code></a> that is required to implement
an extension module.</p>
<div class="refsect3">
<a name="lt-ext-module-get-funcs-func-t.returns"></a><h4>Returns</h4>
<p>a <a class="link" href="liblangtag-Module---Accessor.html#lt-ext-module-funcs-t" title="struct lt_ext_module_funcs_t"><span class="type">lt_ext_module_funcs_t</span></a>. </p>
<p><span class="annotation">[<acronym title="The data is owned by the callee, which is responsible of freeing it."><span class="acronym">transfer none</span></acronym>]</span></p>
</div>
</div>
<hr>
<div class="refsect2">
<a name="lt-ext-module-singleton-func-t"></a><h3>lt_ext_module_singleton_func_t ()</h3>
<pre class="programlisting"><span class="returnvalue">char</span>
<span class="c_punctuation">(</span>*lt_ext_module_singleton_func_t<span class="c_punctuation">)</span> (<em class="parameter"><code><span class="type">void</span></code></em>);</pre>
<p>The type of the callback function used to obtain a singleton character
for Extension subtag that the module would support.</p>
<div class="refsect3">
<a name="lt-ext-module-singleton-func-t.returns"></a><h4>Returns</h4>
<p> a singleton character.</p>
</div>
</div>
<hr>
<div class="refsect2">
<a name="lt-ext-module-data-new-func-t"></a><h3>lt_ext_module_data_new_func_t ()</h3>
<pre class="programlisting"><a class="link" href="liblangtag-Module---Data.html#lt-ext-module-data-t" title="lt_ext_module_data_t"><span class="returnvalue">lt_ext_module_data_t</span></a> *
<span class="c_punctuation">(</span>*lt_ext_module_data_new_func_t<span class="c_punctuation">)</span> (<em class="parameter"><code><span class="type">void</span></code></em>);</pre>
<p>The type of the callback function used to create a new instance of
<a class="link" href="liblangtag-Module---Data.html#lt-ext-module-data-t" title="lt_ext_module_data_t"><span class="type">lt_ext_module_data_t</span></a>.
This is invoked when new Extension subtag appears and keep data.</p>
<div class="refsect3">
<a name="lt-ext-module-data-new-func-t.returns"></a><h4>Returns</h4>
<p> a new instance of <a class="link" href="liblangtag-Module---Data.html#lt-ext-module-data-t" title="lt_ext_module_data_t"><span class="type">lt_ext_module_data_t</span></a>.</p>
</div>
</div>
<hr>
<div class="refsect2">
<a name="lt-ext-module-precheck-func-t"></a><h3>lt_ext_module_precheck_func_t ()</h3>
<pre class="programlisting"><a class="link" href="liblangtag-Miscellaneous-Macros.html#lt-bool-t" title="lt_bool_t"><span class="returnvalue">lt_bool_t</span></a>
<span class="c_punctuation">(</span>*lt_ext_module_precheck_func_t<span class="c_punctuation">)</span> (<em class="parameter"><code><a class="link" href="liblangtag-Module---Data.html#lt-ext-module-data-t" title="lt_ext_module_data_t"><span class="type">lt_ext_module_data_t</span></a> *data</code></em>,
<em class="parameter"><code>const <a class="link" href="liblangtag-Container---Tag.html#lt-tag-t" title="lt_tag_t"><span class="type">lt_tag_t</span></a> *tag</code></em>,
<em class="parameter"><code><a class="link" href="liblangtag-Error.html#lt-error-t" title="lt_error_t"><span class="type">lt_error_t</span></a> **error</code></em>);</pre>
<p>The type of the callback function used to check <em class="parameter"><code>tag</code></em>
prior to process
parsing subtags for the extension.</p>
<div class="refsect3">
<a name="lt-ext-module-precheck-func-t.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody>
<tr>
<td class="parameter_name"><p>data</p></td>
<td class="parameter_description"><p>a <a class="link" href="liblangtag-Module---Data.html#lt-ext-module-data-t" title="lt_ext_module_data_t"><span class="type">lt_ext_module_data_t</span></a>.</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>tag</p></td>
<td class="parameter_description"><p>a <a class="link" href="liblangtag-Container---Tag.html#lt-tag-t" title="lt_tag_t"><span class="type">lt_tag_t</span></a>.</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>error</p></td>
<td class="parameter_description"><p>a <a class="link" href="liblangtag-Error.html#lt-error-t" title="lt_error_t"><span class="type">lt_error_t</span></a>. </p></td>
<td class="parameter_annotations"><span class="annotation">[<acronym title="NULL is OK, both for passing and for returning."><span class="acronym">allow-none</span></acronym>]</span></td>
</tr>
</tbody>
</table></div>
</div>
<div class="refsect3">
<a name="lt-ext-module-precheck-func-t.returns"></a><h4>Returns</h4>
<p> <code class="literal">TRUE</code> if <em class="parameter"><code>tag</code></em>
is valid to process parsing subtags for the extension.
otherwise <code class="literal">FALSE</code>.</p>
</div>
</div>
<hr>
<div class="refsect2">
<a name="lt-ext-module-parse-func-t"></a><h3>lt_ext_module_parse_func_t ()</h3>
<pre class="programlisting"><a class="link" href="liblangtag-Miscellaneous-Macros.html#lt-bool-t" title="lt_bool_t"><span class="returnvalue">lt_bool_t</span></a>
<span class="c_punctuation">(</span>*lt_ext_module_parse_func_t<span class="c_punctuation">)</span> (<em class="parameter"><code><a class="link" href="liblangtag-Module---Data.html#lt-ext-module-data-t" title="lt_ext_module_data_t"><span class="type">lt_ext_module_data_t</span></a> *data</code></em>,
<em class="parameter"><code>const <span class="type">char</span> *subtag</code></em>,
<em class="parameter"><code><a class="link" href="liblangtag-Error.html#lt-error-t" title="lt_error_t"><span class="type">lt_error_t</span></a> **error</code></em>);</pre>
<p>The type of the callback function used to parse tags.</p>
<div class="refsect3">
<a name="lt-ext-module-parse-func-t.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody>
<tr>
<td class="parameter_name"><p>data</p></td>
<td class="parameter_description"><p>a <a class="link" href="liblangtag-Module---Data.html#lt-ext-module-data-t" title="lt_ext_module_data_t"><span class="type">lt_ext_module_data_t</span></a>.</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>subtag</p></td>
<td class="parameter_description"><p>a subtag string to parse.</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>error</p></td>
<td class="parameter_description"><p>a <a class="link" href="liblangtag-Error.html#lt-error-t" title="lt_error_t"><span class="type">lt_error_t</span></a>. </p></td>
<td class="parameter_annotations"><span class="annotation">[<acronym title="NULL is OK, both for passing and for returning."><span class="acronym">allow-none</span></acronym>]</span></td>
</tr>
</tbody>
</table></div>
</div>
<div class="refsect3">
<a name="lt-ext-module-parse-func-t.returns"></a><h4>Returns</h4>
<p> <code class="literal">TRUE</code> if the <em class="parameter"><code>subtag</code></em>
is valid for Extension. otherwise <code class="literal">FALSE</code>.</p>
</div>
</div>
<hr>
<div class="refsect2">
<a name="lt-ext-module-get-tag-func-t"></a><h3>lt_ext_module_get_tag_func_t ()</h3>
<pre class="programlisting"><span class="returnvalue">char</span> *
<span class="c_punctuation">(</span>*lt_ext_module_get_tag_func_t<span class="c_punctuation">)</span> (<em class="parameter"><code><a class="link" href="liblangtag-Module---Data.html#lt-ext-module-data-t" title="lt_ext_module_data_t"><span class="type">lt_ext_module_data_t</span></a> *data</code></em>);</pre>
<p>The type of the callback function used to obtain the tag.</p>
<div class="refsect3">
<a name="lt-ext-module-get-tag-func-t.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody><tr>
<td class="parameter_name"><p>data</p></td>
<td class="parameter_description"><p>a <a class="link" href="liblangtag-Module---Data.html#lt-ext-module-data-t" title="lt_ext_module_data_t"><span class="type">lt_ext_module_data_t</span></a>.</p></td>
<td class="parameter_annotations"> </td>
</tr></tbody>
</table></div>
</div>
<div class="refsect3">
<a name="lt-ext-module-get-tag-func-t.returns"></a><h4>Returns</h4>
<p> a tag string.</p>
</div>
</div>
<hr>
<div class="refsect2">
<a name="lt-ext-module-validate-func-t"></a><h3>lt_ext_module_validate_func_t ()</h3>
<pre class="programlisting"><a class="link" href="liblangtag-Miscellaneous-Macros.html#lt-bool-t" title="lt_bool_t"><span class="returnvalue">lt_bool_t</span></a>
<span class="c_punctuation">(</span>*lt_ext_module_validate_func_t<span class="c_punctuation">)</span> (<em class="parameter"><code><a class="link" href="liblangtag-Module---Data.html#lt-ext-module-data-t" title="lt_ext_module_data_t"><span class="type">lt_ext_module_data_t</span></a> *data</code></em>);</pre>
<p>The type of the callback function used to validate the tags in <em class="parameter"><code>data</code></em>
.</p>
<div class="refsect3">
<a name="lt-ext-module-validate-func-t.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody><tr>
<td class="parameter_name"><p>data</p></td>
<td class="parameter_description"><p>a <a class="link" href="liblangtag-Module---Data.html#lt-ext-module-data-t" title="lt_ext_module_data_t"><span class="type">lt_ext_module_data_t</span></a>.</p></td>
<td class="parameter_annotations"> </td>
</tr></tbody>
</table></div>
</div>
<div class="refsect3">
<a name="lt-ext-module-validate-func-t.returns"></a><h4>Returns</h4>
<p> <code class="literal">TRUE</code> if it's valid, otherwise <code class="literal">FALSE</code>.</p>
</div>
</div>
<hr>
<div class="refsect2">
<a name="lt-ext-modules-load"></a><h3>lt_ext_modules_load ()</h3>
<pre class="programlisting"><span class="returnvalue">void</span>
lt_ext_modules_load (<em class="parameter"><code><span class="type">void</span></code></em>);</pre>
<p>Load all of the modules on the system, including the internal accessor.
This has to be invoked before processing something with <a class="link" href="liblangtag-Container---Extension.html#lt-extension-t" title="lt_extension_t"><span class="type">lt_extension_t</span></a>.
or <a class="link" href="liblangtag-Database.html#lt-db-initialize" title="lt_db_initialize ()"><code class="function">lt_db_initialize()</code></a> does.</p>
</div>
<hr>
<div class="refsect2">
<a name="lt-ext-modules-unload"></a><h3>lt_ext_modules_unload ()</h3>
<pre class="programlisting"><span class="returnvalue">void</span>
lt_ext_modules_unload (<em class="parameter"><code><span class="type">void</span></code></em>);</pre>
<p>Unload all of the modules already loaded.</p>
</div>
<hr>
<div class="refsect2">
<a name="lt-ext-module-ref"></a><h3>lt_ext_module_ref ()</h3>
<pre class="programlisting"><a class="link" href="liblangtag-Module---Accessor.html#lt-ext-module-t" title="lt_ext_module_t"><span class="returnvalue">lt_ext_module_t</span></a> *
lt_ext_module_ref (<em class="parameter"><code><a class="link" href="liblangtag-Module---Accessor.html#lt-ext-module-t" title="lt_ext_module_t"><span class="type">lt_ext_module_t</span></a> *module</code></em>);</pre>
<p>Increases the reference count of <em class="parameter"><code>module</code></em>
.</p>
<div class="refsect3">
<a name="lt-ext-module-ref.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody><tr>
<td class="parameter_name"><p>module</p></td>
<td class="parameter_description"><p>a <a class="link" href="liblangtag-Module---Accessor.html#lt-ext-module-t" title="lt_ext_module_t"><span class="type">lt_ext_module_t</span></a>.</p></td>
<td class="parameter_annotations"> </td>
</tr></tbody>
</table></div>
</div>
<div class="refsect3">
<a name="lt-ext-module-ref.returns"></a><h4>Returns</h4>
<p>the same <em class="parameter"><code>module</code></em>
object. </p>
<p><span class="annotation">[<acronym title="The data is owned by the callee, which is responsible of freeing it."><span class="acronym">transfer none</span></acronym>]</span></p>
</div>
</div>
<hr>
<div class="refsect2">
<a name="lt-ext-module-unref"></a><h3>lt_ext_module_unref ()</h3>
<pre class="programlisting"><span class="returnvalue">void</span>
lt_ext_module_unref (<em class="parameter"><code><a class="link" href="liblangtag-Module---Accessor.html#lt-ext-module-t" title="lt_ext_module_t"><span class="type">lt_ext_module_t</span></a> *module</code></em>);</pre>
<p>Decreases the reference count of <em class="parameter"><code>module</code></em>
. when its reference count
drops to 0, the object is finalized (i.e. its memory is freed).</p>
<div class="refsect3">
<a name="lt-ext-module-unref.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody><tr>
<td class="parameter_name"><p>module</p></td>
<td class="parameter_description"><p>a <a class="link" href="liblangtag-Module---Accessor.html#lt-ext-module-t" title="lt_ext_module_t"><span class="type">lt_ext_module_t</span></a>.</p></td>
<td class="parameter_annotations"> </td>
</tr></tbody>
</table></div>
</div>
</div>
<hr>
<div class="refsect2">
<a name="LT-MODULE-SYMBOL:CAPS"></a><h3>LT_MODULE_SYMBOL()</h3>
<pre class="programlisting"># define LT_MODULE_SYMBOL(__sym__) LT_MODULE_SYMBOL_(LT_MODULE_PREFIX, __sym__)
</pre>
</div>
<hr>
<div class="refsect2">
<a name="LT-MODULE-SYMBOL-:CAPS"></a><h3>LT_MODULE_SYMBOL_()</h3>
<pre class="programlisting">#define LT_MODULE_SYMBOL_(__prefix__,__sym__) LT_MODULE_SYMBOL__(__prefix__, __sym__)
</pre>
</div>
<hr>
<div class="refsect2">
<a name="LT-MODULE-SYMBOL--:CAPS"></a><h3>LT_MODULE_SYMBOL__()</h3>
<pre class="programlisting">#define LT_MODULE_SYMBOL__(__prefix__,__sym__) __prefix__##_module_##__sym__
</pre>
</div>
<hr>
<div class="refsect2">
<a name="module-get-version"></a><h3>module_get_version ()</h3>
<pre class="programlisting"><span class="returnvalue">int</span>
module_get_version (<em class="parameter"><code><span class="type">void</span></code></em>);</pre>
<p>Obtains the module version. this must be implemented in a module.</p>
<div class="refsect3">
<a name="module-get-version.returns"></a><h4>Returns</h4>
<p> a version number. this is the same to <a class="link" href="liblangtag-Module---Accessor.html#LT-EXT-MODULE-VERSION:CAPS" title="LT_EXT_MODULE_VERSION"><span class="type">LT_EXT_MODULE_VERSION</span></a>
when the module was built.</p>
</div>
</div>
<hr>
<div class="refsect2">
<a name="module-get-funcs"></a><h3>module_get_funcs ()</h3>
<pre class="programlisting">const <a class="link" href="liblangtag-Module---Accessor.html#lt-ext-module-funcs-t" title="struct lt_ext_module_funcs_t"><span class="returnvalue">lt_ext_module_funcs_t</span></a> *
module_get_funcs (<em class="parameter"><code><span class="type">void</span></code></em>);</pre>
<p>Obtains a <a class="link" href="liblangtag-Module---Accessor.html#lt-ext-module-funcs-t" title="struct lt_ext_module_funcs_t"><span class="type">lt_ext_module_funcs_t</span></a>, callback collection structure that
the module would process. this must be implemented in the external module.</p>
<div class="refsect3">
<a name="module-get-funcs.returns"></a><h4>Returns</h4>
<p> a <a class="link" href="liblangtag-Module---Accessor.html#lt-ext-module-funcs-t" title="struct lt_ext_module_funcs_t"><span class="type">lt_ext_module_funcs_t</span></a>.</p>
</div>
</div>
</div>
<div class="refsect1">
<a name="liblangtag-Module---Accessor.other_details"></a><h2>Types and Values</h2>
<div class="refsect2">
<a name="LT-EXT-MODULE-VERSION:CAPS"></a><h3>LT_EXT_MODULE_VERSION</h3>
<pre class="programlisting">#define LT_EXT_MODULE_VERSION 1
</pre>
<p>Static variable for the module version. this is used to ensure if the built
module is compatible with the runtime library.</p>
</div>
<hr>
<div class="refsect2">
<a name="LT-CONST-DECL:CAPS"></a><h3>LT_CONST_DECL</h3>
<pre class="programlisting">#define LT_CONST_DECL
</pre>
</div>
<hr>
<div class="refsect2">
<a name="lt-ext-module-funcs-t"></a><h3>struct lt_ext_module_funcs_t</h3>
<pre class="programlisting">struct lt_ext_module_funcs_t {
LT_CONST_DECL lt_ext_module_singleton_func_t get_singleton;
LT_CONST_DECL lt_ext_module_data_new_func_t create_data;
LT_CONST_DECL lt_ext_module_precheck_func_t precheck_tag;
LT_CONST_DECL lt_ext_module_parse_func_t parse_tag;
LT_CONST_DECL lt_ext_module_get_tag_func_t get_tag;
LT_CONST_DECL lt_ext_module_validate_func_t validate_tag;
};
</pre>
<p>The <span class="structname">lt_ext_module_funcs_t</span> struct is a callback
collection to provide an accessor between <a class="link" href="liblangtag-Container---Extension.html#lt-extension-t" title="lt_extension_t"><span class="type">lt_extension_t</span></a>
and <a class="link" href="liblangtag-Module---Accessor.html#lt-ext-module-t" title="lt_ext_module_t"><span class="type">lt_ext_module_t</span></a> and extend features.</p>
<div class="refsect3">
<a name="lt-ext-module-funcs-t.members"></a><h4>Members</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="300px" class="struct_members_name">
<col class="struct_members_description">
<col width="200px" class="struct_members_annotations">
</colgroup>
<tbody></tbody>
</table></div>
</div>
</div>
<hr>
<div class="refsect2">
<a name="lt-ext-module-t"></a><h3>lt_ext_module_t</h3>
<pre class="programlisting">typedef struct _lt_ext_module_t lt_ext_module_t;</pre>
<p>All the fields in the <span class="structname">lt_ext_module_t</span>
structure are private to the <a class="link" href="liblangtag-Module---Accessor.html#lt-ext-module-t" title="lt_ext_module_t"><span class="type">lt_ext_module_t</span></a> implementation.</p>
</div>
</div>
</div>
<div class="footer">
<hr>Generated by GTK-Doc V1.34.0</div>
</body>
</html>
|