Upx_Doxygen
https://github.com/upx/upx
packmast.h
1 /* packmast.h --
2 
3  This file is part of the UPX executable compressor.
4 
5  Copyright (C) 1996-2016 Markus Franz Xaver Johannes Oberhumer
6  Copyright (C) 1996-2016 Laszlo Molnar
7  All Rights Reserved.
8 
9  UPX and the UCL library are free software; you can redistribute them
10  and/or modify them under the terms of the GNU General Public License as
11  published by the Free Software Foundation; either version 2 of
12  the License, or (at your option) any later version.
13 
14  This program is distributed in the hope that it will be useful,
15  but WITHOUT ANY WARRANTY; without even the implied warranty of
16  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17  GNU General Public License for more details.
18 
19  You should have received a copy of the GNU General Public License
20  along with this program; see the file COPYING.
21  If not, write to the Free Software Foundation, Inc.,
22  59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
23 
24  Markus F.X.J. Oberhumer Laszlo Molnar
25  <markus@oberhumer.com> <ezerotven+github@gmail.com>
26  */
27 
28 
29 #ifndef __UPX_PACKMASTER_H
30 #define __UPX_PACKMASTER_H 1
31 
32 class Packer;
33 class InputFile;
34 class OutputFile;
35 
36 
37 /*************************************************************************
38 // interface for work.cpp
39 **************************************************************************/
40 
42 {
43 public:
44  PackMaster(InputFile *f, options_t *o=NULL);
45  virtual ~PackMaster();
46 
47  void pack(OutputFile *fo);
48  void unpack(OutputFile *fo);
49  void test();
50  void list();
51  void fileInfo();
52 
53  typedef Packer* (*visit_func_t)(Packer *p, void *user);
54  static Packer* visitAllPackers(visit_func_t, InputFile *f, const options_t *, void *user);
55 
56 private:
57  InputFile *fi;
58  Packer *p;
59 
60  static Packer *getPacker(InputFile *f);
61  static Packer *getUnpacker(InputFile *f);
62 
63  // setup local options for each file
64  options_t local_options;
65  options_t *saved_opt;
66 };
67 
68 
69 #endif /* already included */
70 
71 /* vim:set ts=4 sw=4 et: */
Definition: options.h:45
Definition: file.h:89
Definition: packer.h:115
Definition: packmast.h:41
Definition: file.h:121