Changeset View
Changeset View
Standalone View
Standalone View
src/attachment.cpp
Show All 26 Lines | 21 | /** | |||
---|---|---|---|---|---|
27 | Represents information related to an attachment for a Calendar Incidence. | 27 | Represents information related to an attachment for a Calendar Incidence. | ||
28 | 28 | | |||
29 | @author Michael Brade \<brade@kde.org\> | 29 | @author Michael Brade \<brade@kde.org\> | ||
30 | */ | 30 | */ | ||
31 | 31 | | |||
32 | #include "attachment.h" | 32 | #include "attachment.h" | ||
33 | #include <QDataStream> | 33 | #include <QDataStream> | ||
34 | 34 | | |||
35 | using namespace KCalCore; | 35 | using namespace KCalendarCore; | ||
36 | 36 | | |||
37 | /** | 37 | /** | ||
38 | Private class that helps to provide binary compatibility between releases. | 38 | Private class that helps to provide binary compatibility between releases. | ||
39 | @internal | 39 | @internal | ||
40 | */ | 40 | */ | ||
41 | //@cond PRIVATE | 41 | //@cond PRIVATE | ||
42 | class Q_DECL_HIDDEN KCalCore::Attachment::Private : public QSharedData | 42 | class Q_DECL_HIDDEN KCalendarCore::Attachment::Private : public QSharedData | ||
43 | { | 43 | { | ||
44 | public: | 44 | public: | ||
45 | Private() = default; | 45 | Private() = default; | ||
46 | Private(const QString &mime, bool binary) | 46 | Private(const QString &mime, bool binary) | ||
47 | : mMimeType(mime), | 47 | : mMimeType(mime), | ||
48 | mBinary(binary) | 48 | mBinary(binary) | ||
49 | {} | 49 | {} | ||
50 | Private(const Private &other) = default; | 50 | Private(const Private &other) = default; | ||
▲ Show 20 Lines • Show All 163 Lines • ▼ Show 20 Line(s) | 208 | return uri() == a2.uri() && | |||
214 | decodedData() == a2.decodedData(); | 214 | decodedData() == a2.decodedData(); | ||
215 | } | 215 | } | ||
216 | 216 | | |||
217 | bool Attachment::operator!=(const Attachment &a2) const | 217 | bool Attachment::operator!=(const Attachment &a2) const | ||
218 | { | 218 | { | ||
219 | return !(*this == a2); | 219 | return !(*this == a2); | ||
220 | } | 220 | } | ||
221 | 221 | | |||
222 | QDataStream &KCalCore::operator<<(QDataStream &out, const KCalCore::Attachment &a) | 222 | QDataStream &KCalendarCore::operator<<(QDataStream &out, const KCalendarCore::Attachment &a) | ||
223 | { | 223 | { | ||
224 | out << a.d->mSize | 224 | out << a.d->mSize | ||
225 | << a.d->mMimeType | 225 | << a.d->mMimeType | ||
226 | << a.d->mUri | 226 | << a.d->mUri | ||
227 | << a.d->mEncodedData | 227 | << a.d->mEncodedData | ||
228 | << a.d->mLabel | 228 | << a.d->mLabel | ||
229 | << a.d->mBinary | 229 | << a.d->mBinary | ||
230 | << a.d->mLocal | 230 | << a.d->mLocal | ||
231 | << a.d->mShowInline; | 231 | << a.d->mShowInline; | ||
232 | return out; | 232 | return out; | ||
233 | } | 233 | } | ||
234 | 234 | | |||
235 | QDataStream &KCalCore::operator>>(QDataStream &in, KCalCore::Attachment &a) | 235 | QDataStream &KCalendarCore::operator>>(QDataStream &in, KCalendarCore::Attachment &a) | ||
236 | { | 236 | { | ||
237 | in >> a.d->mSize | 237 | in >> a.d->mSize | ||
238 | >> a.d->mMimeType | 238 | >> a.d->mMimeType | ||
239 | >> a.d->mUri | 239 | >> a.d->mUri | ||
240 | >> a.d->mEncodedData | 240 | >> a.d->mEncodedData | ||
241 | >> a.d->mLabel | 241 | >> a.d->mLabel | ||
242 | >> a.d->mBinary | 242 | >> a.d->mBinary | ||
243 | >> a.d->mLocal | 243 | >> a.d->mLocal | ||
244 | >> a.d->mShowInline; | 244 | >> a.d->mShowInline; | ||
245 | return in; | 245 | return in; | ||
246 | } | 246 | } |