~lubuntu-dev/lxde/libsysstat-lxde

« back to all changes in this revision

Viewing changes to netstat_p.hpp

  • Committer: Kuzma Shapran
  • Date: 2013-01-19 21:05:50 UTC
  • Revision ID: git-v1:11cc6ba1c2df1bcb25b8cd6cfc86c0a33e306b42
Style follows the Coding Standard

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
/* BEGIN_COMMON_COPYRIGHT_HEADER
2
 
 * (c)LGPL2+
3
 
**
4
 
**  SysStat is a Qt-based interface to system statistics
5
 
**
6
 
**  Authors:
7
 
**       Copyright (c) 2009 - 2012 Kuzma Shapran <Kuzma.Shapran@gmail.com>
8
 
**
9
 
**  This library is free software; you can redistribute it and/or
10
 
**  modify it under the terms of the GNU Lesser General Public
11
 
**  License as published by the Free Software Foundation; either
12
 
**  version 2.1 of the License, or (at your option) any later version.
13
 
**
14
 
**  This library is distributed in the hope that it will be useful,
15
 
**  but WITHOUT ANY WARRANTY; without even the implied warranty of
16
 
**  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
17
 
**  Lesser General Public License for more details.
18
 
**
19
 
**  You should have received a copy of the GNU Lesser General Public
20
 
**  License along with this library;
21
 
**  if not, write to the Free Software Foundation, Inc.,
22
 
**  51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
23
 
**
24
 
** END_COMMON_COPYRIGHT_HEADER */
25
 
 
26
 
 
27
 
#ifndef LIBSYSSTAT__NET_STAT__PRIVATE__INCLUDED
28
 
#define LIBSYSSTAT__NET_STAT__PRIVATE__INCLUDED
29
 
 
30
 
 
31
 
#include <QtCore/QObject>
32
 
#include <QtCore/QtGlobal>
33
 
#include <QtCore/QMap>
34
 
 
35
 
#include "basestat_p.hpp"
36
 
#include "netstat.hpp"
37
 
 
38
 
 
39
 
namespace SysStat {
40
 
 
41
 
class NetStatPrivate : public BaseStatPrivate
42
 
{
43
 
    Q_OBJECT
44
 
 
45
 
public:
46
 
    NetStatPrivate(NetStat *parent = NULL);
47
 
    ~NetStatPrivate();
48
 
 
49
 
signals:
50
 
    void update(unsigned received, unsigned transmitted);
51
 
 
52
 
private slots:
53
 
    void timeout(void);
54
 
 
55
 
private:
56
 
    QString defaultSource(void);
57
 
 
58
 
    typedef struct Values
59
 
    {
60
 
        Values(void);
61
 
 
62
 
        qulonglong received;
63
 
        qulonglong transmitted;
64
 
    } Values;
65
 
    typedef QMap<QString, Values> NamedValues;
66
 
    NamedValues mPrevious;
67
 
};
68
 
 
69
 
}
70
 
 
71
 
#endif //LIBSYSSTAT__NET_STAT__PRIVATE__INCLUDED