* @param uri specifies the search parameters; can be
* a KSK URI or an SKS URI.
* @param anonymity desired level of anonymity
+ * @param cctx client context
* @param parent parent search (for namespace update searches)
* @return context that can be used to control the search
*/
search_start (struct GNUNET_FS_Handle *h,
const struct GNUNET_FS_Uri *uri,
uint32_t anonymity,
+ void *cctx,
struct GNUNET_FS_SearchContext *parent);
search_start (sc->h,
&uu,
sc->anonymity,
+ NULL,
sc);
}
* @param uri specifies the search parameters; can be
* a KSK URI or an SKS URI.
* @param anonymity desired level of anonymity
+ * @param cctx initial value for the client context
* @param parent parent search (for namespace update searches)
* @return context that can be used to control the search
*/
search_start (struct GNUNET_FS_Handle *h,
const struct GNUNET_FS_Uri *uri,
uint32_t anonymity,
+ void *cctx,
struct GNUNET_FS_SearchContext *parent)
{
struct GNUNET_FS_SearchContext *sc;
sc->client = client;
sc->parent = parent;
sc->master_result_map = GNUNET_CONTAINER_multihashmap_create (16);
+ sc->client_info = cctx;
sc->requests = GNUNET_malloc (sizeof (struct SearchRequestEntry) *
sc->uri->data.ksk.keywordCount);
* @param uri specifies the search parameters; can be
* a KSK URI or an SKS URI.
* @param anonymity desired level of anonymity
+ * @param cctx initial value for the client context
* @return context that can be used to control the search
*/
struct GNUNET_FS_SearchContext *
GNUNET_FS_search_start (struct GNUNET_FS_Handle *h,
const struct GNUNET_FS_Uri *uri,
- uint32_t anonymity)
+ uint32_t anonymity,
+ void *cctx)
{
- return search_start (h, uri, anonymity, NULL);
+ return search_start (h, uri, anonymity, cctx, NULL);
}
start = GNUNET_TIME_absolute_get ();
search = GNUNET_FS_search_start (fs,
kuri,
- 1);
+ 1,
+ "search");
GNUNET_FS_uri_destroy (kuri);
GNUNET_assert (search != NULL);
break;
break;
case GNUNET_FS_STATUS_SEARCH_START:
GNUNET_assert (search == NULL);
- // GNUNET_assert (0 == strcmp ("search", event->value.search.cctx));
+ GNUNET_assert (0 == strcmp ("search", event->value.search.cctx));
GNUNET_assert (1 == event->value.search.anonymity);
break;
case GNUNET_FS_STATUS_SEARCH_RESULT_STOPPED:
* @param uri specifies the search parameters; can be
* a KSK URI or an SKS URI.
* @param anonymity desired level of anonymity
+ * @param cctx initial value for the client context
* @return context that can be used to control the search
*/
-// FIXME: add a "void *" context for the client to arguments!?
struct GNUNET_FS_SearchContext *
GNUNET_FS_search_start (struct GNUNET_FS_Handle *h,
const struct GNUNET_FS_Uri *uri,
- uint32_t anonymity);
+ uint32_t anonymity,
+ void *cctx);
/**