00001 // This file is part of par2cmdline (a PAR 2.0 compatible file verification and 00002 // repair tool). See https://parchive.sourceforge.net for details of PAR 2.0. 00003 // 00004 // Copyright (c) 2003 Peter Brian Clements 00005 // 00006 // par2cmdline is free software; you can redistribute it and/or modify 00007 // it under the terms of the GNU General Public License as published by 00008 // the Free Software Foundation; either version 2 of the License, or 00009 // (at your option) any later version. 00010 // 00011 // par2cmdline is distributed in the hope that it will be useful, 00012 // but WITHOUT ANY WARRANTY; without even the implied warranty of 00013 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 00014 // GNU General Public License for more details. 00015 // 00016 // You should have received a copy of the GNU General Public License 00017 // along with this program; if not, write to the Free Software 00018 // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 00019 00020 #ifndef __CREATORPACKET_H__ 00021 #define __CREATORPACKET_H__ 00022 00023 // The creator packet records details as to which PAR2 client 00024 // created a particular recovery file. 00025 00026 // The PAR 2.0 specification requires the presence of a 00027 // creator packet, but it is not actually needed for the 00028 // verification or recovery of damaged files. 00029 00030 class CreatorPacket : public CriticalPacket 00031 { 00032 public: 00033 // Construct the packet 00034 CreatorPacket(void) {}; 00035 ~CreatorPacket(void) {}; 00036 00037 // Create a creator packet for a specified set id hash value 00038 bool Create(const MD5Hash &set_id_hash); 00039 00040 // Load a creator packet from a specified file 00041 bool Load(DiskFile *diskfile, u64 offset, PACKET_HEADER &header); 00042 }; 00043 00044 #endif // __CREATORPACKET_H__