digiKam
smugmpform.h
Go to the documentation of this file.
1 /* ============================================================
2  *
3  * This file is a part of digiKam project
4  * https://www.digikam.org
5  *
6  * Date : 2005-07-07
7  * Description : a tool to export images to Smugmug web service
8  *
9  * Copyright (C) 2005-2008 by Vardhman Jain <vardhman at gmail dot com>
10  * Copyright (C) 2008-2022 by Gilles Caulier <caulier dot gilles at gmail dot com>
11  *
12  * This program is free software; you can redistribute it
13  * and/or modify it under the terms of the GNU General
14  * Public License as published by the Free Software Foundation;
15  * either version 2, or (at your option) any later version.
16  *
17  * This program is distributed in the hope that it will be useful,
18  * but WITHOUT ANY WARRANTY; without even the implied warranty of
19  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
20  * GNU General Public License for more details.
21  *
22  * ============================================================ */
23 
24 #ifndef DIGIKAM_SMUG_MPFORM_H
25 #define DIGIKAM_SMUG_MPFORM_H
26 
27 // Qt includes
28 
29 #include <QByteArray>
30 #include <QString>
31 
33 {
34 
36 {
37 
38 public:
39 
40  explicit SmugMPForm();
41  ~SmugMPForm();
42 
43 public:
44 
45  void finish();
46  void reset();
47 
48  bool addPair(const QString& name,
49  const QString& value,
50  const QString& type = QLatin1String("text/plain"));
51 
52  bool addFile(const QString& name,
53  const QString& path);
54 
55  QString contentType() const;
56  QByteArray formData() const;
57  QString boundary() const;
58 
59 private:
60 
61  QByteArray m_buffer;
62  QByteArray m_boundary;
63 };
64 
65 } // namespace DigikamGenericSmugPlugin
66 
67 #endif // DIGIKAM_SMUG_MPFORM_H
Definition: smugmpform.h:36
QString boundary() const
Definition: smugmpform.cpp:158
bool addFile(const QString &name, const QString &path)
Definition: smugmpform.cpp:103
~SmugMPForm()
Definition: smugmpform.cpp:49
void reset()
Definition: smugmpform.cpp:53
QByteArray formData() const
Definition: smugmpform.cpp:163
QString contentType() const
Definition: smugmpform.cpp:153
bool addPair(const QString &name, const QString &value, const QString &type=QLatin1String("text/plain"))
Definition: smugmpform.cpp:67
void finish()
Definition: smugmpform.cpp:58
SmugMPForm()
Definition: smugmpform.cpp:44
qulonglong value
Definition: itemviewutilities.cpp:592
Definition: smugitem.h:33