MySQL 8.0.39
Source Code Documentation
component_status_var_service_imp.h
Go to the documentation of this file.
1/* Copyright (c) 2017, 2024, Oracle and/or its affiliates.
2
3This program is free software; you can redistribute it and/or modify
4it under the terms of the GNU General Public License, version 2.0,
5as published by the Free Software Foundation.
6
7This program is designed to work with certain software (including
8but not limited to OpenSSL) that is licensed under separate terms,
9as designated in a particular file or component or in included license
10documentation. The authors of MySQL hereby grant you an additional
11permission to link the program and your derivative works with the
12separately licensed software that they have either included with
13the program or referenced in the documentation.
14
15This program is distributed in the hope that it will be useful,
16but WITHOUT ANY WARRANTY; without even the implied warranty of
17MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
18GNU General Public License, version 2.0, for more details.
19
20You should have received a copy of the GNU General Public License
21along with this program; if not, write to the Free Software
22Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */
23
24#ifndef COMPONENT_STAUTS_VARIABLE_SERVICE_H
25#define COMPONENT_STAUTS_VARIABLE_SERVICE_H
26
29#include <mysql/status_var.h>
30
31extern bool add_status_vars(const SHOW_VAR *);
32extern void remove_status_vars(SHOW_VAR *);
33
34/**
35 An implementation of the component status variables Service to register
36 variable and unregister variable.
37*/
39 public:
40 /**
41 Register status variable.
42
43 @param status_var fully constructed status variable object.
44 @return Status of performed operation
45 @retval false success
46 @retval true failure
47
48 Note: Please see the components/test/test_status_var_service.cc file,
49 to know how to construct status variables for different variable types.
50 */
51 static DEFINE_BOOL_METHOD(register_variable, (SHOW_VAR * status_var));
52
53 /**
54 Unregister's status variable.
55 @param status_var SHOW_VAR object with only the name of the variable,
56 which has to be removed from the global list.
57 @return Status of performed operation
58 @retval false success
59 @retval true failure
60 */
61 static DEFINE_BOOL_METHOD(unregister_variable, (SHOW_VAR * status_var));
62};
63#endif /* COMPONENT_STATUS_VARIABLE_SERVICE_H */
An implementation of the component status variables Service to register variable and unregister varia...
Definition: component_status_var_service_imp.h:38
static mysql_service_status_t unregister_variable(SHOW_VAR *status_var) noexcept
Unregister's status variable.
Definition: component_status_var_service.cc:63
static mysql_service_status_t register_variable(SHOW_VAR *status_var) noexcept
Register status variable.
Definition: component_status_var_service.cc:43
bool add_status_vars(const SHOW_VAR *)
Definition: sql_show.cc:3295
void remove_status_vars(SHOW_VAR *)
Definition: sql_show.cc:3472
Specifies macros to define Service Implementations.
#define DEFINE_BOOL_METHOD(name, args)
A short macro to define method that returns bool, which is the most common case.
Definition: service_implementation.h:88
SHOW STATUS Server status variable.
Definition: status_var.h:79