Subversion Repositories OpenInventory

Rev

Rev 239 | Rev 242 | Go to most recent revision | Details | Compare with Previous | Last modification | View Log | RSS feed

Rev Author Line No. Line
239 pingvin 1
#ifndef WMITHREAD_H
2
#define WMITHREAD_H
3
 
4
#include <QThread>
5
#include <QProcess>
6
#include <QMutex>
7
 
8
class WmiThread : public QThread
9
{
10
    Q_OBJECT
11
public:
12
    explicit WmiThread(QObject *parent = 0);
13
    void run();
14
    void stop();
15
    void setHost(QString new_host){host = new_host;}
16
    void setUser(QString new_user){user_name = new_user;}
17
    void setPassword(QString new_password){password = new_password;}
18
    QByteArray buffer(){return p_buffer;}
19
    void clearBuffer(){p_buffer.clear();}
241 pingvin 20
    bool isError(){return error;}
21
    void setWmiString(QString new_wmi_string){wmi_string = new_wmi_string;}
239 pingvin 22
private:
23
    volatile bool stopped;
24
    volatile bool error;
25
    QProcess process;
26
    QString host;
27
    QString user_name;
28
    QString password;
29
    QMutex mutex;
30
    QByteArray p_buffer; //   ,       ()
241 pingvin 31
    QString wmi_string;  //   wmi-
239 pingvin 32
 
33
signals:
34
 
35
public slots:
241 pingvin 36
    void readStandartProcessOutput();
37
    void readStandartProcessError();
239 pingvin 38
 
39
private slots:
40
 
41
 
241 pingvin 42
 
239 pingvin 43
};
44
 
45
#endif // WMITHREAD_H