From df67148db5c78750f4bb251e5c2445d5387aa025 Mon Sep 17 00:00:00 2001 From: Fredric N Date: Tue, 21 Sep 2010 19:57:43 +0200 Subject: [PATCH] Added documentation --- docs/output.txt | 37 +++++++++++++++++++++++++++++++++++++ src/arch.c | 10 ++++++++++ src/indexer.c | 3 ++- 3 files changed, 49 insertions(+), 1 deletion(-) create mode 100644 docs/output.txt diff --git a/docs/output.txt b/docs/output.txt new file mode 100644 index 0000000..1662f71 --- /dev/null +++ b/docs/output.txt @@ -0,0 +1,37 @@ +----------------------------------- + output API +----------------------------------- + +The data we handle and output needs to be taken care of. We don't want to put +any limitation for this within the core so we have designed a output API which +allows us and others to easily develop "output drivers" which handles the data +processing. + +The output drivers have complete access to the configuration file to allow them +a way to get user defined input. Eg. database access information. + +At this time we only provide two different output drivers. One for mysql and +one for stdout. + +-- functions + +output_init(): + + This function is called on startup and allows the output driver to initialize + stuff that is needed later on. Eg. loading configuration options and/or connecting + to the database. + +output_process(): + + Is called every time a new event is triggered. The event is passed to the function + and after that it is up to the driver to do some magic. + +output_error(): + + Converts error numbers to actual error strings. This function is used by the core + to display error messages from the output driver. + +output_exit(): + + Called when the program is exiting (For whatever reason). It allows you to clean up + your mess. diff --git a/src/arch.c b/src/arch.c index 549f9f6..93d6714 100644 --- a/src/arch.c +++ b/src/arch.c @@ -1,3 +1,13 @@ +/* arch.c + * + * (C) Copyright 2010 Henrik Hautakoski + * (C) Copyright 2010 Fredric Nilsson + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + */ #include #include #include diff --git a/src/indexer.c b/src/indexer.c index 2301379..eddf2ed 100644 --- a/src/indexer.c +++ b/src/indexer.c @@ -1,6 +1,7 @@ /* indexer.c * - * (C) Copyright 2010 Henrik Hautakoski + * (C) Copyright 2010 Henrik Hautakoski + * (C) Copyright 2010 Fredric Nilsson * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by