MySQL 9.1.0
Source Code Documentation
s_mysql_mysql_keyring_iterator Struct Reference

Keyring iterator component service definition, which enables to iterate over items stored within currently used keyring. More...

#include <keyring_iterator_service.h>

Public Attributes

mysql_service_status_t(* init )(my_h_keyring_iterator *iterator)
 Initialize an iterator. More...
 
mysql_service_status_t(* deinit )(my_h_keyring_iterator iterator)
 Deinitialize an iterator. More...
 
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)
 Fetch key info stored under key iterator and move it forward. More...
 

Detailed Description

Keyring iterator component service definition, which enables to iterate over items stored within currently used keyring.

my_service<SERVICE_TYPE(mysql_keyring_iterator)> service(
"mysql_keyring_iterator.mysql_server", m_reg_srv);
if (!service.is_valid()) {
return;
}
my_h_keyring_iterator iterator = nullptr;
if (service->init(&iterator)) {
return;
}
char key_id[64];
char user_id[64];
while (iterator != nullptr && service->get(iterator, key_id, sizeof(key_id)
user_id, sizeof(user_id))
== 0) {
// Do something with key and user_id values.
}
service->deinit(iterator);
Wraps my_h_service struct conforming ABI into RAII C++ object with ability to cast to desired service...
Definition: my_service.h:35
struct my_h_keyring_iterator_imp * my_h_keyring_iterator
Definition: keyring_iterator_service.h:30
#define SERVICE_TYPE(name)
Generates the standard Service type name.
Definition: service.h:76

Member Data Documentation

◆ deinit

mysql_service_status_t(* s_mysql_mysql_keyring_iterator::deinit) (my_h_keyring_iterator iterator)

Deinitialize an iterator.

Parameters
iteratorIterator pointer.
Returns
Return values
falseSucceeded.
trueFailed.
See also
plugin_keyring.h

◆ get

mysql_service_status_t(* s_mysql_mysql_keyring_iterator::get) (my_h_keyring_iterator iterator, char *key_id, size_t key_id_size, char *user_id, size_t user_id_size)

Fetch key info stored under key iterator and move it forward.

Parameters
iteratorIterator pointer.
[out]key_idThe buffer pointer for storing key id.
key_id_sizeSize of the key_id buffer.
[out]user_idThe buffer pointer for storing user id. In case of lack of user id, empty string is returned.
user_id_sizeSize of the user_id buffer.
Returns
Return values
falseSucceeded.
trueFailed.
See also
plugin_keyring.h

◆ init

mysql_service_status_t(* s_mysql_mysql_keyring_iterator::init) (my_h_keyring_iterator *iterator)

Initialize an iterator.

Parameters
[out]iteratorIterator pointer.
Returns
Return values
falseSucceeded.
trueFailed.
See also
plugin_keyring.h

The documentation for this struct was generated from the following file: