~ubuntu-branches/ubuntu/raring/recorditnow/raring

« back to all changes in this revision

Viewing changes to joschy-snapshot-23-02-10/joschycore/joschycore/postfile.h

  • Committer: Bazaar Package Importer
  • Author(s): Felix Geyer
  • Date: 2011-01-09 14:54:01 UTC
  • mfrom: (1.1.2 upstream)
  • Revision ID: james.westby@ubuntu.com-20110109145401-gyckb4airz4fio50
Tags: 0.8.1-0ubuntu1
* New upstream release. (LP: #681270)
  - Update debian/copyright.
* Build-depend on recordmydesktop.
* Add a watch file.
* Drop 01_fix_ftbfs_kwarning_call.diff, fixed upstream.
* Add 01_joschy_install_to_usr_lib.diff.
* Add 02_fix_ftbfs_no-add-needed.diff.
* Add 03_dont_install_header_files.diff.
* Replace dependency on libpolkit-qt-1-0 with policykit-1.

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/*
 
2
    Copyright (C) 2010  Kai Dombrowe <just89@gmx.de>
 
3
 
 
4
    This library is free software; you can redistribute it and/or
 
5
    modify it under the terms of the GNU Lesser General Public
 
6
    License as published by the Free Software Foundation; either
 
7
    version 2.1 of the License, or (at your option) any later version.
 
8
 
 
9
    This library is distributed in the hope that it will be useful,
 
10
    but WITHOUT ANY WARRANTY; without even the implied warranty of
 
11
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
 
12
    Lesser General Public License for more details.
 
13
 
 
14
    You should have received a copy of the GNU Lesser General Public
 
15
    License along with this library; if not, write to the Free Software
 
16
    Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
 
17
*/
 
18
 
 
19
#ifndef POSTFILE_H
 
20
#define POSTFILE_H
 
21
 
 
22
 
 
23
// own
 
24
#include "joschy_global.h"
 
25
 
 
26
// Qt
 
27
#include <QtCore/QFile>
 
28
 
 
29
 
 
30
 
 
31
namespace Joschy {
 
32
 
 
33
 
 
34
class PostFilePrivate;
 
35
 
 
36
 
 
37
/**
 
38
 * @class PostFile joschycore/postfile.h
 
39
 *
 
40
 * @short A QFile with post data
 
41
 **/
 
42
class JOSCHY_EXPORT PostFile : public QFile
 
43
{
 
44
    Q_OBJECT
 
45
 
 
46
 
 
47
public:
 
48
    /**
 
49
     * Creates a new PostFile object.
 
50
     * @param file the video file
 
51
     **/
 
52
    explicit PostFile(const QString &file);
 
53
    ~PostFile();
 
54
 
 
55
    /**
 
56
     * @internal
 
57
     **/
 
58
    qint64 bytesAvailable() const;
 
59
    /**
 
60
     * @return Returns the file size + the post data size
 
61
     **/
 
62
    qint64 size () const;
 
63
 
 
64
    /**
 
65
     * Sets the post data.
 
66
     * Example:
 
67
     * \verbatim
 
68
        firstData
 
69
        <file data>
 
70
        secondData
 
71
      \endverbatim
 
72
     * @param firstData Post data
 
73
     * @param secondData Post data
 
74
     **/
 
75
    void setData(const QByteArray &firstData, const QByteArray &secondData);
 
76
 
 
77
 
 
78
private:
 
79
    PostFilePrivate *d;
 
80
 
 
81
 
 
82
protected:
 
83
    /**
 
84
     * @internal
 
85
     **/
 
86
    qint64 readData(char *data, qint64 maxSize);
 
87
 
 
88
 
 
89
};
 
90
 
 
91
 
 
92
} // namespace Joschy
 
93
 
 
94
 
 
95
#endif // POSTFILE_H