MySQL  8.0.19
Source Code Documentation
keyring_iterator_service_imp.h
Go to the documentation of this file.
1 /* Copyright (c) 2019, 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 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 */
mysql_keyring_iterator_imp
Definition: keyring_iterator_service_imp.h:34
keyring_iterator_service.h
mysql_keyring_iterator_imp::get
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:46
mysql_keyring_iterator_imp::deinit
static mysql_service_status_t deinit(my_h_keyring_iterator iterator) noexcept
Deinitialize an iterator.
Definition: keyring_iterator_service_imp.cc:40
my_h_keyring_iterator
struct my_h_keyring_iterator_imp * my_h_keyring_iterator
Definition: keyring_iterator_service.h:29
DEFINE_BOOL_METHOD
#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
mysql_keyring_iterator_imp::init
static mysql_service_status_t init(my_h_keyring_iterator *iterator) noexcept
Initialize an iterator.
Definition: keyring_iterator_service_imp.cc:35
service_implementation.h