~ubuntu-branches/ubuntu/precise/gwenview/precise-proposed

« back to all changes in this revision

Viewing changes to lib/mimetypeutils_p.h

  • Committer: Package Import Robot
  • Author(s): Jonathan Riddell
  • Date: 2011-12-15 14:17:54 UTC
  • mto: This revision was merged to the branch mainline in revision 12.
  • Revision ID: package-import@ubuntu.com-20111215141754-z043hyx69dulbggf
Tags: upstream-4.7.90
Import upstream version 4.7.90

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
// vim: set tabstop=4 shiftwidth=4 noexpandtab:
 
1
// vim: set tabstop=4 shiftwidth=4 expandtab:
2
2
/*
3
3
Gwenview: an image viewer
4
4
Copyright 2008 Aurélien Gâteau <agateau@kde.org>
25
25
#include <QByteArray>
26
26
#include <QObject>
27
27
 
28
 
namespace KIO { class Job; class TransferJob; }
29
 
 
30
 
namespace Gwenview {
31
 
 
32
 
namespace MimeTypeUtils {
 
28
namespace KIO
 
29
{
 
30
class Job;
 
31
class TransferJob;
 
32
}
 
33
 
 
34
namespace Gwenview
 
35
{
 
36
 
 
37
namespace MimeTypeUtils
 
38
{
33
39
/**
34
40
 * A simple helper class used to determine mime type in some extreme cases
35
41
 * where we need to download the url header
36
42
 */
37
 
class DataAccumulator : public QObject {
38
 
        Q_OBJECT
 
43
class DataAccumulator : public QObject
 
44
{
 
45
    Q_OBJECT
39
46
public:
40
 
        DataAccumulator(KIO::TransferJob* job);
41
 
 
42
 
        const QByteArray& data() const {
43
 
                return mData;
44
 
        }
45
 
 
46
 
        bool finished() const {
47
 
                return mFinished;
48
 
        }
 
47
    DataAccumulator(KIO::TransferJob* job);
 
48
 
 
49
    const QByteArray& data() const {
 
50
        return mData;
 
51
    }
 
52
 
 
53
    bool finished() const {
 
54
        return mFinished;
 
55
    }
49
56
 
50
57
private Q_SLOTS:
51
 
        void slotDataReceived(KIO::Job*, const QByteArray& data);
52
 
        void slotFinished();
 
58
    void slotDataReceived(KIO::Job*, const QByteArray& data);
 
59
    void slotFinished();
53
60
 
54
61
private:
55
 
        QByteArray mData;
56
 
        bool mFinished;
 
62
    QByteArray mData;
 
63
    bool mFinished;
57
64
};
58
65
 
59
66
} // namespace MimeTypeUtils