Ejemplo n.º 1
0
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;
}
Ejemplo n.º 2
0
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();
}