summaryrefslogtreecommitdiff
path: root/noncore/graphics/opie-eye/slave/slavereciever.h
blob: b5aaccf12dd918614986e18626fe1b211d8f46a4 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
/*
 * GPLv2
 */


#ifndef SLAVE_RECEIVER_H
#define SLAVE_RECEIVER_H

/**
 * Receive Requests
 */

#include <iface/slaveiface.h>

#include <qobject.h>
#include <qdatastream.h>
#include <qstringlist.h>
#include <qvaluelist.h>
#include <qpixmap.h>



typedef QValueList<PixmapInfo> PixmapList;
typedef QValueList<ImageInfo>  StringList;

class QTimer;
class QSocket;
class SlaveReciever : public QObject {
    Q_OBJECT

    friend QDataStream &operator<<( QDataStream&, const PixmapInfo& );
    friend QDataStream &operator>>( QDataStream&, PixmapInfo& );
    friend QDataStream &operator<<( QDataStream&, const ImageInfo& );
    friend QDataStream &operator>>( QDataStream&, ImageInfo );
public:

    enum Job { ImageInfoJob,  FullImageInfoJob, ThumbNailJob };
    SlaveReciever( QObject* parent );
    ~SlaveReciever();

public slots:
    void recieveAnswer( const QCString&, const QByteArray& );
public:
    PixmapList outPix()const;
    StringList outInf()const;

private slots:
    void slotSend();
    void slotImageInfo();
    void slotThumbNail();
private:
    QTimer *m_inf, *m_pix, *m_out;
    StringList m_inList, m_outList;
    PixmapList m_inPix, m_outPix;
private:
    int m_refs;
};


#endif