attendee.h
00001 /* 00002 This file is part of libkcal. 00003 00004 Copyright (c) 2001-2003 Cornelius Schumacher <schumacher@kde.org> 00005 00006 This library is free software; you can redistribute it and/or 00007 modify it under the terms of the GNU Library General Public 00008 License as published by the Free Software Foundation; either 00009 version 2 of the License, or (at your option) any later version. 00010 00011 This library is distributed in the hope that it will be useful, 00012 but WITHOUT ANY WARRANTY; without even the implied warranty of 00013 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 00014 Library General Public License for more details. 00015 00016 You should have received a copy of the GNU Library General Public License 00017 along with this library; see the file COPYING.LIB. If not, write to 00018 the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, 00019 Boston, MA 02110-1301, USA. 00020 */ 00021 00022 #ifndef KCAL_ATTENDEE_H 00023 #define KCAL_ATTENDEE_H 00024 00025 #include <tqstring.h> 00026 #include <tqstringlist.h> 00027 00028 #include "listbase.h" 00029 #include "person.h" 00030 00031 namespace KCal { 00032 00036 class LIBKCAL_EXPORT Attendee : public Person 00037 { 00038 public: 00039 enum PartStat { NeedsAction, Accepted, Declined, Tentative, 00040 Delegated, Completed, InProcess, None }; 00041 enum Role { ReqParticipant, OptParticipant, NonParticipant, Chair }; 00042 00043 typedef ListBase<Attendee> List; 00044 00055 Attendee( const TQString &name, const TQString &email, 00056 bool rsvp = false, PartStat status = None, 00057 Role role = ReqParticipant, const TQString &u = TQString() ); 00061 virtual ~Attendee(); 00062 00066 // FIXME: List of roles still has to be documented. 00067 void setRole( Role ); 00068 00072 Role role() const; 00073 00077 TQString roleStr() const; 00081 static TQString roleName( Role ); 00085 static TQStringList roleList(); 00086 00090 TQString uid() const; 00094 void setUid ( const TQString & ); 00095 00099 void setStatus( PartStat s ); 00100 00104 PartStat status() const; 00105 00109 TQString statusStr() const; 00113 static TQString statusName( PartStat ); 00117 static TQStringList statusList(); 00118 00122 void setRSVP( bool r ) { mRSVP = r; } 00126 bool RSVP() const { return mRSVP; } 00127 00131 void setDelegate( const TQString &delegate ) { mDelegate = delegate; } 00135 TQString delegate() const { return mDelegate; } 00136 00140 void setDelegator( const TQString &delegator ) { mDelegator = delegator; } 00144 TQString delegator() const { return mDelegator; } 00145 00146 private: 00147 bool mRSVP; 00148 Role mRole; 00149 PartStat mStatus; 00150 TQString mUid; 00151 TQString mDelegate; 00152 TQString mDelegator; 00153 00154 class Private; 00155 Private *d; 00156 }; 00157 00158 bool operator==( const Attendee& a1, const Attendee& a2 ); 00159 00160 } 00161 00162 #endif