36 #include <QDataStream> 45 class KCalCore::Attendee::Private
72 void KCalCore::Attendee::Private::setCuType(
const QString &cuType)
74 const QString upper = cuType.toUpper();
75 if (upper == QLatin1String(
"INDIVIDUAL")) {
77 }
else if (upper == QLatin1String(
"GROUP")) {
79 }
else if (upper == QLatin1String(
"RESOURCE")) {
81 }
else if (upper == QLatin1String(
"ROOM")) {
85 if (upper.startsWith(QLatin1String(
"X-")) || upper.startsWith(QLatin1String(
"IANA-"))) {
96 QString KCalCore::Attendee::Private::cuTypeStr()
const 100 return QLatin1String(
"INDIVIDUAL");
102 return QLatin1String(
"GROUP");
104 return QLatin1String(
"RESOURCE");
106 return QLatin1String(
"ROOM");
108 if (sCuType.isEmpty()) {
109 return QLatin1String(
"UNKNOWN");
114 return QLatin1String(
"UNKNOWN");
134 d(new
Attendee::Private(*attendee.d))
146 d->mUid == attendee.d->mUid &&
147 d->mRSVP == attendee.d->mRSVP &&
148 d->mRole == attendee.d->mRole &&
149 d->mStatus == attendee.d->mStatus &&
150 d->mDelegate == attendee.d->mDelegate &&
151 d->mDelegator == attendee.d->mDelegator &&
158 return !operator==(attendee);
164 if (&attendee ==
this) {
169 setName(attendee.
name());
170 setEmail(attendee.
email());
211 return d->cuTypeStr();
251 return d->mDelegator;
256 d->mCustomProperties.setNonKDECustomProperty(xname, xvalue);
261 return d->mCustomProperties;
266 return d->mCustomProperties;
273 return stream << attendee->d->mRSVP
274 << int(attendee->d->mRole)
275 << int(attendee->d->mStatus)
277 << attendee->d->mDelegate
278 << attendee->d->mDelegator
279 << attendee->d->cuTypeStr()
280 << attendee->d->mCustomProperties;
311 RSVP, status, role, uid));
312 att_temp->setDelegate(delegate);
313 att_temp->setDelegator(delegator);
314 att_temp->setCuType(cuType);
315 att_temp->d->mCustomProperties = customProperties;
316 attendee.swap(att_temp);
QString delegator() const
Returns the delegator.
void setDelegator(const QString &delegator)
Sets the delegator.
~Attendee()
Destroys the attendee.
void setStatus(PartStat status)
Sets the PartStat of the attendee to status.
This file is part of the API for handling calendar data and defines the Attendee class.
bool RSVP() const
Returns the attendee RSVP flag.
Represents a person, by name and email address.
Attendee(const QString &name, const QString &email, bool rsvp=false, PartStat status=None, Role role=ReqParticipant, const QString &uid=QString())
Constructs an attendee consisting of a Person name (name) and email address (email); invitation statu...
QString delegate() const
Returns the delegate.
void setEmail(const QString &email)
Sets the email address for this person to email.
QString name() const
Returns the person name string.
void setCustomProperty(const QByteArray &xname, const QString &xvalue)
Adds a custom property.
Role
The different types of participation roles.
void setUid(const QString &uid)
Sets the UID of the attendee to uid.
Role role() const
Returns the Role of the attendee.
void setCuType(CuType cuType)
Sets the CuType of the attendee to cuType.
CuType cuType() const
Returns the CuType of the attendee.
Attendee & operator=(const Attendee &attendee)
Sets this attendee equal to attendee.
bool operator==(const Attendee &attendee) const
Compares this with attendee for equality.
void setName(const QString &name)
Sets the name of the person to name.
CuType
The different types of a participant.
QString name() const
Returns the person name string.
QString cuTypeStr() const
Returns the CuType of the attendee.
void setDelegate(const QString &delegate)
Sets the delegate.
PartStat
The different types of participant status.
void setRSVP(bool rsvp)
Sets the RSVP flag of the attendee to rsvp.
bool operator!=(const Attendee &attendee) const
Compares this with attendee for inequality.
QString uid() const
Returns the UID of the attendee.
KCALCORE_EXPORT QDataStream & operator>>(QDataStream &in, const KCalCore::Alarm::Ptr &)
Alarm deserializer.
QSharedPointer< Person > Ptr
A shared pointer to a Person object.
QSharedPointer< Attendee > Ptr
A shared pointer to an Attendee object.
A class to manage custom calendar properties.
CustomProperties & customProperties()
Returns a reference to the CustomProperties object.
QString email() const
Returns the email address for this person.
QString email() const
Returns the email address for this person.
Represents information related to an attendee of an Calendar Incidence, typically a meeting or task (...
KCALCORE_EXPORT QDataStream & operator<<(QDataStream &out, const KCalCore::Alarm::Ptr &)
Alarm serializer.
void setRole(Role role)
Sets the Role of the attendee to role.
PartStat status() const
Returns the PartStat of the attendee.