1 // This file is part of par2cmdline (a PAR 2.0 compatible file verification and 2 // repair tool). See http://parchive.sourceforge.net for details of PAR 2.0. 3 // 4 // Copyright (c) 2003 Peter Brian Clements 5 // 6 // par2cmdline is free software; you can redistribute it and/or modify 7 // it under the terms of the GNU General Public License as published by 8 // the Free Software Foundation; either version 2 of the License, or 9 // (at your option) any later version. 10 // 11 // par2cmdline is distributed in the hope that it will be useful, 12 // but WITHOUT ANY WARRANTY; without even the implied warranty of 13 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 // GNU General Public License for more details. 15 // 16 // You should have received a copy of the GNU General Public License 17 // along with this program; if not, write to the Free Software 18 // Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA 19 20 #ifndef __CREATORPACKET_H__ 21 #define __CREATORPACKET_H__ 22 23 // The creator packet records details as to which PAR2 client 24 // created a particular recovery file. 25 26 // The PAR 2.0 specification requires the presence of a 27 // creator packet, but it is not actually needed for the 28 // verification or recovery of damaged files. 29 30 class CreatorPacket : public CriticalPacket 31 { 32 public: 33 // Construct the packet CreatorPacket(void)34 CreatorPacket(void) {}; ~CreatorPacket(void)35 ~CreatorPacket(void) {}; 36 37 // Create a creator packet for a specified set id hash value 38 bool Create(const MD5Hash &set_id_hash); 39 40 // Load a creator packet from a specified file 41 bool Load(DiskFile *diskfile, u64 offset, PACKET_HEADER &header); 42 }; 43 44 #endif // __CREATORPACKET_H__ 45