digiKam
gdmpform.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 : 2013-11-18
7  * Description : a tool to export items to Google web services
8  *
9  * Copyright (C) 2013 by Pankaj Kumar <me at panks dot me>
10  * Copyright (C) 2013-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_GD_MPFORM_H
25 #define DIGIKAM_GD_MPFORM_H
26 
27 // Qt includes
28 
29 #include <QByteArray>
30 #include <QString>
31 
33 {
34 
35 class GDMPForm
36 {
37 public:
38 
39  explicit GDMPForm();
40  ~GDMPForm();
41 
42  void finish();
43  void reset();
44 
45  void addPair(const QString& name,
46  const QString& description,
47  const QString& mimetype,
48  const QString& id);
49 
50  bool addFile(const QString& path);
51 
52  QString contentType() const;
53  QByteArray formData() const;
54  QString boundary() const;
55  QString getFileSize() const;
56 
57 private:
58 
59  QByteArray m_buffer;
60  QByteArray m_boundary;
61  QString m_file_size;
62 };
63 
64 } // namespace DigikamGenericGoogleServicesPlugin
65 
66 #endif // DIGIKAM_GD_MPFORM_H
QString boundary() const
Definition: gdmpform.cpp:154
void reset()
Definition: gdmpform.cpp:58
QString getFileSize() const
Definition: gdmpform.cpp:165
void addPair(const QString &name, const QString &description, const QString &mimetype, const QString &id)
Definition: gdmpform.cpp:74
~GDMPForm()
Definition: gdmpform.cpp:54
QByteArray formData() const
Definition: gdmpform.cpp:149
void finish()
Definition: gdmpform.cpp:63
bool addFile(const QString &path)
Definition: gdmpform.cpp:115
QString contentType() const
Definition: gdmpform.cpp:159
GDMPForm()
Definition: gdmpform.cpp:48
Definition: gdmpform.cpp:46