struct returned by the initialization function of the plugin More...
#include <gnunet_namestore_plugin.h>
Data Fields | |
| void * | cls | 
| Closure to pass to all plugin functions.   | |
| enum GNUNET_GenericReturnValue(* | store_records )(void *cls, const struct GNUNET_CRYPTO_BlindablePrivateKey *zone, const char *label, unsigned int rd_count, const struct GNUNET_GNSRECORD_Data *rd) | 
| Store a record in the datastore for which we are the authority.   | |
| enum GNUNET_GenericReturnValue(* | lookup_records )(void *cls, const struct GNUNET_CRYPTO_BlindablePrivateKey *zone, const char *label, GNUNET_NAMESTORE_RecordIterator iter, void *iter_cls) | 
| Lookup records in the datastore for which we are the authority.   | |
| enum GNUNET_GenericReturnValue(* | iterate_records )(void *cls, const struct GNUNET_CRYPTO_BlindablePrivateKey *zone, uint64_t serial, uint64_t limit, GNUNET_NAMESTORE_RecordIterator iter, void *iter_cls) | 
| Iterate over the results for a particular zone in the datastore.   | |
| enum GNUNET_GenericReturnValue(* | zone_to_name )(void *cls, const struct GNUNET_CRYPTO_BlindablePrivateKey *zone, const struct GNUNET_CRYPTO_BlindablePublicKey *value_zone, GNUNET_NAMESTORE_RecordIterator iter, void *iter_cls) | 
| Look for an existing PKEY delegation record for a given public key.   | |
| enum GNUNET_GenericReturnValue(* | edit_records )(void *cls, const char *editor_hint, const struct GNUNET_CRYPTO_BlindablePrivateKey *zone, const char *label, GNUNET_NAMESTORE_RecordIterator iter, void *iter_cls) | 
| Transaction-based API draft.   | |
| enum GNUNET_GenericReturnValue(* | clear_editor_hint )(void *cls, const char *editor_hint, const char *editor_hint_replacement, const struct GNUNET_CRYPTO_BlindablePrivateKey *zone, const char *label) | 
| This clears the editor hint, unless it does not match the given editor hint, in which case this is a NOP.   | |
| enum GNUNET_GenericReturnValue(* | begin_tx )(void *cls) | 
| Tell plugin that a set of procedures are coming that are ideally handled within a single TX (BEGIN/COMMIT).   | |
| enum GNUNET_GenericReturnValue(* | commit_tx )(void *cls) | 
| Tell plugin the we finished what we started with begin_tx.   | |
| enum GNUNET_GenericReturnValue(* | rollback_tx )(void *cls) | 
| Tell plugin to rollback what we started with begin_tx This may be a NOP (and thus NOT roll anything back!)   | |
| enum GNUNET_GenericReturnValue(* | create_tables )(void *cls) | 
| Setup the database.   | |
| enum GNUNET_GenericReturnValue(* | drop_tables )(void *cls) | 
| Drop existing tables.   | |
struct returned by the initialization function of the plugin
Definition at line 77 of file gnunet_namestore_plugin.h.
| void* GNUNET_NAMESTORE_PluginFunctions::cls | 
Closure to pass to all plugin functions.
Definition at line 82 of file gnunet_namestore_plugin.h.
Referenced by get_nick_record(), libgnunet_plugin_namestore_flat_done(), libgnunet_plugin_namestore_flat_init(), libgnunet_plugin_namestore_postgres_done(), libgnunet_plugin_namestore_postgres_init(), libgnunet_plugin_namestore_sqlite_done(), libgnunet_plugin_namestore_sqlite_init(), and run().
| enum GNUNET_GenericReturnValue(* GNUNET_NAMESTORE_PluginFunctions::store_records) (void *cls, const struct GNUNET_CRYPTO_BlindablePrivateKey *zone, const char *label, unsigned int rd_count, const struct GNUNET_GNSRECORD_Data *rd) | 
Store a record in the datastore for which we are the authority.
Removes any existing record in the same zone with the same name.
| cls | closure (internal context for the plugin) | 
| zone | private key of the zone | 
| label | name of the record in the zone | 
| rd_count | number of entries in rd array, 0 to delete all records | 
| rd | array of records with data to store | 
Definition at line 82 of file gnunet_namestore_plugin.h.
Referenced by libgnunet_plugin_namestore_flat_init(), libgnunet_plugin_namestore_postgres_init(), and libgnunet_plugin_namestore_sqlite_init().
| enum GNUNET_GenericReturnValue(* GNUNET_NAMESTORE_PluginFunctions::lookup_records) (void *cls, const struct GNUNET_CRYPTO_BlindablePrivateKey *zone, const char *label, GNUNET_NAMESTORE_RecordIterator iter, void *iter_cls) | 
Lookup records in the datastore for which we are the authority.
| cls | closure (internal context for the plugin) | 
| zone | private key of the zone | 
| label | name of the record in the zone | 
| iter | function to call with the result | 
| iter_cls | closure for iter | 
Definition at line 82 of file gnunet_namestore_plugin.h.
Referenced by get_nick_record(), libgnunet_plugin_namestore_flat_init(), libgnunet_plugin_namestore_postgres_init(), and libgnunet_plugin_namestore_sqlite_init().
| enum GNUNET_GenericReturnValue(* GNUNET_NAMESTORE_PluginFunctions::iterate_records) (void *cls, const struct GNUNET_CRYPTO_BlindablePrivateKey *zone, uint64_t serial, uint64_t limit, GNUNET_NAMESTORE_RecordIterator iter, void *iter_cls) | 
Iterate over the results for a particular zone in the datastore.
Will return at most limit results to the iterator.
| cls | closure (internal context for the plugin) | 
| zone | private key of the zone, NULL for all zones | 
| serial | serial (to exclude) in the list of matching records; 0 means to exclude nothing; results must be returned using the minimum possible sequence number first (ordered by serial) | 
| limit | maximum number of results to return to iter | 
| iter | function to call with the result | 
| iter_cls | closure for iter | 
Definition at line 82 of file gnunet_namestore_plugin.h.
Referenced by libgnunet_plugin_namestore_flat_init(), libgnunet_plugin_namestore_postgres_init(), and libgnunet_plugin_namestore_sqlite_init().
| enum GNUNET_GenericReturnValue(* GNUNET_NAMESTORE_PluginFunctions::zone_to_name) (void *cls, const struct GNUNET_CRYPTO_BlindablePrivateKey *zone, const struct GNUNET_CRYPTO_BlindablePublicKey *value_zone, GNUNET_NAMESTORE_RecordIterator iter, void *iter_cls) | 
Look for an existing PKEY delegation record for a given public key.
Returns at most one result to the iterator.
| cls | closure (internal context for the plugin) | 
| zone | private key of the zone to look up in, never NULL | 
| value_zone | public key of the target zone (value), never NULL | 
| iter | function to call with the result | 
| iter_cls | closure for iter | 
Definition at line 82 of file gnunet_namestore_plugin.h.
Referenced by libgnunet_plugin_namestore_flat_init(), libgnunet_plugin_namestore_postgres_init(), and libgnunet_plugin_namestore_sqlite_init().
| enum GNUNET_GenericReturnValue(* GNUNET_NAMESTORE_PluginFunctions::edit_records) (void *cls, const char *editor_hint, const struct GNUNET_CRYPTO_BlindablePrivateKey *zone, const char *label, GNUNET_NAMESTORE_RecordIterator iter, void *iter_cls) | 
Transaction-based API draft.
Edit records in the namestore. This modifies the editor hint, an advisory lock entry. The record iterator will be called with the old editor hint (if any).
| cls | closure (internal context for the plugin) | 
| zone | private key of the zone | 
| editor_hint | the new value for the advisory lock field | 
| label | name of the record in the zone | 
| iter | function to call with the result | 
| iter_cls | closure for iter | 
Definition at line 82 of file gnunet_namestore_plugin.h.
Referenced by libgnunet_plugin_namestore_postgres_init(), and libgnunet_plugin_namestore_sqlite_init().
| enum GNUNET_GenericReturnValue(* GNUNET_NAMESTORE_PluginFunctions::clear_editor_hint) (void *cls, const char *editor_hint, const char *editor_hint_replacement, const struct GNUNET_CRYPTO_BlindablePrivateKey *zone, const char *label) | 
This clears the editor hint, unless it does not match the given editor hint, in which case this is a NOP.
If a replacement hint is given, it hint is not cleared, but set to the replacement.
| cls | closure (internal context for the plugin) | 
| zone | private key of the zone | 
| editor_hint | the new value for the advisory lock field | 
| editor_hint_replacement | an optional value to use instead of a clear | 
| label | name of the record in the zone | 
| iter | function to call with the result | 
| iter_cls | closure for iter | 
Definition at line 82 of file gnunet_namestore_plugin.h.
Referenced by libgnunet_plugin_namestore_postgres_init(), and libgnunet_plugin_namestore_sqlite_init().
| enum GNUNET_GenericReturnValue(* GNUNET_NAMESTORE_PluginFunctions::begin_tx) (void *cls) | 
Tell plugin that a set of procedures are coming that are ideally handled within a single TX (BEGIN/COMMIT).
This may be implemented as a NOP, but can speed up store calls in some cases (e.g. SQL databases)
| cls | closure (internal context for the plugin) | 
Definition at line 82 of file gnunet_namestore_plugin.h.
Referenced by libgnunet_plugin_namestore_postgres_init(), and libgnunet_plugin_namestore_sqlite_init().
| enum GNUNET_GenericReturnValue(* GNUNET_NAMESTORE_PluginFunctions::commit_tx) (void *cls) | 
Tell plugin the we finished what we started with begin_tx.
| cls | closure (internal context for the plugin) | 
Definition at line 82 of file gnunet_namestore_plugin.h.
Referenced by libgnunet_plugin_namestore_postgres_init(), and libgnunet_plugin_namestore_sqlite_init().
| enum GNUNET_GenericReturnValue(* GNUNET_NAMESTORE_PluginFunctions::rollback_tx) (void *cls) | 
Tell plugin to rollback what we started with begin_tx This may be a NOP (and thus NOT roll anything back!)
| cls | closure (internal context for the plugin) | 
Definition at line 82 of file gnunet_namestore_plugin.h.
Referenced by libgnunet_plugin_namestore_postgres_init(), and libgnunet_plugin_namestore_sqlite_init().
| enum GNUNET_GenericReturnValue(* GNUNET_NAMESTORE_PluginFunctions::create_tables) (void *cls) | 
Setup the database.
| cls | closure (internal context for the plugin) | 
Definition at line 82 of file gnunet_namestore_plugin.h.
Referenced by libgnunet_plugin_namestore_postgres_init(), and libgnunet_plugin_namestore_sqlite_init().
| enum GNUNET_GenericReturnValue(* GNUNET_NAMESTORE_PluginFunctions::drop_tables) (void *cls) | 
Drop existing tables.
DANGEROUS: All existing data in the database will be lost!
| cls | closure (internal context for the plugin) | 
Definition at line 82 of file gnunet_namestore_plugin.h.
Referenced by libgnunet_plugin_namestore_postgres_init(), and libgnunet_plugin_namestore_sqlite_init().