CWVOID cwStreaming::streamRelease() { if (!canRelease()) { streamCancel(); return; } if (m_eState == eStreamStateOnline) { cwRemoveBatch* pRemoveBatch = this->buildRemoveBatch(); if (pRemoveBatch) { cwRepertory::getInstance().getResourceLoader()->remove(pRemoveBatch); } } m_eState = eStreamStateOffline; }
int NetworkJob::cancelJob() { m_cancelled = true; // Cancel jobs loading local data by killing the timer, and jobs // getting data from the network by calling the inherited URLStream::cancel. if (m_loadDataTimer.isActive()) { m_loadDataTimer.stop(); notifyClose(BlackBerry::Platform::FilterStream::StatusCancelled); return 0; } if (m_loadAboutTimer.isActive()) { m_loadAboutTimer.stop(); notifyClose(BlackBerry::Platform::FilterStream::StatusCancelled); return 0; } return streamCancel(); }