• Skip to content
  • Skip to link menu
Trinity API Reference
  • Trinity API Reference
  • tdeio/tdeio
 

tdeio/tdeio

  • tdeio
  • tdeio
kshred.h
1 /*--------------------------------------------------------------------------*
2  KShred.h Copyright (c) 2000 MieTerra LLC.
3  Credits: Andreas F. Pour <bugs@mieterra.com>
4 
5 Permission is hereby granted, free of charge, to any person obtaining a copy
6 of this software and associated documentation files (the "Software"), to deal
7 in the Software without restriction, including without limitation the rights
8 to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9 copies of the Software, and to permit persons to whom the Software is
10 furnished to do so, subject to the following conditions:
11 
12 The above copyright notice and this permission notice shall be included in
13 all copies or substantial portions of the Software.
14 
15 THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16 IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17 FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18 AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
19 AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
20 CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
21 */
22 
23 #ifndef kshred_h
24 #define kshred_h
25 
26 #include <stdlib.h>
27 #include <stdio.h>
28 #include <string.h>
29 #include <unistd.h>
30 #include <tqstring.h>
31 #include <tqfile.h>
32 #include <tqobject.h>
33 
34 #include <tdeio/global.h>
35 
45 class TDEIO_EXPORT_DEPRECATED KShred : public TQObject { // KDE4: remove
46 
47  TQ_OBJECT
48 
49  public:
50 
55  KShred(TQString fileName);
56 
57  /*
58  * Destructor for the class.
59  */
60  ~KShred();
61 
67  bool fill1s();
72  bool fill0s();
73 
79  bool fillbyte(unsigned int byte);
80 
85  bool fillrandom();
86 
93  bool fillpattern(unsigned char *pattern, unsigned int size);
94 
101  bool shred();
102 
108  static bool shred(TQString fileName);
109 
110  signals:
115  void processedSize(TDEIO::filesize_t bytes);
116 
121  void infoMessage(const TQString & message);
122 
123  private:
127  bool writeData(unsigned char *data, unsigned int size);
128 
132  bool flush();
133 
137  TQFile *file;
138 
142  TDEIO::filesize_t fileSize;
143 
147  unsigned int totalBytes;
148  unsigned int bytesWritten;
149  unsigned int lastSignalled;
150  unsigned int tbpc;
151  unsigned int fspc;
152  private:
153  class KShredPrivate* d;
154 };
155 
156 #endif
KShred
Definition: kshred.h:45
KShred::infoMessage
void infoMessage(const TQString &message)
KShred::processedSize
void processedSize(TDEIO::filesize_t bytes)
TDEIO::filesize_t
TQ_ULLONG filesize_t
64-bit file size
Definition: global.h:39

tdeio/tdeio

Skip menu "tdeio/tdeio"
  • Main Page
  • Modules
  • Namespace List
  • Class Hierarchy
  • Alphabetical List
  • Class List
  • File List
  • Namespace Members
  • Class Members
  • Related Pages

tdeio/tdeio

Skip menu "tdeio/tdeio"
  • arts
  • dcop
  • dnssd
  • interfaces
  •   kspeech
  •     interface
  •     library
  •   tdetexteditor
  • kate
  • kded
  • kdoctools
  • kimgio
  • kjs
  • libtdemid
  • libtdescreensaver
  • tdeabc
  • tdecmshell
  • tdecore
  • tdefx
  • tdehtml
  • tdeinit
  • tdeio
  •   bookmarks
  •   httpfilter
  •   kpasswdserver
  •   kssl
  •   tdefile
  •   tdeio
  •   tdeioexec
  • tdeioslave
  •   http
  • tdemdi
  •   tdemdi
  • tdenewstuff
  • tdeparts
  • tdeprint
  • tderandr
  • tderesources
  • tdespell2
  • tdesu
  • tdeui
  • tdeunittest
  • tdeutils
  • tdewallet
Generated for tdeio/tdeio by doxygen 1.9.1
This website is maintained by Timothy Pearson.