54 #include <private/qcore_symbian_p.h> 57 #ifndef QT_NO_BEARERMANAGEMENT 287 qRegisterMetaType<QNetworkSession::State>();
288 qRegisterMetaType<QNetworkSession::SessionError>();
413 #ifndef QT_NO_NETWORKINTERFACE 753 qWarning(
"QNetworkSessionPrivate::nativeSession called in wrong thread");
754 return s.
d->nativeSession();
757 TInt QNetworkSessionPrivate::nativeOpenSocket(
QNetworkSession& s, RSocket& sock, TUint family, TUint
type, TUint protocol)
762 RConnection *con = s.
d->nativeSession();
763 if (!con || !con->SubSessionHandle())
765 return sock.Open(qt_symbianGetSocketServer(), family,
type, protocol, *con);
768 TInt QNetworkSessionPrivate::nativeOpenHostResolver(
QNetworkSession& s, RHostResolver& resolver, TUint family, TUint protocol)
773 RConnection *con = s.
d->nativeSession();
774 if (!con || !con->SubSessionHandle())
776 return resolver.Open(qt_symbianGetSocketServer(), family, protocol, *con);
781 #include "moc_qnetworksession.cpp" 785 #endif // QT_NO_BEARERMANAGEMENT The QVariant class acts like a union for the most common Qt data types.
QString errorString() const
Returns a human-readable description of the last device error that occurred.
virtual void syncStateWithInterface()=0
QVariant sessionProperty(const QString &key) const
Returns the value for property key.
virtual void connectNotify(const char *signal)
This function is required to detect whether the client wants to control the roaming process...
#define QT_END_NAMESPACE
This macro expands to.
quint64 activeTime() const
Returns the number of seconds that the session has been active.
void migrate()
Instructs the session to roam to the new access point.
virtual QNetworkInterface currentInterface() const =0
void reject()
The new access point is not suitable for the application.
virtual ~QNetworkSession()
Frees the resources associated with the QNetworkSession object.
QNetworkSessionPrivate * d
void stateChanged(QNetworkSession::State)
This signal is emitted whenever the state of the network session changes.
State
This enum describes the connectivity state of the session.
QNetworkConfiguration serviceConfig
void opened()
This signal is emitted when the network session has been opened.
static QString tr(const char *sourceText, const char *comment=0, int n=-1)
QLatin1String(DBUS_INTERFACE_DBUS))) Q_GLOBAL_STATIC_WITH_ARGS(QString
SessionError error() const
Returns the type of error that last occurred.
The QString class provides a Unicode character string.
virtual QVariant sessionProperty(const QString &key) const =0
The QObject class is the base class of all Qt objects.
void ignore()
This function indicates that the application does not wish to roam the session.
virtual void connectNotify(const char *signal)
This virtual function is called when something has been connected to signal in this object...
QNetworkConfiguration activeConfig
virtual void disconnectNotify(const char *signal)
This function is called when the client disconnects from the preferredConfigurationChanged() signal...
virtual void setALREnabled(bool)
virtual QNetworkSessionPrivate * createSessionBackend()=0
QNetworkConfiguration configuration() const
Returns the QNetworkConfiguration that this network session object is based on.
bool isValid() const
Returns true if this QNetworkConfiguration object is valid.
static QThread * currentThread()
Returns a pointer to a QThread which manages the currently executing thread.
SessionError
This enum describes the session errors that can occur.
The QNetworkConfiguration class provides an abstraction of one or more access point configurations...
#define QT_BEGIN_NAMESPACE
This macro expands to.
virtual QNetworkSession::SessionError error() const =0
void preferredConfigurationChanged(const QNetworkConfiguration &config, bool isSeamless)
This signal is emitted when the preferred configuration/access point for the session changes...
The QEventLoop class provides a means of entering and leaving an event loop.
void accept()
Instructs the session to permanently accept the new access point.
QNetworkInterface interface() const
Returns the network interface that is used by this session.
static bool connect(const QObject *sender, const char *signal, const QObject *receiver, const char *member, Qt::ConnectionType=Qt::AutoConnection)
Creates a connection of the given type from the signal in the sender object to the method in the rece...
bool isEmpty() const
Returns true if the string has no characters; otherwise returns false.
quint64 bytesWritten() const
Returns the amount of data sent in bytes; otherwise 0.
QNetworkConfigurationManagerPrivate * qNetworkConfigurationManagerPrivate()
QNetworkSession::State state
Q_CORE_EXPORT void qWarning(const char *,...)
State state() const
Returns the state of the session.
QNetworkConfiguration publicConfig
virtual quint64 activeTime() const =0
virtual quint64 bytesWritten() const =0
The QMutexLocker class is a convenience class that simplifies locking and unlocking mutexes...
QString identifier() const
Returns the unique and platform specific identifier for this network configuration; otherwise an empt...
The QNetworkSession class provides control over the system's access points and enables session manage...
virtual void disconnectNotify(const char *signal)
This virtual function is called when something has been disconnected from signal in this object...
bool isOpen() const
Returns true if this session is open.
quint64 bytesReceived() const
Returns the amount of data received in bytes; otherwise 0.
void open()
Creates an open session which increases the session counter on the underlying network interface...
bool singleShot
This static function calls a slot after a given time interval.
virtual bool hasIdentifier(const QString &id)=0
QList< QBearerEngine * > engines() const
virtual quint64 bytesReceived() const =0
static QReadWriteLock lock
virtual void setSessionProperty(const QString &key, const QVariant &value)=0
QNetworkSession(const QNetworkConfiguration &connConfig, QObject *parent=0)
Constructs a session based on connectionConfig with the given parent.
void stop()
Invalidates all open sessions against the network interface and therefore stops the underlying networ...
virtual QString errorString() const =0
void closed()
This signal is emitted when the network session has been closed.
int qstrcmp(const QByteArray &str1, const char *str2)
The QNetworkInterface class provides a listing of the host's IP addresses and network interfaces...
QThread * thread() const
Returns the thread in which the object lives.
void setSessionProperty(const QString &key, const QVariant &value)
Sets the property value on the session.
void newConfigurationActivated()
This signal is emitted once the session has roamed to the new access point.
void close()
Decreases the session counter on the associated network configuration.
int exec(ProcessEventsFlags flags=AllEvents)
Enters the main event loop and waits until exit() is called.
Type type() const
Returns the type of the configuration.
bool waitForOpened(int msecs=30000)
Waits until the session has been opened, up to msecs milliseconds.