diff options
Diffstat (limited to 'lib/cpluff/doc/reference/c-api/group__cFuncsPluginExec.html')
-rw-r--r-- | lib/cpluff/doc/reference/c-api/group__cFuncsPluginExec.html | 228 |
1 files changed, 0 insertions, 228 deletions
diff --git a/lib/cpluff/doc/reference/c-api/group__cFuncsPluginExec.html b/lib/cpluff/doc/reference/c-api/group__cFuncsPluginExec.html deleted file mode 100644 index 69a148e397..0000000000 --- a/lib/cpluff/doc/reference/c-api/group__cFuncsPluginExec.html +++ /dev/null @@ -1,228 +0,0 @@ -<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> -<html><head><meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1"> -<title>C-Pluff C API: Plug-in execution</title> -<link href="doxygen.css" rel="stylesheet" type="text/css"> -<link href="tabs.css" rel="stylesheet" type="text/css"> -</head><body> -<!-- Generated by Doxygen 1.5.1 --> -<div class="tabs"> - <ul> - <li><a href="index.html"><span>Main Page</span></a></li> - <li><a href="modules.html"><span>Modules</span></a></li> - <li><a href="annotated.html"><span>Data Structures</span></a></li> - <li><a href="files.html"><span>Files</span></a></li> - <li><a href="pages.html"><span>Related Pages</span></a></li> - </ul></div> -<h1>Plug-in execution<br> -<small> -[<a class="el" href="group__cFuncs.html">Functions</a>]</small> -</h1><hr><a name="_details"></a><h2>Detailed Description</h2> -These functions support a plug-in controlled execution model. -<p> -Started plug-ins can use <a class="el" href="group__cFuncsPluginExec.html#g357c45e87ff896e8541fe3758b19a035">cp_run_function</a> to register <a class="el" href="group__cTypedefsFuncs.html#gf55fb990664aaa069e72a8fa4da20034">a run function</a> which is called when the main program calls <a class="el" href="group__cFuncsPluginExec.html#g4668727a5b1c9f0531f6d5dc77fa9f9f">cp_run_plugins</a> or <a class="el" href="group__cFuncsPluginExec.html#g7e212bc93d6588fc09995f310548c929">cp_run_plugins_step</a>. A run function should do a finite chunk of work and then return telling whether there is more work to be done. A run function is automatically unregistered when the plug-in is stopped. Run functions make it possible for plug-ins to control the flow of execution or they can be used as a coarse way of task switching if there is no multi-threading support.<p> -The C-Pluff distribution includes a generic main program, cpluff-loader, which only acts as a plug-in loader. It loads and starts up the specified plug-ins, passing any additional startup arguments to them and then just calls run functions of the plug-ins. This makes it is possible to put all the application specific logic in plug-ins. Application does not necessarily need a main program of its own.<p> -It is also safe, from framework perspective, to call these functions from multiple threads. Run functions may then be executed in parallel threads. -<p> -<table border="0" cellpadding="0" cellspacing="0"> -<tr><td></td></tr> -<tr><td colspan="2"><br><h2>Functions</h2></td></tr> -<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="el" href="group__cEnums.html#gd6a8106d281ffa4b1f43fe8e3effc7da">cp_status_t</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="group__cFuncsPluginExec.html#g357c45e87ff896e8541fe3758b19a035">cp_run_function</a> (<a class="el" href="group__cTypedefsOpaque.html#gcb1aa0619dcefa746383c5e0833b62e7">cp_context_t</a> *ctx, <a class="el" href="group__cTypedefsFuncs.html#gf55fb990664aaa069e72a8fa4da20034">cp_run_func_t</a> runfunc)</td></tr> - -<tr><td class="mdescLeft"> </td><td class="mdescRight">Registers a new run function. <a href="#g357c45e87ff896e8541fe3758b19a035"></a><br></td></tr> -<tr><td class="memItemLeft" nowrap align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="group__cFuncsPluginExec.html#g4668727a5b1c9f0531f6d5dc77fa9f9f">cp_run_plugins</a> (<a class="el" href="group__cTypedefsOpaque.html#gcb1aa0619dcefa746383c5e0833b62e7">cp_context_t</a> *ctx)</td></tr> - -<tr><td class="mdescLeft"> </td><td class="mdescRight">Runs the started plug-ins as long as there is something to run. <a href="#g4668727a5b1c9f0531f6d5dc77fa9f9f"></a><br></td></tr> -<tr><td class="memItemLeft" nowrap align="right" valign="top">int </td><td class="memItemRight" valign="bottom"><a class="el" href="group__cFuncsPluginExec.html#g7e212bc93d6588fc09995f310548c929">cp_run_plugins_step</a> (<a class="el" href="group__cTypedefsOpaque.html#gcb1aa0619dcefa746383c5e0833b62e7">cp_context_t</a> *ctx)</td></tr> - -<tr><td class="mdescLeft"> </td><td class="mdescRight">Runs one registered run function. <a href="#g7e212bc93d6588fc09995f310548c929"></a><br></td></tr> -<tr><td class="memItemLeft" nowrap align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="group__cFuncsPluginExec.html#g9233fa8a46e408044030d2d767f1fda4">cp_set_context_args</a> (<a class="el" href="group__cTypedefsOpaque.html#gcb1aa0619dcefa746383c5e0833b62e7">cp_context_t</a> *ctx, char **argv)</td></tr> - -<tr><td class="mdescLeft"> </td><td class="mdescRight">Sets startup arguments for the specified plug-in context. <a href="#g9233fa8a46e408044030d2d767f1fda4"></a><br></td></tr> -<tr><td class="memItemLeft" nowrap align="right" valign="top">char ** </td><td class="memItemRight" valign="bottom"><a class="el" href="group__cFuncsPluginExec.html#g08929433446b28f8fce8b8beae0e742a">cp_get_context_args</a> (<a class="el" href="group__cTypedefsOpaque.html#gcb1aa0619dcefa746383c5e0833b62e7">cp_context_t</a> *ctx, int *argc)</td></tr> - -<tr><td class="mdescLeft"> </td><td class="mdescRight">Returns the startup arguments associated with the specified plug-in context. <a href="#g08929433446b28f8fce8b8beae0e742a"></a><br></td></tr> -</table> -<hr><h2>Function Documentation</h2> -<a class="anchor" name="g357c45e87ff896e8541fe3758b19a035"></a><!-- doxytag: member="cpluff.h::cp_run_function" ref="g357c45e87ff896e8541fe3758b19a035" args="(cp_context_t *ctx, cp_run_func_t runfunc)" --> -<div class="memitem"> -<div class="memproto"> - <table class="memname"> - <tr> - <td class="memname"><a class="el" href="group__cEnums.html#gd6a8106d281ffa4b1f43fe8e3effc7da">cp_status_t</a> cp_run_function </td> - <td>(</td> - <td class="paramtype"><a class="el" href="group__cTypedefsOpaque.html#gcb1aa0619dcefa746383c5e0833b62e7">cp_context_t</a> * </td> - <td class="paramname"> <em>ctx</em>, </td> - </tr> - <tr> - <td class="paramkey"></td> - <td></td> - <td class="paramtype"><a class="el" href="group__cTypedefsFuncs.html#gf55fb990664aaa069e72a8fa4da20034">cp_run_func_t</a> </td> - <td class="paramname"> <em>runfunc</em></td><td> </td> - </tr> - <tr> - <td></td> - <td>)</td> - <td></td><td></td><td width="100%"></td> - </tr> - </table> -</div> -<div class="memdoc"> - -<p> -Registers a new run function. -<p> -The plug-in instance data pointer is given to the run function as a parameter. The run function must return zero if it has finished its work or non-zero if it should be called again later. The run function is unregistered when it returns zero. Plug-in framework functions stopping the registering plug-in must not be called from within a run function. This function does nothing if the specified run function is already registered for the calling plug-in instance.<p> -<dl compact><dt><b>Parameters:</b></dt><dd> - <table border="0" cellspacing="2" cellpadding="0"> - <tr><td valign="top"></td><td valign="top"><em>ctx</em> </td><td>the plug-in context of the registering plug-in </td></tr> - <tr><td valign="top"></td><td valign="top"><em>runfunc</em> </td><td>the run function to be registered </td></tr> - </table> -</dl> -<dl class="return" compact><dt><b>Returns:</b></dt><dd><a class="el" href="group__cEnums.html#ggd6a8106d281ffa4b1f43fe8e3effc7da5ffbe0fe80af75e699e4b04909912f7a">CP_OK</a> (zero) on success or an error code on failure </dd></dl> - -</div> -</div><p> -<a class="anchor" name="g4668727a5b1c9f0531f6d5dc77fa9f9f"></a><!-- doxytag: member="cpluff.h::cp_run_plugins" ref="g4668727a5b1c9f0531f6d5dc77fa9f9f" args="(cp_context_t *ctx)" --> -<div class="memitem"> -<div class="memproto"> - <table class="memname"> - <tr> - <td class="memname">void cp_run_plugins </td> - <td>(</td> - <td class="paramtype"><a class="el" href="group__cTypedefsOpaque.html#gcb1aa0619dcefa746383c5e0833b62e7">cp_context_t</a> * </td> - <td class="paramname"> <em>ctx</em> </td> - <td> ) </td> - <td width="100%"></td> - </tr> - </table> -</div> -<div class="memdoc"> - -<p> -Runs the started plug-ins as long as there is something to run. -<p> -This function calls repeatedly run functions registered by started plug-ins until there are no more active run functions. This function is normally called by a thin main proram, a loader, which loads plug-ins, starts some plug-ins and then passes control over to the started plug-ins.<p> -<dl compact><dt><b>Parameters:</b></dt><dd> - <table border="0" cellspacing="2" cellpadding="0"> - <tr><td valign="top"></td><td valign="top"><em>ctx</em> </td><td>the plug-in context containing the plug-ins </td></tr> - </table> -</dl> - -</div> -</div><p> -<a class="anchor" name="g7e212bc93d6588fc09995f310548c929"></a><!-- doxytag: member="cpluff.h::cp_run_plugins_step" ref="g7e212bc93d6588fc09995f310548c929" args="(cp_context_t *ctx)" --> -<div class="memitem"> -<div class="memproto"> - <table class="memname"> - <tr> - <td class="memname">int cp_run_plugins_step </td> - <td>(</td> - <td class="paramtype"><a class="el" href="group__cTypedefsOpaque.html#gcb1aa0619dcefa746383c5e0833b62e7">cp_context_t</a> * </td> - <td class="paramname"> <em>ctx</em> </td> - <td> ) </td> - <td width="100%"></td> - </tr> - </table> -</div> -<div class="memdoc"> - -<p> -Runs one registered run function. -<p> -This function calls one active run function registered by a started plug-in. When the run function returns this function also returns and passes control back to the main program. The return value can be used to determine whether there are any active run functions left. This function does nothing if there are no active registered run functions.<p> -<dl compact><dt><b>Parameters:</b></dt><dd> - <table border="0" cellspacing="2" cellpadding="0"> - <tr><td valign="top"></td><td valign="top"><em>ctx</em> </td><td>the plug-in context containing the plug-ins </td></tr> - </table> -</dl> -<dl class="return" compact><dt><b>Returns:</b></dt><dd>whether there are active run functions waiting to be run </dd></dl> - -</div> -</div><p> -<a class="anchor" name="g9233fa8a46e408044030d2d767f1fda4"></a><!-- doxytag: member="cpluff.h::cp_set_context_args" ref="g9233fa8a46e408044030d2d767f1fda4" args="(cp_context_t *ctx, char **argv)" --> -<div class="memitem"> -<div class="memproto"> - <table class="memname"> - <tr> - <td class="memname">void cp_set_context_args </td> - <td>(</td> - <td class="paramtype"><a class="el" href="group__cTypedefsOpaque.html#gcb1aa0619dcefa746383c5e0833b62e7">cp_context_t</a> * </td> - <td class="paramname"> <em>ctx</em>, </td> - </tr> - <tr> - <td class="paramkey"></td> - <td></td> - <td class="paramtype">char ** </td> - <td class="paramname"> <em>argv</em></td><td> </td> - </tr> - <tr> - <td></td> - <td>)</td> - <td></td><td></td><td width="100%"></td> - </tr> - </table> -</div> -<div class="memdoc"> - -<p> -Sets startup arguments for the specified plug-in context. -<p> -Like for usual C main functions, the first argument is expected to be the name of the program being executed or an empty string and the argument array should be terminated by NULL entry. If the main program is about to pass startup arguments to plug-ins it should call this function before starting any plug-ins in the context. The arguments are not copied and the caller is responsible for keeping the argument data available once the arguments have been set until the context is destroyed. Plug-ins can access the startup arguments using <a class="el" href="group__cFuncsPluginExec.html#g08929433446b28f8fce8b8beae0e742a">cp_get_context_args</a>.<p> -<dl compact><dt><b>Parameters:</b></dt><dd> - <table border="0" cellspacing="2" cellpadding="0"> - <tr><td valign="top"></td><td valign="top"><em>ctx</em> </td><td>the plug-in context </td></tr> - <tr><td valign="top"></td><td valign="top"><em>argv</em> </td><td>a NULL-terminated array of arguments </td></tr> - </table> -</dl> - -</div> -</div><p> -<a class="anchor" name="g08929433446b28f8fce8b8beae0e742a"></a><!-- doxytag: member="cpluff.h::cp_get_context_args" ref="g08929433446b28f8fce8b8beae0e742a" args="(cp_context_t *ctx, int *argc)" --> -<div class="memitem"> -<div class="memproto"> - <table class="memname"> - <tr> - <td class="memname">char** cp_get_context_args </td> - <td>(</td> - <td class="paramtype"><a class="el" href="group__cTypedefsOpaque.html#gcb1aa0619dcefa746383c5e0833b62e7">cp_context_t</a> * </td> - <td class="paramname"> <em>ctx</em>, </td> - </tr> - <tr> - <td class="paramkey"></td> - <td></td> - <td class="paramtype">int * </td> - <td class="paramname"> <em>argc</em></td><td> </td> - </tr> - <tr> - <td></td> - <td>)</td> - <td></td><td></td><td width="100%"></td> - </tr> - </table> -</div> -<div class="memdoc"> - -<p> -Returns the startup arguments associated with the specified plug-in context. -<p> -This function is intended to be used by a plug-in runtime. Startup arguments are set by the main program using <a class="el" href="group__cFuncsPluginExec.html#g9233fa8a46e408044030d2d767f1fda4">cp_set_context_args</a>. The returned argument count is zero and the array pointer is NULL if no arguments have been set.<p> -<dl compact><dt><b>Parameters:</b></dt><dd> - <table border="0" cellspacing="2" cellpadding="0"> - <tr><td valign="top"></td><td valign="top"><em>ctx</em> </td><td>the plug-in context </td></tr> - <tr><td valign="top"></td><td valign="top"><em>argc</em> </td><td>a pointer to a location where the number of startup arguments is stored, or NULL for none </td></tr> - </table> -</dl> -<dl class="return" compact><dt><b>Returns:</b></dt><dd>an argument array terminated by NULL or NULL if not set </dd></dl> - -</div> -</div><p> -<hr size="1"> -<p class="footer"> -<a href="http://www.c-pluff.org/">C-Pluff</a>, a plug-in framework for C<br> -Copyright 2007 <a href="http://www.jlehtinen.net/">Johannes Lehtinen</a> -</p> -<p class="generated-by"> -Generated on Fri Apr 6 15:40:55 2007 for C-Pluff C API by <a href="http://www.doxygen.org/index.html"><img src="doxygen.png" alt="doxygen" align="middle" border="0"></a> 1.5.1 -</p> -</body> -</html> |