* @param lr the lookup request to cancel
*/
void
-GNUNET_GNS_cancel_lookup_request (struct GNUNET_GNS_LookupRequest *lr)
+GNUNET_GNS_lookup_cancel (struct GNUNET_GNS_LookupRequest *lr)
{
struct PendingMessage *p = (struct PendingMessage*) &lr[1];
/**
- * Perform an asynchronous Lookup operation on the GNS.
+ * Perform an asynchronous lookup operation on the GNS.
*
* @param handle handle to the GNS service
* @param name the name to look up
* @param zone the zone to start the resolution in
* @param type the record type to look up
- * @param only_cached GNUNET_YES to only check locally not DHT for performance
- * @param shorten_key the private key of the shorten zone (can be NULL)
+ * @param only_cached #GNUNET_YES to only check locally (not in the DHT)
+ * @param shorten_zone_key the private key of the shorten zone (can be NULL)
* @param proc processor to call on result
* @param proc_cls closure for processor
* @return handle to the get request
*/
struct GNUNET_GNS_LookupRequest*
-GNUNET_GNS_lookup_zone (struct GNUNET_GNS_Handle *handle,
- const char *name,
- struct GNUNET_CRYPTO_ShortHashCode *zone,
- int type,
- int only_cached,
- struct GNUNET_CRYPTO_EccPrivateKey *shorten_key,
- GNUNET_GNS_LookupResultProcessor proc,
- void *proc_cls)
+GNUNET_GNS_lookup (struct GNUNET_GNS_Handle *handle,
+ const char *name,
+ const struct GNUNET_CRYPTO_EccPublicKey *zone,
+ int type,
+ int only_cached,
+ const struct GNUNET_CRYPTO_EccPrivateKey *shorten_zone_key,
+ GNUNET_GNS_LookupResultProcessor proc,
+ void *proc_cls)
{
/* IPC to shorten gns names, return shorten_handle */
struct GNUNET_GNS_ClientLookupMessage *lookup_msg;
lookup_msg->header.size = htons (msize);
lookup_msg->id = htonl (lr->r_id);
lookup_msg->only_cached = htonl (only_cached);
- if (NULL != zone)
- {
- lookup_msg->have_zone = htonl (GNUNET_YES);
- lookup_msg->zone = *zone;
- }
+ lookup_msg->zone = *zone;
lookup_msg->type = htonl (type);
- if (NULL != shorten_key)
+ if (NULL != shorten_zone_key)
{
lookup_msg->have_key = htonl (GNUNET_YES);
- lookup_msg->shorten_key = *shorten_key;
+ lookup_msg->shorten_key = *shorten_zone_key;
}
memcpy (&lookup_msg[1], name, strlen (name) + 1);
GNUNET_CONTAINER_DLL_insert_tail (handle->pending_head,