MySQL 9.3.0
Source Code Documentation
connection_control_interfaces.h
Go to the documentation of this file.
1/* Copyright (c) 2024, 2025, Oracle and/or its affiliates.
2
3 This program is free software; you can redistribute it and/or modify
4 it under the terms of the GNU General Public License, version 2.0,
5 as published by the Free Software Foundation.
6
7 This program is designed to work with certain software (including
8 but not limited to OpenSSL) that is licensed under separate terms,
9 as designated in a particular file or component or in included license
10 documentation. The authors of MySQL hereby grant you an additional
11 permission to link the program and your derivative works with the
12 separately licensed software that they have either included with
13 the program or referenced in the documentation.
14
15 This program is distributed in the hope that it will be useful,
16 but WITHOUT ANY WARRANTY; without even the implied warranty of
17 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
18 GNU General Public License, version 2.0, for more details.
19
20 You should have received a copy of the GNU General Public License
21 along with this program; if not, write to the Free Software
22 Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */
23
24#ifndef CONNECTION_CONTROL_INTERFACES_H
25#define CONNECTION_CONTROL_INTERFACES_H
26
27#include <string> /* std::string */
28#include <vector> /* std::vector */
29#include "connection_control.h"
30#include "connection_control_data.h" /* Variables and Status */
31
32namespace connection_control {
33/* Typedefs for convenience */
34typedef std::string Sql_string;
35
36/* Forward declaration */
38
39/**
40 Interface for defining action on connection events
41*/
43 public:
44 virtual bool notify_event(
46 const mysql_event_tracking_connection_data *connection_event) = 0;
49 void *new_value) = 0;
50 virtual ~Connection_event_observer() = default;
51};
52
53/* Status variable action enum */
54typedef enum status_var_action {
58 ACTION_LAST /* Must be at the end */
60} // namespace connection_control
61#endif // !CONNECTION_CONTROL_INTERFACES_H
#define MYSQL_THD
Definition: backup_page_tracker.h:38
Connection event coordinator.
Definition: connection_control_coordinator.h:65
Interface for defining action on connection events.
Definition: connection_control_interfaces.h:42
virtual bool notify_event(MYSQL_THD thd, Connection_event_coordinator *coordinator, const mysql_event_tracking_connection_data *connection_event)=0
virtual bool notify_sys_var(Connection_event_coordinator *coordinator, opt_connection_control variable, void *new_value)=0
opt_connection_control
Enum for system variables : Must be in sync with members of Connection_control_variables.
Definition: connection_control_data.h:35
Definition: connection_control.h:70
std::string Sql_string
Definition: connection_control_interfaces.h:34
status_var_action
Definition: connection_control_interfaces.h:54
@ ACTION_RESET
Definition: connection_control_interfaces.h:57
@ ACTION_LAST
Definition: connection_control_interfaces.h:58
@ ACTION_NONE
Definition: connection_control_interfaces.h:55
@ ACTION_INC
Definition: connection_control_interfaces.h:56
Structure for Connection event tracking.
Definition: event_tracking_connection_defs.h:60