~ubuntu-branches/ubuntu/utopic/kde-workspace/utopic-proposed

« back to all changes in this revision

Viewing changes to libs/solid/control/ifaces/wirednetworkinterface.h

  • Committer: Bazaar Package Importer
  • Author(s): Michał Zając
  • Date: 2011-07-09 08:31:15 UTC
  • Revision ID: james.westby@ubuntu.com-20110709083115-ohyxn6z93mily9fc
Tags: upstream-4.6.90
Import upstream version 4.6.90

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/*  This file is part of the KDE project
 
2
    Copyright (C) 2006,2007 Will Stephenson <wstephenson@kde.org>
 
3
 
 
4
    This library is free software; you can redistribute it and/or
 
5
    modify it under the terms of the GNU Library General Public
 
6
    License version 2 as published by the Free Software Foundation.
 
7
 
 
8
    This library is distributed in the hope that it will be useful,
 
9
    but WITHOUT ANY WARRANTY; without even the implied warranty of
 
10
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
 
11
    Library General Public License for more details.
 
12
 
 
13
    You should have received a copy of the GNU Library General Public License
 
14
    along with this library; see the file COPYING.LIB.  If not, write to
 
15
    the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
 
16
    Boston, MA 02110-1301, USA.
 
17
 
 
18
*/
 
19
 
 
20
#ifndef SOLID_IFACES_WIREDNETWORKINTERFACE_H
 
21
#define SOLID_IFACES_WIREDNETWORKINTERFACE_H
 
22
 
 
23
#include "../solid_control_export.h"
 
24
 
 
25
#include <QtCore/QStringList>
 
26
 
 
27
#include "networkinterface.h"
 
28
 
 
29
 
 
30
namespace Solid
 
31
{
 
32
namespace Control
 
33
{
 
34
namespace Ifaces
 
35
{
 
36
    /**
 
37
     * Represents a wired network interface
 
38
     */
 
39
    class SOLIDCONTROLIFACES_EXPORT WiredNetworkInterface : virtual public NetworkInterface
 
40
    {
 
41
    public:
 
42
        /**
 
43
         * Destroys a WiredNetworkInterface object
 
44
         */
 
45
        virtual ~WiredNetworkInterface();
 
46
        /**
 
47
         * The hardware address assigned to the network interface
 
48
         */
 
49
        virtual QString hardwareAddress() const = 0;
 
50
        /**
 
51
         * Retrieves the effective bit rate currently attainable by this device.
 
52
         *
 
53
         * @return the bitrate in bit/s
 
54
         */
 
55
        virtual int bitRate() const = 0;
 
56
 
 
57
        /**
 
58
         * Indicates if the network interfaces sees a carrier.
 
59
         *
 
60
         * @return true if there's a carrier, false otherwise
 
61
         */
 
62
        virtual bool carrier() const = 0;
 
63
 
 
64
    protected:
 
65
    //Q_SIGNALS:
 
66
        /**
 
67
         * This signal is emitted when the bitrate of this network has changed.
 
68
         *
 
69
         * @param bitrate the new bitrate value for this network
 
70
         */
 
71
        virtual void bitRateChanged(int bitRate) = 0;
 
72
        /**
 
73
         * This signal indicates if the physical carrier changed state (eg if the network cable was
 
74
         * plugged or unplugged)
 
75
         */
 
76
        virtual void carrierChanged(bool plugged) = 0;
 
77
    };
 
78
} //Ifaces
 
79
} //Control
 
80
} //Solid
 
81
 
 
82
Q_DECLARE_INTERFACE(Solid::Control::Ifaces::WiredNetworkInterface, "org.kde.Solid.Control.Ifaces.WiredNetworkInterface/0.1")
 
83
 
 
84
#endif // SOLID_IFACES_WIRELESSNETWORKINTERFACE_H
 
85