root/src/noit_module.h

Revision caa7b86e0a2913bf4f9e3254320a05dd636b2e06, 0.8 kB (checked in by Theo Schlossnagle <jesus@omniti.com>, 7 years ago)

glue up some actual XML

  • Property mode set to 100644
Line 
1 /*
2  * Copyright (c) 2007, 2008, OmniTI Computer Consulting, Inc.
3  * All rights reserved.
4  */
5
6 #ifndef _NOIT_MODULE_H
7 #define _NOIT_MODULE_H
8
9 #include "noit_defines.h"
10 #include "utils/noit_hash.h"
11 #include "noit_poller.h"
12
13 #define NOIT_MODULE_MAGIC 0x4017DA7A
14
15 typedef struct {
16   uint32_t magic;
17   uint32_t version;
18   char *name;
19   char *description;
20   int (*onload)();
21   int (*config)(noit_hash_table *options);
22   int (*init)();
23   int (*initiate_check)(noit_check_t check);
24 } noit_module_t;
25
26 #define MODULE_MAGIC(a)          ((a)->magic)
27 #define MODULE_VERSION(a)        ((a)->version)
28
29 #define noit_module_validate_magic(a) \
30   ((MODULE_MAGIC(a) == NOIT_MODULE_MAGIC)?0:-1)
31
32 API_EXPORT(int)
33   noit_module_load(const char *file, const char *name);
34 API_EXPORT(noit_module_t *)
35   noit_module_lookup(const char *name);
36
37 #endif
Note: See TracBrowser for help on using the browser.