summaryrefslogtreecommitdiffstats
path: root/src/network/bearer
diff options
context:
space:
mode:
Diffstat (limited to 'src/network/bearer')
-rw-r--r--src/network/bearer/qnetworkconfigmanager.cpp4
-rw-r--r--src/network/bearer/qnetworkconfigmanager.h3
-rw-r--r--src/network/bearer/qnetworkconfigmanager_p.h1
-rw-r--r--src/network/bearer/qnetworkconfiguration.cpp2
-rw-r--r--src/network/bearer/qnetworkconfiguration_p.h3
-rw-r--r--src/network/bearer/qnetworksession.cpp4
-rw-r--r--src/network/bearer/qnetworksession.h8
-rw-r--r--src/network/bearer/qnetworksession_p.h4
8 files changed, 20 insertions, 9 deletions
diff --git a/src/network/bearer/qnetworkconfigmanager.cpp b/src/network/bearer/qnetworkconfigmanager.cpp
index e7595a4..1ba5dab 100644
--- a/src/network/bearer/qnetworkconfigmanager.cpp
+++ b/src/network/bearer/qnetworkconfigmanager.cpp
@@ -64,7 +64,7 @@ QNetworkConfigurationManagerPrivate *qNetworkConfigurationManagerPrivate()
\since 4.7
\inmodule QtNetwork
- \ingroup bearer
+ \ingroup network
QNetworkConfigurationManager provides access to the network configurations known to the system and
enables applications to detect the system capabilities (with regards to network sessions) at runtime.
@@ -166,6 +166,8 @@ QNetworkConfigurationManagerPrivate *qNetworkConfigurationManagerPrivate()
sockets.
\value DataStatistics If this flag is set QNetworkSession can provide statistics
about transmitted and received data.
+ \value NetworkSessionRequired If this flag is set the platform requires that a network
+ session is created before network operations can be performed.
*/
/*!
diff --git a/src/network/bearer/qnetworkconfigmanager.h b/src/network/bearer/qnetworkconfigmanager.h
index 73041fe..bb4d8a0 100644
--- a/src/network/bearer/qnetworkconfigmanager.h
+++ b/src/network/bearer/qnetworkconfigmanager.h
@@ -64,7 +64,8 @@ public:
SystemSessionSupport = 0x00000004,
ApplicationLevelRoaming = 0x00000008,
ForcedRoaming = 0x00000010,
- DataStatistics = 0x00000020
+ DataStatistics = 0x00000020,
+ NetworkSessionRequired = 0x00000040
};
Q_DECLARE_FLAGS(Capabilities, Capability)
diff --git a/src/network/bearer/qnetworkconfigmanager_p.h b/src/network/bearer/qnetworkconfigmanager_p.h
index 8ec8152..dba9d2c 100644
--- a/src/network/bearer/qnetworkconfigmanager_p.h
+++ b/src/network/bearer/qnetworkconfigmanager_p.h
@@ -57,6 +57,7 @@
#include "qnetworkconfiguration_p.h"
#include <QtCore/qmutex.h>
+#include <QtCore/qset.h>
QT_BEGIN_NAMESPACE
diff --git a/src/network/bearer/qnetworkconfiguration.cpp b/src/network/bearer/qnetworkconfiguration.cpp
index 82669e0..4108fee 100644
--- a/src/network/bearer/qnetworkconfiguration.cpp
+++ b/src/network/bearer/qnetworkconfiguration.cpp
@@ -52,7 +52,7 @@ QT_BEGIN_NAMESPACE
\since 4.7
\inmodule QtNetwork
- \ingroup bearer
+ \ingroup network
QNetworkConfiguration encapsulates a single access point or service network.
In most cases a single access point configuration can be mapped to one network
diff --git a/src/network/bearer/qnetworkconfiguration_p.h b/src/network/bearer/qnetworkconfiguration_p.h
index 6908277..ccbe670 100644
--- a/src/network/bearer/qnetworkconfiguration_p.h
+++ b/src/network/bearer/qnetworkconfiguration_p.h
@@ -57,7 +57,6 @@
#include <QtCore/qshareddata.h>
#include <QtCore/qmutex.h>
-#include <QtNetwork/QNetworkInterface>
QT_BEGIN_NAMESPACE
@@ -72,7 +71,7 @@ public:
{
}
- ~QNetworkConfigurationPrivate()
+ virtual ~QNetworkConfigurationPrivate()
{
//release pointers to member configurations
serviceNetworkMembers.clear();
diff --git a/src/network/bearer/qnetworksession.cpp b/src/network/bearer/qnetworksession.cpp
index cf9f4b2..1bba56f 100644
--- a/src/network/bearer/qnetworksession.cpp
+++ b/src/network/bearer/qnetworksession.cpp
@@ -58,7 +58,7 @@ QT_BEGIN_NAMESPACE
\since 4.7
\inmodule QtNetwork
- \ingroup bearer
+ \ingroup network
A QNetworkSession enables control over the system's network interfaces. The session's configuration
parameter are determined via the QNetworkConfiguration object to which it is bound. Depending on the
@@ -370,6 +370,7 @@ QNetworkConfiguration QNetworkSession::configuration() const
return d ? d->publicConfig : QNetworkConfiguration();
}
+#ifndef QT_NO_NETWORKINTERFACE
/*!
Returns the network interface that is used by this session.
@@ -386,6 +387,7 @@ QNetworkInterface QNetworkSession::interface() const
{
return d ? d->currentInterface() : QNetworkInterface();
}
+#endif
/*!
Returns true if this session is open. If the number of all open sessions is greater than
diff --git a/src/network/bearer/qnetworksession.h b/src/network/bearer/qnetworksession.h
index 18437f6..596f527 100644
--- a/src/network/bearer/qnetworksession.h
+++ b/src/network/bearer/qnetworksession.h
@@ -48,6 +48,10 @@
#include <QtCore/qvariant.h>
#include <QtNetwork/qnetworkconfiguration.h>
+#if defined(Q_OS_WIN) && defined(interface)
+#undef interface
+#endif
+
QT_BEGIN_HEADER
QT_BEGIN_NAMESPACE
@@ -77,12 +81,14 @@ public:
InvalidConfigurationError
};
- QNetworkSession(const QNetworkConfiguration& connConfig, QObject* parent =0);
+ explicit QNetworkSession(const QNetworkConfiguration& connConfig, QObject* parent =0);
virtual ~QNetworkSession();
bool isOpen() const;
QNetworkConfiguration configuration() const;
+#ifndef QT_NO_NETWORKINTERFACE
QNetworkInterface interface() const;
+#endif
State state() const;
SessionError error() const;
diff --git a/src/network/bearer/qnetworksession_p.h b/src/network/bearer/qnetworksession_p.h
index 76691b3..a341eaf 100644
--- a/src/network/bearer/qnetworksession_p.h
+++ b/src/network/bearer/qnetworksession_p.h
@@ -56,8 +56,6 @@
#include "qnetworksession.h"
#include "qnetworkconfiguration_p.h"
-#include <QNetworkInterface>
-
QT_BEGIN_NAMESPACE
class Q_NETWORK_EXPORT QNetworkSessionPrivate : public QObject
@@ -82,7 +80,9 @@ public:
//notification hooks to discover future state changes.
virtual void syncStateWithInterface() = 0;
+#ifndef QT_NO_NETWORKINTERFACE
virtual QNetworkInterface currentInterface() const = 0;
+#endif
virtual QVariant sessionProperty(const QString& key) const = 0;
virtual void setSessionProperty(const QString& key, const QVariant& value) = 0;