author | Sebastian Harl <sh@tokkee.org> | |
Wed, 15 Oct 2008 07:28:15 +0000 (09:28 +0200) | ||
committer | Florian Forster <octo@huhu.verplant.org> | |
Thu, 16 Oct 2008 07:57:28 +0000 (09:57 +0200) | ||
commit | b12091a31a40edb82f2947989af981f26d1d808e | |
tree | 3bf2826020186a75c5e505d4f0637d9d2b38e473 | tree | snapshot |
parent | 332cf199806de625661fa3a9bf9555f7a47ba9f9 | commit | diff |
src/plugin.[ch]: Added support for "filter" callbacks.
This type of callback is very similar to write callbacks:
int (*) (const data_set_t *, value_list_t *)
The return value of that callback indicates what further actions are to be
taken. It may be a bitwise OR of any of the following new flags:
FILTER_NOWRITE or FILTER_NOTHRESHOLD_CHECK. If both flags are used (which
equals the flag FILTER_IGNORE), the value list is ignored completely.
If more than one such callback is available, the respective return values are
bitwise OR'ed. If they "sum" up to FILTER_IGNORE, no further callbacks are
executed (lazy evaluation).
This type of callback may be used for the following purposes:
* rewrite information included in the value list (e.g. the instance
name)
* discard certain information on a fine-grained level based on the
information provided by the data set and value list
Signed-off-by: Sebastian Harl <sh@tokkee.org>
Signed-off-by: Florian Forster <octo@huhu.verplant.org>
This type of callback is very similar to write callbacks:
int (*) (const data_set_t *, value_list_t *)
The return value of that callback indicates what further actions are to be
taken. It may be a bitwise OR of any of the following new flags:
FILTER_NOWRITE or FILTER_NOTHRESHOLD_CHECK. If both flags are used (which
equals the flag FILTER_IGNORE), the value list is ignored completely.
If more than one such callback is available, the respective return values are
bitwise OR'ed. If they "sum" up to FILTER_IGNORE, no further callbacks are
executed (lazy evaluation).
This type of callback may be used for the following purposes:
* rewrite information included in the value list (e.g. the instance
name)
* discard certain information on a fine-grained level based on the
information provided by the data set and value list
Signed-off-by: Sebastian Harl <sh@tokkee.org>
Signed-off-by: Florian Forster <octo@huhu.verplant.org>
src/plugin.c | diff | blob | history | |
src/plugin.h | diff | blob | history |