diff options
Diffstat (limited to 'include/plist/plist.h')
| -rw-r--r-- | include/plist/plist.h | 162 |
1 files changed, 0 insertions, 162 deletions
diff --git a/include/plist/plist.h b/include/plist/plist.h index 47e5df3..1b1ac52 100644 --- a/include/plist/plist.h +++ b/include/plist/plist.h | |||
| @@ -578,169 +578,7 @@ extern "C" | |||
| 578 | */ | 578 | */ |
| 579 | PLIST_API char plist_compare_node_value(plist_t node_l, plist_t node_r); | 579 | PLIST_API char plist_compare_node_value(plist_t node_l, plist_t node_r); |
| 580 | 580 | ||
| 581 | |||
| 582 | //DEPRECATED API BELOW | ||
| 583 | |||
| 584 | /*@}*/ | 581 | /*@}*/ |
| 585 | /** | ||
| 586 | * \defgroup DeprecatedAPI Deprecated libplist API | ||
| 587 | */ | ||
| 588 | /*@{*/ | ||
| 589 | |||
| 590 | /******************************************** | ||
| 591 | * * | ||
| 592 | * Tree navigation * | ||
| 593 | * * | ||
| 594 | ********************************************/ | ||
| 595 | |||
| 596 | /** | ||
| 597 | * Get the first child of a node | ||
| 598 | * | ||
| 599 | * @param node the first child | ||
| 600 | */ | ||
| 601 | PLIST_API plist_t plist_get_first_child(plist_t node); | ||
| 602 | |||
| 603 | /** | ||
| 604 | * Get the next sibling of a node | ||
| 605 | * | ||
| 606 | * @param node the next sibling | ||
| 607 | */ | ||
| 608 | PLIST_API plist_t plist_get_next_sibling(plist_t node); | ||
| 609 | |||
| 610 | /** | ||
| 611 | * Get the previous sibling of a node | ||
| 612 | * | ||
| 613 | * @param node the previous sibling | ||
| 614 | */ | ||
| 615 | PLIST_API plist_t plist_get_prev_sibling(plist_t node); | ||
| 616 | |||
| 617 | /** | ||
| 618 | * Get the nth child of a #PLIST_ARRAY node. | ||
| 619 | * | ||
| 620 | * @param node the node of type #PLIST_ARRAY | ||
| 621 | * @param n the index of the child to get. Range is [0, array_size[ | ||
| 622 | * @return the nth children or NULL if node is not of type #PLIST_ARRAY | ||
| 623 | */ | ||
| 624 | PLIST_API plist_t plist_get_array_nth_el(plist_t node, uint32_t n); | ||
| 625 | |||
| 626 | /** | ||
| 627 | * Get the child of a #PLIST_DICT node from the associated key value. | ||
| 628 | * | ||
| 629 | * @param node the node of type #PLIST_DICT | ||
| 630 | * @param key the key associated to the requested value | ||
| 631 | * @return the key associated value or NULL if node is not of type #PLIST_DICT | ||
| 632 | */ | ||
| 633 | PLIST_API plist_t plist_get_dict_el_from_key(plist_t node, const char *key); | ||
| 634 | |||
| 635 | |||
| 636 | /******************************************** | ||
| 637 | * * | ||
| 638 | * Setters * | ||
| 639 | * * | ||
| 640 | ********************************************/ | ||
| 641 | |||
| 642 | /** | ||
| 643 | * Add a subnode to a node. The node must be of a structured type | ||
| 644 | * (ie #PLIST_DICT or #PLIST_ARRAY). This function fails silently | ||
| 645 | * if subnode already has a father. | ||
| 646 | * | ||
| 647 | * @param node the node to add a children to | ||
| 648 | * @param subnode the children node | ||
| 649 | */ | ||
| 650 | PLIST_API void plist_add_sub_node(plist_t node, plist_t subnode); | ||
| 651 | |||
| 652 | /** | ||
| 653 | * Add a subnode of type #PLIST_KEY to a node. The node must be of a structured type | ||
| 654 | * (ie #PLIST_DICT or #PLIST_ARRAY). | ||
| 655 | * | ||
| 656 | * @param node the node to add a children to | ||
| 657 | * @param val the key value encoded as an ASCII string (must be null terminated) | ||
| 658 | */ | ||
| 659 | PLIST_API void plist_add_sub_key_el(plist_t node, const char *val); | ||
| 660 | |||
| 661 | /** | ||
| 662 | * Add a subnode of type #PLIST_STRING to a node. The node must be of a structured type | ||
| 663 | * (ie #PLIST_DICT or #PLIST_ARRAY). | ||
| 664 | * | ||
| 665 | * @param node the node to add a children to | ||
| 666 | * @param val the string value encoded as an ASCII or UTF-8 string (must be null terminated) | ||
| 667 | */ | ||
| 668 | PLIST_API void plist_add_sub_string_el(plist_t node, const char *val); | ||
| 669 | |||
| 670 | /** | ||
| 671 | * Add a subnode of type #PLIST_BOOLEAN to a node. The node must be of a structured type | ||
| 672 | * (ie #PLIST_DICT or #PLIST_ARRAY). | ||
| 673 | * | ||
| 674 | * @param node the node to add a children to | ||
| 675 | * @param val the boolean value (TRUE or FALSE) | ||
| 676 | */ | ||
| 677 | PLIST_API void plist_add_sub_bool_el(plist_t node, uint8_t val); | ||
| 678 | |||
| 679 | /** | ||
| 680 | * Add a subnode of type #PLIST_UINT to a node. The node must be of a structured type | ||
| 681 | * (ie #PLIST_DICT or #PLIST_ARRAY). | ||
| 682 | * | ||
| 683 | * @param node the node to add a children to | ||
| 684 | * @param val the unsigned integer value | ||
| 685 | */ | ||
| 686 | PLIST_API void plist_add_sub_uint_el(plist_t node, uint64_t val); | ||
| 687 | |||
| 688 | /** | ||
| 689 | * Add a subnode of type #PLIST_REAL to a node. The node must be of a structured type | ||
| 690 | * (ie #PLIST_DICT or #PLIST_ARRAY). | ||
| 691 | * | ||
| 692 | * @param node the node to add a children to | ||
| 693 | * @param val the real value | ||
| 694 | */ | ||
| 695 | PLIST_API void plist_add_sub_real_el(plist_t node, double val); | ||
| 696 | |||
| 697 | /** | ||
| 698 | * Add a subnode of type #PLIST_DATA to a node. The node must be of a structured type | ||
| 699 | * (ie #PLIST_DICT or #PLIST_ARRAY). | ||
| 700 | * | ||
| 701 | * @param node the node to add a children to | ||
| 702 | * @param val the binary buffer | ||
| 703 | * @param length the length of the buffer | ||
| 704 | */ | ||
| 705 | PLIST_API void plist_add_sub_data_el(plist_t node, const char *val, uint64_t length); | ||
| 706 | |||
| 707 | /** | ||
| 708 | * Add a subnode of type #PLIST_DATE to a node. The node must be of a structured type | ||
| 709 | * (ie #PLIST_DICT or #PLIST_ARRAY). | ||
| 710 | * | ||
| 711 | * @param node the node to add a children to | ||
| 712 | * @param sec the number of seconds since 01/01/2001 | ||
| 713 | * @param usec the number of microseconds | ||
| 714 | */ | ||
| 715 | PLIST_API void plist_add_sub_date_el(plist_t node, int32_t sec, int32_t usec); | ||
| 716 | |||
| 717 | |||
| 718 | /******************************************** | ||
| 719 | * * | ||
| 720 | * Utils * | ||
| 721 | * * | ||
| 722 | ********************************************/ | ||
| 723 | |||
| 724 | /** | ||
| 725 | * Find the first encountered #PLIST_KEY node mathing that key. | ||
| 726 | * Search is breath first order. | ||
| 727 | * | ||
| 728 | * @param plist the root node of the plist structure. | ||
| 729 | * @param value the ASCII Key to match. | ||
| 730 | */ | ||
| 731 | PLIST_API plist_t plist_find_node_by_key(plist_t plist, const char *value); | ||
| 732 | |||
| 733 | /** | ||
| 734 | * Find the first encountered #PLIST_STRING node mathing that string. | ||
| 735 | * Search is breath first order. | ||
| 736 | * | ||
| 737 | * @param plist the root node of the plist structure. | ||
| 738 | * @param value the ASCII String to match. | ||
| 739 | */ | ||
| 740 | PLIST_API plist_t plist_find_node_by_string(plist_t plist, const char *value); | ||
| 741 | |||
| 742 | /*@}*/ | ||
| 743 | |||
| 744 | 582 | ||
| 745 | #ifdef __cplusplus | 583 | #ifdef __cplusplus |
| 746 | } | 584 | } |
