Build, if that was not necessary blame cartman who told me "sure" :-D
[kdepim.git] / libkcal / attendee.h
blobecc34e0aaba9a5742e846be4754d67e4ec3a4ffb
1 /*
2 This file is part of libkcal.
4 Copyright (c) 2001-2003 Cornelius Schumacher <schumacher@kde.org>
6 This library is free software; you can redistribute it and/or
7 modify it under the terms of the GNU Library General Public
8 License as published by the Free Software Foundation; either
9 version 2 of the License, or (at your option) any later version.
11 This library is distributed in the hope that it will be useful,
12 but WITHOUT ANY WARRANTY; without even the implied warranty of
13 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 Library General Public License for more details.
16 You should have received a copy of the GNU Library General Public License
17 along with this library; see the file COPYING.LIB. If not, write to
18 the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
19 Boston, MA 02111-1307, USA.
22 #ifndef KCAL_ATTENDEE_H
23 #define KCAL_ATTENDEE_H
25 #include <qstring.h>
27 #include "listbase.h"
28 #include "person.h"
30 namespace KCal {
32 /**
33 This class represents information related to an attendee of an event.
35 class Attendee : public Person
37 public:
38 enum PartStat { NeedsAction, Accepted, Declined, Tentative,
39 Delegated, Completed, InProcess };
40 enum Role { ReqParticipant, OptParticipant, NonParticipant, Chair };
42 typedef ListBase<Attendee> List;
44 /**
45 Create Attendee.
47 @param name Name
48 @param email Email address
49 @param rsvp Request for reply
50 @param status Status (see enum for list)
51 @param role Role
52 @param u the uid for the attendee
54 Attendee( const QString &name, const QString &email,
55 bool rsvp = false, PartStat status = NeedsAction,
56 Role role = ReqParticipant, const QString &u = QString::null );
57 /**
58 Destruct Attendee.
60 virtual ~Attendee();
62 /**
63 Set role of Attendee.
65 // FIXME: List of roles still has to be documented.
66 void setRole( Role );
68 /**
69 Return role of Attendee.
71 Role role() const;
73 /**
74 Return role as clear text string.
76 QString roleStr() const;
77 /**
78 Return string represenation of role.
80 static QString roleName( Role );
81 /**
82 Return string representations of all available roles.
84 static QStringList roleList();
86 /**
87 Return unique id of the attendee.
89 QString uid() const;
90 /**
91 Set unique id of attendee.
93 void setUid ( const QString & );
95 /**
96 Set status. See enum for definitions of possible values.
98 void setStatus( PartStat s );
101 Return status.
103 PartStat status() const;
106 Return status as human-readable string.
108 QString statusStr() const;
110 Return string representation of attendee status.
112 static QString statusName( PartStat );
114 Return string representations of all available attendee status values.
116 static QStringList statusList();
119 Set if Attendee is asked to reply.
121 void setRSVP( bool r ) { mRSVP = r; }
123 Return, if Attendee is asked to reply.
125 bool RSVP() const { return mRSVP; }
127 private:
128 bool mRSVP;
129 Role mRole;
130 PartStat mStatus;
131 QString mUid;
133 class Private;
134 Private *d;
137 bool operator==( const Attendee& a1, const Attendee& a2 );
141 #endif