libkcal

attendee.h
1 /*
2  This file is part of libkcal.
3 
4  Copyright (c) 2001-2003 Cornelius Schumacher <schumacher@kde.org>
5 
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.
10 
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.
15 
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., 51 Franklin Street, Fifth Floor,
19  Boston, MA 02110-1301, USA.
20 */
21 
22 #ifndef KCAL_ATTENDEE_H
23 #define KCAL_ATTENDEE_H
24 
25 #include <tqstring.h>
26 #include <tqstringlist.h>
27 
28 #include "listbase.h"
29 #include "person.h"
30 
31 namespace KCal {
32 
36 class LIBKCAL_EXPORT Attendee : public Person
37 {
38  public:
39  enum PartStat { NeedsAction, Accepted, Declined, Tentative,
40  Delegated, Completed, InProcess, None };
41  enum Role { ReqParticipant, OptParticipant, NonParticipant, Chair };
42 
43  typedef ListBase<Attendee> List;
44 
55  Attendee( const TQString &name, const TQString &email,
56  bool rsvp = false, PartStat status = None,
57  Role role = ReqParticipant, const TQString &u = TQString() );
61  virtual ~Attendee();
62 
66  // FIXME: List of roles still has to be documented.
67  void setRole( Role );
68 
72  Role role() const;
73 
77  TQString roleStr() const;
81  static TQString roleName( Role );
85  static TQStringList roleList();
86 
90  TQString uid() const;
94  void setUid ( const TQString & );
95 
99  void setStatus( PartStat s );
100 
104  PartStat status() const;
105 
109  TQString statusStr() const;
113  static TQString statusName( PartStat );
117  static TQStringList statusList();
118 
122  void setRSVP( bool r ) { mRSVP = r; }
126  bool RSVP() const { return mRSVP; }
127 
131  void setDelegate( const TQString &delegate ) { mDelegate = delegate; }
135  TQString delegate() const { return mDelegate; }
136 
140  void setDelegator( const TQString &delegator ) { mDelegator = delegator; }
144  TQString delegator() const { return mDelegator; }
145 
146  private:
147  bool mRSVP;
148  Role mRole;
149  PartStat mStatus;
150  TQString mUid;
151  TQString mDelegate;
152  TQString mDelegator;
153 
154  class Private;
155  Private *d;
156 };
157 
158 bool operator==( const Attendee& a1, const Attendee& a2 );
159 
160 }
161 
162 #endif
This class represents information related to an attendee of an event.
Definition: attendee.h:37
void setDelegator(const TQString &delegator)
Sets the delegator.
Definition: attendee.h:140
void setRSVP(bool r)
Set if Attendee is asked to reply.
Definition: attendee.h:122
void setDelegate(const TQString &delegate)
Sets the delegate.
Definition: attendee.h:131
TQString delegate() const
Returns the delegate.
Definition: attendee.h:135
TQString delegator() const
Returns the delegator.
Definition: attendee.h:144
bool RSVP() const
Return, if Attendee is asked to reply.
Definition: attendee.h:126
This class represents a person.
Definition: person.h:35
Namespace KCal is for global classes, objects and/or functions in libkcal.
Definition: alarm.h:38