File indexing completed on 2025-01-05 03:53:24

0001 /* ============================================================
0002  *
0003  * This file is a part of digiKam project
0004  * https://www.digikam.org
0005  *
0006  * Date        : 2008-12-28
0007  * Description : a tool to export items to Facebook 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  * SPDX-FileCopyrightText: 2008-2009 by Luka Renko <lure at kubuntu dot org>
0012  *
0013  * SPDX-License-Identifier: GPL-2.0-or-later
0014  *
0015  * ============================================================ */
0016 
0017 #ifndef DIGIKAM_FB_MPFORM_H
0018 #define DIGIKAM_FB_MPFORM_H
0019 
0020 // Qt includes
0021 
0022 #include <QByteArray>
0023 #include <QString>
0024 
0025 namespace DigikamGenericFaceBookPlugin
0026 {
0027 
0028 class FbMPForm
0029 {
0030 
0031 public:
0032 
0033     explicit FbMPForm();
0034     ~FbMPForm();
0035 
0036     void finish();
0037     void reset();
0038 
0039     void addPair(const QString& name, const QString& value);
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 DigikamGenericFaceBookPlugin
0053 
0054 #endif // DIGIKAM_FB_MPFORM_H