Qt 4.8
Classes | Functions | Variables
qcorewlanengine_10_6.mm File Reference
#include <SystemConfiguration/SCNetworkConfiguration.h>

Go to the source code of this file.

Classes

class  QNSListener
 

Functions

void networkChangeCallback (SCDynamicStoreRef, CFArrayRef changedKeys, void *info)
 

Variables

static QNSListenerlistener = 0
 

Function Documentation

◆ networkChangeCallback()

void networkChangeCallback ( SCDynamicStoreRef  ,
CFArrayRef  changedKeys,
void *  info 
)

Definition at line 111 of file qcorewlanengine_10_6.mm.

Referenced by QCoreWlanEngine::startNetworkChangeLoop().

112 {
113  for ( long i = 0; i < CFArrayGetCount(changedKeys); i++) {
114 
115  QString changed = QCFString::toQString(CFStringRef((CFStringRef)CFArrayGetValueAtIndex(changedKeys, i)));
116  if( changed.contains("/Network/Global/IPv4")) {
117  QCoreWlanEngine* wlanEngine = static_cast<QCoreWlanEngine*>(info);
118  wlanEngine->requestUpdate();
119  }
120  }
121  return;
122 }
QBool contains(QChar c, Qt::CaseSensitivity cs=Qt::CaseSensitive) const
Definition: qstring.h:904
const struct __CFString * CFStringRef
static mach_timebase_info_data_t info
static QString toQString(CFStringRef cfstr)
Definition: qcore_mac.cpp:47
The QString class provides a Unicode character string.
Definition: qstring.h:83
Q_INVOKABLE void requestUpdate()

Variable Documentation

◆ listener

QNSListener* listener = 0
static