MySQL 9.1.0
Source Code Documentation
keyring_iterator_service_imp.h
Go to the documentation of this file.
1/* Copyright (c) 2020, 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 KEYRING_ITERATOR_IMP_H
25#define KEYRING_ITERATOR_IMP_H
26
29
30/**
31 @class mysql_keyring_iterator_imp
32
33 Keyring iterator component service implementation.
34*/
36 public:
37 /**
38 Initialize an iterator.
39
40 @param[out] iterator Iterator pointer.
41
42 @return
43 @retval false Succeeded.
44 @retval true Failed.
45
46 @sa plugin_keyring.h
47 */
48 static DEFINE_BOOL_METHOD(init, (my_h_keyring_iterator * iterator));
49
50 /**
51 Deinitialize an iterator.
52
53 @param iterator Iterator pointer.
54
55 @return
56 @retval false Succeeded.
57 @retval true Failed.
58
59 @sa plugin_keyring.h
60 */
62
63 /**
64 Fetch key info stored under key iterator and move it forward.
65
66 @param iterator Iterator pointer.
67 @param[out] key_id The buffer pointer for storing key id.
68 @param key_id_size key_id buffer size. Value must not be less than 64
69 bytes.
70 @param[out] user_id The buffer pointer for storing user id.
71 @param user_id_size user_id buffer size. Value must not be less than 64
72 bytes.
73
74 @return
75 @retval false Succeeded.
76 @retval true Failed.
77
78 @sa plugin_keyring.h
79 */
80 static DEFINE_BOOL_METHOD(get, (my_h_keyring_iterator iterator, char *key_id,
81 size_t key_id_size, char *user_id,
82 size_t user_id_size));
83};
84
85#endif /* KEYRING_ITERATOR_IMP_H */
Keyring iterator component service implementation.
Definition: keyring_iterator_service_imp.h:35
static mysql_service_status_t get(my_h_keyring_iterator iterator, char *key_id, size_t key_id_size, char *user_id, size_t user_id_size) noexcept
Fetch key info stored under key iterator and move it forward.
Definition: keyring_iterator_service_imp.cc:44
static mysql_service_status_t deinit(my_h_keyring_iterator iterator) noexcept
Deinitialize an iterator.
Definition: keyring_iterator_service_imp.cc:38
static mysql_service_status_t init(my_h_keyring_iterator *iterator) noexcept
Initialize an iterator.
Definition: keyring_iterator_service_imp.cc:33
struct my_h_keyring_iterator_imp * my_h_keyring_iterator
Definition: keyring_iterator_service.h:30
Specifies macros to define Service Implementations.
#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