aboutsummaryrefslogtreecommitdiff
path: root/src/include/gnunet_container_lib.h
diff options
context:
space:
mode:
authorChristian Grothoff <christian@grothoff.org>2013-08-19 19:18:17 +0000
committerChristian Grothoff <christian@grothoff.org>2013-08-19 19:18:17 +0000
commit165d153298d75b64a6a426b534a435945690b436 (patch)
tree3c95f417ebda73a68b347ec5c8aa3e18d2262593 /src/include/gnunet_container_lib.h
parent6afb005da9165db3cd814864956f08e23828de63 (diff)
downloadgnunet-165d153298d75b64a6a426b534a435945690b436.tar.gz
gnunet-165d153298d75b64a6a426b534a435945690b436.zip
-remove ShortHashCode from API, deprecate SList
Diffstat (limited to 'src/include/gnunet_container_lib.h')
-rw-r--r--src/include/gnunet_container_lib.h41
1 files changed, 31 insertions, 10 deletions
diff --git a/src/include/gnunet_container_lib.h b/src/include/gnunet_container_lib.h
index 87249faca..c0aa176c5 100644
--- a/src/include/gnunet_container_lib.h
+++ b/src/include/gnunet_container_lib.h
@@ -1394,22 +1394,26 @@ GNUNET_CONTAINER_heap_update_cost (struct GNUNET_CONTAINER_Heap *heap,
1394/** 1394/**
1395 * Possible ways for how data stored in the linked list 1395 * Possible ways for how data stored in the linked list
1396 * might be allocated. 1396 * might be allocated.
1397 * @deprecated use DLL macros
1397 */ 1398 */
1398enum GNUNET_CONTAINER_SListDisposition 1399enum GNUNET_CONTAINER_SListDisposition
1399{ 1400{
1400 /** 1401 /**
1401 * Single-linked list must copy the buffer. 1402 * Single-linked list must copy the buffer.
1402 */ 1403 * @deprecated use DLL macros
1404 */
1403 GNUNET_CONTAINER_SLIST_DISPOSITION_TRANSIENT = 0, 1405 GNUNET_CONTAINER_SLIST_DISPOSITION_TRANSIENT = 0,
1404 1406
1405 /** 1407 /**
1406 * Data is static, no need to copy or free. 1408 * Data is static, no need to copy or free.
1407 */ 1409 * @deprecated use DLL macros
1410 */
1408 GNUNET_CONTAINER_SLIST_DISPOSITION_STATIC = 2, 1411 GNUNET_CONTAINER_SLIST_DISPOSITION_STATIC = 2,
1409 1412
1410 /** 1413 /**
1411 * Data is dynamic, do not copy but free when done. 1414 * Data is dynamic, do not copy but free when done.
1412 */ 1415 * @deprecated use DLL macros
1416 */
1413 GNUNET_CONTAINER_SLIST_DISPOSITION_DYNAMIC = 4 1417 GNUNET_CONTAINER_SLIST_DISPOSITION_DYNAMIC = 4
1414}; 1418};
1415 1419
@@ -1417,11 +1421,13 @@ enum GNUNET_CONTAINER_SListDisposition
1417 1421
1418/** 1422/**
1419 * Handle to a singly linked list 1423 * Handle to a singly linked list
1424 * @deprecated use DLL macros
1420 */ 1425 */
1421struct GNUNET_CONTAINER_SList; 1426struct GNUNET_CONTAINER_SList;
1422 1427
1423/** 1428/**
1424 * Handle to a singly linked list iterator 1429 * Handle to a singly linked list iterator
1430 * @deprecated use DLL macros
1425 */ 1431 */
1426struct GNUNET_CONTAINER_SList_Iterator 1432struct GNUNET_CONTAINER_SList_Iterator
1427{ 1433{
@@ -1449,6 +1455,7 @@ struct GNUNET_CONTAINER_SList_Iterator
1449 * @param disp memory disposition 1455 * @param disp memory disposition
1450 * @param buf payload buffer 1456 * @param buf payload buffer
1451 * @param len length of the buffer 1457 * @param len length of the buffer
1458 * @deprecated use DLL macros
1452 */ 1459 */
1453void 1460void
1454GNUNET_CONTAINER_slist_add (struct GNUNET_CONTAINER_SList *l, 1461GNUNET_CONTAINER_slist_add (struct GNUNET_CONTAINER_SList *l,
@@ -1462,6 +1469,7 @@ GNUNET_CONTAINER_slist_add (struct GNUNET_CONTAINER_SList *l,
1462 * @param disp memory disposition 1469 * @param disp memory disposition
1463 * @param buf payload buffer 1470 * @param buf payload buffer
1464 * @param len length of the buffer 1471 * @param len length of the buffer
1472 * @deprecated use DLL macros
1465 */ 1473 */
1466void 1474void
1467GNUNET_CONTAINER_slist_add_end (struct GNUNET_CONTAINER_SList *l, 1475GNUNET_CONTAINER_slist_add_end (struct GNUNET_CONTAINER_SList *l,
@@ -1473,6 +1481,7 @@ GNUNET_CONTAINER_slist_add_end (struct GNUNET_CONTAINER_SList *l,
1473 * Append a singly linked list to another 1481 * Append a singly linked list to another
1474 * @param dst list to append to 1482 * @param dst list to append to
1475 * @param src source 1483 * @param src source
1484 * @deprecated use DLL macros
1476 */ 1485 */
1477void 1486void
1478GNUNET_CONTAINER_slist_append (struct GNUNET_CONTAINER_SList *dst, 1487GNUNET_CONTAINER_slist_append (struct GNUNET_CONTAINER_SList *dst,
@@ -1482,6 +1491,7 @@ GNUNET_CONTAINER_slist_append (struct GNUNET_CONTAINER_SList *dst,
1482/** 1491/**
1483 * Create a new singly linked list 1492 * Create a new singly linked list
1484 * @return the new list 1493 * @return the new list
1494 * @deprecated use DLL macros
1485 */ 1495 */
1486struct GNUNET_CONTAINER_SList * 1496struct GNUNET_CONTAINER_SList *
1487GNUNET_CONTAINER_slist_create (void); 1497GNUNET_CONTAINER_slist_create (void);
@@ -1490,6 +1500,7 @@ GNUNET_CONTAINER_slist_create (void);
1490/** 1500/**
1491 * Destroy a singly linked list 1501 * Destroy a singly linked list
1492 * @param l the list to be destroyed 1502 * @param l the list to be destroyed
1503 * @deprecated use DLL macros
1493 */ 1504 */
1494void 1505void
1495GNUNET_CONTAINER_slist_destroy (struct GNUNET_CONTAINER_SList *l); 1506GNUNET_CONTAINER_slist_destroy (struct GNUNET_CONTAINER_SList *l);
@@ -1502,6 +1513,7 @@ GNUNET_CONTAINER_slist_destroy (struct GNUNET_CONTAINER_SList *l);
1502 * @return iterator pointing to the beginning (by value! Either allocate the 1513 * @return iterator pointing to the beginning (by value! Either allocate the
1503 * structure on the stack, or use GNUNET_malloc() yourself! All other 1514 * structure on the stack, or use GNUNET_malloc() yourself! All other
1504 * functions do take pointer to this struct though) 1515 * functions do take pointer to this struct though)
1516 * @deprecated use DLL macros
1505 */ 1517 */
1506struct GNUNET_CONTAINER_SList_Iterator 1518struct GNUNET_CONTAINER_SList_Iterator
1507GNUNET_CONTAINER_slist_begin (struct GNUNET_CONTAINER_SList *l); 1519GNUNET_CONTAINER_slist_begin (struct GNUNET_CONTAINER_SList *l);
@@ -1511,6 +1523,7 @@ GNUNET_CONTAINER_slist_begin (struct GNUNET_CONTAINER_SList *l);
1511 * Clear a list 1523 * Clear a list
1512 * 1524 *
1513 * @param l list 1525 * @param l list
1526 * @deprecated use DLL macros
1514 */ 1527 */
1515void 1528void
1516GNUNET_CONTAINER_slist_clear (struct GNUNET_CONTAINER_SList *l); 1529GNUNET_CONTAINER_slist_clear (struct GNUNET_CONTAINER_SList *l);
@@ -1521,8 +1534,8 @@ GNUNET_CONTAINER_slist_clear (struct GNUNET_CONTAINER_SList *l);
1521 * @param l list 1534 * @param l list
1522 * @param buf payload buffer to find 1535 * @param buf payload buffer to find
1523 * @param len length of the payload (number of bytes in buf) 1536 * @param len length of the payload (number of bytes in buf)
1524 *
1525 * @return GNUNET_YES if found, GNUNET_NO otherwise 1537 * @return GNUNET_YES if found, GNUNET_NO otherwise
1538 * @deprecated use DLL macros
1526 */ 1539 */
1527int 1540int
1528GNUNET_CONTAINER_slist_contains (const struct GNUNET_CONTAINER_SList *l, 1541GNUNET_CONTAINER_slist_contains (const struct GNUNET_CONTAINER_SList *l,
@@ -1538,6 +1551,7 @@ GNUNET_CONTAINER_slist_contains (const struct GNUNET_CONTAINER_SList *l,
1538 * 1551 *
1539 * @return NULL if the 'buf' could not be found, pointer to the 1552 * @return NULL if the 'buf' could not be found, pointer to the
1540 * list element, if found 1553 * list element, if found
1554 * @deprecated use DLL macros
1541 */ 1555 */
1542void * 1556void *
1543GNUNET_CONTAINER_slist_contains2 (const struct GNUNET_CONTAINER_SList *l, 1557GNUNET_CONTAINER_slist_contains2 (const struct GNUNET_CONTAINER_SList *l,
@@ -1547,6 +1561,7 @@ GNUNET_CONTAINER_slist_contains2 (const struct GNUNET_CONTAINER_SList *l,
1547 * Count the elements of a list 1561 * Count the elements of a list
1548 * @param l list 1562 * @param l list
1549 * @return number of elements in the list 1563 * @return number of elements in the list
1564 * @deprecated use DLL macros
1550 */ 1565 */
1551int 1566int
1552GNUNET_CONTAINER_slist_count (const struct GNUNET_CONTAINER_SList *l); 1567GNUNET_CONTAINER_slist_count (const struct GNUNET_CONTAINER_SList *l);
@@ -1555,6 +1570,7 @@ GNUNET_CONTAINER_slist_count (const struct GNUNET_CONTAINER_SList *l);
1555/** 1570/**
1556 * Remove an element from the list 1571 * Remove an element from the list
1557 * @param i iterator that points to the element to be removed 1572 * @param i iterator that points to the element to be removed
1573 * @deprecated use DLL macros
1558 */ 1574 */
1559void 1575void
1560GNUNET_CONTAINER_slist_erase (struct GNUNET_CONTAINER_SList_Iterator *i); 1576GNUNET_CONTAINER_slist_erase (struct GNUNET_CONTAINER_SList_Iterator *i);
@@ -1566,6 +1582,7 @@ GNUNET_CONTAINER_slist_erase (struct GNUNET_CONTAINER_SList_Iterator *i);
1566 * @param disp memory disposition 1582 * @param disp memory disposition
1567 * @param buf payload buffer 1583 * @param buf payload buffer
1568 * @param len length of the payload 1584 * @param len length of the payload
1585 * @deprecated use DLL macros
1569 */ 1586 */
1570void 1587void
1571GNUNET_CONTAINER_slist_insert (struct GNUNET_CONTAINER_SList_Iterator *before, 1588GNUNET_CONTAINER_slist_insert (struct GNUNET_CONTAINER_SList_Iterator *before,
@@ -1577,6 +1594,7 @@ GNUNET_CONTAINER_slist_insert (struct GNUNET_CONTAINER_SList_Iterator *before,
1577 * Advance an iterator to the next element 1594 * Advance an iterator to the next element
1578 * @param i iterator 1595 * @param i iterator
1579 * @return GNUNET_YES on success, GNUNET_NO if the end has been reached 1596 * @return GNUNET_YES on success, GNUNET_NO if the end has been reached
1597 * @deprecated use DLL macros
1580 */ 1598 */
1581int 1599int
1582GNUNET_CONTAINER_slist_next (struct GNUNET_CONTAINER_SList_Iterator *i); 1600GNUNET_CONTAINER_slist_next (struct GNUNET_CONTAINER_SList_Iterator *i);
@@ -1587,6 +1605,7 @@ GNUNET_CONTAINER_slist_next (struct GNUNET_CONTAINER_SList_Iterator *i);
1587 * @param i iterator 1605 * @param i iterator
1588 * @return GNUNET_YES if the end has been reached, GNUNET_NO if the iterator 1606 * @return GNUNET_YES if the end has been reached, GNUNET_NO if the iterator
1589 * points to a valid element 1607 * points to a valid element
1608 * @deprecated use DLL macros
1590 */ 1609 */
1591int 1610int
1592GNUNET_CONTAINER_slist_end (struct GNUNET_CONTAINER_SList_Iterator *i); 1611GNUNET_CONTAINER_slist_end (struct GNUNET_CONTAINER_SList_Iterator *i);
@@ -1598,6 +1617,7 @@ GNUNET_CONTAINER_slist_end (struct GNUNET_CONTAINER_SList_Iterator *i);
1598 * @param i iterator 1617 * @param i iterator
1599 * @param len set to the payload length 1618 * @param len set to the payload length
1600 * @return payload 1619 * @return payload
1620 * @deprecated use DLL macros
1601 */ 1621 */
1602void * 1622void *
1603GNUNET_CONTAINER_slist_get (const struct GNUNET_CONTAINER_SList_Iterator *i, 1623GNUNET_CONTAINER_slist_get (const struct GNUNET_CONTAINER_SList_Iterator *i,
@@ -1607,6 +1627,7 @@ GNUNET_CONTAINER_slist_get (const struct GNUNET_CONTAINER_SList_Iterator *i,
1607/** 1627/**
1608 * Release an iterator 1628 * Release an iterator
1609 * @param i iterator 1629 * @param i iterator
1630 * @deprecated use DLL macros
1610 */ 1631 */
1611void 1632void
1612GNUNET_CONTAINER_slist_iter_destroy (struct GNUNET_CONTAINER_SList_Iterator *i); 1633GNUNET_CONTAINER_slist_iter_destroy (struct GNUNET_CONTAINER_SList_Iterator *i);