1 | <?xml version="1.0" encoding="UTF-8"?>
|
---|
2 | <html>
|
---|
3 | <head>
|
---|
4 | <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
|
---|
5 | <title>xmlmodule: dynamic module loading</title>
|
---|
6 | <meta name="generator" content="Libxml2 devhelp stylesheet"/>
|
---|
7 | <link rel="start" href="index.html" title="libxml2 Reference Manual"/>
|
---|
8 | <link rel="up" href="general.html" title="API"/>
|
---|
9 | <link rel="stylesheet" href="style.css" type="text/css"/>
|
---|
10 | <link rel="chapter" href="general.html" title="API"/>
|
---|
11 | </head>
|
---|
12 | <body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
|
---|
13 | <table class="navigation" width="100%" summary="Navigation header" cellpadding="2" cellspacing="2">
|
---|
14 | <tr valign="middle">
|
---|
15 | <td>
|
---|
16 | <a accesskey="p" href="libxml2-xmlmemory.html">
|
---|
17 | <img src="left.png" width="24" height="24" border="0" alt="Prev"/>
|
---|
18 | </a>
|
---|
19 | </td>
|
---|
20 | <td>
|
---|
21 | <a accesskey="u" href="general.html">
|
---|
22 | <img src="up.png" width="24" height="24" border="0" alt="Up"/>
|
---|
23 | </a>
|
---|
24 | </td>
|
---|
25 | <td>
|
---|
26 | <a accesskey="h" href="index.html">
|
---|
27 | <img src="home.png" width="24" height="24" border="0" alt="Home"/>
|
---|
28 | </a>
|
---|
29 | </td>
|
---|
30 | <td>
|
---|
31 | <a accesskey="n" href="libxml2-xmlreader.html">
|
---|
32 | <img src="right.png" width="24" height="24" border="0" alt="Next"/>
|
---|
33 | </a>
|
---|
34 | </td>
|
---|
35 | <th width="100%" align="center">libxml2 Reference Manual</th>
|
---|
36 | </tr>
|
---|
37 | </table>
|
---|
38 | <h2>
|
---|
39 | <span class="refentrytitle">xmlmodule</span>
|
---|
40 | </h2>
|
---|
41 | <p>xmlmodule - dynamic module loading</p>
|
---|
42 | <p>basic API for dynamic module loading, used by libexslt added in 2.6.17 </p>
|
---|
43 | <p>Author(s): Joel W. Reed </p>
|
---|
44 | <div class="refsynopsisdiv">
|
---|
45 | <h2>Synopsis</h2>
|
---|
46 | <pre class="synopsis">typedef struct _xmlModule <a href="#xmlModule">xmlModule</a>;
|
---|
47 | typedef <a href="libxml2-xmlmodule.html#xmlModule">xmlModule</a> * <a href="#xmlModulePtr">xmlModulePtr</a>;
|
---|
48 | typedef enum <a href="#xmlModuleOption">xmlModuleOption</a>;
|
---|
49 | int <a href="#xmlModuleFree">xmlModuleFree</a> (<a href="libxml2-xmlmodule.html#xmlModulePtr">xmlModulePtr</a> module);
|
---|
50 | int <a href="#xmlModuleSymbol">xmlModuleSymbol</a> (<a href="libxml2-xmlmodule.html#xmlModulePtr">xmlModulePtr</a> module, <br/> const char * name, <br/> void ** symbol);
|
---|
51 | <a href="libxml2-xmlmodule.html#xmlModulePtr">xmlModulePtr</a> <a href="#xmlModuleOpen">xmlModuleOpen</a> (const char * name, <br/> int options);
|
---|
52 | int <a href="#xmlModuleClose">xmlModuleClose</a> (<a href="libxml2-xmlmodule.html#xmlModulePtr">xmlModulePtr</a> module);
|
---|
53 | </pre>
|
---|
54 | </div>
|
---|
55 | <div class="refsect1" lang="en">
|
---|
56 | <h2>Description</h2>
|
---|
57 | </div>
|
---|
58 | <div class="refsect1" lang="en">
|
---|
59 | <h2>Details</h2>
|
---|
60 | <div class="refsect2" lang="en">
|
---|
61 | <div class="refsect2" lang="en"><h3><a name="xmlModule">Structure </a>xmlModule</h3><pre class="programlisting">struct _xmlModule {
|
---|
62 | The content of this structure is not made public by the API.
|
---|
63 | } xmlModule;
|
---|
64 | </pre><p/>
|
---|
65 | </div>
|
---|
66 | <hr/>
|
---|
67 | <div class="refsect2" lang="en"><h3><a name="xmlModuleOption">Enum </a>xmlModuleOption</h3><pre class="programlisting">enum <a href="#xmlModuleOption">xmlModuleOption</a> {
|
---|
68 | <a name="XML_MODULE_LAZY">XML_MODULE_LAZY</a> = 1 /* lazy binding */
|
---|
69 | <a name="XML_MODULE_LOCAL">XML_MODULE_LOCAL</a> = 2 /* local binding */
|
---|
70 | };
|
---|
71 | </pre><p/>
|
---|
72 | </div>
|
---|
73 | <hr/>
|
---|
74 | <div class="refsect2" lang="en"><h3><a name="xmlModulePtr">Typedef </a>xmlModulePtr</h3><pre class="programlisting"><a href="libxml2-xmlmodule.html#xmlModule">xmlModule</a> * xmlModulePtr;
|
---|
75 | </pre><p>A handle to a dynamically loaded module</p>
|
---|
76 | </div>
|
---|
77 | <hr/>
|
---|
78 | <div class="refsect2" lang="en"><h3><a name="xmlModuleClose"/>xmlModuleClose ()</h3><pre class="programlisting">int xmlModuleClose (<a href="libxml2-xmlmodule.html#xmlModulePtr">xmlModulePtr</a> module)<br/>
|
---|
79 | </pre><p>The close operations unload the associated module and free the data associated to the module.</p>
|
---|
80 | <div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>module</tt></i>:</span></td><td>the module handle</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>0 in case of success, -1 in case of argument error and -2 if the module could not be closed/unloaded.</td></tr></tbody></table></div></div>
|
---|
81 | <hr/>
|
---|
82 | <div class="refsect2" lang="en"><h3><a name="xmlModuleFree"/>xmlModuleFree ()</h3><pre class="programlisting">int xmlModuleFree (<a href="libxml2-xmlmodule.html#xmlModulePtr">xmlModulePtr</a> module)<br/>
|
---|
83 | </pre><p>The free operations free the data associated to the module but does not unload the associated shared library which may still be in use.</p>
|
---|
84 | <div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>module</tt></i>:</span></td><td>the module handle</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>0 in case of success, -1 in case of argument error</td></tr></tbody></table></div></div>
|
---|
85 | <hr/>
|
---|
86 | <div class="refsect2" lang="en"><h3><a name="xmlModuleOpen"/>xmlModuleOpen ()</h3><pre class="programlisting"><a href="libxml2-xmlmodule.html#xmlModulePtr">xmlModulePtr</a> xmlModuleOpen (const char * name, <br/> int options)<br/>
|
---|
87 | </pre><p>Opens a module/shared library given its name or path NOTE: that due to portability issues, behaviour can only be guaranteed with @name using ASCII. We canot guarantee that an UTF-8 string would work, which is why name is a const char * and not a const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * . TODO: options are not yet implemented.</p>
|
---|
88 | <div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>name</tt></i>:</span></td><td>the module name</td></tr><tr><td><span class="term"><i><tt>options</tt></i>:</span></td><td>a set of <a href="libxml2-xmlmodule.html#xmlModuleOption">xmlModuleOption</a></td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>a handle for the module or NULL in case of error</td></tr></tbody></table></div></div>
|
---|
89 | <hr/>
|
---|
90 | <div class="refsect2" lang="en"><h3><a name="xmlModuleSymbol"/>xmlModuleSymbol ()</h3><pre class="programlisting">int xmlModuleSymbol (<a href="libxml2-xmlmodule.html#xmlModulePtr">xmlModulePtr</a> module, <br/> const char * name, <br/> void ** symbol)<br/>
|
---|
91 | </pre><p>Lookup for a symbol address in the given module NOTE: that due to portability issues, behaviour can only be guaranteed with @name using ASCII. We canot guarantee that an UTF-8 string would work, which is why name is a const char * and not a const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * .</p>
|
---|
92 | <div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>module</tt></i>:</span></td><td>the module</td></tr><tr><td><span class="term"><i><tt>name</tt></i>:</span></td><td>the name of the symbol</td></tr><tr><td><span class="term"><i><tt>symbol</tt></i>:</span></td><td>the resulting symbol address</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>0 if the symbol was found, or -1 in case of error</td></tr></tbody></table></div></div>
|
---|
93 | <hr/>
|
---|
94 | </div>
|
---|
95 | </div>
|
---|
96 | </body>
|
---|
97 | </html>
|
---|