diff options
author | Christian Grothoff <christian@grothoff.org> | 2013-08-19 19:18:17 +0000 |
---|---|---|
committer | Christian Grothoff <christian@grothoff.org> | 2013-08-19 19:18:17 +0000 |
commit | 165d153298d75b64a6a426b534a435945690b436 (patch) | |
tree | 3c95f417ebda73a68b347ec5c8aa3e18d2262593 /src/include/gnunet_container_lib.h | |
parent | 6afb005da9165db3cd814864956f08e23828de63 (diff) | |
download | gnunet-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.h | 41 |
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 | */ |
1398 | enum GNUNET_CONTAINER_SListDisposition | 1399 | enum 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 | */ |
1421 | struct GNUNET_CONTAINER_SList; | 1426 | struct 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 | */ |
1426 | struct GNUNET_CONTAINER_SList_Iterator | 1432 | struct 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 | */ |
1453 | void | 1460 | void |
1454 | GNUNET_CONTAINER_slist_add (struct GNUNET_CONTAINER_SList *l, | 1461 | GNUNET_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 | */ |
1466 | void | 1474 | void |
1467 | GNUNET_CONTAINER_slist_add_end (struct GNUNET_CONTAINER_SList *l, | 1475 | GNUNET_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 | */ |
1477 | void | 1486 | void |
1478 | GNUNET_CONTAINER_slist_append (struct GNUNET_CONTAINER_SList *dst, | 1487 | GNUNET_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 | */ |
1486 | struct GNUNET_CONTAINER_SList * | 1496 | struct GNUNET_CONTAINER_SList * |
1487 | GNUNET_CONTAINER_slist_create (void); | 1497 | GNUNET_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 | */ |
1494 | void | 1505 | void |
1495 | GNUNET_CONTAINER_slist_destroy (struct GNUNET_CONTAINER_SList *l); | 1506 | GNUNET_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 | */ |
1506 | struct GNUNET_CONTAINER_SList_Iterator | 1518 | struct GNUNET_CONTAINER_SList_Iterator |
1507 | GNUNET_CONTAINER_slist_begin (struct GNUNET_CONTAINER_SList *l); | 1519 | GNUNET_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 | */ |
1515 | void | 1528 | void |
1516 | GNUNET_CONTAINER_slist_clear (struct GNUNET_CONTAINER_SList *l); | 1529 | GNUNET_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 | */ |
1527 | int | 1540 | int |
1528 | GNUNET_CONTAINER_slist_contains (const struct GNUNET_CONTAINER_SList *l, | 1541 | GNUNET_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 | */ |
1542 | void * | 1556 | void * |
1543 | GNUNET_CONTAINER_slist_contains2 (const struct GNUNET_CONTAINER_SList *l, | 1557 | GNUNET_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 | */ |
1551 | int | 1566 | int |
1552 | GNUNET_CONTAINER_slist_count (const struct GNUNET_CONTAINER_SList *l); | 1567 | GNUNET_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 | */ |
1559 | void | 1575 | void |
1560 | GNUNET_CONTAINER_slist_erase (struct GNUNET_CONTAINER_SList_Iterator *i); | 1576 | GNUNET_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 | */ |
1570 | void | 1587 | void |
1571 | GNUNET_CONTAINER_slist_insert (struct GNUNET_CONTAINER_SList_Iterator *before, | 1588 | GNUNET_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 | */ |
1581 | int | 1599 | int |
1582 | GNUNET_CONTAINER_slist_next (struct GNUNET_CONTAINER_SList_Iterator *i); | 1600 | GNUNET_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 | */ |
1591 | int | 1610 | int |
1592 | GNUNET_CONTAINER_slist_end (struct GNUNET_CONTAINER_SList_Iterator *i); | 1611 | GNUNET_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 | */ |
1602 | void * | 1622 | void * |
1603 | GNUNET_CONTAINER_slist_get (const struct GNUNET_CONTAINER_SList_Iterator *i, | 1623 | GNUNET_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 | */ |
1611 | void | 1632 | void |
1612 | GNUNET_CONTAINER_slist_iter_destroy (struct GNUNET_CONTAINER_SList_Iterator *i); | 1633 | GNUNET_CONTAINER_slist_iter_destroy (struct GNUNET_CONTAINER_SList_Iterator *i); |