Messagelib

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

KDE's Doxygen guidelines are available online.