KDELibs4Support

networking.cpp
1 /*
2  Copyright 2006-2007 Will Stephenson <[email protected]>
3  Copyright 2006-2007 Kevin Ottens <[email protected]>
4 
5  This library is free software; you can redistribute it and/or
6  modify it under the terms of the GNU Lesser General Public
7  License as published by the Free Software Foundation; either
8  version 2.1 of the License, or (at your option) version 3, or any
9  later version accepted by the membership of KDE e.V. (or its
10  successor approved by the membership of KDE e.V.), which shall
11  act as a proxy defined in Section 6 of version 3 of the license.
12 
13  This library is distributed in the hope that it will be useful,
14  but WITHOUT ANY WARRANTY; without even the implied warranty of
15  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
16  Lesser General Public License for more details.
17 
18  You should have received a copy of the GNU Lesser General Public
19  License along with this library. If not, see <http://www.gnu.org/licenses/>.
20 */
21 
22 //#include <KDebug>
23 
24 #include "networking.h"
25 #include "networking_p.h"
26 
27 Q_GLOBAL_STATIC(Solid::NetworkingPrivate, globalNetworkManager)
28 
29 Solid::Networking::Notifier::Notifier()
30 {
31 }
32 
34 {
35  return netStatus;
36 }
37 
38 /*=========================================================================*/
39 
40 Solid::Networking::Status Solid::Networking::status()
41 {
42  return static_cast<Solid::Networking::Status>(globalNetworkManager->status());
43 }
44 
45 Solid::Networking::Notifier *Solid::Networking::notifier()
46 {
47  return globalNetworkManager;
48 }
49 
51 {
52  return globalNetworkManager->connectPolicy;
53 }
54 
56 {
57  globalNetworkManager->connectPolicy = policy;
58 }
59 
61 {
62  return globalNetworkManager->disconnectPolicy;
63 }
64 
66 {
67  globalNetworkManager->disconnectPolicy = policy;
68 }
69 
70 #include "moc_networking.cpp"
71 #include "moc_networking_p.cpp"
This object emits signals, for use if your application requires notification of changes to networking...
Definition: networking.h:99
ManagementPolicy disconnectPolicy()
Retrieve a policy managing the application's disconnect behaviour.
Definition: networking.cpp:60
ManagementPolicy
This defines application policy in response to networking connect/disconnect events.
Definition: networking.h:58
ManagementPolicy connectPolicy()
Retrieve a policy managing the application's connect behaviour.
Definition: networking.cpp:50
Q_GLOBAL_STATIC(Internal::StaticControl, s_instance) class ControlPrivate
Q_SCRIPTABLE CaptureState status()
Get the current networking status If the result is Unknown, the backend may be unconfigured or otherw...
Definition: networking.cpp:40
void setDisconnectPolicy(ManagementPolicy policy)
Set a policy to manage the application's disconnect behaviour.
Definition: networking.cpp:65
Status
Describes the state of the networking system.
Definition: networking.h:47
void setConnectPolicy(ManagementPolicy policy)
Set a policy to manage the application's connect behaviour.
Definition: networking.cpp:55
This file is part of the KDE documentation.
Documentation copyright © 1996-2023 The KDE developers.
Generated on Sun Dec 3 2023 04:00:05 by doxygen 1.8.17 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.