#include <mw/wac/wacconnectionManager.h>
Link against: wacConnectionManager.lib
class WAC::ConnectionManager : public QObject, public QObject |
The ConnectionManager class can be used to:
Public Member Enumerations | |
---|---|
enum | Error { UnknownSessionError, SessionAbortedError, RoamingError, OperationNotSupportedError, NoConfigurationError } |
enum | PropertyKey { ActiveConfigurationName, ActiveConfigurationID, ActiveBearerType, ConnectionState, ..., Proxy } |
enum | State { INVALID, NOTAVAILABLE, CONNECTING, CONNECTED, ..., CONFIGSEXIST } |
Public Member Functions | |
---|---|
ConnectionManager(QObject *) | |
~ConnectionManager() | |
QStringList | accessPoints() |
void | closeConnection() |
void | disableConnectionMigration() |
void | enableConnectionMigration() |
QList< NetworkConfiguration > | networkConfigurations() |
void | openConnection(bool) |
void | openConnection(const QString &, bool) |
void | openConnection(const NetworkConfiguration &, bool) |
QVariant | property(ConnectionManager::PropertyKey) |
Public Signals | |
---|---|
void | betterConfigurationExists(const QString &) |
void | error(ConnectionManager::Error) |
void | stateChanged(ConnectionManager::State) |
Inherited Attributes | |
---|---|
QObject::d_ptr | |
QObject::objectName | |
QObject::staticQtMetaObject |
Inherited Functions | |
---|---|
QObject::QObject(QObjectPrivate &,QObject *) | |
QObject::blockSignals(bool) | |
QObject::childEvent(QChildEvent *) | |
QObject::children()const | |
QObject::connect(const QObject *,const QMetaMethod &,const QObject *,const QMetaMethod &,Qt::ConnectionType) | |
QObject::connect(const QObject *,const char *,const QObject *,const char *,Qt::ConnectionType) | |
QObject::connect(const QObject *,const char *,const char *,Qt::ConnectionType)const | |
QObject::connectNotify(const char *) | |
QObject::customEvent(QEvent *) | |
QObject::deleteLater | |
QObject::destroyed | |
QObject::disconnect(const QObject *,const QMetaMethod &,const QObject *,const QMetaMethod &) | |
QObject::disconnect(const QObject *,const char *) | |
QObject::disconnect(const QObject *,const char *,const QObject *,const char *) | |
QObject::disconnect(const char *,const QObject *,const char *) | |
QObject::disconnectNotify(const char *) | |
QObject::dumpObjectInfo() | |
QObject::dumpObjectTree() | |
QObject::dynamicPropertyNames()const | |
QObject::event(QEvent *) | |
QObject::eventFilter(QObject *,QEvent *) | |
QObject::findChild(const QString &)const | |
QObject::findChildren(const QRegExp &)const | |
QObject::findChildren(const QString &)const | |
QObject::inherits(const char *)const | |
QObject::installEventFilter(QObject *) | |
QObject::isWidgetType()const | |
QObject::killTimer(int) | |
QObject::moveToThread(QThread *) | |
QObject::objectName()const | |
QObject::parent()const | |
QObject::property(const char *)const | |
QObject::receivers(const char *)const | |
QObject::registerUserData() | |
QObject::removeEventFilter(QObject *) | |
QObject::sender()const | |
QObject::senderSignalIndex()const | |
QObject::setObjectName(const QString &) | |
QObject::setParent(QObject *) | |
QObject::setProperty(const char *,const QVariant &) | |
QObject::setUserData(uint,QObjectUserData *) | |
QObject::signalsBlocked()const | |
QObject::startTimer(int) | |
QObject::thread()const | |
QObject::timerEvent(QTimerEvent *) | |
QObject::userData(uint)const | |
QObject::~QObject() |
List out all possible access points to client.
Open a connection using best possible configuration.
Close an opened connection.
Monitor state of established connection
Supports ALR in the case connection are based on SNAP configuration.
Gives an option to migrate to a better configuration , In the case , connection is based on individual access point
ConnectionManager *connManager = new ConnectionManager(this); connManager->openConnectionSync(); QString iap = connManager->property(ConnectionManager::ActiveConfigurationName);
Enumerator | Value | Description |
---|---|---|
UnknownSessionError | 0 | |
SessionAbortedError | ||
RoamingError | ||
OperationNotSupportedError | ||
NoConfigurationError |
Enumerator | Value | Description |
---|---|---|
ActiveConfigurationName | 0 | |
ActiveConfigurationID | ||
ActiveBearerType | ||
ConnectionState | ||
ReceivedData | ||
SentData | ||
ActiveTime | ||
IsOnline | ||
LastErrorCode | ||
Proxy |
Enumerator | Value | Description |
---|---|---|
INVALID | 0 | |
NOTAVAILABLE | ||
CONNECTING | ||
CONNECTED | ||
CLOSING | ||
DISCONNECTED | ||
ROAMING | ||
CONNECTIONLOSS | ||
CONFIGSEXIST |
ConnectionManager | ( | QObject * | parent = 0 | ) | [explicit] |
Constructs a ConnectionManager object with the given parent.
See also: accessPoints(), openConnectionSync(), openConnectionAsync(), closeConnection()
QStringList | accessPoints | ( | ) |
Returns the list of Access Points. The configurations returned will be in "Discovered" state. All the configurations are reday to be used for making connections.
void | betterConfigurationExists | ( | const QString & | ) | [signal] |
void | closeConnection | ( | ) |
This function closes the established network connection. The connection will be closed if all the in-process clients requests to disconnect. The connection will exist untill the last in-process clients requests to disconnect.
void | disableConnectionMigration | ( | ) |
Disables the migration of connection even if a better configuration becomes available.
void | enableConnectionMigration | ( | ) |
Enables the migration of connection if a better configuration becomes available.
void | error | ( | ConnectionManager::Error | ) | [signal] |
QList< NetworkConfiguration > | networkConfigurations | ( | ) |
void | openConnection | ( | bool | sync = false | ) |
The function opens a connection using best possible access point. The connection will be started synchrously if 'sync' is true, else asynchronously. By default connection will be started asynchronously. The criterion to choose best configuration is WLAN is preferred to packet data. If a session already exists and its non-packet session, it will re-use the same session. If the current session is packet data, it will search for non-packet data configuration.
If it fails to open or doesn't find any configuration ready to be used, emits errors.
See also: openConnection(const QString&, bool)
void | openConnection | ( | const QString & | , |
bool | sync = false | |||
) |
This function opens a connection using access point passed as argument. The connection will be started synchrously if 'sync' is true, else asynchronously. By default connection will be started asynchronously.
See also: openConnection()
void | openConnection | ( | const NetworkConfiguration & | , |
bool | sync = false | |||
) |
This function opens a connection using networkConfiguration passed as argument. The connection will be started synchrously if 'sync' is true, else asynchronously. By default connection will be started asynchronously.
See also: openConnection(const NetworkConfiguration& ntwrkConfig, bool sync)
QVariant | property | ( | ConnectionManager::PropertyKey | ) |
Returns the value of property specified by key. The function can be used to get information about current session.