00001 // Filename: patcher.h 00002 // Created by: mike (09Jan97) 00003 // 00004 //////////////////////////////////////////////////////////////////// 00005 // 00006 // PANDA 3D SOFTWARE 00007 // Copyright (c) 2001, Disney Enterprises, Inc. All rights reserved 00008 // 00009 // All use of this software is subject to the terms of the Panda 3d 00010 // Software license. You should have received a copy of this license 00011 // along with this source code; you will also find a current copy of 00012 // the license at http://www.panda3d.org/license.txt . 00013 // 00014 // To contact the maintainers of this program write to 00015 // panda3d@yahoogroups.com . 00016 // 00017 //////////////////////////////////////////////////////////////////// 00018 #ifndef PATCHER_H 00019 #define PATCHER_H 00020 // 00021 //////////////////////////////////////////////////////////////////// 00022 // Includes 00023 //////////////////////////////////////////////////////////////////// 00024 #include <pandabase.h> 00025 #include <filename.h> 00026 #include <buffer.h> 00027 #include <patchfile.h> 00028 00029 //////////////////////////////////////////////////////////////////// 00030 // Class : Patcher 00031 // Description : Applies a patch synchronously 00032 //////////////////////////////////////////////////////////////////// 00033 class EXPCL_PANDAEXPRESS Patcher { 00034 PUBLISHED: 00035 Patcher(void); 00036 Patcher(PT(Buffer) buffer); 00037 virtual ~Patcher(void); 00038 00039 int initiate(Filename &patch, Filename &infile); 00040 int run(void); 00041 00042 INLINE float get_progress(void) const; 00043 00044 private: 00045 void init(PT(Buffer) buffer); 00046 PT(Buffer) _buffer; 00047 Patchfile *_patchfile; 00048 }; 00049 00050 #include "patcher.I" 00051 00052 #endif