kshred.h
/*--------------------------------------------------------------------------*
KShred.h Copyright (c) 2000 MieTerra LLC.
Credits: Andreas F. Pour <bugs@mieterra.com>
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
*/
#ifndef kshred_h
#define kshred_h
#include <stdlib.h>
#include <stdio.h>
#include <string.h>
#include <unistd.h>
#include <qstring.h>
#include <qfile.h>
#include <qobject.h>
#include <kio/global.h>
class KIO_EXPORT_DEPRECATED KShred : public QObject { // KDE4: remove
Q_OBJECT
public:
KShred(QString fileName);
/*
* Destructor for the class.
*/
~KShred();
bool fill1s();
bool fill0s();
bool fillbyte(unsigned int byte);
bool fillrandom();
bool fillpattern(unsigned char *pattern, unsigned int size);
bool shred();
static bool shred(QString fileName);
signals:
void processedSize(KIO::filesize_t bytes);
void infoMessage(const QString & message);
private:
bool writeData(unsigned char *data, unsigned int size);
bool flush();
QFile *file;
KIO::filesize_t fileSize;
unsigned int totalBytes;
unsigned int bytesWritten;
unsigned int lastSignalled;
unsigned int tbpc;
unsigned int fspc;
private:
class KShredPrivate* d;
};
#endif
KIO::filesize_t
Q_ULLONG filesize_t
64-bit file size
Definition: global.h:39
KShred
Definition: kshred.h:45

KDE Home | KDE Accessibility Home | Description of Access Keys