libtdepim
distributionlist.h00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021 #ifndef DISTRIBUTIONLIST_H
00022 #define DISTRIBUTIONLIST_H
00023
00024 #include <tdeabc/addressee.h>
00025
00026 namespace TDEABC {
00027 class AddressBook;
00028 }
00029
00030 namespace KPIM {
00031
00043 class DistributionList : public TDEABC::Addressee
00044 {
00045 public:
00053 struct Entry
00054 {
00055 typedef TQValueList<Entry> List;
00056
00057 Entry() {}
00058 Entry( const Addressee &_addressee, const TQString &_email ) :
00059 addressee( _addressee ), email( _email ) {}
00060
00061 Addressee addressee;
00062 TQString email;
00063 };
00064
00065 typedef TQValueList<DistributionList> List;
00066
00070 DistributionList();
00075 DistributionList( const TDEABC::Addressee& addr );
00076
00080 ~DistributionList() {}
00081
00083 void setName( const TQString &name );
00084
00086 TQString name() const { return formattedName(); }
00087
00092 void insertEntry( const Addressee &, const TQString &email=TQString() );
00093
00098 void removeEntry( const Addressee &, const TQString &email=TQString() );
00099
00101 void insertEntry( const TQString& uid, const TQString& email=TQString() );
00103 void removeEntry( const TQString& uid, const TQString& email=TQString() );
00104
00105
00111 TQStringList emails( TDEABC::AddressBook* book ) const;
00112
00118 Entry::List entries( TDEABC::AddressBook* book ) const;
00119
00120
00121 static bool isDistributionList( const TDEABC::Addressee& addr );
00122
00123
00124 static DistributionList findByName( TDEABC::AddressBook* book,
00125 const TQString& name,
00126 bool caseSensitive = true );
00127
00128
00129
00130 static TQValueList<DistributionList> allDistributionLists( TDEABC::AddressBook* book );
00131
00132
00133 private:
00134
00135 };
00136
00137 }
00138
00139 #endif
00140
|