aboutsummaryrefslogtreecommitdiff
path: root/src/include
diff options
context:
space:
mode:
authorChristian Grothoff <christian@grothoff.org>2014-12-14 22:15:06 +0000
committerChristian Grothoff <christian@grothoff.org>2014-12-14 22:15:06 +0000
commit6d7c1dd00a193fc054d1f1588ae7c98dc95b6257 (patch)
treedce6c9493eaae4e53c0d778aaa55bddfa7878337 /src/include
parent37a6aa8d92d86b0f956c567d05a59ba5415b1052 (diff)
downloadgnunet-6d7c1dd00a193fc054d1f1588ae7c98dc95b6257.tar.gz
gnunet-6d7c1dd00a193fc054d1f1588ae7c98dc95b6257.zip
fix #3570: finally remove SList API
Diffstat (limited to 'src/include')
-rw-r--r--src/include/gnunet_container_lib.h245
1 files changed, 0 insertions, 245 deletions
diff --git a/src/include/gnunet_container_lib.h b/src/include/gnunet_container_lib.h
index 68e62c750..60082489c 100644
--- a/src/include/gnunet_container_lib.h
+++ b/src/include/gnunet_container_lib.h
@@ -1818,251 +1818,6 @@ GNUNET_CONTAINER_heap_update_cost (struct GNUNET_CONTAINER_Heap *heap,
1818 GNUNET_CONTAINER_HeapCostType new_cost); 1818 GNUNET_CONTAINER_HeapCostType new_cost);
1819 1819
1820 1820
1821/* ******************** Singly linked list *************** */
1822
1823/**
1824 * Possible ways for how data stored in the linked list
1825 * might be allocated.
1826 * @deprecated use DLL macros
1827 */
1828enum GNUNET_CONTAINER_SListDisposition
1829{
1830 /**
1831 * Single-linked list must copy the buffer.
1832 * @deprecated use DLL macros
1833 */
1834 GNUNET_CONTAINER_SLIST_DISPOSITION_TRANSIENT = 0,
1835
1836 /**
1837 * Data is static, no need to copy or free.
1838 * @deprecated use DLL macros
1839 */
1840 GNUNET_CONTAINER_SLIST_DISPOSITION_STATIC = 2,
1841
1842 /**
1843 * Data is dynamic, do not copy but free when done.
1844 * @deprecated use DLL macros
1845 */
1846 GNUNET_CONTAINER_SLIST_DISPOSITION_DYNAMIC = 4
1847};
1848
1849struct GNUNET_CONTAINER_SList_Elem;
1850
1851
1852/**
1853 * Handle to a singly linked list
1854 * @deprecated use DLL macros
1855 */
1856struct GNUNET_CONTAINER_SList;
1857
1858/**
1859 * Handle to a singly linked list iterator
1860 * @deprecated use DLL macros
1861 */
1862struct GNUNET_CONTAINER_SList_Iterator
1863{
1864 /**
1865 * Linked list that we are iterating over.
1866 */
1867 struct GNUNET_CONTAINER_SList *list;
1868
1869 /**
1870 * Last element accessed.
1871 */
1872 struct GNUNET_CONTAINER_SList_Elem *last;
1873
1874 /**
1875 * Current list element.
1876 */
1877 struct GNUNET_CONTAINER_SList_Elem *elem;
1878};
1879
1880
1881
1882/**
1883 * Add a new element to the list
1884 * @param l list
1885 * @param disp memory disposition
1886 * @param buf payload buffer
1887 * @param len length of the buffer
1888 * @deprecated use DLL macros
1889 */
1890void
1891GNUNET_CONTAINER_slist_add (struct GNUNET_CONTAINER_SList *l,
1892 enum GNUNET_CONTAINER_SListDisposition disp,
1893 const void *buf, size_t len);
1894
1895
1896/**
1897 * Add a new element to the end of the list
1898 * @param l list
1899 * @param disp memory disposition
1900 * @param buf payload buffer
1901 * @param len length of the buffer
1902 * @deprecated use DLL macros
1903 */
1904void
1905GNUNET_CONTAINER_slist_add_end (struct GNUNET_CONTAINER_SList *l,
1906 enum GNUNET_CONTAINER_SListDisposition disp,
1907 const void *buf, size_t len);
1908
1909
1910/**
1911 * Append a singly linked list to another
1912 * @param dst list to append to
1913 * @param src source
1914 * @deprecated use DLL macros
1915 */
1916void
1917GNUNET_CONTAINER_slist_append (struct GNUNET_CONTAINER_SList *dst,
1918 struct GNUNET_CONTAINER_SList *src);
1919
1920
1921/**
1922 * Create a new singly linked list
1923 * @return the new list
1924 * @deprecated use DLL macros
1925 */
1926struct GNUNET_CONTAINER_SList *
1927GNUNET_CONTAINER_slist_create (void);
1928
1929
1930/**
1931 * Destroy a singly linked list
1932 * @param l the list to be destroyed
1933 * @deprecated use DLL macros
1934 */
1935void
1936GNUNET_CONTAINER_slist_destroy (struct GNUNET_CONTAINER_SList *l);
1937
1938
1939/**
1940 * Return the beginning of a list
1941 *
1942 * @param l list
1943 * @return iterator pointing to the beginning (by value! Either allocate the
1944 * structure on the stack, or use GNUNET_malloc() yourself! All other
1945 * functions do take pointer to this struct though)
1946 * @deprecated use DLL macros
1947 */
1948struct GNUNET_CONTAINER_SList_Iterator
1949GNUNET_CONTAINER_slist_begin (struct GNUNET_CONTAINER_SList *l);
1950
1951
1952/**
1953 * Clear a list
1954 *
1955 * @param l list
1956 * @deprecated use DLL macros
1957 */
1958void
1959GNUNET_CONTAINER_slist_clear (struct GNUNET_CONTAINER_SList *l);
1960
1961
1962/**
1963 * Check if a list contains a certain element
1964 * @param l list
1965 * @param buf payload buffer to find
1966 * @param len length of the payload (number of bytes in buf)
1967 * @return GNUNET_YES if found, GNUNET_NO otherwise
1968 * @deprecated use DLL macros
1969 */
1970int
1971GNUNET_CONTAINER_slist_contains (const struct GNUNET_CONTAINER_SList *l,
1972 const void *buf, size_t len);
1973
1974/**
1975 * Check if a list contains a certain element using 'compare' function
1976 *
1977 * @param l list
1978 * @param buf payload buffer to find
1979 * @param len length of the payload (number of bytes in buf)
1980 * @param compare comparison function
1981 *
1982 * @return NULL if the 'buf' could not be found, pointer to the
1983 * list element, if found
1984 * @deprecated use DLL macros
1985 */
1986void *
1987GNUNET_CONTAINER_slist_contains2 (const struct GNUNET_CONTAINER_SList *l,
1988 const void *buf, size_t len,
1989 int (*compare)(const void *, const size_t, const void *, const size_t));
1990/**
1991 * Count the elements of a list
1992 * @param l list
1993 * @return number of elements in the list
1994 * @deprecated use DLL macros
1995 */
1996int
1997GNUNET_CONTAINER_slist_count (const struct GNUNET_CONTAINER_SList *l);
1998
1999
2000/**
2001 * Remove an element from the list
2002 * @param i iterator that points to the element to be removed
2003 * @deprecated use DLL macros
2004 */
2005void
2006GNUNET_CONTAINER_slist_erase (struct GNUNET_CONTAINER_SList_Iterator *i);
2007
2008
2009/**
2010 * Insert an element into a list at a specific position
2011 * @param before where to insert the new element
2012 * @param disp memory disposition
2013 * @param buf payload buffer
2014 * @param len length of the payload
2015 * @deprecated use DLL macros
2016 */
2017void
2018GNUNET_CONTAINER_slist_insert (struct GNUNET_CONTAINER_SList_Iterator *before,
2019 enum GNUNET_CONTAINER_SListDisposition disp,
2020 const void *buf, size_t len);
2021
2022
2023/**
2024 * Advance an iterator to the next element
2025 * @param i iterator
2026 * @return GNUNET_YES on success, GNUNET_NO if the end has been reached
2027 * @deprecated use DLL macros
2028 */
2029int
2030GNUNET_CONTAINER_slist_next (struct GNUNET_CONTAINER_SList_Iterator *i);
2031
2032
2033/**
2034 * Check if an iterator points beyond the end of a list
2035 * @param i iterator
2036 * @return GNUNET_YES if the end has been reached, GNUNET_NO if the iterator
2037 * points to a valid element
2038 * @deprecated use DLL macros
2039 */
2040int
2041GNUNET_CONTAINER_slist_end (struct GNUNET_CONTAINER_SList_Iterator *i);
2042
2043
2044/**
2045 * Retrieve the element at a specific position in a list
2046 *
2047 * @param i iterator
2048 * @param len set to the payload length
2049 * @return payload
2050 * @deprecated use DLL macros
2051 */
2052void *
2053GNUNET_CONTAINER_slist_get (const struct GNUNET_CONTAINER_SList_Iterator *i,
2054 size_t *len);
2055
2056
2057/**
2058 * Release an iterator
2059 * @param i iterator
2060 * @deprecated use DLL macros
2061 */
2062void
2063GNUNET_CONTAINER_slist_iter_destroy (struct GNUNET_CONTAINER_SList_Iterator *i);
2064
2065
2066#if 0 /* keep Emacsens' auto-indent happy */ 1821#if 0 /* keep Emacsens' auto-indent happy */
2067{ 1822{
2068#endif 1823#endif