diff options
author | Christian Grothoff <christian@grothoff.org> | 2012-02-16 18:24:32 +0000 |
---|---|---|
committer | Christian Grothoff <christian@grothoff.org> | 2012-02-16 18:24:32 +0000 |
commit | 62eb73513d8f8099319c07a0486263b572095460 (patch) | |
tree | 4b51b7d6b7b5d450442a592aefc2f943d5a57442 /src/include/gnunet_gns_service.h | |
parent | e577a22606d48042fbf970f1585f81e083ea7e56 (diff) | |
download | gnunet-62eb73513d8f8099319c07a0486263b572095460.tar.gz gnunet-62eb73513d8f8099319c07a0486263b572095460.zip |
-comments
Diffstat (limited to 'src/include/gnunet_gns_service.h')
-rw-r--r-- | src/include/gnunet_gns_service.h | 26 |
1 files changed, 23 insertions, 3 deletions
diff --git a/src/include/gnunet_gns_service.h b/src/include/gnunet_gns_service.h index 235785116..99028f60c 100644 --- a/src/include/gnunet_gns_service.h +++ b/src/include/gnunet_gns_service.h | |||
@@ -1,6 +1,6 @@ | |||
1 | /* | 1 | /* |
2 | This file is part of GNUnet | 2 | This file is part of GNUnet |
3 | (C) 2004, 2005, 2006, 2008, 2009, 2011 Christian Grothoff (and other contributing authors) | 3 | (C) 2012 Christian Grothoff (and other contributing authors) |
4 | 4 | ||
5 | GNUnet is free software; you can redistribute it and/or modify | 5 | GNUnet is free software; you can redistribute it and/or modify |
6 | it under the terms of the GNU General Public License as published | 6 | it under the terms of the GNU General Public License as published |
@@ -58,6 +58,8 @@ struct GNUNET_GNS_Record; | |||
58 | */ | 58 | */ |
59 | enum GNUNET_GNS_RecordType | 59 | enum GNUNET_GNS_RecordType |
60 | { | 60 | { |
61 | // FIXME: should be based on GNUNET_DNSPARSER_TYPE's (standard DNS), | ||
62 | // and then maybe our extensions in the area > 255? | ||
61 | GNUNET_GNS_RECORD_A, | 63 | GNUNET_GNS_RECORD_A, |
62 | GNUNET_GNS_RECORD_AAAA, | 64 | GNUNET_GNS_RECORD_AAAA, |
63 | GNUNET_GNS_RECORD_MX, | 65 | GNUNET_GNS_RECORD_MX, |
@@ -90,18 +92,29 @@ GNUNET_GNS_disconnect (struct GNUNET_GNS_Handle *handle); | |||
90 | /** | 92 | /** |
91 | * Perform an add operation storing records in the GNS. | 93 | * Perform an add operation storing records in the GNS. |
92 | * | 94 | * |
95 | * FIXME: Yes, we need this kind of API, but should it not be with the | ||
96 | * NameDataStore, rather than the GNS-service? | ||
97 | * | ||
93 | * @param handle handle to GNS service | 98 | * @param handle handle to GNS service |
94 | * @param key the key to store under | 99 | * @param name the key to store under |
100 | * // FIXME: need to be precise here what 'name' is. Does it | ||
101 | // include '.gnunet'? What happens if we specify 'a.b.c.gnunet' | ||
102 | // but 'b.c.gnunet' has been delegated? (error?) | ||
95 | * @param desired_replication_level estimate of how many | 103 | * @param desired_replication_level estimate of how many |
96 | * nearest peers this request should reach | 104 | * nearest peers this request should reach |
97 | * @param options routing options for this message | 105 | * @param options routing options for this message |
106 | // FIXME: which are? where is the arg? | ||
107 | // FIXME: we should probably distinguish between 'private' and 'public' | ||
108 | // records; | ||
98 | * @param type type of the value | 109 | * @param type type of the value |
99 | * @param size number of bytes in data; must be less than 64k | 110 | * @param size number of bytes in data; must be less than 64k |
100 | * @param data the data to store | 111 | * @param data the data to store |
112 | // FIXME: what is the exact format of data? | ||
101 | * @param exp desired expiration time for the value | 113 | * @param exp desired expiration time for the value |
102 | * @param timeout how long to wait for transmission of this request | 114 | * @param timeout how long to wait for transmission of this request |
103 | * @param cont continuation to call when done (transmitting request to service) | 115 | * @param cont continuation to call when done (transmitting request to service) |
104 | * @param cont_cls closure for cont | 116 | * @param cont_cls closure for cont |
117 | * // FIXME: where are the continuations? | ||
105 | */ | 118 | */ |
106 | void | 119 | void |
107 | GNUNET_GNS_add_record (struct GNUNET_GNS_Handle *handle, | 120 | GNUNET_GNS_add_record (struct GNUNET_GNS_Handle *handle, |
@@ -116,12 +129,16 @@ GNUNET_GNS_add_record (struct GNUNET_GNS_Handle *handle, | |||
116 | * Iterator called on each result obtained for a GNS | 129 | * Iterator called on each result obtained for a GNS |
117 | * operation that expects a reply TODO: eh? | 130 | * operation that expects a reply TODO: eh? |
118 | * | 131 | * |
132 | * | ||
119 | * @param cls closure | 133 | * @param cls closure |
120 | * @param exp when will this value expire | 134 | * @param exp when will this value expire |
121 | * @param key key of the result | 135 | * @param key key of the result |
122 | * @param records the records in reply | 136 | * // how does the key relate to the name exactly? Why not give the name? |
137 | * @param record the records in reply | ||
138 | * // FIXME: shouldn't this then be an array of pointers? | ||
123 | * @param num_records the number of records in reply | 139 | * @param num_records the number of records in reply |
124 | * @param type type of the result | 140 | * @param type type of the result |
141 | * // FIXME: not in signature | ||
125 | */ | 142 | */ |
126 | typedef void (*GNUNET_GNS_LookupIterator) (void *cls, | 143 | typedef void (*GNUNET_GNS_LookupIterator) (void *cls, |
127 | const GNUNET_HashCode * key, | 144 | const GNUNET_HashCode * key, |
@@ -135,11 +152,14 @@ typedef void (*GNUNET_GNS_LookupIterator) (void *cls, | |||
135 | * | 152 | * |
136 | * @param handle handle to the GNS service | 153 | * @param handle handle to the GNS service |
137 | * @param timeout how long to wait for transmission of this request to the service | 154 | * @param timeout how long to wait for transmission of this request to the service |
155 | * // FIXME: what happens afterwards? | ||
138 | * @param type expected type of the response object | 156 | * @param type expected type of the response object |
139 | * @param key the key to look up | 157 | * @param key the key to look up |
158 | * // FIXME: key, name, what format? | ||
140 | * @param desired_replication_level estimate of how many | 159 | * @param desired_replication_level estimate of how many |
141 | nearest peers this request should reach | 160 | nearest peers this request should reach |
142 | * @param options routing options for this message | 161 | * @param options routing options for this message |
162 | * //FIXME: missmatch between documented and actual options... | ||
143 | * @param xquery extended query data (can be NULL, depending on type) | 163 | * @param xquery extended query data (can be NULL, depending on type) |
144 | * @param xquery_size number of bytes in xquery | 164 | * @param xquery_size number of bytes in xquery |
145 | * @param iter function to call on each result | 165 | * @param iter function to call on each result |