File indexing completed on 2025-01-05 03:53:41
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 items to Rajce web service 0008 * 0009 * SPDX-FileCopyrightText: 2005-2008 by Vardhman Jain <vardhman at gmail dot com> 0010 * SPDX-FileCopyrightText: 2008-2018 by Caulier Gilles <caulier dot gilles at gmail dot com> 0011 * 0012 * SPDX-License-Identifier: GPL-2.0-or-later 0013 * 0014 * ============================================================ */ 0015 0016 #ifndef DIGIKAM_RAJCE_MPFORM_H 0017 #define DIGIKAM_RAJCE_MPFORM_H 0018 0019 // Qt includes 0020 0021 #include <QByteArray> 0022 #include <QString> 0023 0024 namespace DigikamGenericRajcePlugin 0025 { 0026 0027 class RajceMPForm 0028 { 0029 public: 0030 0031 explicit RajceMPForm(); 0032 ~RajceMPForm(); 0033 0034 public: 0035 0036 void finish(); 0037 void reset(); 0038 0039 bool addPair(const QString& name, const QString& value, const QString& contentType = QString()); 0040 bool addFile(const QString& name, const QString& path); 0041 0042 QString contentType() const; 0043 QByteArray formData() const; 0044 QString boundary() const; 0045 0046 private: 0047 0048 QByteArray m_buffer; 0049 QByteArray m_boundary; 0050 }; 0051 0052 } // namespace DigikamGenericRajcePlugin 0053 0054 #endif // DIGIKAM_RAJCE_MPFORM_H