paludis  Version 2.6.0
tar_merger.hh
1 /* vim: set sw=4 sts=4 et foldmethod=syntax : */
2 
3 /*
4  * Copyright (c) 2010, 2011 Ciaran McCreesh
5  *
6  * This file is part of the Paludis package manager. Paludis is free software;
7  * you can redistribute it and/or modify it under the terms of the GNU General
8  * Public License version 2, as published by the Free Software Foundation.
9  *
10  * Paludis is distributed in the hope that it will be useful, but WITHOUT ANY
11  * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
12  * FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
13  * details.
14  *
15  * You should have received a copy of the GNU General Public License along with
16  * this program; if not, write to the Free Software Foundation, Inc., 59 Temple
17  * Place, Suite 330, Boston, MA 02111-1307 USA
18  */
19 
20 #ifndef PALUDIS_GUARD_PALUDIS_TAR_MERGER_HH
21 #define PALUDIS_GUARD_PALUDIS_TAR_MERGER_HH 1
22 
23 #include <paludis/tar_merger-fwd.hh>
24 #include <paludis/util/timestamp.hh>
25 #include <paludis/merger.hh>
26 
27 namespace paludis
28 {
29  namespace n
30  {
31  typedef Name<struct name_compression> compression;
32  typedef Name<struct name_environment> environment;
33  typedef Name<struct name_fix_mtimes_before> fix_mtimes_before;
34  typedef Name<struct name_get_new_ids_or_minus_one> get_new_ids_or_minus_one;
35  typedef Name<struct name_image> image;
36  typedef Name<struct name_install_under> install_under;
37  typedef Name<struct name_maybe_output_manager> maybe_output_manager;
38  typedef Name<struct name_merged_entries> merged_entries;
39  typedef Name<struct name_no_chown> no_chown;
40  typedef Name<struct name_options> options;
41  typedef Name<struct name_permit_destination> permit_destination;
42  typedef Name<struct name_root> root;
43  typedef Name<struct name_tar_file> tar_file;
44  }
45 
46  /**
47  * Parameters for a basic TarMerger.
48  *
49  * \see Merger
50  * \ingroup g_repository
51  * \nosubgrouping
52  * \since 0.51
53  */
55  {
69  };
70 
72  public Merger
73  {
74  private:
75  Pimp<TarMerger> _imp;
76 
77  protected:
78  virtual FSPath canonicalise_root_path(const FSPath & f);
79 
80  virtual void add_file(const FSPath &, const FSPath &);
81 
82  virtual void track_install_file(const FSPath &, const FSPath &) = 0;
83  virtual void track_install_sym(const FSPath &, const FSPath &) = 0;
84 
85  public:
86  TarMerger(const TarMergerParams &);
87  ~TarMerger();
88 
89  virtual void on_file_main(bool is_check, const FSPath &, const FSPath &);
90  virtual void on_dir_main(bool is_check, const FSPath &, const FSPath &);
91  virtual void on_sym_main(bool is_check, const FSPath &, const FSPath &);
92 
93  virtual void prepare_install_under();
94 
95  virtual void merge();
96  };
97 }
98 
99 #endif
Definition: tar_merger.hh:71
Definition: pimp.hh:51
Definition: about_metadata-fwd.hh:23
Definition: merger.hh:83
Definition: tar_merger.hh:54
Definition: fs_path.hh:33
#define PALUDIS_VISIBLE
Definition: attributes.hh:59