MySQL 8.3.0
Source Code Documentation
event_tracking_general_service.h
Go to the documentation of this file.
1/* Copyright (c) 2022, 2023, 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 MYSQL_COMPONENTS_SERVICES_EVENT_TRACKING_GENERAL_SERVICE_H
24#define MYSQL_COMPONENTS_SERVICES_EVENT_TRACKING_GENERAL_SERVICE_H
25
28
29/**
30 @file mysql/components/services/event_tracking_general_service.h
31 General event tracking.
32
33 @sa @ref EVENT_TRACKING_GENERAL_CONSUMER_EXAMPLE
34*/
35
36/** A handle to obtain details related to general event */
38
39/**
40 @ingroup event_tracking_services_inventory
41
42 @anchor EVENT_TRACKING_GENERAL_SERVICE
43
44 A service to track and consume general events.
45
46 Producer of the event will broadcast notify all interested
47 consumers of the event.
48
49 @sa @ref EVENT_TRACKING_GENERAL_CONSUMER_EXAMPLE
50*/
51
52BEGIN_SERVICE_DEFINITION(event_tracking_general)
53
54/**
55 Process a general event
56
57 @param [in] data Event specific data
58
59 @returns Status of processing the event
60 @retval false Success
61 @retval true Error
62*/
64
65END_SERVICE_DEFINITION(event_tracking_general)
66
67/**
68 @ingroup event_tracking_services_inventory
69
70 @anchor EVENT_TRACKING_GENERAL_INFORMATION
71
72 A service to fetch additional data about authentication event
73*/
74
75BEGIN_SERVICE_DEFINITION(event_tracking_general_information)
76
77/**
78 Initialize authentication event data handle
79
80 @param [out] handle Handle to authentication event data
81
82 @returns Status of handle creation
83 @retval false Success
84 @retval true Error
85*/
87
88/**
89 Deinitialize authentication event data handle
90
91 @param [in, out] handle Handle to be deinitialized
92
93 @returns Status of operation
94 @retval false Success
95 @retval true Error
96*/
98
99/**
100 Get information about given authentication event
101
102 Accepted names and corresponding value type
103
104 "external_user" -> mysql_cstring_with_length
105 "time" -> uint64_t
106 "rows" -> uint64_t
107
108 @param [in] handle Event tracking information handle
109 @param [in] name Data identifier
110 @param [out] value Value of the identifier
111
112 @returns status of the operation
113 @retval false Success
114 @retval true Error
115*/
117 const char *name, void *value));
118
119END_SERVICE_DEFINITION(event_tracking_general_information)
120
121#endif // !MYSQL_COMPONENTS_SERVICES_EVENT_TRACKING_GENERAL_SERVICE_H
static mysql_service_status_t deinit()
Component deinitialization.
Definition: audit_api_message_emit.cc:579
static mysql_service_status_t init()
Component initialization.
Definition: audit_api_message_emit.cc:570
Data for 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:37
void get(PSI_field *, PSI_longlong *) noexcept
Definition: pfs_plugin_column_bigint_v1_all_empty.cc:31
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:63
static bool notify(SvcTypes svc_type, Notification_context &ctx)
Auxiliary function to engage the service registry to notify a set of listeners.
Definition: notification.cc:86
#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 DEFINE_SERVICE_HANDLE(name)
Defines an object type that is meant for carrying handles to the implementation-specific objects used...
Definition: service.h:128
#define DECLARE_BOOL_METHOD(name, args)
Declares a method that returns bool as a part of the Service definition.
Definition: service.h:111
case opt name
Definition: sslopt-case.h:32
Structure for General event tracking.
Definition: event_tracking_general_defs.h:58