paludis  Version 2.6.0
ndbam_merger.hh
1 /* vim: set sw=4 sts=4 et foldmethod=syntax : */
2 
3 /*
4  * Copyright (c) 2007, 2008, 2009, 2010, 2011, 2013 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_REPOSITORIES_UNPACKAGED_NDBAM_MERGER_HH
21 #define PALUDIS_GUARD_PALUDIS_REPOSITORIES_UNPACKAGED_NDBAM_MERGER_HH 1
22 
23 #include <paludis/fs_merger.hh>
25 #include <paludis/util/named_value.hh>
26 #include <paludis/output_manager-fwd.hh>
27 #include <paludis/partitioning-fwd.hh>
28 #include <functional>
29 
30 namespace paludis
31 {
32  namespace n
33  {
34  typedef Name<struct name_config_protect> config_protect;
35  typedef Name<struct name_config_protect_mask> config_protect_mask;
36  typedef Name<struct name_contents_file> contents_file;
37  typedef Name<struct name_environment> environment;
38  typedef Name<struct name_fix_mtimes_before> fix_mtimes_before;
39  typedef Name<struct name_fs_merger_options> fs_merger_options;
40  typedef Name<struct name_get_new_ids_or_minus_one> get_new_ids_or_minus_one;
41  typedef Name<struct name_image> image;
42  typedef Name<struct name_install_under> install_under;
43  typedef Name<struct name_is_volatile> is_volatile;
44  typedef Name<struct name_merged_entries> merged_entries;
45  typedef Name<struct name_options> options;
46  typedef Name<struct name_output_manager> output_manager;
47  typedef Name<struct name_package_id> package_id;
48  typedef Name<struct name_parts> parts;
49  typedef Name<struct name_permit_destination> permit_destination;
50  typedef Name<struct name_root> root;
51  typedef Name<struct name_should_merge> should_merge;
52  }
53 
55  {
74  };
75 
76  /**
77  * Merger subclass for NDBAM.
78  *
79  * \ingroup g_ndbam
80  * \since 0.26
81  */
83  public FSMerger
84  {
85  private:
86  void display_override(const std::string &) const;
87 
88  Pimp<NDBAMMerger> _imp;
89 
90  public:
92  ~NDBAMMerger();
93 
94  virtual Hook extend_hook(const Hook &);
95 
96  virtual void record_install_file(const FSPath &, const FSPath &, const std::string &, const FSMergerStatusFlags &);
97  virtual void record_install_dir(const FSPath &, const FSPath &, const FSMergerStatusFlags &);
98  virtual void record_install_under_dir(const FSPath &, const FSMergerStatusFlags &);
99  virtual void record_install_sym(const FSPath &, const FSPath &, const FSMergerStatusFlags &);
100 
101  virtual void on_error(bool is_check, const std::string &);
102  virtual void on_warn(bool is_check, const std::string &);
103  virtual void on_enter_dir(bool is_check, const FSPath);
104 
105  virtual bool config_protected(const FSPath &, const FSPath &);
106  virtual std::string make_config_protect_name(const FSPath &, const FSPath &);
107 
108  virtual void merge();
109  virtual bool check();
110  };
111 }
112 
113 #endif
Definition: pimp.hh:51
Definition: about_metadata-fwd.hh:23
Definition: fs_merger.hh:151
Definition: hook.hh:74
Definition: options-fwd.hh:34
Definition: fs_path.hh:33
Definition: ndbam_merger.hh:82
Definition: ndbam_merger.hh:54
#define PALUDIS_VISIBLE
Definition: attributes.hh:59