summaryrefslogtreecommitdiffabout
path: root/libkcal/attendee.h
authorzautrix <zautrix>2004-06-26 19:01:18 (UTC)
committer zautrix <zautrix>2004-06-26 19:01:18 (UTC)
commitb9aad1f15dc600e4dbe4c62d3fcced6363188ba3 (patch) (unidiff)
tree2c3d4004fb21c72cba65793859f9bcd8ffd3a49c /libkcal/attendee.h
downloadkdepimpi-b9aad1f15dc600e4dbe4c62d3fcced6363188ba3.zip
kdepimpi-b9aad1f15dc600e4dbe4c62d3fcced6363188ba3.tar.gz
kdepimpi-b9aad1f15dc600e4dbe4c62d3fcced6363188ba3.tar.bz2
Initial revision
Diffstat (limited to 'libkcal/attendee.h') (more/less context) (ignore whitespace changes)
-rw-r--r--libkcal/attendee.h96
1 files changed, 96 insertions, 0 deletions
diff --git a/libkcal/attendee.h b/libkcal/attendee.h
new file mode 100644
index 0000000..1bd2ff3
--- a/dev/null
+++ b/libkcal/attendee.h
@@ -0,0 +1,96 @@
1/*
2 This file is part of libkcal.
3 Copyright (c) 2001 Cornelius Schumacher <schumacher@kde.org>
4
5 This library is free software; you can redistribute it and/or
6 modify it under the terms of the GNU Library General Public
7 License as published by the Free Software Foundation; either
8 version 2 of the License, or (at your option) any later version.
9
10 This library is distributed in the hope that it will be useful,
11 but WITHOUT ANY WARRANTY; without even the implied warranty of
12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13 Library General Public License for more details.
14
15 You should have received a copy of the GNU Library General Public License
16 along with this library; see the file COPYING.LIB. If not, write to
17 the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
18 Boston, MA 02111-1307, USA.
19*/
20
21#ifndef _ATTENDEE_H
22#define _ATTENDEE_H
23
24#include <qstring.h>
25
26#include "person.h"
27
28namespace KCal {
29
30/**
31 This class represents information related to an attendee of an event.
32*/
33class Attendee : public Person
34{
35 public:
36 enum PartStat { NeedsAction, Accepted, Declined, Tentative,
37 Delegated, Completed, InProcess };
38 enum Role { ReqParticipant, OptParticipant, NonParticipant, Chair };
39
40 /**
41 Create Attendee.
42
43 @param name Name
44 @param email Email address
45 @param rsvp Request for reply
46 @param status Status (see enum for list)
47 @param role Role
48 */
49 Attendee(const QString& name, const QString &email,
50 bool rsvp=false, PartStat status=NeedsAction,
51 Role role=ReqParticipant,const QString& u=QString::null);
52 /** Destruct Attendee */
53 virtual ~Attendee();
54
55 /** Set role of Attendee. List of roles still has to be documented. */
56 void setRole( Role );
57 /** Return role of Attendee. */
58 Role role() const;
59 /** Return role as clear text string */
60 QString roleStr() const;
61 static QString roleName( Role );
62 static QStringList roleList();
63
64 /** Holds the uid of the attendee, if applicable **/
65 QString uid() const;
66 void setUid (QString);
67
68 /** Set status. See enum for definitions of possible values */
69 void setStatus(PartStat s);
70 /** Return status. */
71 PartStat status() const;
72 /** Return status as human-readable string. */
73 QString statusStr() const;
74 static QString statusName( PartStat );
75 static QStringList statusList();
76
77 /** Set if Attendee is asked to reply. */
78 void setRSVP(bool r) { mRSVP = r; }
79 /** Return, if Attendee is asked to reply. */
80 bool RSVP() const { return mRSVP; }
81
82 private:
83 bool mRSVP;
84 Role mRole;
85 PartStat mStatus;
86 QString mUid;
87
88 // used to tell whether we have need to mail this person or not.
89 bool mFlag;
90};
91
92 bool operator==( const Attendee& a1, const Attendee& a2 );
93
94}
95
96#endif