MySQL  8.0.17
Source Code Documentation
audit_api_message_service_imp.h
Go to the documentation of this file.
1 /* Copyright (c) 2018, Oracle and/or its affiliates. All rights reserved.
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 also distributed 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 included with MySQL.
13 
14 This program is distributed in the hope that it will be useful,
15 but WITHOUT ANY WARRANTY; without even the implied warranty of
16 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17 GNU General Public License, version 2.0, for more details.
18 
19 You should have received a copy of the GNU General Public License
20 along with this program; if not, write to the Free Software
21 Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */
22 
23 #ifndef AUDIT_API_IMP_H
24 #define AUDIT_API_IMP_H
25 
28 
29 /**
30  @class mysql_audit_api_imp
31 
32  Audit API service implementation.
33 */
35  public:
36  /**
37  Method that generates Audit API message event.
38 
39  @param type Message event type.
40  @param component Component name.
41  @param component_length Component name length.
42  @param producer Producer name.
43  @param producer_length Producer name length.
44  @param message Message.
45  @param message_length Message length.
46  @param key_value_map Key-value map pointer. The function does not
47  perform key values uniqueness.
48  @param key_value_map_length Key-value map length.
49 
50  @return This method always returns false. The service is using underlying
51  Audit API function that do not allow to distinguish, whether the
52  audit log plugin has been called or not.
53  */
54  static DEFINE_BOOL_METHOD(emit,
56  const char *component, size_t component_length,
57  const char *producer, size_t producer_length,
58  const char *message, size_t message_length,
59  mysql_event_message_key_value_t *key_value_map,
60  size_t key_value_map_length));
61 };
62 
63 #endif /* AUDIT_API_IMP_H */
Definition: audit_api_message_service_imp.h:34
#define DEFINE_BOOL_METHOD(name, args)
Definition: plugin_audit_message_types.h:65
mysql_event_message_subclass_t
Events for MYSQL_AUDIT_MESSAGE_CLASS event class.
Definition: plugin_audit_message_types.h:40
static mysql_service_status_t emit(mysql_event_message_subclass_t type, const char *component, size_t component_length, const char *producer, size_t producer_length, const char *message, size_t message_length, mysql_event_message_key_value_t *key_value_map, size_t key_value_map_length) noexcept
Method that generates Audit API message event.
Definition: audit_api_message_service_imp.cc:38
int type
Definition: http_common.h:411
Specifies macros to define Service Implementations.