diff options
author | Christian Grothoff <christian@grothoff.org> | 2010-04-24 13:08:05 +0000 |
---|---|---|
committer | Christian Grothoff <christian@grothoff.org> | 2010-04-24 13:08:05 +0000 |
commit | 32892c4aa7736eb8039f28d79b5cdb53cdc0061c (patch) | |
tree | 9729d165562c1780934a9a979dbc06d7f8470592 /src/include/gnunet_datastore_service.h | |
parent | bf6e480c1dda383bd55b311039d8d41189c5feea (diff) | |
download | gnunet-32892c4aa7736eb8039f28d79b5cdb53cdc0061c.tar.gz gnunet-32892c4aa7736eb8039f28d79b5cdb53cdc0061c.zip |
off-line hack fest
Diffstat (limited to 'src/include/gnunet_datastore_service.h')
-rw-r--r-- | src/include/gnunet_datastore_service.h | 44 |
1 files changed, 4 insertions, 40 deletions
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 |
37 | extern "C" | 38 | extern "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, | |||
264 | void | 228 | void |
265 | GNUNET_DATASTORE_get (struct GNUNET_DATASTORE_Handle *h, | 229 | GNUNET_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); |