Messagelib

imagecollector.h
1 /* -*- c++ -*-
2  * imagecollector.h
3  *
4  * This file is part of KMail, the KDE mail client.
5  * SPDX-FileCopyrightText: 2004 Marc Mutz <[email protected]>
6  * SPDX-FileCopyrightText: 2011 Torgny Nyblom <[email protected]>
7  *
8  * SPDX-License-Identifier: GPL-2.0-or-later
9  */
10 
11 #pragma once
12 
13 #include "messagecore_export.h"
14 
15 #include <QObject>
16 #include <memory>
17 #include <vector>
18 namespace KMime
19 {
20 class Content;
21 }
22 
23 namespace MessageCore
24 {
25 /**
26  * @short A helper class to collect the embedded images of a email.
27  *
28  * @author Marc Mutz <[email protected]>
29  * @author Torgny Nyblom <[email protected]>
30  * @todo: Make it a simple static method?!?
31  */
32 class MESSAGECORE_EXPORT ImageCollector
33 {
34 public:
35  /**
36  * Creates a new image collector.
37  */
39 
40  /**
41  * Destroys the image collector.
42  */
43  ~ImageCollector();
44 
45  /**
46  * Starts collecting the images.
47  *
48  * @param content The email content that contains the images.
49  */
50  void collectImagesFrom(KMime::Content *content);
51 
52  /**
53  * Returns the collected images.
54  */
55  Q_REQUIRED_RESULT const std::vector<KMime::Content *> &images() const;
56 
57 private:
58  //@cond PRIVATE
59  class ImageCollectorPrivate;
60  std::unique_ptr<ImageCollectorPrivate> const d;
61 
62  Q_DISABLE_COPY(ImageCollector)
63  //@endcond
64 };
65 }
66 
A helper class to collect the embedded images of a email.
This file is part of the KDE documentation.
Documentation copyright © 1996-2021 The KDE developers.
Generated on Sat Dec 4 2021 23:12:53 by doxygen 1.8.11 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.