void PeerConnection00::setRemoteDescription(int action, PassRefPtr<SessionDescription> sessionDescription, ExceptionCode& ec) { if (m_readyState == CLOSED) { ec = INVALID_STATE_ERR; return; } switch (action) { case SDP_OFFER: case SDP_PRANSWER: case SDP_ANSWER: break; default: ec = SYNTAX_ERR; return; } if (!sessionDescription) { ec = TYPE_MISMATCH_ERR; return; } bool valid = m_peerHandler->setRemoteDescription(action, sessionDescription->descriptor()); if (!valid) ec = SYNTAX_ERR; }
void MediaStreamRegistry::registerMediaStreamURL(const KURL& url, PassRefPtr<MediaStream> stream) { ASSERT(isMainThread()); m_streamDescriptors.set(url.string(), stream->descriptor()); }
void SessionDescription::addCandidate(PassRefPtr<IceCandidate> candidate) { m_descriptor->addCandidate(candidate->descriptor()); }