summaryrefslogtreecommitdiff
path: root/doc/source/dev/plugin.rst
diff options
context:
space:
mode:
authormathieui <mathieui@mathieui.net>2013-04-08 18:52:35 +0200
committermathieui <mathieui@mathieui.net>2013-04-08 18:52:35 +0200
commitbd8d38d711e15d42ac8e797723af5242e4c3f4fb (patch)
treed3ea6da641be1c7e67a3123071cb816933436502 /doc/source/dev/plugin.rst
parente5f219d43edbb4b05c8890f81f2f93b90e215a10 (diff)
downloadpoezio-bd8d38d711e15d42ac8e797723af5242e4c3f4fb.tar.gz
poezio-bd8d38d711e15d42ac8e797723af5242e4c3f4fb.tar.bz2
poezio-bd8d38d711e15d42ac8e797723af5242e4c3f4fb.tar.xz
poezio-bd8d38d711e15d42ac8e797723af5242e4c3f4fb.zip
Beginning of the migration to reST documentation
Diffstat (limited to 'doc/source/dev/plugin.rst')
-rw-r--r--doc/source/dev/plugin.rst41
1 files changed, 41 insertions, 0 deletions
diff --git a/doc/source/dev/plugin.rst b/doc/source/dev/plugin.rst
new file mode 100644
index 00000000..7978a5e9
--- /dev/null
+++ b/doc/source/dev/plugin.rst
@@ -0,0 +1,41 @@
+Plugin API documentation
+========================
+
+.. module:: plugin
+
+.. autoclass:: BasePlugin
+ :members: init, cleanup, api, core
+
+ .. method:: init(self)
+
+ Method called at the creation of the plugin.
+
+ Do not override __init__ and use this instead.
+
+ .. method:: cleanup(self)
+
+ Method called before the destruction of the plugin.
+
+ Use it to erase or save things before the plugin is disabled.
+
+ .. attribute:: core
+
+ The Poezio :py:class:`~Core` object. Use it carefully.
+
+ .. attribute:: api
+
+ The :py:class:`~PluginAPI` instance for this plugin.
+
+
+Each plugin inheriting :py:class:`~BasePlugin` has an ``api`` member variable, which refers
+to a :py:class:`~PluginAPI` object.
+
+The :py:class:`~PluginAPI` object is an a interface through which the :py:class:`~BasePlugin`
+(and inheritors) *should* go to interact with poezio. If it is not sufficient, then the ``core``
+member can be used.
+
+.. autoclass:: PluginAPI
+ :members:
+ :undoc-members:
+
+