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

« back to all changes in this revision

Viewing changes to libs/solid/control/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 Will Stephenson <wstephenson@kde.org>
 
3
    Copyright (C) 2007 Kevin Ottens <ervin@kde.org>
 
4
 
 
5
    This library is free software; you can redistribute it and/or
 
6
    modify it under the terms of the GNU Library General Public
 
7
    License version 2 as published by the Free Software Foundation.
 
8
 
 
9
    This library is distributed in the hope that it will be useful,
 
10
    but WITHOUT ANY WARRANTY; without even the implied warranty of
 
11
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
 
12
    Library General Public License for more details.
 
13
 
 
14
    You should have received a copy of the GNU Library General Public License
 
15
    along with this library; see the file COPYING.LIB.  If not, write to
 
16
    the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
 
17
    Boston, MA 02110-1301, USA.
 
18
 
 
19
*/
 
20
 
 
21
#ifndef SOLID_CONTROL_WIREDNETWORKINTERFACE_H
 
22
#define SOLID_CONTROL_WIREDNETWORKINTERFACE_H
 
23
 
 
24
#include "solid_control_export.h"
 
25
 
 
26
#include "networkinterface.h"
 
27
 
 
28
namespace Solid
 
29
{
 
30
namespace Control
 
31
{
 
32
    class WiredNetworkInterfacePrivate;
 
33
 
 
34
    /**
 
35
     * This interface represents a wired Ethernet network interface
 
36
     */
 
37
    class SOLIDCONTROL_EXPORT WiredNetworkInterface : public NetworkInterface
 
38
    {
 
39
        Q_OBJECT
 
40
        Q_DECLARE_PRIVATE(WiredNetworkInterface)
 
41
 
 
42
    public:
 
43
        /**
 
44
         * Creates a new WiredNetworkInterface object.
 
45
         *
 
46
         * @param backendObject the network object provided by the backend
 
47
         */
 
48
        WiredNetworkInterface(QObject *backendObject = 0);
 
49
 
 
50
        /**
 
51
         * Constructs a copy of a network.
 
52
         *
 
53
         * @param network the network to copy
 
54
         */
 
55
        WiredNetworkInterface(const WiredNetworkInterface &network);
 
56
 
 
57
        /**
 
58
         * Destroys a WiredNetworkInterface object.
 
59
         */
 
60
        virtual ~WiredNetworkInterface();
 
61
 
 
62
        /**
 
63
         * The NetworkInterface type.
 
64
         *
 
65
         * @return the NetworkInterface::Type.  This always returns NetworkInterface::Ieee8023
 
66
         */
 
67
        virtual NetworkInterface::Type type() const;
 
68
 
 
69
        /**
 
70
         * The hardware address assigned to the network interface
 
71
         */
 
72
        QString hardwareAddress() const;
 
73
 
 
74
        /**
 
75
         * Retrieves the effective bit rate currently attainable by this device.
 
76
         *
 
77
         * @return the bitrate in Kbit/s
 
78
         */
 
79
        int bitRate() const;
 
80
 
 
81
        /**
 
82
         * Indicates if the network interfaces sees a carrier.
 
83
         *
 
84
         * @return true if there's a carrier, false otherwise
 
85
         */
 
86
        bool carrier() const;
 
87
 
 
88
    Q_SIGNALS:
 
89
        /**
 
90
         * This signal is emitted when the bitrate of this network has changed.
 
91
         *
 
92
         * @param bitrate the new bitrate value for this network
 
93
         */
 
94
        void bitRateChanged(int bitRate);
 
95
 
 
96
        /**
 
97
         * This signal indicates if the physical carrier changed state (eg if the network cable was
 
98
         * plugged or unplugged)
 
99
         */
 
100
        void carrierChanged(bool plugged);
 
101
    protected:
 
102
        /**
 
103
         * @internal
 
104
         */
 
105
        WiredNetworkInterface(WiredNetworkInterfacePrivate &dd, QObject *backendObject);
 
106
 
 
107
        /**
 
108
         * @internal
 
109
         */
 
110
        WiredNetworkInterface(WiredNetworkInterfacePrivate &dd, const WiredNetworkInterface &network);
 
111
 
 
112
    private Q_SLOTS:
 
113
        void _k_destroyed(QObject *object);
 
114
    private:
 
115
        friend class NetworkInterface;
 
116
        friend class NetworkInterfacePrivate;
 
117
    };
 
118
} //Control
 
119
} //Solid
 
120
 
 
121
#endif //SOLID_CONTROL_WIREDNETWORKINTERFACE_H
 
122