You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
140 lines
5.1 KiB
140 lines
5.1 KiB
12 years ago
|
/* This file is part of the TDE libraries
|
||
|
Copyright (C) 2012 Timothy Pearson <kb9vqf@pearsoncomputing.net>
|
||
|
|
||
|
This library is free software; you can redistribute it and/or
|
||
|
modify it under the terms of the GNU Library General Public
|
||
|
License version 2 as published by the Free Software Foundation.
|
||
|
|
||
|
This library is distributed in the hope that it will be useful,
|
||
|
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||
|
Library General Public License for more details.
|
||
|
|
||
|
You should have received a copy of the GNU Library General Public License
|
||
|
along with this library; see the file COPYING.LIB. If not, write to
|
||
|
the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
|
||
|
Boston, MA 02110-1301, USA.
|
||
|
*/
|
||
|
|
||
|
#ifndef _TDENETWORKBACKEND_NETWORKMANAGER_P_H
|
||
|
#define _TDENETWORKBACKEND_NETWORKMANAGER_P_H
|
||
|
|
||
|
/* TQt headers */
|
||
|
#include <tqvaluelist.h>
|
||
|
#include <tqapplication.h>
|
||
|
#include <tqtimer.h>
|
||
12 years ago
|
#include <tquuid.h>
|
||
12 years ago
|
|
||
|
/* TDE headers */
|
||
|
#include <kdebug.h>
|
||
12 years ago
|
#include <tdelocale.h>
|
||
12 years ago
|
|
||
|
/* TQDbus headers */
|
||
|
#include <tqdbusconnection.h>
|
||
|
#include <tqdbusobjectpath.h>
|
||
|
#include <tqdbusdata.h>
|
||
|
#include <tqdbuserror.h>
|
||
|
#include <tqdbusdatamap.h>
|
||
|
#include <tqdbusvariant.h>
|
||
|
#include <tqdbusdatalist.h>
|
||
|
|
||
|
/* NM headers */
|
||
|
//#include <NetworkManager.h>
|
||
|
|
||
|
/* Proxy headers */
|
||
|
#include "networkmanagerproxy.h"
|
||
|
#include "networkmanagersettings.h"
|
||
|
#include "connectionsettings.h"
|
||
|
#include "deviceproxy.h"
|
||
|
#include "ethernetproxy.h"
|
||
12 years ago
|
#include "infinibandproxy.h"
|
||
12 years ago
|
#include "wifiproxy.h"
|
||
12 years ago
|
#include "wimaxproxy.h"
|
||
|
#include "bluetoothproxy.h"
|
||
|
#include "olpcmeshproxy.h"
|
||
12 years ago
|
#include "activeconnectionproxy.h"
|
||
|
#include "accesspointproxy.h"
|
||
12 years ago
|
#include "vpnpluginproxy.h"
|
||
12 years ago
|
|
||
|
typedef TQT_DBusDataMap<TQString> TQT_DBusTQStringDataMap;
|
||
|
typedef TQValueList<TQT_DBusData> TQT_DBusDataValueList;
|
||
|
|
||
|
typedef TQMap<uint, bool> NMAsyncCallIDMap;
|
||
|
typedef TQMap<uint, TQT_DBusTQStringDataMap> NMAsyncSettingsResponseMap;
|
||
|
typedef TQMap<uint, TQT_DBusObjectPath> NMAddConnectionAsyncResponseMap;
|
||
11 years ago
|
typedef TQMap<uint, TQT_DBusError> NMAddConnectionAsyncErrorResponseMap;
|
||
12 years ago
|
|
||
|
typedef TQValueList<TQT_DBusObjectPath> TQT_DBusObjectPathList;
|
||
|
|
||
12 years ago
|
class TDENetworkConnectionManager_BackendNM;
|
||
12 years ago
|
class TDENetworkConnectionManager_BackendNMPrivate;
|
||
|
|
||
|
class TDENetworkConnectionManager_BackendNM_DBusSignalReceiver : public TQObject
|
||
|
{
|
||
|
Q_OBJECT
|
||
|
|
||
|
public:
|
||
|
TDENetworkConnectionManager_BackendNM_DBusSignalReceiver(TDENetworkConnectionManager_BackendNMPrivate*);
|
||
|
~TDENetworkConnectionManager_BackendNM_DBusSignalReceiver();
|
||
|
|
||
|
public slots:
|
||
|
void dbusSignal(const TQT_DBusMessage&);
|
||
|
|
||
|
private:
|
||
|
TDENetworkConnectionManager_BackendNMPrivate* m_parent;
|
||
|
};
|
||
12 years ago
|
|
||
12 years ago
|
class TDENetworkConnectionManager_BackendNMPrivate : public TQObject
|
||
|
{
|
||
|
Q_OBJECT
|
||
|
|
||
|
public:
|
||
12 years ago
|
TDENetworkConnectionManager_BackendNMPrivate(TDENetworkConnectionManager_BackendNM*);
|
||
|
~TDENetworkConnectionManager_BackendNMPrivate();
|
||
12 years ago
|
|
||
|
public:
|
||
|
DBus::NetworkManagerProxy* m_networkManagerProxy;
|
||
|
DBus::SettingsInterface* m_networkManagerSettings;
|
||
|
DBus::DeviceProxy* m_networkDeviceProxy;
|
||
12 years ago
|
DBus::WiFiDeviceProxy* m_wiFiDeviceProxy;
|
||
12 years ago
|
DBus::VPNPluginProxy* m_vpnProxy;
|
||
12 years ago
|
NMAsyncCallIDMap nmConnectionSettingsAsyncCallWaiting;
|
||
|
NMAsyncSettingsResponseMap nmConnectionSettingsAsyncSettingsResponse;
|
||
|
NMAddConnectionAsyncResponseMap nmAddConnectionAsyncResponse;
|
||
11 years ago
|
NMAddConnectionAsyncErrorResponseMap nmConnectionSettingsAsyncSettingsErrorResponse;
|
||
|
NMAddConnectionAsyncErrorResponseMap nmConnectionSettingsUpdateAsyncSettingsErrorResponse;
|
||
|
NMAddConnectionAsyncErrorResponseMap nmAddConnectionAsyncErrorResponse;
|
||
12 years ago
|
bool nonReentrantCallActive;
|
||
12 years ago
|
TQString m_dbusDeviceString;
|
||
11 years ago
|
bool vpn_service_error_notified;
|
||
11 years ago
|
bool device_autoconnect_error_notified;
|
||
12 years ago
|
|
||
|
public slots:
|
||
|
void processConnectionSettingsAsyncReply(int, const TQT_DBusDataMap<TQString>&);
|
||
|
void processConnectionSettingsUpdateAsyncReply(int);
|
||
|
void processAddConnectionAsyncReply(int, const TQT_DBusObjectPath&);
|
||
11 years ago
|
void processConnectionSettingsAsyncError(int, const TQT_DBusError);
|
||
|
void processConnectionSettingsUpdateAsyncError(int, const TQT_DBusError);
|
||
|
void processAddConnectionAsyncError(int, const TQT_DBusError);
|
||
12 years ago
|
|
||
|
void internalProcessGlobalStateChanged(TQ_UINT32 state);
|
||
12 years ago
|
void internalProcessVPNStateChanged(TQ_UINT32 state);
|
||
|
void internalProcessVPNLoginBanner(const TQString& banner);
|
||
|
void internalProcessVPNFailure(TQ_UINT32 reason);
|
||
12 years ago
|
void internalProcessDeviceStateChanged(TQ_UINT32 newState, TQ_UINT32 oldState, TQ_UINT32 reason);
|
||
|
void internalProcessWiFiAccessPointAdded(const TQT_DBusObjectPath&);
|
||
|
void internalProcessWiFiAccessPointRemoved(const TQT_DBusObjectPath&);
|
||
12 years ago
|
void internalProcessWiFiPropertiesChanged(const TQMap<TQString, TQT_DBusVariant>&);
|
||
12 years ago
|
void internalProcessAPPropertiesChanged(const TQMap<TQString, TQT_DBusVariant>&);
|
||
12 years ago
|
|
||
|
private:
|
||
|
TDENetworkConnectionManager_BackendNM* m_parent;
|
||
12 years ago
|
TQMap<TQString, DBus::AccessPointProxy*> m_accessPointProxyList;
|
||
12 years ago
|
TQT_DBusConnection *m_dbusSignalConnection;
|
||
|
TDENetworkConnectionManager_BackendNM_DBusSignalReceiver *m_dbusSignalReceiver;
|
||
11 years ago
|
TQ_UINT32 m_prevDeviceState;
|
||
12 years ago
|
|
||
|
friend class TDENetworkConnectionManager_BackendNM_DBusSignalReceiver;
|
||
12 years ago
|
};
|
||
|
|
||
|
#endif // _TDENETWORKBACKEND_NETWORKMANAGER_P_H
|