GIF89a;
mysql_key_iterator_init(&iterator_ptr); if (iterator_ptr == NULL) report error; while (!(plugin_handle->mysql_key_iterator_get_key(iterator_ptr, key_id, user_id))) { Fetch the keys. Perform operations on the fetched keys. .. } plugin_handle->mysql_key_iterator_deinit(iterator_ptr); init() method accepts a void pointer which is the made to point to Keys_iterator instance. Keys_iterator instance internal pointer points to Key_metadata list. This list holds information about all keys stored in the backed end data store of keyring plugin. After call to init() please check iterator_ptr. get_key() method accepts the above iterator_ptr as IN param and then fills the passes in key_id and user_id with valid values. This can be used to fetch actual key information. Every call to this method will change internal pointers to advance to next position, so that the next call will fetch the next key. deinit() method frees all internal pointers along with iterator_ptr. */ /** Initialize an iterator. @param[out] key_iterator Iterator used to fetch individual keys from key_container. @return VOID */ void (*mysql_key_iterator_init)(void** key_iterator); /** Deinitialize an iterator. @param[in] key_iterator Iterator used to fetch individual keys from key_container. @return VOID */ void (*mysql_key_iterator_deinit)(void* key_iterator); /** Get details of key. Every call to this service will change internal pointers to advance to next position, so that the next call will fetch the next key. In case iterator moves to the end, this service will return error. @param[in] key_iterator Iterator used to fetch individual keys from key_container. @param[out] key_id id of the key @param[out] user_id id of the owner @return Operation status @retval 0 OK @retval 1 ERROR */ bool (*mysql_key_iterator_get_key)(void* key_iterator, char *key_id, char *user_id); }; #endif