diff options
author | Martin Schanzenbach <mschanzenbach@posteo.de> | 2012-02-16 20:38:29 +0000 |
---|---|---|
committer | Martin Schanzenbach <mschanzenbach@posteo.de> | 2012-02-16 20:38:29 +0000 |
commit | 349d176da232e5fdc6afd9c90ae02bf928365ac0 (patch) | |
tree | 0b3dd606f9e9f10d1c45d4113eead668648c99ce /src/include/gnunet_gns_service.h | |
parent | f49e139a6fbcde654b2130e78665e48712713612 (diff) | |
download | gnunet-349d176da232e5fdc6afd9c90ae02bf928365ac0.tar.gz gnunet-349d176da232e5fdc6afd9c90ae02bf928365ac0.zip |
- removed add, other feedback
Diffstat (limited to 'src/include/gnunet_gns_service.h')
-rw-r--r-- | src/include/gnunet_gns_service.h | 68 |
1 files changed, 11 insertions, 57 deletions
diff --git a/src/include/gnunet_gns_service.h b/src/include/gnunet_gns_service.h index 322a1c9bf..748aa9f4b 100644 --- a/src/include/gnunet_gns_service.h +++ b/src/include/gnunet_gns_service.h | |||
@@ -93,43 +93,7 @@ void | |||
93 | GNUNET_GNS_disconnect (struct GNUNET_GNS_Handle *handle); | 93 | GNUNET_GNS_disconnect (struct GNUNET_GNS_Handle *handle); |
94 | 94 | ||
95 | 95 | ||
96 | /* *************** Standard API: add and lookup ******************* */ | 96 | /* *************** Standard API: lookup ******************* */ |
97 | |||
98 | /** | ||
99 | * Perform an add operation storing records in the GNS. | ||
100 | * | ||
101 | * FIXME: Yes, we need this kind of API, but should it not be with the | ||
102 | * NameDataStore, rather than the GNS-service? | ||
103 | * | ||
104 | * @param handle handle to GNS service | ||
105 | * @param name the key to store under | ||
106 | * // FIXME: need to be precise here what 'name' is. Does it | ||
107 | // include '.gnunet'? What happens if we specify 'a.b.c.gnunet' | ||
108 | // but 'b.c.gnunet' has been delegated? (error?) | ||
109 | * @param desired_replication_level estimate of how many | ||
110 | * nearest peers this request should reach | ||
111 | * @param options routing options for this message | ||
112 | // FIXME: which are? where is the arg? | ||
113 | // FIXME: we should probably distinguish between 'private' and 'public' | ||
114 | // records; | ||
115 | * @param type type of the value | ||
116 | * @param size number of bytes in data; must be less than 64k | ||
117 | * @param data the data to store | ||
118 | // FIXME: what is the exact format of data? | ||
119 | * @param exp desired expiration time for the value | ||
120 | * @param timeout how long to wait for transmission of this request | ||
121 | * @param cont continuation to call when done (transmitting request to service) | ||
122 | * @param cont_cls closure for cont | ||
123 | * // FIXME: where are the continuations? | ||
124 | */ | ||
125 | void | ||
126 | GNUNET_GNS_add_record (struct GNUNET_GNS_Handle *handle, | ||
127 | const char* name, | ||
128 | enum GNUNET_GNS_RecordType type, | ||
129 | size_t size, const char *data, | ||
130 | struct GNUNET_TIME_Absolute exp, | ||
131 | struct GNUNET_TIME_Relative timeout); | ||
132 | |||
133 | 97 | ||
134 | /** | 98 | /** |
135 | * Iterator called on each result obtained for a GNS | 99 | * Iterator called on each result obtained for a GNS |
@@ -137,17 +101,13 @@ GNUNET_GNS_add_record (struct GNUNET_GNS_Handle *handle, | |||
137 | * | 101 | * |
138 | * | 102 | * |
139 | * @param cls closure | 103 | * @param cls closure |
140 | * @param exp when will this value expire | 104 | * @param name "name" of the original lookup |
141 | * @param key key of the result | ||
142 | * // how does the key relate to the name exactly? Why not give the name? | ||
143 | * @param record the records in reply | 105 | * @param record the records in reply |
144 | * // FIXME: shouldn't this then be an array of pointers? | 106 | * // FIXME: shouldn't this then be an array of pointers? - not sure as of yet |
145 | * @param num_records the number of records in reply | 107 | * @param num_records the number of records in reply |
146 | * @param type type of the result | ||
147 | * // FIXME: not in signature | ||
148 | */ | 108 | */ |
149 | typedef void (*GNUNET_GNS_LookupIterator) (void *cls, | 109 | typedef void (*GNUNET_GNS_LookupIterator) (void *cls, |
150 | const GNUNET_HashCode * key, | 110 | const char * name, |
151 | const struct GNUNET_GNS_Record *record, | 111 | const struct GNUNET_GNS_Record *record, |
152 | unsigned int num_records); | 112 | unsigned int num_records); |
153 | 113 | ||
@@ -160,14 +120,8 @@ typedef void (*GNUNET_GNS_LookupIterator) (void *cls, | |||
160 | * @param timeout how long to wait for transmission of this request to the service | 120 | * @param timeout how long to wait for transmission of this request to the service |
161 | * // FIXME: what happens afterwards? | 121 | * // FIXME: what happens afterwards? |
162 | * @param type expected type of the response object | 122 | * @param type expected type of the response object |
163 | * @param key the key to look up | 123 | * @param name the name to look up |
164 | * // FIXME: key, name, what format? | 124 | * @param type the GNUNET_GNS_RecordType to look for |
165 | * @param desired_replication_level estimate of how many | ||
166 | nearest peers this request should reach | ||
167 | * @param options routing options for this message | ||
168 | * //FIXME: missmatch between documented and actual options... | ||
169 | * @param xquery extended query data (can be NULL, depending on type) | ||
170 | * @param xquery_size number of bytes in xquery | ||
171 | * @param iter function to call on each result | 125 | * @param iter function to call on each result |
172 | * @param iter_cls closure for iter | 126 | * @param iter_cls closure for iter |
173 | * | 127 | * |
@@ -175,11 +129,11 @@ typedef void (*GNUNET_GNS_LookupIterator) (void *cls, | |||
175 | */ | 129 | */ |
176 | struct GNUNET_GNS_LookupHandle * | 130 | struct GNUNET_GNS_LookupHandle * |
177 | GNUNET_GNS_lookup_start (struct GNUNET_GNS_Handle *handle, | 131 | GNUNET_GNS_lookup_start (struct GNUNET_GNS_Handle *handle, |
178 | struct GNUNET_TIME_Relative timeout, | 132 | struct GNUNET_TIME_Relative timeout, |
179 | const char * name, | 133 | const char * name, |
180 | enum GNUNET_GNS_RecordType type, | 134 | enum GNUNET_GNS_RecordType type, |
181 | GNUNET_GNS_LookupIterator iter, | 135 | GNUNET_GNS_LookupIterator iter, |
182 | void *iter_cls); | 136 | void *iter_cls); |
183 | 137 | ||
184 | 138 | ||
185 | /** | 139 | /** |