void PhoneAudioHelper::setCall(SipCall *call) { if (call != m_call) { // disconnect old signals if (m_call) m_call->disconnect(this); // connect new signals m_call = call; if (m_call) { bool check; m_call->audioChannel()->setParent(0); m_call->audioChannel()->moveToThread(m_stream->thread()); check = connect(m_call, SIGNAL(stateChanged(SipCall::State)), this, SLOT(_q_callStateChanged(SipCall::State))); Q_ASSERT(check); Q_UNUSED(check); _q_callStateChanged(m_call->state()); } // change call emit callChanged(); } }
void RemoteAspect::receiveChanged(Connection &con, FieldContainerFactoryBase *fcFactory) { UInt32 remoteId = 0; UInt32 localId = 0; BitVector fieldMask = 0; UInt32 len = 0; FieldContainer *fcPtr = NULL; con.getValue(remoteId); con.getValue(fieldMask); con.getValue(len); if(getLocalId(remoteId, localId)) { fcPtr = fcFactory->getContainer(localId); #ifndef OSG_REMOTE_ASPECT_SILENT SLOG << "Receive CHANGED: id (r/l) '" << remoteId << "/" << localId << "' mask '0x" << std::hex << fieldMask << std::dec << "' len '" << len << "' type name '" << (fcPtr != NULL ? fcPtr->getType().getName() : "") << "'\n"; #endif if(fcPtr == NULL) { clearFCMapping(localId, remoteId); char dummy; while(len--) con.get(&dummy, 1); } else { fcPtr->copyFromBin(con, fieldMask); callChanged(fcPtr); } } else { char dummy; SWARNING << "Can not do CHANGED for unknown FC remote id " << remoteId << " skip " << len << " bytes." << std::endl; while(len--) con.get(&dummy, 1); } }
void ApiTraceModel::changed(ApiTraceEvent *event) { if (event->type() == ApiTraceEvent::Call) { callChanged(static_cast<ApiTraceCall*>(event)); } else if (event->type() == ApiTraceEvent::Frame) { frameChanged(static_cast<ApiTraceFrame*>(event)); } }