45 #include <QtCore/private/qfactoryloader_p.h> 47 #include <QtCore/qdebug.h> 48 #include <QtCore/qtimer.h> 49 #include <QtCore/qstringlist.h> 50 #include <QtCore/qthread.h> 51 #include <QtCore/private/qcoreapplication_p.h> 53 #ifndef QT_NO_BEARERMANAGEMENT 63 :
QObject(), pollTimer(0), bearerThread(0), mutex(
QMutex::Recursive), forcedPolling(0), firstUpdate(true)
65 qRegisterMetaType<QNetworkConfiguration>(
"QNetworkConfiguration");
66 qRegisterMetaType<QNetworkConfigurationPrivatePointer>(
"QNetworkConfigurationPrivatePointer");
92 if(thread->
wait(5000))
130 }
else if (!defaultConfiguration) {
132 defaultConfiguration =
ptr;
138 if (defaultConfiguration) {
170 if (!defaultConfiguration) {
171 defaultConfiguration =
ptr;
175 if (defaultConfiguration->
state == ptr->
state) {
182 defaultConfiguration =
ptr;
188 defaultConfiguration =
ptr;
195 defaultConfiguration =
ptr;
204 if (defaultConfiguration) {
232 if ((ptr->
state & filter) == filter) {
246 if ((ptr->
state & filter) == filter) {
292 QNetworkConfigurationManager::Capabilities capFlags;
370 if (qobject_cast<QBearerEngine *>(
sender()))
375 #ifndef QT_NO_LIBRARY 410 #endif // QT_NO_LIBRARY 515 #endif // QT_NO_BEARERMANAGEMENT BearerType
Specifies the type of bearer used by a configuration.
void setSingleShot(bool singleShot)
QExplicitlySharedDataPointer< QNetworkConfigurationPrivate > d
#define QT_END_NAMESPACE
This macro expands to.
void lock()
Locks the mutex.
The QMutex class provides access serialization between threads.
QHash< QString, QNetworkConfigurationPrivatePointer > userChoiceConfigurations
Q_GLOBAL_STATIC_WITH_ARGS(QFactoryLoader, loader,(QBearerEngineFactoryInterface_iid, QLatin1String("/bearer"))) QNetworkConfigurationManagerPrivate
#define it(className, varName)
QNetworkConfiguration::StateFlags state
bool remove(const T &value)
void unlock()
Unlocks this mutex locker.
QLatin1String(DBUS_INTERFACE_DBUS))) Q_GLOBAL_STATIC_WITH_ARGS(QString
T & value() const
Returns a modifiable reference to the current item's value.
The QString class provides a Unicode character string.
T * qobject_cast(QObject *object)
virtual QBearerEngine * create(const QString &key) const =0
The QObject class is the base class of all Qt objects.
void quit()
Tells the thread's event loop to exit with return code 0 (success).
QNetworkConfiguration::BearerType bearerType
bool isEmpty() const
Returns true if the list contains no items; otherwise returns false.
QObject * sender() const
Returns a pointer to the object that sent the signal, if called in a slot activated by a signal; othe...
QNetworkConfiguration defaultConfiguration() const
void append(const T &t)
Inserts value at the end of the list.
The QNetworkConfiguration class provides an abstraction of one or more access point configurations...
#define QT_BEGIN_NAMESPACE
This macro expands to.
QNetworkConfigurationManagerPrivate()
Q_INVOKABLE void startPolling()
void configurationUpdateComplete()
void onlineStateChanged(bool isOnline)
QHash< QString, QNetworkConfigurationPrivatePointer > accessPointConfigurations
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...
QSet< QBearerEngine * > updatingEngines
virtual ~QNetworkConfigurationManagerPrivate()
const_iterator insert(const T &value)
QList< QNetworkConfiguration > allConfigurations(QNetworkConfiguration::StateFlags filter) const
bool isActive() const
Returns true if the timer is running (pending); otherwise returns false.
void moveToThread(QThread *thread)
Changes the thread affinity for this object and its children.
const T * ptr(const T &t)
QHash< QString, QNetworkConfigurationPrivatePointer > snapConfigurations
void configurationRemoved(const QNetworkConfiguration &config)
void performAsyncConfigurationUpdate()
void unlock()
Unlocks the mutex.
void setInterval(int msec)
virtual bool requiresPolling() const
The QMutexLocker class is a convenience class that simplifies locking and unlocking mutexes...
bool configurationsInUse() const
virtual QNetworkConfigurationManager::Capabilities capabilities() const =0
static QThread * mainThread()
void start(Priority=InheritPriority)
Begins execution of the thread by calling run().
QObject * instance(const QString &key) const
bool wait(unsigned long time=ULONG_MAX)
Blocks the thread until either of these conditions is met:
The QHash::iterator class provides an STL-style non-const iterator for QHash and QMultiHash.
void configurationAdded(const QNetworkConfiguration &config)
QList< QBearerEngine * > engines() const
if(void) toggleToolbarShown
QList< QBearerEngine * > sessionEngines
QFuture< void > filter(Sequence &sequence, FilterFunction filterFunction)
void configurationChanged(const QNetworkConfiguration &config)
void updateConfigurations()
virtual QNetworkConfigurationPrivatePointer defaultConfiguration()=0
QSet< QBearerEngine * > pollingEngines
QSet< QString > onlineConfigurations
QThread * thread() const
Returns the thread in which the object lives.
The QTimer class provides repetitive and single-shot timers.
#define QBearerEngineFactoryInterface_iid
QNetworkConfiguration configurationFromIdentifier(const QString &identifier) const
static const KeyPair *const end
QNetworkConfigurationManager::Capabilities capabilities() const
void start(int msec)
Starts or restarts the timer with a timeout interval of msec milliseconds.
The QThread class provides a platform-independent way to manage threads.
Q_OUTOFLINE_TEMPLATE void qDeleteAll(ForwardIterator begin, ForwardIterator end)
void deleteLater()
Schedules this object for deletion.
The QList class is a template class that provides lists.