aboutsummaryrefslogtreecommitdiff
path: root/src/include
diff options
context:
space:
mode:
authorChristian Grothoff <christian@grothoff.org>2010-04-24 13:08:05 +0000
committerChristian Grothoff <christian@grothoff.org>2010-04-24 13:08:05 +0000
commit32892c4aa7736eb8039f28d79b5cdb53cdc0061c (patch)
tree9729d165562c1780934a9a979dbc06d7f8470592 /src/include
parentbf6e480c1dda383bd55b311039d8d41189c5feea (diff)
downloadgnunet-32892c4aa7736eb8039f28d79b5cdb53cdc0061c.tar.gz
gnunet-32892c4aa7736eb8039f28d79b5cdb53cdc0061c.zip
off-line hack fest
Diffstat (limited to 'src/include')
-rw-r--r--src/include/gnunet_datacache_lib.h7
-rw-r--r--src/include/gnunet_datastore_service.h44
-rw-r--r--src/include/gnunet_dht_service.h2
3 files changed, 9 insertions, 44 deletions
diff --git a/src/include/gnunet_datacache_lib.h b/src/include/gnunet_datacache_lib.h
index 3bd76df32..e0866416d 100644
--- a/src/include/gnunet_datacache_lib.h
+++ b/src/include/gnunet_datacache_lib.h
@@ -32,6 +32,7 @@
32#define GNUNET_DATACACHE_LIB_H 32#define GNUNET_DATACACHE_LIB_H
33 33
34#include "gnunet_util_lib.h" 34#include "gnunet_util_lib.h"
35#include "gnunet_block_lib.h"
35 36
36#ifdef __cplusplus 37#ifdef __cplusplus
37extern "C" 38extern "C"
@@ -86,7 +87,7 @@ typedef int (*GNUNET_DATACACHE_Iterator) (void *cls,
86 const GNUNET_HashCode * key, 87 const GNUNET_HashCode * key,
87 uint32_t size, 88 uint32_t size,
88 const char *data, 89 const char *data,
89 uint32_t type); 90 enum GNUNET_BLOCK_Type type);
90 91
91 92
92/** 93/**
@@ -105,7 +106,7 @@ GNUNET_DATACACHE_put (struct GNUNET_DATACACHE_Handle *h,
105 const GNUNET_HashCode * key, 106 const GNUNET_HashCode * key,
106 uint32_t size, 107 uint32_t size,
107 const char *data, 108 const char *data,
108 unsigned int type, 109 enum GNUNET_BLOCK_Type type,
109 struct GNUNET_TIME_Absolute discard_time); 110 struct GNUNET_TIME_Absolute discard_time);
110 111
111 112
@@ -123,7 +124,7 @@ GNUNET_DATACACHE_put (struct GNUNET_DATACACHE_Handle *h,
123unsigned int 124unsigned int
124GNUNET_DATACACHE_get (struct GNUNET_DATACACHE_Handle *h, 125GNUNET_DATACACHE_get (struct GNUNET_DATACACHE_Handle *h,
125 const GNUNET_HashCode * key, 126 const GNUNET_HashCode * key,
126 unsigned int type, 127 enum GNUNET_BLOCK_Type type,
127 GNUNET_DATACACHE_Iterator iter, 128 GNUNET_DATACACHE_Iterator iter,
128 void *iter_cls); 129 void *iter_cls);
129 130
diff --git a/src/include/gnunet_datastore_service.h b/src/include/gnunet_datastore_service.h
index 2bf0f8f34..bf18860a6 100644
--- a/src/include/gnunet_datastore_service.h
+++ b/src/include/gnunet_datastore_service.h
@@ -32,6 +32,7 @@
32#define GNUNET_DATASTORE_SERVICE_H 32#define GNUNET_DATASTORE_SERVICE_H
33 33
34#include "gnunet_util_lib.h" 34#include "gnunet_util_lib.h"
35#include "gnunet_block_lib.h"
35 36
36#ifdef __cplusplus 37#ifdef __cplusplus
37extern "C" 38extern "C"
@@ -41,43 +42,6 @@ extern "C"
41#endif 42#endif
42#endif 43#endif
43 44
44/**
45 * Any type of block, used as a wildcard when searching. Should
46 * never be attached to a specific block.
47 */
48#define GNUNET_DATASTORE_BLOCKTYPE_ANY 0
49
50/**
51 * Data block (leaf) in the CHK tree.
52 */
53#define GNUNET_DATASTORE_BLOCKTYPE_DBLOCK 1
54
55/**
56 * Inner block in the CHK tree.
57 */
58#define GNUNET_DATASTORE_BLOCKTYPE_IBLOCK 2
59
60/**
61 * Type of a block representing a keyword search result.
62 */
63#define GNUNET_DATASTORE_BLOCKTYPE_KBLOCK 3
64
65/**
66 * Type of a block that is used to advertise content in a namespace.
67 */
68#define GNUNET_DATASTORE_BLOCKTYPE_SBLOCK 4
69
70/**
71 * Type of a block representing a block to be encoded on demand from disk.
72 * Should never appear on the network directly.
73 */
74#define GNUNET_DATASTORE_BLOCKTYPE_ONDEMAND 5
75
76/**
77 * Type of a block that is used to advertise a namespace.
78 */
79#define GNUNET_DATASTORE_BLOCKTYPE_NBLOCK 6
80
81 45
82/** 46/**
83 * Handle to the datastore service. 47 * Handle to the datastore service.
@@ -171,7 +135,7 @@ GNUNET_DATASTORE_put (struct GNUNET_DATASTORE_Handle *h,
171 const GNUNET_HashCode * key, 135 const GNUNET_HashCode * key,
172 uint32_t size, 136 uint32_t size,
173 const void *data, 137 const void *data,
174 uint32_t type, 138 enum GNUNET_BLOCK_Type type,
175 uint32_t priority, 139 uint32_t priority,
176 uint32_t anonymity, 140 uint32_t anonymity,
177 struct GNUNET_TIME_Absolute expiration, 141 struct GNUNET_TIME_Absolute expiration,
@@ -239,7 +203,7 @@ typedef void (*GNUNET_DATASTORE_Iterator) (void *cls,
239 const GNUNET_HashCode * key, 203 const GNUNET_HashCode * key,
240 uint32_t size, 204 uint32_t size,
241 const void *data, 205 const void *data,
242 uint32_t type, 206 enum GNUNET_BLOCK_Type type,
243 uint32_t priority, 207 uint32_t priority,
244 uint32_t anonymity, 208 uint32_t anonymity,
245 struct GNUNET_TIME_Absolute 209 struct GNUNET_TIME_Absolute
@@ -264,7 +228,7 @@ typedef void (*GNUNET_DATASTORE_Iterator) (void *cls,
264void 228void
265GNUNET_DATASTORE_get (struct GNUNET_DATASTORE_Handle *h, 229GNUNET_DATASTORE_get (struct GNUNET_DATASTORE_Handle *h,
266 const GNUNET_HashCode * key, 230 const GNUNET_HashCode * key,
267 uint32_t type, 231 enum GNUNET_BLOCK_Type type,
268 GNUNET_DATASTORE_Iterator iter, 232 GNUNET_DATASTORE_Iterator iter,
269 void *iter_cls, 233 void *iter_cls,
270 struct GNUNET_TIME_Relative timeout); 234 struct GNUNET_TIME_Relative timeout);
diff --git a/src/include/gnunet_dht_service.h b/src/include/gnunet_dht_service.h
index d14606d70..dcbe3dc98 100644
--- a/src/include/gnunet_dht_service.h
+++ b/src/include/gnunet_dht_service.h
@@ -147,7 +147,7 @@ typedef void (*GNUNET_DHT_GetIterator)(void *cls,
147 * @param handle handle to the DHT service 147 * @param handle handle to the DHT service
148 * @param timeout timeout for this request to be sent to the 148 * @param timeout timeout for this request to be sent to the
149 * service (this is NOT a timeout for receiving responses) 149 * service (this is NOT a timeout for receiving responses)
150 * @param type expected type of the response object (GNUNET_DATASTORE_BLOCKTYPE_*) 150 * @param type expected type of the response object (GNUNET_BLOCK_TYPE_*)
151 * @param key the key to look up 151 * @param key the key to look up
152 * @param iter function to call on each result 152 * @param iter function to call on each result
153 * @param iter_cls closure for iter 153 * @param iter_cls closure for iter