~ubuntu-branches/ubuntu/natty/knemo/natty

« back to all changes in this revision

Viewing changes to src/knemod/interface.h

  • Committer: Bazaar Package Importer
  • Author(s): Felix Geyer
  • Date: 2011-02-22 16:36:22 UTC
  • mfrom: (1.1.13 upstream)
  • Revision ID: james.westby@ubuntu.com-20110222163622-d8i62gy1stn7tydv
Tags: 0.7.0-0ubuntu1
* New upstream release.
* Switch to source format 3.0 (quilt).
* Make knemo depend on libqt4-sql-sqlite.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
/* This file is part of KNemo
2
2
   Copyright (C) 2004, 2006 Percy Leonhardt <percy@eris23.de>
3
 
   Copyright (C) 2009 John Stamp <jstamp@users.sourceforge.net>
 
3
   Copyright (C) 2009, 2010 John Stamp <jstamp@users.sourceforge.net>
4
4
 
5
5
   KNemo is free software; you can redistribute it and/or modify
6
6
   it under the terms of the GNU Library General Public License as
53
53
     */
54
54
    virtual ~Interface();
55
55
 
56
 
    int getState()
57
 
    {
58
 
        return mState;
59
 
    }
60
 
 
61
 
    int getPreviousState()
62
 
    {
63
 
        return mPreviousState;
64
 
    }
65
 
 
66
 
    QString getUptimeString()
 
56
    int ifaceState()
 
57
    {
 
58
        return mIfaceState;
 
59
    }
 
60
 
 
61
    int previousIfaceState()
 
62
    {
 
63
        return mPreviousIfaceState;
 
64
    }
 
65
 
 
66
    QString uptimeString()
67
67
    {
68
68
        return mUptimeString;
69
69
    }
70
70
 
71
 
    const QString& getName() const
 
71
    const QString& ifaceName() const
72
72
    {
73
 
        return mName;
 
73
        return mIfaceName;
74
74
    }
75
75
 
76
 
    const BackendData* getData() const
 
76
    const BackendData* backendData() const
77
77
    {
78
78
        return mBackendData;
79
79
    }
80
80
 
81
 
    InterfaceSettings& getSettings()
 
81
    InterfaceSettings& settings()
82
82
    {
83
83
        return mSettings;
84
84
    }
85
85
 
86
 
    InterfaceStatistics* getStatistics()
 
86
    InterfaceStatistics* ifaceStatistics()
87
87
    {
88
 
        return mStatistics;
 
88
        return mIfaceStatistics;
89
89
    }
90
90
 
91
 
    unsigned long getRxRate()
 
91
    unsigned long rxRate()
92
92
    {
93
93
        return mRxRate;
94
94
    }
95
95
 
96
 
    unsigned long getTxRate()
 
96
    unsigned long txRate()
97
97
    {
98
98
        return mTxRate;
99
99
    }
100
100
 
101
 
    QString getRxRateStr()
 
101
    QString rxRateStr()
102
102
    {
103
103
        return mRxRateStr;
104
104
    }
105
105
 
106
 
    QString getTxRateStr()
 
106
    QString txRateStr()
107
107
    {
108
108
        return mTxRateStr;
109
109
    }
144
144
    /**
145
145
     * Emit a notification when traffic exceeds a threshold
146
146
     */
147
 
    void warnTraffic( quint64 threshold, quint64 current );
 
147
    void warnTraffic( QString text, quint64 threshold, quint64 current );
148
148
 
149
149
private:
150
150
    /**
168
168
 
169
169
    void resetUptime();
170
170
 
171
 
    KNemoIface::Type mType;
172
 
 
173
 
    int mState;
174
 
    int mPreviousState;
175
 
    QString mName;
 
171
    int mIfaceState;
 
172
    int mPreviousIfaceState;
 
173
    QString mIfaceName;
176
174
    qreal mRealSec;
177
175
    time_t mUptime;
178
176
    QString mUptimeString;
182
180
    QString mTxRateStr;
183
181
    InterfaceIcon mIcon;
184
182
    InterfaceSettings mSettings;
185
 
    InterfaceStatistics* mStatistics;
 
183
    InterfaceStatistics* mIfaceStatistics;
186
184
    InterfaceStatusDialog* mStatusDialog;
187
185
    InterfaceStatisticsDialog* mStatisticsDialog;
188
186
    InterfacePlotterDialog* mPlotterDialog;