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