MySQL 8.0.31
Source Code Documentation
component_status_var_service.h
Go to the documentation of this file.
1/* Copyright (c) 2017, 2022, 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 also distributed 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 included with MySQL.
13
14This program is distributed in the hope that it will be useful,
15but WITHOUT ANY WARRANTY; without even the implied warranty of
16MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17GNU General Public License, version 2.0, for more details.
18
19You should have received a copy of the GNU General Public License
20along with this program; if not, write to the Free Software
21Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */
22
23#ifndef COMPONENT_STATUS_VAR_SERVICE_H
24#define COMPONENT_STATUS_VAR_SERVICE_H
25
27#include <mysql/status_var.h>
28
29/**
30 Component status variables as a service to mysql_server component
31*/
32
33struct SHOW_VAR;
34
35/**
36 Service to register variable and unregister variable.
37*/
38BEGIN_SERVICE_DEFINITION(status_variable_registration)
39
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*/
51DECLARE_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*/
61DECLARE_BOOL_METHOD(unregister_variable, (SHOW_VAR * status_var));
62
63END_SERVICE_DEFINITION(status_variable_registration)
64
65#endif /* COMPONENT_STATUS_VAR_SERVICE_H */
#define END_SERVICE_DEFINITION(name)
A macro to end the last Service definition started with the BEGIN_SERVICE_DEFINITION macro.
Definition: service.h:90
#define BEGIN_SERVICE_DEFINITION(name)
Declares a new Service.
Definition: service.h:85
#define DECLARE_BOOL_METHOD(name, args)
Declares a method that returns bool as a part of the Service definition.
Definition: service.h:111
SHOW STATUS Server status variable.
Definition: status_var.h:78