/* * * $Id: sourceheader 511311 2006-02-19 14:51:05Z trueg $ * Copyright (C) 2006 Sebastian Trueg * * This file is part of the K3b project. * Copyright (C) 1998-2007 Sebastian Trueg * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * See the file "COPYING" for the exact licensing terms. */ #include "k3baudioripjob.h" #include "k3baudioripthread.h" #include #include #include #include K3bAudioRipJob::K3bAudioRipJob( K3bJobHandler* hdl, TQObject* parent ) : K3bJob( hdl, parent ) { m_thread = new K3bAudioRipThread(); m_threadJob = new K3bThreadJob( m_thread, this, this ); connectSubJob( m_threadJob, TQT_SLOT(slotRippingFinished(bool)), TQT_SIGNAL(newTask(const TQString&)), TQT_SIGNAL(newSubTask(const TQString&)), TQT_SIGNAL(percent(int)), TQT_SIGNAL(subPercent(int)) ); } K3bAudioRipJob::~K3bAudioRipJob() { } TQString K3bAudioRipJob::jobDescription() const { return m_thread->jobDescription(); } TQString K3bAudioRipJob::jobDetails() const { return m_thread->jobDetails(); } void K3bAudioRipJob::start() { jobStarted(); k3bcore->blockDevice( m_thread->m_device ); m_threadJob->start(); } void K3bAudioRipJob::cancel() { m_threadJob->cancel(); } void K3bAudioRipJob::slotRippingFinished( bool success ) { k3bcore->unblockDevice( m_thread->m_device ); jobFinished( success ); } #include "k3baudioripjob.moc"