-rw-r--r-- | kabc/addressee.h | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/kabc/addressee.h b/kabc/addressee.h index 9336edc..0aa2c51 100644 --- a/kabc/addressee.h +++ b/kabc/addressee.h | |||
@@ -642,208 +642,211 @@ class Addressee | |||
642 | */ | 642 | */ |
643 | void removePhoneNumber( const PhoneNumber &phoneNumber ); | 643 | void removePhoneNumber( const PhoneNumber &phoneNumber ); |
644 | 644 | ||
645 | /** | 645 | /** |
646 | Return phone number, which matches the given type. | 646 | Return phone number, which matches the given type. |
647 | */ | 647 | */ |
648 | PhoneNumber phoneNumber( int type ) const; | 648 | PhoneNumber phoneNumber( int type ) const; |
649 | 649 | ||
650 | /** | 650 | /** |
651 | Return list of all phone numbers. | 651 | Return list of all phone numbers. |
652 | */ | 652 | */ |
653 | PhoneNumber::List phoneNumbers() const; | 653 | PhoneNumber::List phoneNumbers() const; |
654 | 654 | ||
655 | /** | 655 | /** |
656 | Return list of phone numbers with a special type. | 656 | Return list of phone numbers with a special type. |
657 | */ | 657 | */ |
658 | PhoneNumber::List phoneNumbers( int type ) const; | 658 | PhoneNumber::List phoneNumbers( int type ) const; |
659 | 659 | ||
660 | /** | 660 | /** |
661 | Return phone number with the given id. | 661 | Return phone number with the given id. |
662 | */ | 662 | */ |
663 | PhoneNumber findPhoneNumber( const QString &id ) const; | 663 | PhoneNumber findPhoneNumber( const QString &id ) const; |
664 | 664 | ||
665 | /** | 665 | /** |
666 | Insert a key. If a key with the same id already exists | 666 | Insert a key. If a key with the same id already exists |
667 | in this addressee it is not duplicated. | 667 | in this addressee it is not duplicated. |
668 | */ | 668 | */ |
669 | void insertKey( const Key &key ); | 669 | void insertKey( const Key &key ); |
670 | 670 | ||
671 | /** | 671 | /** |
672 | Remove a key. If no key with the given id exists for this | 672 | Remove a key. If no key with the given id exists for this |
673 | addresse nothing happens. | 673 | addresse nothing happens. |
674 | */ | 674 | */ |
675 | void removeKey( const Key &key ); | 675 | void removeKey( const Key &key ); |
676 | 676 | ||
677 | /** | 677 | /** |
678 | Return key, which matches the given type. | 678 | Return key, which matches the given type. |
679 | If @p type == Key::Custom you can specify a string | 679 | If @p type == Key::Custom you can specify a string |
680 | that should match. If you leave the string empty, the first | 680 | that should match. If you leave the string empty, the first |
681 | key with a custom value is returned. | 681 | key with a custom value is returned. |
682 | */ | 682 | */ |
683 | Key key( int type, QString customTypeString = QString::null ) const; | 683 | Key key( int type, QString customTypeString = QString::null ) const; |
684 | 684 | ||
685 | /** | 685 | /** |
686 | Return list of all keys. | 686 | Return list of all keys. |
687 | */ | 687 | */ |
688 | Key::List keys() const; | 688 | Key::List keys() const; |
689 | 689 | ||
690 | /** | 690 | /** |
691 | Set the list of keys | 691 | Set the list of keys |
692 | @param keys The keys to be set. | 692 | @param keys The keys to be set. |
693 | */ | 693 | */ |
694 | void setKeys( const Key::List& keys); | 694 | void setKeys( const Key::List& keys); |
695 | 695 | ||
696 | /** | 696 | /** |
697 | Return list of keys with a special type. | 697 | Return list of keys with a special type. |
698 | If @p type == Key::Custom you can specify a string | 698 | If @p type == Key::Custom you can specify a string |
699 | that should match. If you leave the string empty, all custom | 699 | that should match. If you leave the string empty, all custom |
700 | keys will be returned. | 700 | keys will be returned. |
701 | */ | 701 | */ |
702 | Key::List keys( int type, QString customTypeString = QString::null ) const; | 702 | Key::List keys( int type, QString customTypeString = QString::null ) const; |
703 | 703 | ||
704 | /** | 704 | /** |
705 | Return key with the given id. | 705 | Return key with the given id. |
706 | */ | 706 | */ |
707 | Key findKey( const QString &id ) const; | 707 | Key findKey( const QString &id ) const; |
708 | 708 | ||
709 | /** | 709 | /** |
710 | Insert an address. If an address with the same id already exists | 710 | Insert an address. If an address with the same id already exists |
711 | in this addressee it is not duplicated. | 711 | in this addressee it is not duplicated. |
712 | */ | 712 | */ |
713 | void insertAddress( const Address &address ); | 713 | void insertAddress( const Address &address ); |
714 | 714 | ||
715 | /** | 715 | /** |
716 | Remove address. If no address with the given id exists for this | 716 | Remove address. If no address with the given id exists for this |
717 | addresse nothing happens. | 717 | addresse nothing happens. |
718 | */ | 718 | */ |
719 | void removeAddress( const Address &address ); | 719 | void removeAddress( const Address &address ); |
720 | 720 | ||
721 | /** | 721 | /** |
722 | Return address, which matches the given type. | 722 | Return address, which matches the given type. |
723 | */ | 723 | */ |
724 | Address address( int type ) const; | 724 | Address address( int type ) const; |
725 | 725 | ||
726 | /** | 726 | /** |
727 | Return list of all addresses. | 727 | Return list of all addresses. |
728 | */ | 728 | */ |
729 | Address::List addresses() const; | 729 | Address::List addresses() const; |
730 | 730 | ||
731 | /** | 731 | /** |
732 | Return list of addresses with a special type. | 732 | Return list of addresses with a special type. |
733 | */ | 733 | */ |
734 | Address::List addresses( int type ) const; | 734 | Address::List addresses( int type ) const; |
735 | 735 | ||
736 | /** | 736 | /** |
737 | Return address with the given id. | 737 | Return address with the given id. |
738 | */ | 738 | */ |
739 | Address findAddress( const QString &id ) const; | 739 | Address findAddress( const QString &id ) const; |
740 | 740 | ||
741 | /** | 741 | /** |
742 | Insert category. If the category already exists it is not duplicated. | 742 | Insert category. If the category already exists it is not duplicated. |
743 | */ | 743 | */ |
744 | void insertCategory( const QString & ); | 744 | void insertCategory( const QString & ); |
745 | 745 | ||
746 | /** | 746 | /** |
747 | Remove category. | 747 | Remove category. |
748 | */ | 748 | */ |
749 | void removeCategory( const QString & ); | 749 | void removeCategory( const QString & ); |
750 | 750 | ||
751 | /** | 751 | /** |
752 | Return, if addressee has the given category. | 752 | Return, if addressee has the given category. |
753 | */ | 753 | */ |
754 | bool hasCategory( const QString & ) const; | 754 | bool hasCategory( const QString & ) const; |
755 | 755 | ||
756 | /** | 756 | /** |
757 | Set categories to given value. | 757 | Set categories to given value. |
758 | */ | 758 | */ |
759 | void setCategories( const QStringList & ); | 759 | void setCategories( const QStringList & ); |
760 | 760 | ||
761 | /** | 761 | /** |
762 | Return list of all set categories. | 762 | Return list of all set categories. |
763 | */ | 763 | */ |
764 | QStringList categories() const; | 764 | QStringList categories() const; |
765 | 765 | ||
766 | /** | 766 | /** |
767 | Insert custom entry. The entry is identified by the name of the inserting | 767 | Insert custom entry. The entry is identified by the name of the inserting |
768 | application and a unique name. If an entry with the given app and name | 768 | application and a unique name. If an entry with the given app and name |
769 | already exists its value is replaced with the new given value. | 769 | already exists its value is replaced with the new given value. |
770 | */ | 770 | */ |
771 | void insertCustom( const QString &app, const QString &name, | 771 | void insertCustom( const QString &app, const QString &name, |
772 | const QString &value ); | 772 | const QString &value ); |
773 | 773 | ||
774 | /** | 774 | /** |
775 | Remove custom entry. | 775 | Remove custom entry. |
776 | */ | 776 | */ |
777 | void removeCustom( const QString &app, const QString &name ); | 777 | void removeCustom( const QString &app, const QString &name ); |
778 | 778 | ||
779 | /** | 779 | /** |
780 | Return value of custom entry, identified by app and entry name. | 780 | Return value of custom entry, identified by app and entry name. |
781 | */ | 781 | */ |
782 | QString custom( const QString &app, const QString &name ) const; | 782 | QString custom( const QString &app, const QString &name ) const; |
783 | 783 | ||
784 | /** | 784 | /** |
785 | Set all custom entries. | 785 | Set all custom entries. |
786 | */ | 786 | */ |
787 | void setCustoms( const QStringList & ); | 787 | void setCustoms( const QStringList & ); |
788 | 788 | ||
789 | /** | 789 | /** |
790 | Return list of all custom entries. | 790 | Return list of all custom entries. |
791 | */ | 791 | */ |
792 | QStringList customs() const; | 792 | QStringList customs() const; |
793 | 793 | ||
794 | /** | 794 | /** |
795 | Parse full email address. The result is given back in fullName and email. | 795 | Parse full email address. The result is given back in fullName and email. |
796 | */ | 796 | */ |
797 | static void parseEmailAddress( const QString &rawEmail, QString &fullName, | 797 | static void parseEmailAddress( const QString &rawEmail, QString &fullName, |
798 | QString &email ); | 798 | QString &email ); |
799 | 799 | ||
800 | /** | 800 | /** |
801 | Debug output. | 801 | Debug output. |
802 | */ | 802 | */ |
803 | void dump() const; | 803 | void dump() const; |
804 | 804 | ||
805 | /** | 805 | /** |
806 | Returns string representation of the addressee. | 806 | Returns string representation of the addressee. |
807 | */ | 807 | */ |
808 | QString asString() const; | 808 | QString asString() const; |
809 | 809 | ||
810 | /** | 810 | /** |
811 | Set resource where the addressee is from. | 811 | Set resource where the addressee is from. |
812 | */ | 812 | */ |
813 | void setResource( Resource *resource ); | 813 | void setResource( Resource *resource ); |
814 | 814 | ||
815 | /** | 815 | /** |
816 | Return pointer to resource. | 816 | Return pointer to resource. |
817 | */ | 817 | */ |
818 | Resource *resource() const; | 818 | Resource *resource() const; |
819 | 819 | ||
820 | /** | 820 | /** |
821 | Return resourcelabel. | 821 | Return resourcelabel. |
822 | */ | 822 | */ |
823 | //US | 823 | //US |
824 | static QString resourceLabel(); | 824 | static QString resourceLabel(); |
825 | 825 | ||
826 | /** | 826 | /** |
827 | Mark addressee as changed. | 827 | Mark addressee as changed. |
828 | */ | 828 | */ |
829 | void setChanged( bool value ); | 829 | void setChanged( bool value ); |
830 | 830 | ||
831 | /** | 831 | /** |
832 | Return whether the addressee is changed. | 832 | Return whether the addressee is changed. |
833 | */ | 833 | */ |
834 | bool changed() const; | 834 | bool changed() const; |
835 | |||
836 | void setTagged( bool value ); | ||
837 | bool tagged() const; | ||
835 | 838 | ||
836 | private: | 839 | private: |
837 | Addressee copy(); | 840 | Addressee copy(); |
838 | void detach(); | 841 | void detach(); |
839 | 842 | ||
840 | struct AddresseeData; | 843 | struct AddresseeData; |
841 | mutable KSharedPtr<AddresseeData> mData; | 844 | mutable KSharedPtr<AddresseeData> mData; |
842 | }; | 845 | }; |
843 | 846 | ||
844 | QDataStream &operator<<( QDataStream &, const Addressee & ); | 847 | QDataStream &operator<<( QDataStream &, const Addressee & ); |
845 | QDataStream &operator>>( QDataStream &, Addressee & ); | 848 | QDataStream &operator>>( QDataStream &, Addressee & ); |
846 | 849 | ||
847 | } | 850 | } |
848 | 851 | ||
849 | #endif | 852 | #endif |