helper exception callback lesser parameters
[oweals/gnunet.git] / src / include / gnunet_gns_service.h
index ffd0224c8262278b3fa73696fe6d0ef40427cd85..618d3c2c2787d3dc6b955fc6cb7d0de309df1d5c 100644 (file)
@@ -52,13 +52,19 @@ extern "C"
 struct GNUNET_GNS_Handle;
 
 /**
- * Handle to control a get operation.
+ * Handle to control a lookup operation.
  */
-struct GNUNET_GNS_LookupHandle;
+struct GNUNET_GNS_LookupRequest;
 
 /**
- * Handle to control a shorten operation
+ * Handle to control a shorten operation.
  */
+struct GNUNET_GNS_ShortenRequest;
+
+/**
+ * Handle to control a get authority operation
+ */
+struct GNUNET_GNS_GetAuthRequest;
 
 /**
  * Record types
@@ -161,7 +167,7 @@ typedef void (*GNUNET_GNS_LookupResultProcessor) (void *cls,
  *
  * @return handle to the queued request
  */
-struct GNUNET_GNS_QueueEntry *
+struct GNUNET_GNS_LookupRequest*
 GNUNET_GNS_lookup (struct GNUNET_GNS_Handle *handle,
                          const char * name,
                          enum GNUNET_GNS_RecordType type,
@@ -185,7 +191,7 @@ GNUNET_GNS_lookup (struct GNUNET_GNS_Handle *handle,
  *
  * @return handle to the queued request
  */
-struct GNUNET_GNS_QueueEntry *
+struct GNUNET_GNS_LookupRequest*
 GNUNET_GNS_lookup_zone (struct GNUNET_GNS_Handle *handle,
                          const char * name,
                          struct GNUNET_CRYPTO_ShortHashCode *zone,
@@ -195,6 +201,15 @@ GNUNET_GNS_lookup_zone (struct GNUNET_GNS_Handle *handle,
                          GNUNET_GNS_LookupResultProcessor proc,
                          void *proc_cls);
 
+
+/**
+ * Cancel pending lookup request
+ *
+ * @param lr the lookup request to cancel
+ */
+void
+GNUNET_GNS_cancel_lookup_request (struct GNUNET_GNS_LookupRequest *lr);
+
 /* *************** Standard API: shorten ******************* */
 
 
@@ -220,7 +235,7 @@ typedef void (*GNUNET_GNS_ShortenResultProcessor) (void *cls,
  * @param proc_cls closure for processor
  * @return handle to the operation
  */
-struct GNUNET_GNS_QueueEntry *
+struct GNUNET_GNS_ShortenRequest*
 GNUNET_GNS_shorten (struct GNUNET_GNS_Handle *handle,
                     const char * name,
                     struct GNUNET_CRYPTO_ShortHashCode *private_zone,
@@ -241,7 +256,7 @@ GNUNET_GNS_shorten (struct GNUNET_GNS_Handle *handle,
  * @param proc_cls closure for processor
  * @return handle to the operation
  */
-struct GNUNET_GNS_QueueEntry *
+struct GNUNET_GNS_ShortenRequest*
 GNUNET_GNS_shorten_zone (struct GNUNET_GNS_Handle *handle,
                          const char * name,
                          struct GNUNET_CRYPTO_ShortHashCode *private_zone,
@@ -250,6 +265,15 @@ GNUNET_GNS_shorten_zone (struct GNUNET_GNS_Handle *handle,
                          GNUNET_GNS_ShortenResultProcessor proc,
                          void *proc_cls);
 
+
+/**
+ * Cancel pending shorten request
+ *
+ * @param sr the lookup request to cancel
+ */
+void
+GNUNET_GNS_cancel_shorten_request (struct GNUNET_GNS_ShortenRequest *sr);
+
 /* *************** Standard API: get authority ******************* */
 
 
@@ -273,12 +297,21 @@ typedef void (*GNUNET_GNS_GetAuthResultProcessor) (void *cls,
  * @param proc_cls closure for processor
  * @return handle to the operation
  */
-struct GNUNET_GNS_QueueEntry *
+struct GNUNET_GNS_GetAuthRequest*
 GNUNET_GNS_get_authority (struct GNUNET_GNS_Handle *handle,
                     const char * name,
                     GNUNET_GNS_GetAuthResultProcessor proc,
                     void *proc_cls);
 
+
+/**
+ * Cancel pending get auth request
+ *
+ * @param gar the lookup request to cancel
+ */
+void
+GNUNET_GNS_cancel_get_auth_request (struct GNUNET_GNS_GetAuthRequest *gar);
+
 #if 0                           /* keep Emacsens' auto-indent happy */
 {
 #endif