kshred.h
00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
#ifndef kshred_h
00024
#define kshred_h
00025
00026
00027
#include <stdlib.h>
00028
#include <stdio.h>
00029
#include <string.h>
00030
#include <unistd.h>
00031
#include <qstring.h>
00032
#include <qfile.h>
00033
#include <qobject.h>
00034
00035
#include <kio/global.h>
00036
00045 class KShred :
public QObject {
00046
00047 Q_OBJECT
00048
00049
public:
00050
00055
KShred(
QString fileName);
00056
00057
00058
00059
00060 ~
KShred();
00061
00067
bool fill1s();
00072
bool fill0s();
00073
00079
bool fillbyte(
unsigned int byte);
00080
00085
bool fillrandom();
00086
00093
bool fillpattern(
unsigned char *pattern,
unsigned int size);
00094
00101
bool shred();
00102
00108
static bool shred(
QString fileName);
00109
00110 signals:
00115
void processedSize(
KIO::filesize_t bytes);
00116
00121
void infoMessage(
const QString & message);
00122
00123
private:
00127
bool writeData(
unsigned char *data,
unsigned int size);
00128
00132
bool flush();
00133
00137
QFile *file;
00138
00142
KIO::filesize_t fileSize;
00143
00147
unsigned int totalBytes;
00148
unsigned int bytesWritten;
00149
unsigned int lastSignalled;
00150
unsigned int tbpc;
00151
unsigned int fspc;
00152
private:
00153
class KShredPrivate* d;
00154 };
00155
00156
#endif
This file is part of the documentation for kio Library Version 3.3.1.