summaryrefslogtreecommitdiff
path: root/noncore/apps/opie-console/filetransfer.h
blob: 06c6d122c4297fe0e86258ff3d58bcb38fdd71e5 (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
#ifndef OPIE_FILE_TRANSFER_H
#define OPIE_FILE_TRANSFER_H

#include <sys/types.h>

#include <qfile.h>

#include "file_layer.h"

class QSocketNotifier;
class OProcess;
class FileTransfer : public FileTransferLayer{
    Q_OBJECT
public:
    enum Type {
        SZ = 0,
        SX,
        SY
    };
    FileTransfer( Type t, IOLayer* );
    ~FileTransfer();

    void sendFile( const QString& file );
    void sendFile( const QFile& );

private slots:
    void setupChild();
private:
    static pid_t m_pid;
    int m_fd;
    int m_info[2];
    int m_comm[2];
    Type m_type;
    static void signal_handler(int);
    static bool terminate;
};

#endif