/usr/share/gtk-doc/html/ethos/ethos-EthosPluginLoader.html is in libethos-doc 0.2.2-2ubuntu1.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
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 | <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>EthosPluginLoader</title>
<meta name="generator" content="DocBook XSL Stylesheets V1.75.2">
<link rel="home" href="index.html" title="Ethos Reference Manual">
<link rel="up" href="ch04.html" title="Ethos Reference">
<link rel="prev" href="EthosPluginInfo.html" title="EthosPluginInfo">
<link rel="next" href="EthosPlugin.html" title="EthosPlugin">
<meta name="generator" content="GTK-Doc V1.18 (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="2">
<tr valign="middle">
<td><a accesskey="p" href="EthosPluginInfo.html"><img src="left.png" width="24" height="24" border="0" alt="Prev"></a></td>
<td><a accesskey="u" href="ch04.html"><img src="up.png" width="24" height="24" border="0" alt="Up"></a></td>
<td><a accesskey="h" href="index.html"><img src="home.png" width="24" height="24" border="0" alt="Home"></a></td>
<th width="100%" align="center">Ethos Reference Manual</th>
<td><a accesskey="n" href="EthosPlugin.html"><img src="right.png" width="24" height="24" border="0" alt="Next"></a></td>
</tr>
<tr><td colspan="5" class="shortcuts">
<a href="#ethos-EthosPluginLoader.synopsis" class="shortcut">Top</a>
|
<a href="#ethos-EthosPluginLoader.description" class="shortcut">Description</a>
</td></tr>
</table>
<div class="refentry">
<a name="ethos-EthosPluginLoader"></a><div class="titlepage"></div>
<div class="refnamediv"><table width="100%"><tr>
<td valign="top">
<h2><span class="refentrytitle"><a name="ethos-EthosPluginLoader.top_of_page"></a>EthosPluginLoader</span></h2>
<p>EthosPluginLoader — loading of plugins during runtime</p>
</td>
<td valign="top" align="right"></td>
</tr></table></div>
<div class="refsynopsisdiv">
<a name="ethos-EthosPluginLoader.synopsis"></a><h2>Synopsis</h2>
<pre class="synopsis">struct <a class="link" href="ethos-EthosPluginLoader.html#EthosPluginLoaderIface" title="struct EthosPluginLoaderIface">EthosPluginLoaderIface</a>;
<span class="returnvalue">void</span> <a class="link" href="ethos-EthosPluginLoader.html#ethos-plugin-loader-gc" title="ethos_plugin_loader_gc ()">ethos_plugin_loader_gc</a> (<em class="parameter"><code><span class="type">EthosPluginLoader</span> *plugin_loader</code></em>);
const <span class="returnvalue">gchar</span> * <a class="link" href="ethos-EthosPluginLoader.html#ethos-plugin-loader-get-name" title="ethos_plugin_loader_get_name ()">ethos_plugin_loader_get_name</a> (<em class="parameter"><code><span class="type">EthosPluginLoader</span> *plugin_loader</code></em>);
<span class="returnvalue">void</span> <a class="link" href="ethos-EthosPluginLoader.html#ethos-plugin-loader-initialize" title="ethos_plugin_loader_initialize ()">ethos_plugin_loader_initialize</a> (<em class="parameter"><code><span class="type">EthosPluginLoader</span> *plugin_loader</code></em>,
<em class="parameter"><code><a class="link" href="EthosManager.html" title="EthosManager"><span class="type">EthosManager</span></a> *manager</code></em>);
<a class="link" href="EthosPlugin.html" title="EthosPlugin"><span class="returnvalue">EthosPlugin</span></a> * <a class="link" href="ethos-EthosPluginLoader.html#ethos-plugin-loader-load" title="ethos_plugin_loader_load ()">ethos_plugin_loader_load</a> (<em class="parameter"><code><span class="type">EthosPluginLoader</span> *plugin_loader</code></em>,
<em class="parameter"><code><a class="link" href="EthosPluginInfo.html" title="EthosPluginInfo"><span class="type">EthosPluginInfo</span></a> *plugin_info</code></em>,
<em class="parameter"><code><span class="type">GError</span> **error</code></em>);
<span class="returnvalue">void</span> <a class="link" href="ethos-EthosPluginLoader.html#ethos-plugin-loader-register-plugin" title="ethos_plugin_loader_register_plugin ()">ethos_plugin_loader_register_plugin</a> (<em class="parameter"><code><span class="type">EthosPluginLoader</span> *plugin_loader</code></em>,
<em class="parameter"><code><a class="link" href="EthosPlugin.html" title="EthosPlugin"><span class="type">EthosPlugin</span></a> *plugin</code></em>);
<span class="returnvalue">void</span> <a class="link" href="ethos-EthosPluginLoader.html#ethos-plugin-loader-unload" title="ethos_plugin_loader_unload ()">ethos_plugin_loader_unload</a> (<em class="parameter"><code><span class="type">EthosPluginLoader</span> *plugin_loader</code></em>);
</pre>
</div>
<div class="refsect1">
<a name="ethos-EthosPluginLoader.description"></a><h2>Description</h2>
<p>
The <span class="type">EthosPluginLoader</span> interface is responsible for loading plugins
during runtime. Plugins can specify a plugin-loader that should load
them in their plugin desciption file. This is done using the Loader
keyword such as follows.
</p>
<p>
</p>
<div class="informalexample"><pre class="programlisting">
[Test Plugin]
Name=Sample
Loader=python
Module=sample
IAge=1
</pre></div>
<p>
</p>
<p>
In this example, the <span class="type">EthosPythonLoader</span> will be used to load the plugin.
The python loader, like all loaders, requires that the Module keyword
is set. In this case, the module is "sample", so the python loader will
look for "sample.py" to load the plugin.
</p>
</div>
<div class="refsect1">
<a name="ethos-EthosPluginLoader.details"></a><h2>Details</h2>
<div class="refsect2">
<a name="EthosPluginLoaderIface"></a><h3>struct EthosPluginLoaderIface</h3>
<pre class="programlisting">struct EthosPluginLoaderIface {
GObjectClass parent_class;
const gchar* (*get_name) (EthosPluginLoader *plugin_loader);
void (*initialize) (EthosPluginLoader *plugin_loader,
EthosManager *manager);
void (*unload) (EthosPluginLoader *plugin_loader);
EthosPlugin* (*load) (EthosPluginLoader *plugin_loader,
EthosPluginInfo *plugin_info,
GError **error);
void (*gc) (EthosPluginLoader *plugin_loader);
void (*register_plugin) (EthosPluginLoader *plugin_loader,
EthosPlugin *plugin);
void (*reserved1) (void);
void (*reserved2) (void);
void (*reserved3) (void);
void (*reserved4) (void);
};
</pre>
<p>
</p>
</div>
<hr>
<div class="refsect2">
<a name="ethos-plugin-loader-gc"></a><h3>ethos_plugin_loader_gc ()</h3>
<pre class="programlisting"><span class="returnvalue">void</span> ethos_plugin_loader_gc (<em class="parameter"><code><span class="type">EthosPluginLoader</span> *plugin_loader</code></em>);</pre>
<p>
Runs the garbage collector for an associated vm for the plugin loader.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody><tr>
<td><p><span class="term"><em class="parameter"><code>plugin_loader</code></em> :</span></p></td>
<td>An <span class="type">EthosPluginLoader</span>
</td>
</tr></tbody>
</table></div>
</div>
<hr>
<div class="refsect2">
<a name="ethos-plugin-loader-get-name"></a><h3>ethos_plugin_loader_get_name ()</h3>
<pre class="programlisting">const <span class="returnvalue">gchar</span> * ethos_plugin_loader_get_name (<em class="parameter"><code><span class="type">EthosPluginLoader</span> *plugin_loader</code></em>);</pre>
<p>
Retrieves the name of the plugin loader. The default plugin loader's name
is <code class="literal">NULL</code>.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>plugin_loader</code></em> :</span></p></td>
<td>An <span class="type">EthosPluginLoader</span>
</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td>The name of the plugin loader or <code class="literal">NULL</code>
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2">
<a name="ethos-plugin-loader-initialize"></a><h3>ethos_plugin_loader_initialize ()</h3>
<pre class="programlisting"><span class="returnvalue">void</span> ethos_plugin_loader_initialize (<em class="parameter"><code><span class="type">EthosPluginLoader</span> *plugin_loader</code></em>,
<em class="parameter"><code><a class="link" href="EthosManager.html" title="EthosManager"><span class="type">EthosManager</span></a> *manager</code></em>);</pre>
<p>
Initializes the plugin loader.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>plugin_loader</code></em> :</span></p></td>
<td>An <span class="type">EthosPluginLoader</span>
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>manager</code></em> :</span></p></td>
<td>An <a class="link" href="EthosManager.html" title="EthosManager"><span class="type">EthosManager</span></a>
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2">
<a name="ethos-plugin-loader-load"></a><h3>ethos_plugin_loader_load ()</h3>
<pre class="programlisting"><a class="link" href="EthosPlugin.html" title="EthosPlugin"><span class="returnvalue">EthosPlugin</span></a> * ethos_plugin_loader_load (<em class="parameter"><code><span class="type">EthosPluginLoader</span> *plugin_loader</code></em>,
<em class="parameter"><code><a class="link" href="EthosPluginInfo.html" title="EthosPluginInfo"><span class="type">EthosPluginInfo</span></a> *plugin_info</code></em>,
<em class="parameter"><code><span class="type">GError</span> **error</code></em>);</pre>
<p>
Creates an instance of the plugin from the information in the
<em class="parameter"><code>plugin_info</code></em> object.
</p>
<p>
In case of failure, <em class="parameter"><code>error</code></em> is set and <code class="literal">NULL</code> is returned.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>plugin_loader</code></em> :</span></p></td>
<td>An <span class="type">EthosPluginLoader</span>
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>plugin_info</code></em> :</span></p></td>
<td>An <a class="link" href="EthosPluginInfo.html" title="EthosPluginInfo"><span class="type">EthosPluginInfo</span></a>
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>error</code></em> :</span></p></td>
<td>A location for a <span class="type">GError</span> or <code class="literal">NULL</code>
</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td>The newly created <a class="link" href="EthosPlugin.html" title="EthosPlugin"><span class="type">EthosPlugin</span></a> instance or <code class="literal">NULL</code>.</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2">
<a name="ethos-plugin-loader-register-plugin"></a><h3>ethos_plugin_loader_register_plugin ()</h3>
<pre class="programlisting"><span class="returnvalue">void</span> ethos_plugin_loader_register_plugin (<em class="parameter"><code><span class="type">EthosPluginLoader</span> *plugin_loader</code></em>,
<em class="parameter"><code><a class="link" href="EthosPlugin.html" title="EthosPlugin"><span class="type">EthosPlugin</span></a> *plugin</code></em>);</pre>
<p>
For plugin-loaders that do not support creation of <span class="type">GObjectClass</span>'s during runtime,
this method can be used to instantiate a plugin instance and the plugin-loader will be
notified. For example, a JavaScript plugin may create an instance of <a class="link" href="EthosPlugin.html" title="EthosPlugin"><span class="type">EthosPlugin</span></a> and connect
signals rather than creating its own child class.
</p>
<p>
See <code class="function">ethos_register_runtime_plugin()</code>.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>plugin_loader</code></em> :</span></p></td>
<td>An <span class="type">EthosPluginLoader</span>
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>plugin</code></em> :</span></p></td>
<td>An <a class="link" href="EthosPlugin.html" title="EthosPlugin"><span class="type">EthosPlugin</span></a>
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2">
<a name="ethos-plugin-loader-unload"></a><h3>ethos_plugin_loader_unload ()</h3>
<pre class="programlisting"><span class="returnvalue">void</span> ethos_plugin_loader_unload (<em class="parameter"><code><span class="type">EthosPluginLoader</span> *plugin_loader</code></em>);</pre>
<p>
Unloads the plugin loader and cleans up related resources.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody><tr>
<td><p><span class="term"><em class="parameter"><code>plugin_loader</code></em> :</span></p></td>
<td>An <span class="type">EthosPluginLoader</span>
</td>
</tr></tbody>
</table></div>
</div>
</div>
</div>
<div class="footer">
<hr>
Generated by GTK-Doc V1.18</div>
</body>
</html>
|