Messagelib

attachmentfromurlbasejob.cpp
1 /*
2  SPDX-FileCopyrightText: 2011 Martin Bedn├ír <[email protected]>
3 
4  SPDX-License-Identifier: GPL-2.0-or-later
5 */
6 
7 #include "MessageCore/AttachmentFromUrlBaseJob"
8 
9 using namespace MessageCore;
10 
11 class Q_DECL_HIDDEN AttachmentFromUrlBaseJob::AttachmentFromUrlBaseJobPrivate
12 {
13 public:
14  AttachmentFromUrlBaseJobPrivate(const QUrl &url, AttachmentFromUrlBaseJob *qq);
15 
16  AttachmentFromUrlBaseJob *const q;
17  qint64 mMaxSize = -1;
18  QUrl mUrl;
19 };
20 
21 AttachmentFromUrlBaseJob::AttachmentFromUrlBaseJobPrivate::AttachmentFromUrlBaseJobPrivate(const QUrl &url, AttachmentFromUrlBaseJob *qq)
22  : q(qq)
23  , mUrl(url)
24 {
25 }
26 
27 AttachmentFromUrlBaseJob::AttachmentFromUrlBaseJob(const QUrl &url, QObject *parent)
28  : AttachmentLoadJob(parent)
29  , d(new AttachmentFromUrlBaseJobPrivate(url, this))
30 {
31 }
32 
33 AttachmentFromUrlBaseJob::~AttachmentFromUrlBaseJob() = default;
34 
35 void AttachmentFromUrlBaseJob::setMaximumAllowedSize(qint64 size)
36 {
37  d->mMaxSize = size;
38 }
39 
40 qint64 AttachmentFromUrlBaseJob::maximumAllowedSize() const
41 {
42  return d->mMaxSize;
43 }
44 
45 void AttachmentFromUrlBaseJob::setUrl(const QUrl &url)
46 {
47  d->mUrl = url;
48 }
49 
50 QUrl AttachmentFromUrlBaseJob::url() const
51 {
52  return d->mUrl;
53 }
A base class for jobs to load attachments from different sources.
QObject * parent() const const
This file is part of the KDE documentation.
Documentation copyright © 1996-2021 The KDE developers.
Generated on Fri Nov 26 2021 23:16:41 by doxygen 1.8.11 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.