Add module level static capabilities

The static capabilities declared in getCapabilities allows certain
capabilities to be queried before instances are created. The intended use
of this capability is to remove the need for the `is_internal_service`
function.
This commit is contained in:
Markus Mäkelä
2017-03-20 10:08:56 +02:00
parent 06c40eebd7
commit 1736aca7f7
54 changed files with 63 additions and 0 deletions

View File

@ -18,6 +18,8 @@
#include <maxscale/cdefs.h>
#include <stdint.h>
MXS_BEGIN_DECLS
/**
@ -133,6 +135,7 @@ typedef struct mxs_module
MXS_MODULE_VERSION api_version; /**< Module API version */
const char *description; /**< Module description */
const char *version; /**< Module version */
uint64_t module_capabilities; /**< Declared module capabilities */
void *module_object; /**< Module type specific API implementation */
/**
* If non-NULL, this function is called once at process startup. If the
@ -175,6 +178,13 @@ typedef struct mxs_module
*/
#define MXS_END_MODULE_PARAMS 0
/**
* This value should be given to the @c module_capabilities member if the module
* declares no capabilities. Currently only routers and filters can declare
* capabilities.
*/
#define MXS_NO_MODULE_CAPABILITIES 0
/**
* Name of the module entry point
*