MySQL 9.1.0
Source Code Documentation
event_tracking_information_imp.h
Go to the documentation of this file.
1/* Copyright (c) 2022, 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 SQL_SERVER_COMPONENT_EVENT_TRACKING_INFORMATION_IMP_H
25#define SQL_SERVER_COMPONENT_EVENT_TRACKING_INFORMATION_IMP_H
26
30
32 public:
33 /**
34 Initialize authentication event data handle
35
36 @param [out] handle Handle to authentication event data
37
38 @returns Status of handle creation
39 @retval false Success
40 @retval true Error
41 */
44 handle));
45
46 /**
47 Deinitialize authentication event data handle
48
49 @param [in, out] handle Handle to be deinitialized
50
51 @returns Status of operation
52 @retval false Success
53 @retval true Error
54 */
55 static DEFINE_BOOL_METHOD(
57
58 /**
59 Get information about given authentication event
60
61 Accepted names and corresponding value type
62
63 "authentcation_method_count" -> uint8_t *
64 "new_user" -> mysql_cstring_with_length *
65 "new_host" -> mysql_cstring_with_length *
66 "is_role" -> boolean *
67
68 @param [in] handle Event tracking information handle
69 @param [in] name Data identifier
70 @param [out] value Value of the identifier
71
72 @returns status of the operation
73 @retval false Success
74 @retval true Error
75 */
76 static DEFINE_BOOL_METHOD(
78 const char *name, void *value));
79};
80
82 public:
83 /**
84 Get information about authentication method
85
86 Accepted names and corresponding value type
87
88 "name" -> mysql_cstring_with_length *
89
90 @param [in] handle Handle to authentication method structure
91 Valid until
92 @sa event_tracking_authentication_information_handle_imp
93 is valid
94 @param [in] index Location
95 @param [in] name Data identifier
96 @param [out] value Data value
97
98 @returns status of the operation
99 @retval false Success
100 @retval true Error
101 */
102 static DEFINE_BOOL_METHOD(get,
104 unsigned int index, const char *name,
105 void *value));
106};
107
109 public:
110 /**
111 Initialize authentication event data handle
112
113 @param [out] handle Handle to authentication event data
114
115 @returns Status of handle creation
116 @retval false Success
117 @retval true Error
118 */
120 handle));
121
122 /**
123 Deinitialize authentication event data handle
124
125 @param [in, out] handle Handle to be deinitialized
126
127 @returns Status of operation
128 @retval false Success
129 @retval true Error
130 */
133
134 /**
135 Get information about given authentication event
136
137 Accepted names and corresponding value type
138
139 "external_user" -> mysql_cstring_with_length *
140 "time" -> uint64_t
141 "rows" -> uint64_t
142
143 @param [in] handle Event tracking information handle
144 @param [in] name Data identifier
145 @param [out] value Value of the identifier
146
147 @returns status of the operation
148 @retval false Success
149 @retval true Error
150 */
151 static DEFINE_BOOL_METHOD(get,
153 const char *name, void *value));
154};
155
156#endif // !SQL_SERVER_COMPONENT_EVENT_TRACKING_INFORMATION_IMP_H
Definition: event_tracking_information_imp.h:31
static mysql_service_status_t deinit(event_tracking_authentication_information_handle handle) noexcept
Deinitialize authentication event data handle.
Definition: event_tracking_information.cc:55
static mysql_service_status_t get(event_tracking_authentication_information_handle handle, const char *name, void *value) noexcept
Get information about given authentication event.
Definition: event_tracking_information.cc:70
static mysql_service_status_t init(event_tracking_authentication_information_handle *handle) noexcept
Initialize authentication event data handle.
Definition: event_tracking_information.cc:33
Definition: event_tracking_information_imp.h:81
static mysql_service_status_t get(event_tracking_authentication_method_handle handle, unsigned int index, const char *name, void *value) noexcept
Get information about authentication method.
Definition: event_tracking_information.cc:102
Definition: event_tracking_information_imp.h:108
static mysql_service_status_t init(event_tracking_general_information_handle *handle) noexcept
Initialize authentication event data handle.
Definition: event_tracking_information.cc:129
static mysql_service_status_t get(event_tracking_general_information_handle handle, const char *name, void *value) noexcept
Get information about given authentication event.
Definition: event_tracking_information.cc:164
static mysql_service_status_t deinit(event_tracking_general_information_handle handle) noexcept
Deinitialize authentication event data handle.
Definition: event_tracking_information.cc:149
Specifies macros to define Components.
Authentication event tracking.
struct event_tracking_authentication_method_handle_imp * event_tracking_authentication_method_handle
A handle to obtain details related to authentication method.
Definition: event_tracking_authentication_service.h:46
struct event_tracking_authentication_information_handle_imp * event_tracking_authentication_information_handle
A handle to obtain details related to authentication event.
Definition: event_tracking_authentication_service.h:43
General event tracking.
struct event_tracking_general_information_handle_imp * event_tracking_general_information_handle
A handle to obtain details related to general event.
Definition: event_tracking_general_service.h:38
static int handle(int sql_errno, const char *sqlstate, const char *message, void *state)
Bridge function between the C++ API offered by this module and the C API of the parser service.
Definition: services.cc:64
#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
case opt name
Definition: sslopt-case.h:29