File indexing completed on 2023-10-03 07:22:43
0001 /* ============================================================ 0002 * 0003 * This file is a part of KDE project 0004 * 0005 * 0006 * Date : 2008-12-28 0007 * Description : a kipi plugin to export images to Facebook web service 0008 * 0009 * Copyright (C) 2005-2008 by Vardhman Jain <vardhman at gmail dot com> 0010 * Copyright (C) 2008-2018 by Gilles Caulier <caulier dot gilles at gmail dot com> 0011 * Copyright (C) 2008-2009 by Luka Renko <lure at kubuntu dot org> 0012 * 0013 * This program is free software; you can redistribute it 0014 * and/or modify it under the terms of the GNU General 0015 * Public License as published by the Free Software Foundation; 0016 * either version 2, or (at your option) any later version. 0017 * 0018 * This program is distributed in the hope that it will be useful, 0019 * but WITHOUT ANY WARRANTY; without even the implied warranty of 0020 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 0021 * GNU General Public License for more details. 0022 * 0023 * ============================================================ */ 0024 0025 #ifndef MPFORM_H 0026 #define MPFORM_H 0027 0028 // Qt includes 0029 0030 #include <QByteArray> 0031 #include <QString> 0032 0033 namespace KIPIFacebookPlugin 0034 { 0035 0036 class MPForm 0037 { 0038 0039 public: 0040 0041 MPForm(); 0042 ~MPForm(); 0043 0044 void finish(); 0045 void reset(); 0046 0047 void addPair(const QString& name, const QString& value); 0048 bool addFile(const QString& name, const QString& path); 0049 0050 QString contentType() const; 0051 QByteArray formData() const; 0052 QString boundary() const; 0053 0054 private: 0055 0056 QByteArray m_buffer; 0057 QByteArray m_boundary; 0058 }; 0059 0060 } // namespace KIPIFacebookPlugin 0061 0062 #endif /* MPFORM_H */