File indexing completed on 2025-01-19 03:52:57

0001 /* ============================================================
0002  *
0003  * This file is a part of digiKam project
0004  * https://www.digikam.org
0005  *
0006  * Date        : 2005-07-07
0007  * Description : a tool to export images to Flickr web service
0008  *
0009  * SPDX-FileCopyrightText: 2005-2008 by Vardhman Jain <vardhman at gmail dot com>
0010  * SPDX-FileCopyrightText: 2008-2024 by Gilles Caulier <caulier dot gilles at gmail dot com>
0011  *
0012  * SPDX-License-Identifier: GPL-2.0-or-later
0013  *
0014  * ============================================================ */
0015 
0016 #ifndef DIGIKAM_FLICKR_MPFORM_H
0017 #define DIGIKAM_FLICKR_MPFORM_H
0018 
0019 // Qt includes
0020 
0021 #include <QByteArray>
0022 #include <QString>
0023 
0024 namespace DigikamGenericFlickrPlugin
0025 {
0026 
0027 class FlickrMPForm
0028 {
0029 
0030 public:
0031 
0032     explicit FlickrMPForm();
0033     ~FlickrMPForm();
0034 
0035     void finish();
0036     void reset();
0037 
0038     bool addPair(const QString& name, const QString& value, const QString& type);
0039     bool addFile(const QString& name, const QString& path);
0040 
0041     QString    contentType() const;
0042     QByteArray formData()    const;
0043     QString    boundary()    const;
0044 
0045 private:
0046 
0047     QByteArray m_buffer;
0048     QByteArray m_boundary;
0049 };
0050 
0051 } // namespace DigikamGenericFlickrPlugin
0052 
0053 #endif // DIGIKAM_FLICKR_MPFORM_H