aboutsummaryrefslogtreecommitdiff
path: root/src/include/gnunet_datacache_lib.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/include/gnunet_datacache_lib.h')
-rw-r--r--src/include/gnunet_datacache_lib.h38
1 files changed, 19 insertions, 19 deletions
diff --git a/src/include/gnunet_datacache_lib.h b/src/include/gnunet_datacache_lib.h
index 5fcd99ad4..a1712b809 100644
--- a/src/include/gnunet_datacache_lib.h
+++ b/src/include/gnunet_datacache_lib.h
@@ -56,9 +56,10 @@ struct GNUNET_DATACACHE_Handle;
56 * @param section section in the configuration that contains our options 56 * @param section section in the configuration that contains our options
57 * @return handle to use to access the service 57 * @return handle to use to access the service
58 */ 58 */
59struct GNUNET_DATACACHE_Handle * 59struct GNUNET_DATACACHE_Handle *GNUNET_DATACACHE_create (const struct
60GNUNET_DATACACHE_create (const struct GNUNET_CONFIGURATION_Handle *cfg, 60 GNUNET_CONFIGURATION_Handle
61 const char *section); 61 *cfg,
62 const char *section);
62 63
63 64
64/** 65/**
@@ -81,11 +82,11 @@ void GNUNET_DATACACHE_destroy (struct GNUNET_DATACACHE_Handle *h);
81 * @return GNUNET_OK to continue iterating, GNUNET_SYSERR to abort 82 * @return GNUNET_OK to continue iterating, GNUNET_SYSERR to abort
82 */ 83 */
83typedef int (*GNUNET_DATACACHE_Iterator) (void *cls, 84typedef int (*GNUNET_DATACACHE_Iterator) (void *cls,
84 struct GNUNET_TIME_Absolute exp, 85 struct GNUNET_TIME_Absolute exp,
85 const GNUNET_HashCode * key, 86 const GNUNET_HashCode * key,
86 size_t size, 87 size_t size,
87 const char *data, 88 const char *data,
88 enum GNUNET_BLOCK_Type type); 89 enum GNUNET_BLOCK_Type type);
89 90
90 91
91/** 92/**
@@ -99,13 +100,13 @@ typedef int (*GNUNET_DATACACHE_Iterator) (void *cls,
99 * @param discard_time when to discard the value in any case 100 * @param discard_time when to discard the value in any case
100 * @return GNUNET_OK on success, GNUNET_SYSERR on error (full, etc.) 101 * @return GNUNET_OK on success, GNUNET_SYSERR on error (full, etc.)
101 */ 102 */
102int 103int
103GNUNET_DATACACHE_put (struct GNUNET_DATACACHE_Handle *h, 104GNUNET_DATACACHE_put (struct GNUNET_DATACACHE_Handle *h,
104 const GNUNET_HashCode * key, 105 const GNUNET_HashCode * key,
105 size_t size, 106 size_t size,
106 const char *data, 107 const char *data,
107 enum GNUNET_BLOCK_Type type, 108 enum GNUNET_BLOCK_Type type,
108 struct GNUNET_TIME_Absolute discard_time); 109 struct GNUNET_TIME_Absolute discard_time);
109 110
110 111
111/** 112/**
@@ -119,12 +120,11 @@ GNUNET_DATACACHE_put (struct GNUNET_DATACACHE_Handle *h,
119 * @param iter_cls closure for iter 120 * @param iter_cls closure for iter
120 * @return the number of results found 121 * @return the number of results found
121 */ 122 */
122unsigned int 123unsigned int
123GNUNET_DATACACHE_get (struct GNUNET_DATACACHE_Handle *h, 124GNUNET_DATACACHE_get (struct GNUNET_DATACACHE_Handle *h,
124 const GNUNET_HashCode * key, 125 const GNUNET_HashCode * key,
125 enum GNUNET_BLOCK_Type type, 126 enum GNUNET_BLOCK_Type type,
126 GNUNET_DATACACHE_Iterator iter, 127 GNUNET_DATACACHE_Iterator iter, void *iter_cls);
127 void *iter_cls);
128 128
129 129
130#if 0 /* keep Emacsens' auto-indent happy */ 130#if 0 /* keep Emacsens' auto-indent happy */