aboutsummaryrefslogtreecommitdiff
path: root/src/fs/gnunet-service-fs_indexing.h
diff options
context:
space:
mode:
authorChristian Grothoff <christian@grothoff.org>2010-01-26 09:53:40 +0000
committerChristian Grothoff <christian@grothoff.org>2010-01-26 09:53:40 +0000
commit68907af3eb39fb03936a226f340d469af10d5014 (patch)
treee6365ebb6acb6539e0d8abce0cce4ebe275bbed1 /src/fs/gnunet-service-fs_indexing.h
parenta92360c7ed9fe3e5550a2e4c7832ad9224ee1779 (diff)
downloadgnunet-68907af3eb39fb03936a226f340d469af10d5014.tar.gz
gnunet-68907af3eb39fb03936a226f340d469af10d5014.zip
moving indexing out of main file
Diffstat (limited to 'src/fs/gnunet-service-fs_indexing.h')
-rw-r--r--src/fs/gnunet-service-fs_indexing.h121
1 files changed, 121 insertions, 0 deletions
diff --git a/src/fs/gnunet-service-fs_indexing.h b/src/fs/gnunet-service-fs_indexing.h
new file mode 100644
index 000000000..dc6427234
--- /dev/null
+++ b/src/fs/gnunet-service-fs_indexing.h
@@ -0,0 +1,121 @@
1/*
2 This file is part of GNUnet.
3 (C) 2009, 2010 Christian Grothoff (and other contributing authors)
4
5 GNUnet is free software; you can redistribute it and/or modify
6 it under the terms of the GNU General Public License as published
7 by the Free Software Foundation; either version 2, or (at your
8 option) any later version.
9
10 GNUnet is distributed in the hope that it will be useful, but
11 WITHOUT ANY WARRANTY; without even the implied warranty of
12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13 General Public License for more details.
14
15 You should have received a copy of the GNU General Public License
16 along with GNUnet; see the file COPYING. If not, write to the
17 Free Software Foundation, Inc., 59 Temple Place - Suite 330,
18 Boston, MA 02111-1307, USA.
19*/
20
21/**
22 * @file fs/gnunet-service-fs_indexing.h
23 * @brief indexing for the file-sharing service
24 * @author Christian Grothoff
25 */
26#ifndef GNUNET_SERVICE_FS_INDEXING_H
27#define GNUNET_SERVICE_FS_INDEXING_H
28
29#include "gnunet_core_service.h"
30#include "gnunet_datastore_service.h"
31#include "gnunet_peer_lib.h"
32#include "gnunet_protocols.h"
33#include "gnunet_signatures.h"
34#include "gnunet_util_lib.h"
35
36
37/**
38 * We've received an on-demand encoded block from the datastore.
39 * Attempt to do on-demand encoding and (if successful), call the
40 * continuation with the resulting block. On error, clean up and ask
41 * the datastore for more results.
42 *
43 * @param key key for the content
44 * @param size number of bytes in data
45 * @param data content stored
46 * @param type type of the content
47 * @param priority priority of the content
48 * @param anonymity anonymity-level for the content
49 * @param expiration expiration time for the content
50 * @param uid unique identifier for the datum;
51 * maybe 0 if no unique identifier is available
52 * @param dsh connection to the datastore (to ask for more)
53 * @param cont function to call with the actual block
54 * @param cont_cls closure for cont
55 */
56void
57GNUNET_FS_handle_on_demand_block (const GNUNET_HashCode * key,
58 uint32_t size,
59 const void *data,
60 uint32_t type,
61 uint32_t priority,
62 uint32_t anonymity,
63 struct GNUNET_TIME_Absolute
64 expiration, uint64_t uid,
65 struct GNUNET_DATASTORE_Handle *dsh,
66 GNUNET_DATASTORE_Iterator cont,
67 void *cont_cls);
68
69/**
70 * Handle INDEX_START-message.
71 *
72 * @param cls closure
73 * @param client identification of the client
74 * @param message the actual message
75 */
76void
77GNUNET_FS_handle_index_start (void *cls,
78 struct GNUNET_SERVER_Client *client,
79 const struct GNUNET_MessageHeader *message);
80
81
82/**
83 * Handle INDEX_LIST_GET-message.
84 *
85 * @param cls closure
86 * @param client identification of the client
87 * @param message the actual message
88 */
89void
90GNUNET_FS_handle_index_list_get (void *cls,
91 struct GNUNET_SERVER_Client *client,
92 const struct GNUNET_MessageHeader *message);
93
94
95/**
96 * Handle UNINDEX-message.
97 *
98 * @param cls closure
99 * @param client identification of the client
100 * @param message the actual message
101 */
102void
103GNUNET_FS_handle_unindex (void *cls,
104 struct GNUNET_SERVER_Client *client,
105 const struct GNUNET_MessageHeader *message);
106
107
108
109
110/**
111 * Initialize the indexing submodule.
112 *
113 * @param s scheduler to use
114 * @param c configuration to use
115 */
116void
117GNUNET_FS_init_indexing (struct GNUNET_SCHEDULER_Handle *s,
118 const struct GNUNET_CONFIGURATION_Handle *c);
119
120
121#endif