File indexing completed on 2024-04-14 14:20:35

0001 /*
0002     Copyright 2006-2007 Will Stephenson <wstephenson@kde.org>
0003     Copyright 2006-2007 Kevin Ottens <ervin@kde.org>
0004 
0005     This library is free software; you can redistribute it and/or
0006     modify it under the terms of the GNU Lesser General Public
0007     License as published by the Free Software Foundation; either
0008     version 2.1 of the License, or (at your option) version 3, or any
0009     later version accepted by the membership of KDE e.V. (or its
0010     successor approved by the membership of KDE e.V.), which shall
0011     act as a proxy defined in Section 6 of version 3 of the license.
0012 
0013     This library is distributed in the hope that it will be useful,
0014     but WITHOUT ANY WARRANTY; without even the implied warranty of
0015     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
0016     Lesser General Public License for more details.
0017 
0018     You should have received a copy of the GNU Lesser General Public
0019     License along with this library. If not, see <http://www.gnu.org/licenses/>.
0020 */
0021 
0022 //#include <KDebug>
0023 
0024 #include "networking.h"
0025 #include "networking_p.h"
0026 
0027 Q_GLOBAL_STATIC(Solid::NetworkingPrivate, globalNetworkManager)
0028 
0029 Solid::Networking::Notifier::Notifier()
0030 {
0031 }
0032 
0033 uint Solid::NetworkingPrivate::status() const
0034 {
0035     return netStatus;
0036 }
0037 
0038 /*=========================================================================*/
0039 
0040 Solid::Networking::Status Solid::Networking::status()
0041 {
0042     return static_cast<Solid::Networking::Status>(globalNetworkManager->status());
0043 }
0044 
0045 Solid::Networking::Notifier *Solid::Networking::notifier()
0046 {
0047     return globalNetworkManager;
0048 }
0049 
0050 Solid::Networking::ManagementPolicy Solid::Networking::connectPolicy()
0051 {
0052     return globalNetworkManager->connectPolicy;
0053 }
0054 
0055 void Solid::Networking::setConnectPolicy(Solid::Networking::ManagementPolicy policy)
0056 {
0057     globalNetworkManager->connectPolicy = policy;
0058 }
0059 
0060 Solid::Networking::ManagementPolicy Solid::Networking::disconnectPolicy()
0061 {
0062     return globalNetworkManager->disconnectPolicy;
0063 }
0064 
0065 void Solid::Networking::setDisconnectPolicy(Solid::Networking::ManagementPolicy policy)
0066 {
0067     globalNetworkManager->disconnectPolicy = policy;
0068 }
0069 
0070 #include "moc_networking.cpp"
0071 #include "moc_networking_p.cpp"