~ubuntu-branches/ubuntu/precise/knemo/precise

« back to all changes in this revision

Viewing changes to src/knemod/interfacemonitor.h

  • Committer: Bazaar Package Importer
  • Author(s): Mark Purcell
  • Date: 2010-01-06 17:16:51 UTC
  • mfrom: (1.1.9 upstream) (2.1.4 sid)
  • Revision ID: james.westby@ubuntu.com-20100106171651-ff58ryfnav4l1zbm
Tags: 0.6.0-1
* New upstream release 
  - Fixes "FTBFS: sysbackend.cpp:362: error: 'KILO' was not declared in
  this scope" (Closes: #560496)
  - Fixes "context menu does not appear" (Closes: #504791)
* Add Build-Depends: libnl-dev - Linux netlink sockets library

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
/* This file is part of KNemo
2
 
   Copyright (C) 2004, 2006 Percy Leonhardt <percy@eris23.de>
3
 
   Copyright (C) 2009 John Stamp <jstamp@users.sourceforge.net>
4
 
 
5
 
   KNemo is free software; you can redistribute it and/or modify
6
 
   it under the terms of the GNU Library General Public License as
7
 
   published by the Free Software Foundation; either version 2 of
8
 
   the License, or (at your option) any later version.
9
 
 
10
 
   KNemo is distributed in the hope that it will be useful,
11
 
   but WITHOUT ANY WARRANTY; without even the implied warranty of
12
 
   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
13
 
   GNU Library General Public License for more details.
14
 
 
15
 
   You should have received a copy of the GNU Library General Public License
16
 
   along with this library; see the file COPYING.LIB.  If not, write to
17
 
   the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
18
 
   Boston, MA 02110-1301, USA.
19
 
*/
20
 
 
21
 
#ifndef INTERFACEMONITOR_H
22
 
#define INTERFACEMONITOR_H
23
 
 
24
 
class Interface;
25
 
 
26
 
/**
27
 
 * This class monitors the interface for possible state changes and
28
 
 * for incoming and outgong traffic. If the state changed or traffic
29
 
 * was transmitted it sends an according signal.
30
 
 *
31
 
 * @short Monitor changes of the interface
32
 
 * @author Percy Leonhardt <percy@eris23.de>
33
 
 */
34
 
 
35
 
class InterfaceMonitor : public QObject
36
 
{
37
 
    Q_OBJECT
38
 
public:
39
 
    /**
40
 
     * Default Constructor
41
 
     */
42
 
    InterfaceMonitor(QObject* parent = 0L );
43
 
 
44
 
    /**
45
 
     * Default Destructor
46
 
     */
47
 
    virtual ~InterfaceMonitor();
48
 
 
49
 
    /**
50
 
     * Tell the monitor to check the status of the interface
51
 
     */
52
 
    void checkStatus( Interface* interface );
53
 
 
54
 
signals:
55
 
    // the interface is now connected
56
 
    void available( int );
57
 
    // the interface is now disconnected
58
 
    void notAvailable( int );
59
 
    // the interface no longer exists
60
 
    void notExisting( int );
61
 
    // there was incoming and/or outgoing traffic
62
 
    void statusChanged( int );
63
 
    // the amount of incoming traffic (for statistics)
64
 
    void incomingData( unsigned long );
65
 
    // the amount of outgoing traffic (for statistics)
66
 
    void outgoingData( unsigned long );
67
 
    // Used by the interface to update tooltip and status dialog details.
68
 
    // This includes uptime, so we need to emit it on every checkStatus.
69
 
    void updateDetails();
70
 
};
71
 
 
72
 
#endif // INTERFACEMONITOR_H