00001 #ifndef FILEOBS_H_ 00002 #define FILEOBS_H_ 00003 /* 00004 fileobs.h 00005 00006 (c) 2003 Thor Sigvaldason and Isaac Richards 00007 Part of the mythTV project 00008 00009 Headers for file objects that know 00010 how to do clever things 00011 00012 */ 00013 00014 #include <qstring.h> 00015 #include <qstringlist.h> 00016 #include <qfile.h> 00017 #include <qptrlist.h> 00018 00019 class RipFile 00020 { 00021 00022 public: 00023 00024 RipFile(const QString &a_base, const QString &an_extension, 00025 bool auto_remove_bad); 00026 ~RipFile(); 00027 00028 bool open(int mode, bool multiple_files); 00029 QStringList close(); 00030 void remove(); 00031 QString name(); 00032 bool writeBlocks(unsigned char *the_data, int how_much); 00033 00034 private: 00035 QString base_name; 00036 QString extension; 00037 int filesize; 00038 QFile *active_file; 00039 int bytes_written; 00040 int access_mode; 00041 QPtrList<QFile> files; 00042 bool use_multiple_files; 00043 bool auto_remove_bad_rips; 00044 }; 00045 00046 #endif // fileobs_h_ 00047
1.5.5