diff options
Diffstat (limited to 'src/fs/fs_api.h')
-rw-r--r-- | src/fs/fs_api.h | 128 |
1 files changed, 19 insertions, 109 deletions
diff --git a/src/fs/fs_api.h b/src/fs/fs_api.h index 2fe38f604..83e8c3801 100644 --- a/src/fs/fs_api.h +++ b/src/fs/fs_api.h | |||
@@ -182,16 +182,13 @@ struct GNUNET_FS_Uri | |||
182 | struct | 182 | struct |
183 | { | 183 | { |
184 | /** | 184 | /** |
185 | * Keywords start with a '+' if they are | 185 | * Keywords start with a '+' if they are mandatory (in which |
186 | * mandatory (in which case the '+' is NOT | 186 | * case the '+' is NOT part of the keyword) and with a simple |
187 | * part of the keyword) and with a | 187 | * space if they are optional (in which case the space is ALSO |
188 | * simple space if they are optional | 188 | * not part of the actual keyword). |
189 | * (in which case the space is ALSO not | ||
190 | * part of the actual keyword). | ||
191 | * | 189 | * |
192 | * Double-quotes to protect spaces and | 190 | * Double-quotes to protect spaces and %-encoding are NOT used |
193 | * %-encoding are NOT used internally | 191 | * internally (only in URI-strings). |
194 | * (only in URI-strings). | ||
195 | */ | 192 | */ |
196 | char **keywords; | 193 | char **keywords; |
197 | 194 | ||
@@ -206,7 +203,7 @@ struct GNUNET_FS_Uri | |||
206 | /** | 203 | /** |
207 | * Identifier of the namespace. | 204 | * Identifier of the namespace. |
208 | */ | 205 | */ |
209 | struct GNUNET_FS_PseudonymIdentifier ns; | 206 | struct GNUNET_CRYPTO_EccPublicKey ns; |
210 | 207 | ||
211 | /** | 208 | /** |
212 | * Human-readable identifier chosen for this | 209 | * Human-readable identifier chosen for this |
@@ -1178,7 +1175,7 @@ struct GNUNET_FS_PublishContext | |||
1178 | /** | 1175 | /** |
1179 | * Namespace that we are publishing in, NULL if we have no namespace. | 1176 | * Namespace that we are publishing in, NULL if we have no namespace. |
1180 | */ | 1177 | */ |
1181 | struct GNUNET_FS_Namespace *ns; | 1178 | struct GNUNET_CRYPTO_EccPrivateKey *ns; |
1182 | 1179 | ||
1183 | /** | 1180 | /** |
1184 | * ID of the content in the namespace, NULL if we have no namespace. | 1181 | * ID of the content in the namespace, NULL if we have no namespace. |
@@ -1459,11 +1456,6 @@ struct GNUNET_FS_UnindexContext | |||
1459 | */ | 1456 | */ |
1460 | struct SearchRequestEntry | 1457 | struct SearchRequestEntry |
1461 | { | 1458 | { |
1462 | /** | ||
1463 | * Hash of the original keyword, used to derive the | ||
1464 | * key (for decrypting the KBlock). | ||
1465 | */ | ||
1466 | struct GNUNET_HashCode ukey; | ||
1467 | 1459 | ||
1468 | /** | 1460 | /** |
1469 | * Hash of the public key, also known as the query. | 1461 | * Hash of the public key, also known as the query. |
@@ -1471,6 +1463,17 @@ struct SearchRequestEntry | |||
1471 | struct GNUNET_HashCode uquery; | 1463 | struct GNUNET_HashCode uquery; |
1472 | 1464 | ||
1473 | /** | 1465 | /** |
1466 | * Derived public key, hashes to 'uquery'. | ||
1467 | */ | ||
1468 | struct GNUNET_CRYPTO_EccPublicKey dpub; | ||
1469 | |||
1470 | /** | ||
1471 | * The original keyword, used to derive the | ||
1472 | * key (for decrypting the UBlock). | ||
1473 | */ | ||
1474 | char *keyword; | ||
1475 | |||
1476 | /** | ||
1474 | * Map that contains a "struct GNUNET_FS_SearchResult" for each result that | 1477 | * Map that contains a "struct GNUNET_FS_SearchResult" for each result that |
1475 | * was found under this keyword. Note that the entries will point | 1478 | * was found under this keyword. Note that the entries will point |
1476 | * to the same locations as those in the master result map (in | 1479 | * to the same locations as those in the master result map (in |
@@ -1963,99 +1966,6 @@ struct GNUNET_FS_DownloadContext | |||
1963 | }; | 1966 | }; |
1964 | 1967 | ||
1965 | 1968 | ||
1966 | /** | ||
1967 | * Information about an (updateable) node in the | ||
1968 | * namespace. | ||
1969 | */ | ||
1970 | struct NamespaceUpdateNode | ||
1971 | { | ||
1972 | /** | ||
1973 | * Identifier for this node. | ||
1974 | */ | ||
1975 | char *id; | ||
1976 | |||
1977 | /** | ||
1978 | * Identifier of children of this node. | ||
1979 | */ | ||
1980 | char *update; | ||
1981 | |||
1982 | /** | ||
1983 | * Metadata for this entry. | ||
1984 | */ | ||
1985 | struct GNUNET_CONTAINER_MetaData *md; | ||
1986 | |||
1987 | /** | ||
1988 | * URI of this entry in the namespace. | ||
1989 | */ | ||
1990 | struct GNUNET_FS_Uri *uri; | ||
1991 | |||
1992 | /** | ||
1993 | * Namespace update generation ID. Used to ensure | ||
1994 | * freshness of the tree_id. | ||
1995 | */ | ||
1996 | unsigned int nug; | ||
1997 | |||
1998 | /** | ||
1999 | * TREE this entry belongs to (if nug is current). | ||
2000 | */ | ||
2001 | unsigned int tree_id; | ||
2002 | |||
2003 | }; | ||
2004 | |||
2005 | |||
2006 | /** | ||
2007 | * Handle to one of our namespaces. | ||
2008 | */ | ||
2009 | struct GNUNET_FS_Namespace | ||
2010 | { | ||
2011 | |||
2012 | /** | ||
2013 | * Handle to the FS service context. | ||
2014 | */ | ||
2015 | struct GNUNET_FS_Handle *h; | ||
2016 | |||
2017 | /** | ||
2018 | * Array with information about nodes in the namespace. | ||
2019 | */ | ||
2020 | struct NamespaceUpdateNode **update_nodes; | ||
2021 | |||
2022 | /** | ||
2023 | * Private key for the namespace. | ||
2024 | */ | ||
2025 | struct GNUNET_FS_PseudonymHandle *key; | ||
2026 | |||
2027 | /** | ||
2028 | * Hash map mapping identifiers of update nodes | ||
2029 | * to the update nodes (initialized on-demand). | ||
2030 | */ | ||
2031 | struct GNUNET_CONTAINER_MultiHashMap *update_map; | ||
2032 | |||
2033 | /** | ||
2034 | * Name of the file with the private key. | ||
2035 | */ | ||
2036 | char *filename; | ||
2037 | |||
2038 | /** | ||
2039 | * Name of the namespace. | ||
2040 | */ | ||
2041 | char *name; | ||
2042 | |||
2043 | /** | ||
2044 | * Size of the update nodes array. | ||
2045 | */ | ||
2046 | unsigned int update_node_count; | ||
2047 | |||
2048 | /** | ||
2049 | * Reference counter. | ||
2050 | */ | ||
2051 | unsigned int rc; | ||
2052 | |||
2053 | /** | ||
2054 | * Generator for unique nug numbers. | ||
2055 | */ | ||
2056 | unsigned int nug_gen; | ||
2057 | }; | ||
2058 | |||
2059 | #endif | 1969 | #endif |
2060 | 1970 | ||
2061 | /* end of fs_api.h */ | 1971 | /* end of fs_api.h */ |