File: cNetStat.h

package info (click to toggle)
qnetstatview 1.5.8-2
  • links: PTS
  • area: main
  • in suites: bookworm, forky, sid, trixie
  • size: 452 kB
  • sloc: cpp: 1,380; makefile: 4
file content (39 lines) | stat: -rw-r--r-- 739 bytes parent folder | download | duplicates (2)
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
#ifndef CNETSTAT_H
#define CNETSTAT_H

#include <QObject>
#include <QString>
#include <QStringList>
#include <QVector>
#include <QTime>
#include <QThread>

#include "ProcessList.h"

#if defined(Q_OS_LINUX) || defined(Q_OS_UNIX)
#include "ProcessListLinux.h"
#endif
#if defined(Q_OS_WIN)
#include "ProcessListWindows.h"
#endif

class cNetStat : public QThread {
    Q_OBJECT
    public:
        cNetStat();
        QVector<sNetStat> getNetStat();
        void run();

    private:
        QString convAddress(QString address, QString ipv);
        QVector<sNetStat> getTable();
        void writeLog(QString str);


        QVector<sNetStat> save_netstat;

    signals:
        void endReadStat(QVector<sNetStat>);
};

#endif // CNETSTAT_H