- * @param cls the closure
- * @param rh the resolution handle
- * @param rd_count number of results
- * @param rd result data
- */
-typedef void (*ResolutionResultProcessor) (void *cls,
- struct ResolverHandle *rh,
- uint32_t rd_count,
- const struct GNUNET_NAMESTORE_RecordData *rd);
-
-
-/**
- * Resoltion status indicator
- * EXISTS: the name to lookup exists
- * EXPIRED: the name in the record expired
- */
-enum ResolutionStatus
-{
- EXISTS = 1,
- EXPIRED = 2
-};
-
-/**
- * Handle to a currenty pending resolution
- */
-struct ResolverHandle
-{
- /* The name to resolve */
- char name[MAX_DNS_NAME_LENGTH];
-
- /* has this query been answered? how many matches */
- int answered;
-
- /* the authoritative zone to query */
- struct GNUNET_CRYPTO_ShortHashCode authority;
-
- /* the name of the authoritative zone to query */
- char authority_name[MAX_DNS_LABEL_LENGTH];
-
- /**
- * we have an authority in namestore that
- * may be able to resolve
- */
- int authority_found;
-
- /* a handle for dht lookups. should be NULL if no lookups are in progress */
- struct GNUNET_DHT_GetHandle *get_handle;
-
- /* timeout set for this lookup task */
- struct GNUNET_TIME_Relative timeout;
-
- /* timeout task for the lookup */
- GNUNET_SCHEDULER_TaskIdentifier timeout_task;
-
- /* continuation to call on timeout */
- GNUNET_SCHEDULER_Task timeout_cont;
-
- /* closure for timeout cont */
- void* timeout_cont_cls;
-
- /* called when resolution phase finishes */
- ResolutionResultProcessor proc;
-
- /* closure passed to proc */
- void* proc_cls;
-
- /* DLL to store the authority chain */
- struct AuthorityChain *authority_chain_head;
-
- /* DLL to store the authority chain */
- struct AuthorityChain *authority_chain_tail;
-
- /* status of the resolution result */
- enum ResolutionStatus status;
-
- /**
- * private key of an/our authoritative zone
- * can be NULL but automatical PKEY import will not work
- */
- struct GNUNET_CRYPTO_RsaPrivateKey *priv_key;
-
- /**
- * the heap node associated with this lookup, null if timeout is set
- * used for DHT background lookups.
- */
- struct GNUNET_CONTAINER_HeapNode *dht_heap_node;
-
-};
-
-
-/**
- * Handle to a record lookup
- */
-struct RecordLookupHandle
-{
- /* the record type to look up */
- enum GNUNET_GNS_RecordType record_type;
-
- /* the name to look up */
- char name[MAX_DNS_NAME_LENGTH];
-
- /* Method to call on record resolution result */
- RecordLookupProcessor proc;
-
- /* closure to pass to proc */
- void* proc_cls;
-
-};
-
-
-/**
- * Handle to a shorten context