File indexing completed on 2025-01-19 03:52:59
0001 /* ============================================================ 0002 * 0003 * This file is a part of digiKam project 0004 * https://www.digikam.org 0005 * 0006 * Date : 2013-11-18 0007 * Description : a tool to export items to Google web services 0008 * 0009 * SPDX-FileCopyrightText: 2013 by Pankaj Kumar <me at panks dot me> 0010 * SPDX-FileCopyrightText: 2013-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_GD_MPFORM_H 0017 #define DIGIKAM_GD_MPFORM_H 0018 0019 // Qt includes 0020 0021 #include <QByteArray> 0022 #include <QString> 0023 0024 namespace DigikamGenericGoogleServicesPlugin 0025 { 0026 0027 class GDMPForm 0028 { 0029 public: 0030 0031 explicit GDMPForm(); 0032 ~GDMPForm(); 0033 0034 void finish(); 0035 void reset(); 0036 0037 void addPair(const QString& name, 0038 const QString& description, 0039 const QString& mimetype, 0040 const QString& id); 0041 0042 bool addFile(const QString& path); 0043 0044 QString contentType() const; 0045 QByteArray formData() const; 0046 QString boundary() const; 0047 QString getFileSize() const; 0048 0049 private: 0050 0051 QByteArray m_buffer; 0052 QByteArray m_boundary; 0053 QString m_file_size; 0054 }; 0055 0056 } // namespace DigikamGenericGoogleServicesPlugin 0057 0058 #endif // DIGIKAM_GD_MPFORM_H