File indexing completed on 2025-01-05 03:53:29
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 Google web services 0008 * 0009 * SPDX-FileCopyrightText: 2005-2008 by Vardhman Jain <vardhman at gmail dot com> 0010 * SPDX-FileCopyrightText: 2008-2020 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_GP_MPFORM_H 0017 #define DIGIKAM_GP_MPFORM_H 0018 0019 // Qt includes 0020 0021 #include <QByteArray> 0022 #include <QString> 0023 0024 namespace DigikamGenericGoogleServicesPlugin 0025 { 0026 0027 class GPMPForm 0028 { 0029 0030 public: 0031 0032 explicit GPMPForm(); 0033 ~GPMPForm(); 0034 0035 void finish(); 0036 void reset(); 0037 0038 bool addPair(const QString& name, 0039 const QString& value, 0040 const QString& contentType = QString()); 0041 0042 bool addFile(const QString& name, 0043 const QString& path); 0044 0045 QString contentType() const; 0046 QByteArray formData() const; 0047 QString boundary() const; 0048 0049 private: 0050 0051 QByteArray m_buffer; 0052 QByteArray m_boundary; 0053 }; 0054 0055 } // namespace DigikamGenericGoogleServicesPlugin 0056 0057 #endif // DIGIKAM_GP_MPFORM_H