Filter.h split into public and private parts

- include/maxscale/filter.h
- server/core/maxscale/filter.h
This commit is contained in:
Johan Wikman
2017-01-13 12:53:43 +02:00
parent 3e5e1bda6a
commit 356690c0e5
5 changed files with 76 additions and 58 deletions

View File

@ -0,0 +1,32 @@
#pragma once
/*
* Copyright (c) 2016 MariaDB Corporation Ab
*
* Use of this software is governed by the Business Source License included
* in the LICENSE.TXT file and at www.mariadb.com/bsl.
*
* Change Date: 2019-07-01
*
* On the date above, in accordance with the Business Source License, use
* of this software will be governed by version 2 or later of the General
* Public License.
*/
/**
* @file core/maxscale/filter.h - The private filter interface
*/
#include <maxscale/filter.h>
MXS_BEGIN_DECLS
void filter_add_option(FILTER_DEF *filter_def, const char *option);
void filter_add_parameter(FILTER_DEF *filter_def, const char *name, const char *value);
FILTER_DEF *filter_alloc(const char *name, const char *module_name);
DOWNSTREAM *filter_apply(FILTER_DEF *filte_def, SESSION *session, DOWNSTREAM *downstream);
void filter_free(FILTER_DEF *filter_def);
bool filter_load(FILTER_DEF *filter_def);
int filter_standard_parameter(const char *name);
UPSTREAM *filter_upstream(FILTER_DEF *filter_def, void *fsession, UPSTREAM *upstream);
MXS_END_DECLS

View File

@ -38,6 +38,7 @@
*
* @endverbatim
*/
#include <maxscale/service.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
@ -47,26 +48,25 @@
#include <sys/types.h>
#include <math.h>
#include <fcntl.h>
#include <maxscale/session.h>
#include <maxscale/protocol.h>
#include <maxscale/listener.h>
#include <maxscale/server.h>
#include <maxscale/router.h>
#include <maxscale/spinlock.h>
#include <maxscale/modules.h>
#include <maxscale/dcb.h>
#include <maxscale/users.h>
#include <maxscale/filter.h>
#include <maxscale/poll.h>
#include <maxscale/log_manager.h>
#include <maxscale/housekeeper.h>
#include <maxscale/resultset.h>
#include <maxscale/gwdirs.h>
#include <maxscale/version.h>
#include <maxscale/queuemanager.h>
#include <maxscale/alloc.h>
#include <maxscale/dcb.h>
#include <maxscale/gwdirs.h>
#include <maxscale/housekeeper.h>
#include <maxscale/listener.h>
#include <maxscale/log_manager.h>
#include <maxscale/modules.h>
#include <maxscale/poll.h>
#include <maxscale/protocol.h>
#include <maxscale/queuemanager.h>
#include <maxscale/resultset.h>
#include <maxscale/router.h>
#include <maxscale/server.h>
#include <maxscale/session.h>
#include <maxscale/spinlock.h>
#include <maxscale/users.h>
#include <maxscale/utils.h>
#include <maxscale/version.h>
#include "maxscale/filter.h"
#include "maxscale/service.h"
/** Base value for server weights */

View File

@ -27,21 +27,22 @@
*
* @endverbatim
*/
#include <maxscale/session.h>
#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>
#include <string.h>
#include <errno.h>
#include <maxscale/alloc.h>
#include <maxscale/session.h>
#include <maxscale/service.h>
#include <maxscale/router.h>
#include <maxscale/dcb.h>
#include <maxscale/spinlock.h>
#include <maxscale/atomic.h>
#include <maxscale/log_manager.h>
#include <maxscale/dcb.h>
#include <maxscale/housekeeper.h>
#include <maxscale/log_manager.h>
#include <maxscale/poll.h>
#include <maxscale/router.h>
#include <maxscale/service.h>
#include <maxscale/spinlock.h>
#include "maxscale/filter.h"
/* A session with null values, used for initialization */
static SESSION session_initialized = SESSION_INIT;

View File

@ -33,7 +33,7 @@
#include <stdlib.h>
#include <string.h>
#include <maxscale/filter.h>
#include "../maxscale/filter.h"
/**