digiKam
fbmpform.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 : 2008-12-28
7  * Description : a tool to export items to Facebook 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  * Copyright (C) 2008-2009 by Luka Renko <lure at kubuntu dot org>
12  *
13  * This program is free software; you can redistribute it
14  * and/or modify it under the terms of the GNU General
15  * Public License as published by the Free Software Foundation;
16  * either version 2, or (at your option) any later version.
17  *
18  * This program is distributed in the hope that it will be useful,
19  * but WITHOUT ANY WARRANTY; without even the implied warranty of
20  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
21  * GNU General Public License for more details.
22  *
23  * ============================================================ */
24 
25 #ifndef DIGIKAM_FB_MPFORM_H
26 #define DIGIKAM_FB_MPFORM_H
27 
28 // Qt includes
29 
30 #include <QByteArray>
31 #include <QString>
32 
34 {
35 
36 class FbMPForm
37 {
38 
39 public:
40 
41  explicit FbMPForm();
42  ~FbMPForm();
43 
44  void finish();
45  void reset();
46 
47  void addPair(const QString& name, const QString& value);
48  bool addFile(const QString& name, const QString& path);
49 
50  QString contentType() const;
51  QByteArray formData() const;
52  QString boundary() const;
53 
54 private:
55 
56  QByteArray m_buffer;
57  QByteArray m_boundary;
58 };
59 
60 } // namespace DigikamGenericFaceBookPlugin
61 
62 #endif // DIGIKAM_FB_MPFORM_H
bool addFile(const QString &name, const QString &path)
Definition: fbmpform.cpp:97
QByteArray formData() const
Definition: fbmpform.cpp:151
void addPair(const QString &name, const QString &value)
Definition: fbmpform.cpp:74
void reset()
Definition: fbmpform.cpp:55
void finish()
Definition: fbmpform.cpp:65
QString boundary() const
Definition: fbmpform.cpp:146
QString contentType() const
Definition: fbmpform.cpp:141
FbMPForm()
Definition: fbmpform.cpp:45
~FbMPForm()
Definition: fbmpform.cpp:51
qulonglong value
Definition: itemviewutilities.cpp:592
Definition: fbitem.h:38