kio Library API Documentation

KIO::FileCopyJob Class Reference

The FileCopyJob copies data from one place to another. More...

#include <jobclasses.h>

Inheritance diagram for KIO::FileCopyJob:

KIO::Job QObject List of all members.

Public Methods

 FileCopyJob (const KURL &src, const KURL &dest, int permissions, bool move, bool overwrite, bool resume, bool showProgressInfo)
void setSourceSize64 (KIO::filesize_t size)
void setSourceSize (off_t size) KDE_DEPRECATED
KURL srcURL () const
KURL destURL () const

Protected Slots

virtual void slotResult (KIO::Job *job)
void slotProcessedSize (KIO::Job *job, KIO::filesize_t size)
void slotTotalSize (KIO::Job *job, KIO::filesize_t size)
void slotPercent (KIO::Job *job, unsigned long pct)
void slotCanResume (KIO::Job *job, KIO::filesize_t offset)

Protected Methods

virtual void virtual_hook (int id, void *data)

Detailed Description

The FileCopyJob copies data from one place to another.

See also:
KIO::file_copy() , KIO::file_move()

Definition at line 1030 of file jobclasses.h.


Constructor & Destructor Documentation

FileCopyJob::FileCopyJob const KURL   src,
const KURL   dest,
int    permissions,
bool    move,
bool    overwrite,
bool    resume,
bool    showProgressInfo
 

Do not create a FileCopyJob directly.

Use KIO::file_move() or KIO::file_copy() instead.

Parameters:
src  the source URL
dest  the destination URL
permissions  the permissions of the resulting resource
move  true to move, false to copy
overwrite  true to allow overwriting, false otherwise
resume  true to resume an operation, false otherwise
showProgressInfo  true to show progress information to the user

Definition at line 1311 of file job.cpp.

References KIO::move(), Observer::self(), QTimer::singleShot(), Observer::slotCopying(), and Observer::slotMoving().


Member Function Documentation

void FileCopyJob::setSourceSize64 KIO::filesize_t    size
 

If you know the size of the source file, call this method to inform this job.

It will be displayed in the "resume" dialog.

Parameters:
size  the size of the source file
Since:
3.2

Definition at line 1385 of file job.cpp.

void FileCopyJob::setSourceSize off_t    size
 

Deprecated:

Definition at line 1379 of file job.cpp.

KURL KIO::FileCopyJob::srcURL   const [inline]
 

Returns the source URL.

Returns:
the source URL

Definition at line 1066 of file jobclasses.h.

KURL KIO::FileCopyJob::destURL   const [inline]
 

Returns the destination URL.

Returns:
the destination URL

Definition at line 1072 of file jobclasses.h.

void FileCopyJob::slotResult KIO::Job   job [protected, virtual, slot]
 

Called whenever a subjob finishes.

Parameters:
job  the job that emitted this signal

Reimplemented from KIO::Job.

Definition at line 1576 of file job.cpp.

References KIO::Job::addSubjob(), KIO::Job::emitResult(), KIO::Job::error(), KIO::Job::errorText(), KIO::file_delete(), KIO::SimpleJob::kill(), KIO::Job::removeSubjob(), and KIO::TransferJob::resume().

void FileCopyJob::slotProcessedSize KIO::Job   job,
KIO::filesize_t    size
[protected, slot]
 

Forward signal from subjob.

Parameters:
job  the job that emitted this signal
size  the processed size in bytes

Definition at line 1418 of file job.cpp.

References KIO::Job::emitPercent(), KIO::Job::processedSize(), KIO::Job::setProcessedSize(), and slotTotalSize().

void FileCopyJob::slotTotalSize KIO::Job   job,
KIO::filesize_t    size
[protected, slot]
 

Forward signal from subjob.

Parameters:
job  the job that emitted this signal
size  the total size

Definition at line 1428 of file job.cpp.

References KIO::Job::totalSize().

Referenced by slotProcessedSize().

void FileCopyJob::slotPercent KIO::Job   job,
unsigned long    pct
[protected, slot]
 

Forward signal from subjob.

Parameters:
job  the job that emitted this signal
pct  the percentage

Definition at line 1434 of file job.cpp.

References KIO::Job::percent().

void FileCopyJob::slotCanResume KIO::Job   job,
KIO::filesize_t    offset
[protected, slot]
 

Forward signal from subjob.

Parameters:
job  the job that emitted this signal
offset  the offset to resume from

Definition at line 1462 of file job.cpp.

References KIO::Job::addMetaData(), KIO::Job::addSubjob(), KProtocolManager::autoResume(), QObject::connect(), KIO::Job::emitResult(), KIO::get(), KIO::SimpleJob::kill(), KIO::SlaveInterface::offset(), Observer::open_RenameDlg(), KIO::Job::parentJob(), KURL::prettyURL(), KIO::RenameDlg_Result, KIO::TransferJob::resume(), Observer::self(), KIO::SlaveInterface::setOffset(), KIO::SimpleJob::slave(), KIO::SimpleJob::slotTotalSize(), and KIO::TransferJob::suspend().


The documentation for this class was generated from the following files:
KDE Logo
This file is part of the documentation for kio Library Version 3.2.0.
Documentation copyright © 1996-2004 the KDE developers.
Generated on Wed Feb 4 12:35:17 2004 by doxygen 1.2.18 written by Dimitri van Heesch, © 1997-2003