00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020 #ifndef PALUDIS_GUARD_PALUDIS_STRIPPER_HH
00021 #define PALUDIS_GUARD_PALUDIS_STRIPPER_HH 1
00022
00023 #include <paludis/stripper-fwd.hh>
00024 #include <paludis/action-fwd.hh>
00025 #include <paludis/util/attributes.hh>
00026 #include <paludis/util/private_implementation_pattern.hh>
00027 #include <paludis/util/fs_entry.hh>
00028 #include <paludis/util/named_value.hh>
00029
00030 namespace paludis
00031 {
00032 namespace n
00033 {
00034 struct debug_dir;
00035 struct image_dir;
00036 struct split;
00037 struct strip;
00038 }
00039
00040 struct StripperOptions
00041 {
00042 NamedValue<n::debug_dir, FSEntry> debug_dir;
00043 NamedValue<n::image_dir, FSEntry> image_dir;
00044 NamedValue<n::split, bool> split;
00045 NamedValue<n::strip, bool> strip;
00046 };
00047
00048 class PALUDIS_VISIBLE Stripper :
00049 private PrivateImplementationPattern<Stripper>
00050 {
00051 protected:
00052 virtual void on_enter_dir(const FSEntry &) = 0;
00053 virtual void on_leave_dir(const FSEntry &) = 0;
00054
00055 virtual void on_strip(const FSEntry &) = 0;
00056 virtual void on_split(const FSEntry &, const FSEntry &) = 0;
00057 virtual void on_unknown(const FSEntry &) = 0;
00058
00059 virtual void do_dir_recursive(const FSEntry &);
00060
00061 virtual std::string file_type(const FSEntry &);
00062
00063 virtual void do_split(const FSEntry &, const FSEntry &);
00064 virtual void do_strip(const FSEntry &, const std::string &);
00065
00066 public:
00067
00068
00069
00070 Stripper(const StripperOptions &);
00071 virtual ~Stripper() = 0;
00072
00073
00074
00075
00076
00077
00078 virtual void strip();
00079 };
00080 }
00081
00082 #endif