Changeset View
Changeset View
Standalone View
Standalone View
src/attendee.h
Show All 24 Lines | 21 | /** | |||
---|---|---|---|---|---|
25 | 25 | | |||
26 | @author Cornelius Schumacher \<schumacher@kde.org\> | 26 | @author Cornelius Schumacher \<schumacher@kde.org\> | ||
27 | */ | 27 | */ | ||
28 | 28 | | |||
29 | #ifndef KCALCORE_ATTENDEE_H | 29 | #ifndef KCALCORE_ATTENDEE_H | ||
30 | #define KCALCORE_ATTENDEE_H | 30 | #define KCALCORE_ATTENDEE_H | ||
31 | 31 | | |||
32 | #include <QMetaType> | 32 | #include <QMetaType> | ||
33 | #include <QSharedPointer> | 33 | #include <QSharedDataPointer> | ||
34 | 34 | | |||
35 | #include "kcalcore_export.h" | 35 | #include "kcalcore_export.h" | ||
36 | #include "customproperties.h" | 36 | #include "customproperties.h" | ||
37 | 37 | | |||
38 | namespace KCalCore | 38 | namespace KCalCore | ||
39 | { | 39 | { | ||
40 | 40 | | |||
41 | /** | 41 | /** | ||
▲ Show 20 Lines • Show All 55 Lines • ▼ Show 20 Line(s) | 91 | enum CuType { | |||
97 | /** | 97 | /** | ||
98 | * Parameters that have to set via the QString variant of @setCuType() and @cuType() | 98 | * Parameters that have to set via the QString variant of @setCuType() and @cuType() | ||
99 | * x-name ; Experimental cuType | 99 | * x-name ; Experimental cuType | ||
100 | * iana-token ; Other IANA-registered | 100 | * iana-token ; Other IANA-registered | ||
101 | */ | 101 | */ | ||
102 | }; | 102 | }; | ||
103 | 103 | | |||
104 | /** | 104 | /** | ||
105 | A shared pointer to an Attendee object. | | |||
106 | */ | | |||
107 | typedef QSharedPointer<Attendee> Ptr; | | |||
108 | | ||||
109 | /** | | |||
110 | List of attendees. | 105 | List of attendees. | ||
111 | */ | 106 | */ | ||
112 | typedef QVector<Ptr> List; | 107 | typedef QVector<Attendee> List; | ||
108 | | ||||
109 | /** Create a null Attendee. */ | ||||
110 | Attendee(); | ||||
113 | 111 | | |||
114 | /** | 112 | /** | ||
115 | Constructs an attendee consisting of a person name (@p name) and | 113 | Constructs an attendee consisting of a person name (@p name) and | ||
116 | email address (@p email); invitation status and #Role; | 114 | email address (@p email); invitation status and #Role; | ||
117 | an optional @acronym RSVP flag and @acronym UID. | 115 | an optional @acronym RSVP flag and @acronym UID. | ||
118 | 116 | | |||
119 | @param name is person name of the attendee. | 117 | @param name is person name of the attendee. | ||
120 | @param email is person email address of the attendee. | 118 | @param email is person email address of the attendee. | ||
Show All 14 Lines | |||||
135 | Attendee(const Attendee &attendee); | 133 | Attendee(const Attendee &attendee); | ||
136 | 134 | | |||
137 | /** | 135 | /** | ||
138 | Destroys the attendee. | 136 | Destroys the attendee. | ||
139 | */ | 137 | */ | ||
140 | ~Attendee(); | 138 | ~Attendee(); | ||
141 | 139 | | |||
142 | /** | 140 | /** | ||
141 | * Returns @c true if this is a default-constructed Attendee instance. | ||||
142 | */ | ||||
143 | bool isNull() const; | ||||
144 | | ||||
145 | /** | ||||
143 | Returns the name of the attendee. | 146 | Returns the name of the attendee. | ||
144 | */ | 147 | */ | ||
145 | Q_REQUIRED_RESULT QString name() const; | 148 | Q_REQUIRED_RESULT QString name() const; | ||
146 | /** | 149 | /** | ||
147 | Sets the name of the attendee to @p name. | 150 | Sets the name of the attendee to @p name. | ||
148 | */ | 151 | */ | ||
149 | void setName(const QString &name); | 152 | void setName(const QString &name); | ||
150 | 153 | | |||
▲ Show 20 Lines • Show All 182 Lines • ▼ Show 20 Line(s) | 334 | /** | |||
333 | 336 | | |||
334 | @param attendee is the attendee to copy. | 337 | @param attendee is the attendee to copy. | ||
335 | */ | 338 | */ | ||
336 | Attendee &operator=(const Attendee &attendee); | 339 | Attendee &operator=(const Attendee &attendee); | ||
337 | 340 | | |||
338 | private: | 341 | private: | ||
339 | //@cond PRIVATE | 342 | //@cond PRIVATE | ||
340 | class Private; | 343 | class Private; | ||
341 | Private *const d; | 344 | QSharedDataPointer<Private> d; | ||
342 | //@endcond | 345 | //@endcond | ||
343 | 346 | | |||
344 | friend KCALCORE_EXPORT QDataStream &operator<<(QDataStream &s, | 347 | friend KCALCORE_EXPORT QDataStream &operator<<(QDataStream &s, | ||
345 | const KCalCore::Attendee::Ptr &attendee); | 348 | const KCalCore::Attendee &attendee); | ||
346 | friend KCALCORE_EXPORT QDataStream &operator>>(QDataStream &s, | 349 | friend KCALCORE_EXPORT QDataStream &operator>>(QDataStream &s, | ||
347 | KCalCore::Attendee::Ptr &attendee); | 350 | KCalCore::Attendee &attendee); | ||
348 | }; | 351 | }; | ||
349 | 352 | | |||
350 | /** | 353 | /** | ||
351 | Serializes an Attendee object into a data stream. | 354 | Serializes an Attendee object into a data stream. | ||
352 | @param stream is a QDataStream. | 355 | @param stream is a QDataStream. | ||
353 | @param attendee is a pointer to a Attendee object to be serialized. | 356 | @param attendee is a pointer to a Attendee object to be serialized. | ||
354 | */ | 357 | */ | ||
355 | KCALCORE_EXPORT QDataStream &operator<<(QDataStream &stream, | 358 | KCALCORE_EXPORT QDataStream &operator<<(QDataStream &stream, | ||
356 | const KCalCore::Attendee::Ptr &attendee); | 359 | const KCalCore::Attendee &attendee); | ||
357 | 360 | | |||
358 | /** | 361 | /** | ||
359 | Initializes an Attendee object from a data stream. | 362 | Initializes an Attendee object from a data stream. | ||
360 | @param stream is a QDataStream. | 363 | @param stream is a QDataStream. | ||
361 | @param attendee is a pointer to a Attendee object to be initialized. | 364 | @param attendee is a pointer to a Attendee object to be initialized. | ||
362 | */ | 365 | */ | ||
363 | KCALCORE_EXPORT QDataStream &operator>>(QDataStream &stream, | 366 | KCALCORE_EXPORT QDataStream &operator>>(QDataStream &stream, | ||
364 | KCalCore::Attendee::Ptr &attendee); | 367 | KCalCore::Attendee &attendee); | ||
365 | } | 368 | } | ||
366 | 369 | | |||
367 | //@cond PRIVATE | 370 | //@cond PRIVATE | ||
368 | Q_DECLARE_TYPEINFO(KCalCore::Attendee::Ptr, Q_MOVABLE_TYPE); | 371 | Q_DECLARE_TYPEINFO(KCalCore::Attendee, Q_MOVABLE_TYPE); | ||
369 | Q_DECLARE_METATYPE(KCalCore::Attendee::Ptr) | 372 | Q_DECLARE_METATYPE(KCalCore::Attendee) | ||
370 | //@endcond | 373 | //@endcond | ||
371 | 374 | | |||
372 | #endif | 375 | #endif |