- clean up gns rest api
[oweals/gnunet.git] / src / fs / gnunet-service-fs_pr.h
index 2a5fed29d447bba923f4da6224bef1739fd000f1..8a95c20f4523736f2eb19fb1e29b5fd904c6af6f 100644 (file)
@@ -1,6 +1,6 @@
 /*
      This file is part of GNUnet.
-     (C) 2009, 2010, 2011 Christian Grothoff (and other contributing authors)
+     Copyright (C) 2009, 2010, 2011 Christian Grothoff (and other contributing authors)
 
      GNUnet is free software; you can redistribute it and/or modify
      it under the terms of the GNU General Public License as published
@@ -87,14 +87,7 @@ struct GSF_PendingRequestData
   struct GNUNET_HashCode query;
 
   /**
-   * Namespace to query, only set if the type is SBLOCK.
-   * Allocated after struct only if needed. Do not free!
-   */
-  const struct GNUNET_HashCode *namespace;
-
-  /**
-   * Identity of a peer hosting the content, only set if
-   * 'has_target' is GNUNET_YES.
+   * Identity of a peer hosting the content, otherwise NULl.
    * Allocated after struct only if needed. Do not free!
    */
   const struct GNUNET_PeerIdentity *target;
@@ -102,12 +95,12 @@ struct GSF_PendingRequestData
   /**
    * Fields for the plan module to track a DLL with the request.
    */
-  struct GSF_RequestPlanReference *rpr_head;
+  struct GSF_PendingRequestPlanBijection *pr_head;
 
   /**
    * Fields for the plan module to track a DLL with the request.
    */
-  struct GSF_RequestPlanReference *rpr_tail;
+  struct GSF_PendingRequestPlanBijection *pr_tail;
 
   /**
    * Current TTL for the request.
@@ -213,7 +206,6 @@ typedef void (*GSF_PendingRequestReplyHandler) (void *cls,
  * @param options request options
  * @param type type of the block that is being requested
  * @param query key for the lookup
- * @param namespace namespace to lookup, NULL for no namespace
  * @param target preferred target for the request, NULL for none
  * @param bf_data raw data for bloom filter for known replies, can be NULL
  * @param bf_size number of bytes in bf_data
@@ -234,7 +226,6 @@ struct GSF_PendingRequest *
 GSF_pending_request_create_ (enum GSF_PendingRequestOptions options,
                              enum GNUNET_BLOCK_Type type,
                              const struct GNUNET_HashCode * query,
-                             const struct GNUNET_HashCode * namespace,
                              const struct GNUNET_PeerIdentity *target,
                              const char *bf_data, size_t bf_size,
                              uint32_t mingle, uint32_t anonymity_level,
@@ -359,6 +350,15 @@ void
 GSF_dht_lookup_ (struct GSF_PendingRequest *pr);
 
 
+/**
+ * Consider downloading via cadet (if possible)
+ *
+ * @param pr the pending request to process
+ */
+void
+GSF_cadet_lookup_ (struct GSF_PendingRequest *pr);
+
+
 /**
  * Function to be called after we're done processing
  * replies from the local lookup.