KCalCore Library
attendee.h
Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00029 #ifndef KCALCORE_ATTENDEE_H
00030 #define KCALCORE_ATTENDEE_H
00031
00032 #include <QtCore/QMetaType>
00033
00034 #include "kcalcore_export.h"
00035 #include "customproperties.h"
00036 #include "person.h"
00037
00038 namespace KCalCore {
00039
00057 class KCALCORE_EXPORT Attendee : private Person
00058 {
00059 public:
00060 using Person::setEmail;
00061 using Person::email;
00062 using Person::setName;
00063 using Person::name;
00064 using Person::fullName;
00065
00070 enum PartStat {
00071 NeedsAction,
00072 Accepted,
00073 Declined,
00074 Tentative,
00075 Delegated,
00076 Completed,
00077 InProcess,
00078 None
00079 };
00080
00084 enum Role {
00085 ReqParticipant,
00086 OptParticipant,
00087 NonParticipant,
00088 Chair
00089 };
00090
00094 typedef QSharedPointer<Attendee> Ptr;
00095
00099 typedef QVector<Ptr> List;
00100
00113 Attendee( const QString &name, const QString &email,
00114 bool rsvp = false, PartStat status = None,
00115 Role role = ReqParticipant, const QString &uid = QString() );
00116
00122 Attendee( const Attendee &attendee );
00123
00127 ~Attendee();
00128
00136 void setRole( Role role );
00137
00143 Role role() const;
00144
00152 void setUid ( const QString &uid );
00153
00159 QString uid() const;
00160
00168 void setStatus( PartStat status );
00169
00175 PartStat status() const;
00176
00185 void setRSVP( bool rsvp );
00186
00192 bool RSVP() const;
00193
00199 bool operator==( const Attendee &attendee ) const;
00200
00206 bool operator!=( const Attendee &attendee ) const;
00207
00214 void setDelegate( const QString &delegate );
00215
00220 QString delegate() const;
00221
00228 void setDelegator( const QString &delegator );
00229
00234 QString delegator() const;
00235
00241 void setCustomProperty( const QByteArray &xname, const QString &xvalue );
00242
00246 CustomProperties &customProperties();
00247
00251 const CustomProperties &customProperties() const;
00252
00258 Attendee &operator=( const Attendee &attendee );
00259
00260 private:
00261
00262 class Private;
00263 Private *const d;
00264
00265
00266 friend KCALCORE_EXPORT QDataStream &operator<<( QDataStream &s,
00267 const KCalCore::Attendee::Ptr &attendee );
00268 friend KCALCORE_EXPORT QDataStream &operator>>( QDataStream &s,
00269 KCalCore::Attendee::Ptr &attendee );
00270 };
00271
00277 KCALCORE_EXPORT QDataStream &operator<<( QDataStream &stream,
00278 const KCalCore::Attendee::Ptr &attendee );
00279
00285 KCALCORE_EXPORT QDataStream &operator>>( QDataStream &stream, KCalCore::Attendee::Ptr &attendee );
00286 }
00287
00288
00289 Q_DECLARE_TYPEINFO( KCalCore::Attendee::Ptr, Q_MOVABLE_TYPE );
00290 Q_DECLARE_METATYPE( KCalCore::Attendee::Ptr )
00291
00292
00293 #endif