|
|
@ -105,14 +105,14 @@ void StreamingJob::setBufferSize(size_t buffer_size)
|
|
|
|
|
|
|
|
|
|
|
|
bool StreamingJob::startPutJob()
|
|
|
|
bool StreamingJob::startPutJob()
|
|
|
|
{
|
|
|
|
{
|
|
|
|
m_KIO_Job = KIO::put(m_URL, -1, true, false, false);
|
|
|
|
m_KIO_Job = TDEIO::put(m_URL, -1, true, false, false);
|
|
|
|
if (!m_KIO_Job)
|
|
|
|
if (!m_KIO_Job)
|
|
|
|
return false;
|
|
|
|
return false;
|
|
|
|
m_KIO_Job->setAsyncDataEnabled(true);
|
|
|
|
m_KIO_Job->setAsyncDataEnabled(true);
|
|
|
|
connect (m_KIO_Job, TQT_SIGNAL(dataReq(KIO::Job *job, TQByteArray &data)),
|
|
|
|
connect (m_KIO_Job, TQT_SIGNAL(dataReq(TDEIO::Job *job, TQByteArray &data)),
|
|
|
|
this, TQT_SLOT(slotWriteData (KIO::Job *job, TQByteArray &data)));
|
|
|
|
this, TQT_SLOT(slotWriteData (TDEIO::Job *job, TQByteArray &data)));
|
|
|
|
connect (m_KIO_Job, TQT_SIGNAL(result(KIO::Job *)),
|
|
|
|
connect (m_KIO_Job, TQT_SIGNAL(result(TDEIO::Job *)),
|
|
|
|
this, TQT_SLOT(slotIOJobResult(KIO::Job *)));
|
|
|
|
this, TQT_SLOT(slotIOJobResult(TDEIO::Job *)));
|
|
|
|
return true;
|
|
|
|
return true;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
@ -150,14 +150,14 @@ bool StreamingJob::stopPlayback()
|
|
|
|
|
|
|
|
|
|
|
|
bool StreamingJob::startGetJob()
|
|
|
|
bool StreamingJob::startGetJob()
|
|
|
|
{
|
|
|
|
{
|
|
|
|
m_KIO_Job = KIO::get(m_URL, false, false);
|
|
|
|
m_KIO_Job = TDEIO::get(m_URL, false, false);
|
|
|
|
if (!m_KIO_Job)
|
|
|
|
if (!m_KIO_Job)
|
|
|
|
return false;
|
|
|
|
return false;
|
|
|
|
m_KIO_Job->setAsyncDataEnabled(true);
|
|
|
|
m_KIO_Job->setAsyncDataEnabled(true);
|
|
|
|
connect (m_KIO_Job, TQT_SIGNAL(data(KIO::Job *, const TQByteArray &)),
|
|
|
|
connect (m_KIO_Job, TQT_SIGNAL(data(TDEIO::Job *, const TQByteArray &)),
|
|
|
|
this, TQT_SLOT(slotReadData(KIO::Job *, const TQByteArray &)));
|
|
|
|
this, TQT_SLOT(slotReadData(TDEIO::Job *, const TQByteArray &)));
|
|
|
|
connect (m_KIO_Job, TQT_SIGNAL(result(KIO::Job *)),
|
|
|
|
connect (m_KIO_Job, TQT_SIGNAL(result(TDEIO::Job *)),
|
|
|
|
this, TQT_SLOT(slotIOJobResult(KIO::Job *)));
|
|
|
|
this, TQT_SLOT(slotIOJobResult(TDEIO::Job *)));
|
|
|
|
return true;
|
|
|
|
return true;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
@ -196,7 +196,7 @@ bool StreamingJob::stopCapture()
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
void StreamingJob::slotReadData (KIO::Job */*job*/, const TQByteArray &data)
|
|
|
|
void StreamingJob::slotReadData (TDEIO::Job */*job*/, const TQByteArray &data)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
size_t free = m_Buffer.getFreeSize();
|
|
|
|
size_t free = m_Buffer.getFreeSize();
|
|
|
|
if (free < data.size()) {
|
|
|
|
if (free < data.size()) {
|
|
|
@ -216,7 +216,7 @@ void StreamingJob::slotReadData (KIO::Job */*job*/, const TQByteArray &data)
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
void StreamingJob::slotWriteData (KIO::Job */*job*/, TQByteArray &)
|
|
|
|
void StreamingJob::slotWriteData (TDEIO::Job */*job*/, TQByteArray &)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
size_t size = m_Buffer.getFillSize();
|
|
|
|
size_t size = m_Buffer.getFillSize();
|
|
|
|
if (size) {
|
|
|
|
if (size) {
|
|
|
@ -268,7 +268,7 @@ void StreamingJob::removeData(size_t size)
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
void StreamingJob::slotIOJobResult (KIO::Job *job)
|
|
|
|
void StreamingJob::slotIOJobResult (TDEIO::Job *job)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
if (job && job->error()) {
|
|
|
|
if (job && job->error()) {
|
|
|
|
emit logStreamError(m_URL, job->errorString());
|
|
|
|
emit logStreamError(m_URL, job->errorString());
|
|
|
|