MXS-1929: Make core ResultSet functions private

The functions in the core that generate a ResultSet are now private.
This commit is contained in:
Markus Mäkelä 2018-07-31 10:01:18 +03:00
parent bd48db28ec
commit 8ababa1d39
No known key found for this signature in database
GPG Key ID: 72D48FCE664F7B19
13 changed files with 82 additions and 25 deletions

View File

@ -21,7 +21,6 @@
#include <maxscale/cdefs.h>
#include <maxscale/config.h>
#include <maxscale/dcb.h>
#include <maxscale/resultset.h>
#include <maxscale/jansson.h>
MXS_BEGIN_DECLS
@ -480,6 +479,5 @@ extern void dprintAllServersJson(DCB *);
extern void dprintServer(DCB *, const SERVER *);
extern void dprintPersistentDCBs(DCB *, const SERVER *);
extern void dListServers(DCB *);
extern RESULTSET *serverGetList();
MXS_END_DECLS

View File

@ -32,7 +32,6 @@
#include <maxscale/server.h>
#include <maxscale/listener.h>
#include <maxscale/filter.h>
#include <maxscale/resultset.h>
#include <maxscale/config.h>
#include <maxscale/jansson.h>
@ -248,8 +247,6 @@ void dprintService(DCB *dcb, SERVICE *service);
void dListServices(DCB *dcb);
void dListListeners(DCB *dcb);
int serviceSessionCountAll(void);
RESULTSET* serviceGetList(void);
RESULTSET* serviceGetListenerList(void);
/**
* Get the capabilities of the servive.

View File

@ -21,9 +21,9 @@
#include <time.h>
#include <maxscale/atomic.h>
#include <maxscale/dcb.h>
#include <maxscale/buffer.h>
#include <maxscale/log_manager.h>
#include <maxscale/resultset.h>
#include <maxscale/spinlock.h>
#include <maxscale/jansson.h>

View File

@ -19,7 +19,6 @@
#include <maxscale/cdefs.h>
#include <maxscale/dcb.h>
#include <maxscale/modinfo.h>
#include <maxscale/resultset.h>
#include <maxscale/debug.h>
MXS_BEGIN_DECLS
@ -85,13 +84,6 @@ void printModules();
*/
void dprintAllModules(DCB *);
/**
* @brief Return a resultset that has the current set of modules in it
*
* @return A Result set
*/
RESULTSET *moduleGetList();
typedef struct mxs_module_iterator
{
const char* type;

View File

@ -0,0 +1,24 @@
#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/bsl11.
*
* Change Date: 2022-01-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.
*/
#include "modules.h"
#include <maxscale/resultset.hh>
/**
* @brief Return a resultset that has the current set of modules in it
*
* @return A Result set
*/
ResultSet *moduleGetList();

View File

@ -81,7 +81,6 @@ void monitor_show(DCB *, MXS_MONITOR *);
void monitor_show_all(DCB *);
void monitor_list(DCB *);
RESULTSET *monitor_get_list();
bool monitor_add_server(MXS_MONITOR *mon, SERVER *server);
void monitor_remove_server(MXS_MONITOR *mon, SERVER *server);

View File

@ -0,0 +1,23 @@
#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/bsl11.
*
* Change Date: 2022-01-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.
*/
/**
* Internal header for the monitor type
*/
#include "monitor.h"
#include <maxscale/resultset.hh>
ResultSet *monitor_get_list();

View File

@ -18,7 +18,7 @@
#include <maxscale/poll.h>
#include <maxscale/resultset.h>
#include <maxscale/resultset.hh>
MXS_BEGIN_DECLS
@ -42,6 +42,6 @@ void dShowThreads(DCB *dcb);
void dShowEventQ(DCB *dcb);
void dShowEventStats(DCB *dcb);
RESULTSET *eventTimesGetList();
ResultSet *eventTimesGetList();
MXS_END_DECLS

View File

@ -0,0 +1,21 @@
#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/bsl11.
*
* Change Date: 2022-01-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.
*/
/**
* Internal header for the server type
*/
#include <maxscale/resultset.hh>
ResultSet* serverGetList();

View File

@ -13,6 +13,7 @@
*/
#include <maxscale/service.h>
#include <maxscale/resultset.hh>
/**
* @file service.h - MaxScale internal service functions
@ -351,3 +352,6 @@ json_t* service_relations_to_server(const SERVER* server, const char* host);
* @return Array of service links
*/
json_t* service_relations_to_filter(const MXS_FILTER_DEF* filter, const char* host);
ResultSet* serviceGetList(void);
ResultSet* serviceGetListenerList(void);

View File

@ -59,8 +59,6 @@ void session_link_backend_dcb(MXS_SESSION *session, struct dcb *dcb);
*/
void session_unlink_backend_dcb(MXS_SESSION *session, struct dcb *dcb);
RESULTSET *sessionGetList(SESSIONLISTFILTER);
void printAllSessions();
void printSession(MXS_SESSION *);

View File

@ -14,6 +14,8 @@
#include <maxscale/cppdefs.hh>
#include <maxscale/session.h>
#include <maxscale/resultset.hh>
#include <maxscale/utils.hh>
namespace maxscale
{
@ -37,3 +39,5 @@ struct RegistryTraits<MXS_SESSION>
};
}
ResultSet *sessionGetList();

View File

@ -32,8 +32,7 @@
#include <maxscale/service.h>
#include <maxscale/session.h>
#include <maxscale/spinlock.h>
MXS_BEGIN_DECLS
#include <maxscale/resultset.hh>
struct maxinfo_session;
@ -137,9 +136,7 @@ extern void maxinfo_free_tree(MAXINFO_TREE *);
extern void maxinfo_execute(DCB *, MAXINFO_TREE *);
extern void maxinfo_send_error(DCB *, int, const char *);
extern void maxinfo_send_parse_error(DCB *, char *, PARSE_ERROR);
extern RESULTSET *maxinfo_variables();
extern RESULTSET *maxinfo_status();
MXS_END_DECLS
extern ResultSet *maxinfo_variables();
extern ResultSet *maxinfo_status();
#endif