diff options
author | Christian Grothoff <christian@grothoff.org> | 2012-11-13 20:05:40 +0000 |
---|---|---|
committer | Christian Grothoff <christian@grothoff.org> | 2012-11-13 20:05:40 +0000 |
commit | 4e1d85bac66209e6655f3fb4d3ddef7929f0f3fc (patch) | |
tree | df5c5a0d972f35d741b51c3a3fc8d2298ac8b4fd /src/include/gnunet_datacache_lib.h | |
parent | 855362e698928b0a5a8f72fc6427c2ea42af4e79 (diff) | |
download | gnunet-4e1d85bac66209e6655f3fb4d3ddef7929f0f3fc.tar.gz gnunet-4e1d85bac66209e6655f3fb4d3ddef7929f0f3fc.zip |
changing datacache API to separate put-paths from data (so that plugins can test for duplicates), removing support for MySQL
Diffstat (limited to 'src/include/gnunet_datacache_lib.h')
-rw-r--r-- | src/include/gnunet_datacache_lib.h | 20 |
1 files changed, 14 insertions, 6 deletions
diff --git a/src/include/gnunet_datacache_lib.h b/src/include/gnunet_datacache_lib.h index 071b304be..4f97ee526 100644 --- a/src/include/gnunet_datacache_lib.h +++ b/src/include/gnunet_datacache_lib.h | |||
@@ -74,18 +74,22 @@ GNUNET_DATACACHE_destroy (struct GNUNET_DATACACHE_Handle *h); | |||
74 | * An iterator over a set of items stored in the datacache. | 74 | * An iterator over a set of items stored in the datacache. |
75 | * | 75 | * |
76 | * @param cls closure | 76 | * @param cls closure |
77 | * @param exp when will the content expire? | ||
78 | * @param key key for the content | 77 | * @param key key for the content |
79 | * @param size number of bytes in data | 78 | * @param size number of bytes in data |
80 | * @param data content stored | 79 | * @param data content stored |
81 | * @param type type of the content | 80 | * @param type type of the content |
81 | * @param exp when will the content expire? | ||
82 | * @param path_info_len number of entries in 'path_info' | ||
83 | * @param path_info a path through the network | ||
82 | * @return GNUNET_OK to continue iterating, GNUNET_SYSERR to abort | 84 | * @return GNUNET_OK to continue iterating, GNUNET_SYSERR to abort |
83 | */ | 85 | */ |
84 | typedef int (*GNUNET_DATACACHE_Iterator) (void *cls, | 86 | typedef int (*GNUNET_DATACACHE_Iterator) (void *cls, |
85 | struct GNUNET_TIME_Absolute exp, | 87 | const struct GNUNET_HashCode *key, |
86 | const struct GNUNET_HashCode * key, | ||
87 | size_t size, const char *data, | 88 | size_t size, const char *data, |
88 | enum GNUNET_BLOCK_Type type); | 89 | enum GNUNET_BLOCK_Type type, |
90 | struct GNUNET_TIME_Absolute exp, | ||
91 | unsigned int path_info_len, | ||
92 | const struct GNUNET_PeerIdentity *path_info); | ||
89 | 93 | ||
90 | 94 | ||
91 | /** | 95 | /** |
@@ -97,13 +101,17 @@ typedef int (*GNUNET_DATACACHE_Iterator) (void *cls, | |||
97 | * @param data data to store | 101 | * @param data data to store |
98 | * @param type type of the value | 102 | * @param type type of the value |
99 | * @param discard_time when to discard the value in any case | 103 | * @param discard_time when to discard the value in any case |
100 | * @return GNUNET_OK on success, GNUNET_SYSERR on error (full, etc.) | 104 | * @param path_info_len number of entries in 'path_info' |
105 | * @param path_info a path through the network | ||
106 | * @return GNUNET_OK on success, GNUNET_SYSERR on error, GNUNET_NO if duplicate | ||
101 | */ | 107 | */ |
102 | int | 108 | int |
103 | GNUNET_DATACACHE_put (struct GNUNET_DATACACHE_Handle *h, | 109 | GNUNET_DATACACHE_put (struct GNUNET_DATACACHE_Handle *h, |
104 | const struct GNUNET_HashCode * key, size_t size, | 110 | const struct GNUNET_HashCode * key, size_t size, |
105 | const char *data, enum GNUNET_BLOCK_Type type, | 111 | const char *data, enum GNUNET_BLOCK_Type type, |
106 | struct GNUNET_TIME_Absolute discard_time); | 112 | struct GNUNET_TIME_Absolute discard_time, |
113 | unsigned int path_info_len, | ||
114 | const struct GNUNET_PeerIdentity *path_info); | ||
107 | 115 | ||
108 | 116 | ||
109 | /** | 117 | /** |