diff options
Diffstat (limited to 'src/fs/fs.h')
-rw-r--r-- | src/fs/fs.h | 67 |
1 files changed, 67 insertions, 0 deletions
diff --git a/src/fs/fs.h b/src/fs/fs.h index 41831e8a8..699f73a79 100644 --- a/src/fs/fs.h +++ b/src/fs/fs.h | |||
@@ -1839,15 +1839,72 @@ struct GNUNET_FS_DownloadContext | |||
1839 | int tried_full_data; | 1839 | int tried_full_data; |
1840 | }; | 1840 | }; |
1841 | 1841 | ||
1842 | |||
1843 | /** | ||
1844 | * Information about an (updateable) node in the | ||
1845 | * namespace. | ||
1846 | */ | ||
1847 | struct NamespaceUpdateNode | ||
1848 | { | ||
1849 | /** | ||
1850 | * Identifier for this node. | ||
1851 | */ | ||
1852 | char *id; | ||
1853 | |||
1854 | /** | ||
1855 | * Identifier of children of this node. | ||
1856 | */ | ||
1857 | char *update; | ||
1858 | |||
1859 | /** | ||
1860 | * Metadata for this entry. | ||
1861 | */ | ||
1862 | struct GNUNET_CONTAINER_MetaData *md; | ||
1863 | |||
1864 | /** | ||
1865 | * URI of this entry in the namespace. | ||
1866 | */ | ||
1867 | struct GNUNET_FS_Uri *uri; | ||
1868 | |||
1869 | /** | ||
1870 | * Namespace update generation ID. Used to ensure | ||
1871 | * freshness of the scc_id. | ||
1872 | */ | ||
1873 | unsigned int nug; | ||
1874 | |||
1875 | /** | ||
1876 | * SCC this entry belongs to (if nug is current). | ||
1877 | */ | ||
1878 | unsigned int scc_id; | ||
1879 | |||
1880 | }; | ||
1881 | |||
1882 | |||
1842 | struct GNUNET_FS_Namespace | 1883 | struct GNUNET_FS_Namespace |
1843 | { | 1884 | { |
1844 | 1885 | ||
1845 | /** | 1886 | /** |
1887 | * Handle to the FS service context. | ||
1888 | */ | ||
1889 | struct GNUNET_FS_Handle *h; | ||
1890 | |||
1891 | /** | ||
1892 | * Array with information about nodes in the namespace. | ||
1893 | */ | ||
1894 | struct NamespaceUpdateNode **update_nodes; | ||
1895 | |||
1896 | /** | ||
1846 | * Private key for the namespace. | 1897 | * Private key for the namespace. |
1847 | */ | 1898 | */ |
1848 | struct GNUNET_CRYPTO_RsaPrivateKey *key; | 1899 | struct GNUNET_CRYPTO_RsaPrivateKey *key; |
1849 | 1900 | ||
1850 | /** | 1901 | /** |
1902 | * Hash map mapping identifiers of update nodes | ||
1903 | * to the update nodes (initialized on-demand). | ||
1904 | */ | ||
1905 | struct GNUNET_CONTAINER_MultiHashMap *update_map; | ||
1906 | |||
1907 | /** | ||
1851 | * Name of the file with the private key. | 1908 | * Name of the file with the private key. |
1852 | */ | 1909 | */ |
1853 | char *filename; | 1910 | char *filename; |
@@ -1858,9 +1915,19 @@ struct GNUNET_FS_Namespace | |||
1858 | char *name; | 1915 | char *name; |
1859 | 1916 | ||
1860 | /** | 1917 | /** |
1918 | * Size of the update nodes array. | ||
1919 | */ | ||
1920 | unsigned int update_node_count; | ||
1921 | |||
1922 | /** | ||
1861 | * Reference counter. | 1923 | * Reference counter. |
1862 | */ | 1924 | */ |
1863 | unsigned int rc; | 1925 | unsigned int rc; |
1926 | |||
1927 | /** | ||
1928 | * Generator for unique nug numbers. | ||
1929 | */ | ||
1930 | unsigned int nug_gen; | ||
1864 | }; | 1931 | }; |
1865 | 1932 | ||
1866 | 1933 | ||