<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://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/html; charset=utf-8" /> <title>IPlugin — Yapsy 1.10.2 documentation</title> <link rel="stylesheet" href="_static/default.css" type="text/css" /> <link rel="stylesheet" href="_static/pygments.css" type="text/css" /> <script type="text/javascript"> var DOCUMENTATION_OPTIONS = { URL_ROOT: '', VERSION: '1.10.2', COLLAPSE_INDEX: false, FILE_SUFFIX: '.html', HAS_SOURCE: true }; </script> <script type="text/javascript" src="_static/jquery.js"></script> <script type="text/javascript" src="_static/underscore.js"></script> <script type="text/javascript" src="_static/doctools.js"></script> <link rel="shortcut icon" href="_static/yapsy-favicon.ico"/> <link rel="top" title="Yapsy 1.10.2 documentation" href="index.html" /> <link rel="next" title="PluginManager" href="PluginManager.html" /> <link rel="prev" title="Yapsy: Yet Another Plugin SYstem" href="index.html" /> </head> <body> <div class="related"> <h3>Navigation</h3> <ul> <li class="right" style="margin-right: 10px"> <a href="genindex.html" title="General Index" accesskey="I">index</a></li> <li class="right" > <a href="py-modindex.html" title="Python Module Index" >modules</a> |</li> <li class="right" > <a href="PluginManager.html" title="PluginManager" accesskey="N">next</a> |</li> <li class="right" > <a href="index.html" title="Yapsy: Yet Another Plugin SYstem" accesskey="P">previous</a> |</li> <li><a href="index.html">Yapsy 1.10.2 documentation</a> »</li> </ul> </div> <div class="document"> <div class="documentwrapper"> <div class="bodywrapper"> <div class="body"> <div class="section" id="module-yapsy.IPlugin"> <span id="iplugin"></span><h1>IPlugin<a class="headerlink" href="#module-yapsy.IPlugin" title="Permalink to this headline">¶</a></h1> <div class="section" id="role"> <h2>Role<a class="headerlink" href="#role" title="Permalink to this headline">¶</a></h2> <p>Defines the basic interfaces for a plugin. These interfaces are inherited by the <em>core</em> class of a plugin. The <em>core</em> class of a plugin is then the one that will be notified the activation/deactivation of a plugin via the <tt class="docutils literal"><span class="pre">activate/deactivate</span></tt> methods.</p> <p>For simple (near trivial) plugin systems, one can directly use the following interfaces.</p> </div> <div class="section" id="extensibility"> <h2>Extensibility<a class="headerlink" href="#extensibility" title="Permalink to this headline">¶</a></h2> <p>In your own software, you’ll probably want to build derived classes of the <tt class="docutils literal"><span class="pre">IPlugin</span></tt> class as it is a mere interface with no specific functionality.</p> <p>Your software’s plugins should then inherit your very own plugin class (itself derived from <tt class="docutils literal"><span class="pre">IPlugin</span></tt>).</p> <p>Where and how to code these plugins is explained in the section about the <a class="reference internal" href="PluginManager.html"><em>PluginManager</em></a>.</p> </div> <div class="section" id="api"> <h2>API<a class="headerlink" href="#api" title="Permalink to this headline">¶</a></h2> <dl class="class"> <dt id="yapsy.IPlugin.IPlugin"> <em class="property">class </em><tt class="descclassname">yapsy.IPlugin.</tt><tt class="descname">IPlugin</tt><a class="headerlink" href="#yapsy.IPlugin.IPlugin" title="Permalink to this definition">¶</a></dt> <dd><p>The most simple interface to be inherited when creating a plugin.</p> <dl class="method"> <dt id="yapsy.IPlugin.IPlugin.activate"> <tt class="descname">activate</tt><big>(</big><big>)</big><a class="headerlink" href="#yapsy.IPlugin.IPlugin.activate" title="Permalink to this definition">¶</a></dt> <dd><p>Called at plugin activation.</p> </dd></dl> <dl class="method"> <dt id="yapsy.IPlugin.IPlugin.deactivate"> <tt class="descname">deactivate</tt><big>(</big><big>)</big><a class="headerlink" href="#yapsy.IPlugin.IPlugin.deactivate" title="Permalink to this definition">¶</a></dt> <dd><p>Called when the plugin is disabled.</p> </dd></dl> </dd></dl> </div> </div> </div> </div> </div> <div class="sphinxsidebar"> <div class="sphinxsidebarwrapper"> <p class="logo"><a href="index.html"> <img class="logo" src="_static/yapsy-big.png" alt="Logo"/> </a></p> <h3><a href="index.html">Table Of Contents</a></h3> <ul> <li><a class="reference internal" href="#">IPlugin</a><ul> <li><a class="reference internal" href="#role">Role</a></li> <li><a class="reference internal" href="#extensibility">Extensibility</a></li> <li><a class="reference internal" href="#api">API</a></li> </ul> </li> </ul> <h4>Previous topic</h4> <p class="topless"><a href="index.html" title="previous chapter">Yapsy: Yet Another Plugin SYstem</a></p> <h4>Next topic</h4> <p class="topless"><a href="PluginManager.html" title="next chapter">PluginManager</a></p> <h3>This Page</h3> <ul class="this-page-menu"> <li><a href="_sources/IPlugin.txt" rel="nofollow">Show Source</a></li> </ul> <div id="searchbox" style="display: none"> <h3>Quick search</h3> <form class="search" action="search.html" method="get"> <input type="text" name="q" /> <input type="submit" value="Go" /> <input type="hidden" name="check_keywords" value="yes" /> <input type="hidden" name="area" value="default" /> </form> <p class="searchtip" style="font-size: 90%"> Enter search terms or a module, class or function name. </p> </div> <script type="text/javascript">$('#searchbox').show(0);</script> </div> </div> <div class="clearer"></div> </div> <div class="related"> <h3>Navigation</h3> <ul> <li class="right" style="margin-right: 10px"> <a href="genindex.html" title="General Index" >index</a></li> <li class="right" > <a href="py-modindex.html" title="Python Module Index" >modules</a> |</li> <li class="right" > <a href="PluginManager.html" title="PluginManager" >next</a> |</li> <li class="right" > <a href="index.html" title="Yapsy: Yet Another Plugin SYstem" >previous</a> |</li> <li><a href="index.html">Yapsy 1.10.2 documentation</a> »</li> </ul> </div> <div class="footer"> © Copyright 2010-2013, Thibauld Nion. Last updated on Oct 05, 2013. Created using <a href="http://sphinx.pocoo.org/">Sphinx</a> 1.1.3. </div> </body> </html>