/*! Constructs a WLAN registration object with the given \a parent. The \a hashedHandle is the hash value of the WLAN network device handle. The object will be created in client mode if \a mode is Client, or server mode otherwise. The following example demonstrates how to create a QWlanRegistration: \code QStringList wlanDevices = QtopiaNetwork::availableNetworkConfigs( QtopiaNetwork::WirelessLAN ); foreach( QString wlanHandle, wlanDevices ) { QWlanRegistration* wlanReg = new QWlanRegistration( QString::number(qHash( wlanHandle )) ); } \endcode \sa QCommInterface */ QWlanRegistration::QWlanRegistration( const QString& hashedHandle, QObject* parent, QAbstractIpcInterface::Mode mode ) : QCommInterface( "QWlanRegistration", hashedHandle, parent, mode ) { dptr = new QWlanRegistrationPrivate(); proxy( SIGNAL(accessPointChanged()) ); }
// Go through all interfaces and add all IPs for interfaces that can // broadcast and are not local. foreach (QNetworkInterface networkInterface, QNetworkInterface::allInterfaces()) { if (!networkInterface.addressEntries().isEmpty() && networkInterface.isValid()) { QNetworkInterface::InterfaceFlags interfaceFlags = networkInterface.flags(); if (interfaceFlags & QNetworkInterface::IsUp && interfaceFlags & QNetworkInterface::IsRunning && interfaceFlags & QNetworkInterface::CanBroadcast && !(interfaceFlags & QNetworkInterface::IsLoopBack)) { qDebug() << "ConnectionManager::handleNetworkSessionOpened():" << "The connection is valid!"; if (mNetworkSession) { mAccessPoint = mNetworkSession->configuration().name(); emit accessPointChanged(mAccessPoint); } mMyIp.setAddress(networkInterface.addressEntries().at(0).ip().toString()); emit myIpChanged(mMyIp.toString()); setState(Connected); return; } } }
void S60VideoPlayerSession::MvpuoPrepareComplete(TInt aError) { DP0("S60VideoPlayerSession::MvpuoPrepareComplete +++"); DP1("S60VideoPlayerSession::MvpuoPrepareComplete - aError:", aError); if (KErrNone == aError && m_stream) { emit accessPointChanged(m_accessPointId); } if (KErrCouldNotConnect == aError && !(m_networkAccessControl->isLastAccessPoint())) { load(m_UrlPath); return; } TInt error = aError; if (KErrNone == error || KErrMMPartialPlayback == error) { TSize originalSize; TRAP(error, m_player->VideoFrameSizeL(originalSize)); if (KErrNone == error) { m_nativeSize = QSize(originalSize.iWidth, originalSize.iHeight); emit nativeSizeChanged(m_nativeSize); m_pendingChanges |= ScaleFactors; #ifdef HAS_AUDIOROUTING_IN_VIDEOPLAYER Q_ASSERT(!m_audioOutput); TRAP(error, m_audioOutput = CAudioOutput::NewL(*m_player)); if (KErrNone == error) { TRAP(error, m_audioOutput->RegisterObserverL(*this)); if (KErrNone == error) setActiveEndpoint(m_audioEndpoint); } #endif } if (KErrNone == error) { applyPendingChanges(true); // force apply even though state is not Loaded if (KErrNone == this->error()) // applyPendingChanges() can call setError() loaded(); } } else { setError(error); } DP0("S60VideoPlayerSession::MvpuoPrepareComplete ---"); }