summaryrefslogtreecommitdiffstats
path: root/doc
diff options
context:
space:
mode:
authorDaniel Novotny <dnovotny@dhcp-lab-180.englab.brq.redhat.com>2009-07-03 12:58:16 +0200
committerDaniel Novotny <dnovotny@dhcp-lab-180.englab.brq.redhat.com>2009-07-03 12:58:16 +0200
commit5b7b33d851002f67b9d32e0702c7da0d82fbbb58 (patch)
treeadca923ec8cc72fdf5a4206c743eb6871646ca88 /doc
parente5c814ec3846a6d5806e3dd38e1a36160c7d73d2 (diff)
downloadabrt-5b7b33d851002f67b9d32e0702c7da0d82fbbb58.tar.gz
abrt-5b7b33d851002f67b9d32e0702c7da0d82fbbb58.tar.xz
abrt-5b7b33d851002f67b9d32e0702c7da0d82fbbb58.zip
documentation after English language review from rlandman@redhat.com
Diffstat (limited to 'doc')
-rw-r--r--doc/PLUGINS-HOWTO62
1 files changed, 30 insertions, 32 deletions
diff --git a/doc/PLUGINS-HOWTO b/doc/PLUGINS-HOWTO
index bb315f99..a8eb4e20 100644
--- a/doc/PLUGINS-HOWTO
+++ b/doc/PLUGINS-HOWTO
@@ -1,44 +1,44 @@
This document describes how to create your own plugin for abrt.
-There is a base abstract class CPlugin, but you can't inherit
-directly from that: you have to use one of the four subclasses,
-depending on what is your plugin supposed to do.
+Although a base abstract class CPlugin exists, you can't inherit
+directly from it. You must use one of the four subclasses,
+depending on what you want your plugin to do.
-These are the subclasses:
+The subclasses are:
* Action plugin (CAction)
* Analyzer plugin (CAnalyzer)
* Reporter plugin (CReporter)
* Database plugin (CDatabase)
-Each of them requires you to override different set of methods.
+Each of them requires you to override a different set of methods.
-One very common parameter of the methods is called
-pDebugDumpDir: it specifies the directory,
-which is created to gather information of this specific crash:
-the files (such as core dumps) that were created when the application
-crashed are all stored here. In addition, the plugins can write
+The pDebugDumpDir parameter is very common: it specifies the directory
+that is created to gather information of this specific crash.
+The files that were created when the application crashed (such as core dumps)
+are all stored here. In addition, the plugins can write
their output files there, if any.
Let's discuss the plugin types in detail:
Action Plugin
-------------
-This type of plugin is used, when you need some action to be
-performed in the case the crash is encountered.
+You use this type of plugin when you need some action to be
+performed when a crash is encountered.
you have to override one method:
virtual void Run(const std::string& pActiveDir,
const std::string& pArgs) = 0;
-This method runs the specified action.
- The first argument is an directory name. It can be either current debug
- dump dir or directory which contains all debug dumps.
+ The first argument is a directory name. It can be either the current debug
+ dump dir or a directory that contains all debug dumps.
The second argument is a string with arguments specified for the action.
Analyzer Plugin
---------------
-This plugin has to compute the UUID of the crash: crashes in kernel,
-in userspace binary, in python script etc. differ, so you have to have
-plugin for each type of application, that you want "abrt" to handle.
+This plugin has to compute the UUID of the crash. Crashes differ, depending on
+where they occur, for example crashes in the kernel differ from crashes in
+userspace binaries, which differ from crashes in python scripts. Therefore,
+you need a plugin for each type of application that you want "abrt" to handle.
you have to override these methods:
@@ -48,8 +48,8 @@ virtual std::string GetLocalUUID(const std::string& pDebugDumpPath) = 0;
virtual std::string GetGlobalUUID(const std::string& pDebugDumpPath) = 0;
- This method computes the global UUID of the crash.
-NOTE:The difference between local and global UUID is, that the local UUID
-is specific for the machine architecture, on which the crash is encountered.
+NOTE:The difference between local and global UUID is that the local UUID
+is specific for the machine architecture on which the crash is encountered.
When the crash is reported, abrt has to use the "-debuginfo" packages
to render a global UUID, which should be independent of the specific
system (the same crash on different architectures/configurations can
@@ -69,18 +69,17 @@ you have to override this method:
virtual void Report(const crash_report_t& pCrashReport,
const std::string& pArgs) = 0;
--It's self-explanatory, that this method takes the report
+-It is self-explanatory, that this method takes the report
and presents it somewhere to the world.
- The second argument is a string with arguments specified for the retorter.
+ The second argument is a string with arguments specified for the reporter.
Database Plugin
---------------
-This plugin is used to store the metadata about the crash:
-they have to be in the database in order to distinguish,
-whether the current crash is or is not the same as some
-crash before. The database can be local, or in some
-centralized location on the network.
+You use this plugin to store the metadata about the crash. The metadata
+has to be in a database, to distinguish whether the current crash is or
+is not the same as some crash before. The database can be local, or in
+some centralized location on the network.
you have to override these methods:
virtual void Connect() = 0;
@@ -91,14 +90,14 @@ virtual void Insert(const std::string& pUUID,
const std::string& pUID,
const std::string& pDebugDumpPath,
const std::string& pTime) = 0;
-- insert an entry to the database: you use both UID (user ID) and UUID
+- insert an entry into the database: you use both UID (user ID) and UUID
(ID of the crash)
virtual void Delete(const std::string& pUUID, const std::string& pUID) = 0;
- delete an entry
virtual void SetReported(const std::string& pUUID, const std::string& pUID) = 0;
-- insert to the database the information, that this bug was already
+- insert information into the database to say that this bug was already
reported (so for example the report plugins won't run several times
for the same bug)
@@ -112,11 +111,10 @@ virtual const database_row_t GetUUIDData(const std::string& pUUID, const
The macro PLUGIN_INFO
---------------------
-It is required, in order for your subclass to be properly registered
-and treated as a plugin, to use the macro PLUGIN_INFO in your plugin's
-header file.
+Use the macro PLUGIN_INFO in the header file of your plugin so that your
+subclass will be properly registered and treated as a plugin.
This sets up all the lower-level and administrative details to fit your
-class into the plugin infrastructure. The syntax is this:
+class into the plugin infrastructure. The syntax is:
PLUGIN_INFO(type, plugin_class, name, version, description, email, www)
- "type" is one of ANALYZER, ACTION, REPORTER, or DATABASE