20#ifndef PALUDIS_GUARD_PALUDIS_ACTION_HH
21#define PALUDIS_GUARD_PALUDIS_ACTION_HH 1
27#include <paludis/output_manager-fwd.hh>
30#include <paludis/util/visitor.hh>
34#include <paludis/util/named_value.hh>
35#include <paludis/util/fs_path-fwd.hh>
37#include <paludis/util/type_list.hh>
55 typedef Name<struct name_config_protect> config_protect;
56 typedef Name<struct name_cross_compile_host> cross_compile_host;
57 typedef Name<struct name_destination> destination;
58 typedef Name<struct name_errors> errors;
59 typedef Name<struct name_exclude_unmirrorable> exclude_unmirrorable;
60 typedef Name<struct name_failed_automatic_fetching> failed_automatic_fetching;
61 typedef Name<struct name_failed_integrity_checks> failed_integrity_checks;
62 typedef Name<struct name_fetch_parts> fetch_parts;
63 typedef Name<struct name_if_for_install_id> if_for_install_id;
64 typedef Name<struct name_ignore_for_unmerge> ignore_for_unmerge;
65 typedef Name<struct name_ignore_unfetched> ignore_unfetched;
66 typedef Name<struct name_is_overwrite> is_overwrite;
67 typedef Name<struct name_make_output_manager> make_output_manager;
68 typedef Name<struct name_override_contents> override_contents;
69 typedef Name<struct name_perform_uninstall> perform_uninstall;
70 typedef Name<struct name_replacing> replacing;
71 typedef Name<struct name_requires_manual_fetching> requires_manual_fetching;
72 typedef Name<struct name_safe_resume> safe_resume;
73 typedef Name<struct name_tool_prefix> tool_prefix;
74 typedef Name<struct name_target_file> target_file;
75 typedef Name<struct name_want_phase> want_phase;
76 typedef Name<struct name_ignore_not_in_manifest> ignore_not_in_manifest;
175 NamedValue<n::perform_uninstall, std::function<void (
176 const std::shared_ptr<const PackageID> &,
187 NamedValue<n::want_phase, std::function<WantPhase (
const std::string &)> > want_phase;
276 InstallAction, UninstallAction, PretendAction, ConfigAction, FetchAction,
277 InfoAction, PretendFetchAction>::Type>
315 ~InstallAction()
override;
324 static const std::
string class_simple_name()
PALUDIS_ATTRIBUTE((warn_unused_result));
347 ~FetchAction()
override;
356 static const std::
string class_simple_name()
PALUDIS_ATTRIBUTE((warn_unused_result));
357 static const std::
string ignore_unfetched_flag_name()
PALUDIS_ATTRIBUTE((warn_unused_result));
379 ~UninstallAction()
override;
388 static const std::
string class_simple_name()
PALUDIS_ATTRIBUTE((warn_unused_result));
459 static const std::
string class_simple_name()
PALUDIS_ATTRIBUTE((warn_unused_result));
482 ~PretendFetchAction()
override;
490 virtual void will_fetch(
const FSPath & destination,
const unsigned long size_in_bytes) = 0;
494 static const std::
string class_simple_name()
PALUDIS_ATTRIBUTE((warn_unused_result));
551 static const std::
string class_simple_name()
PALUDIS_ATTRIBUTE((warn_unused_result));
617 static const std::
string class_simple_name()
PALUDIS_ATTRIBUTE((warn_unused_result));
653 template <
typename A_>
674 ActionFailedError(
const std::string & msg)
noexcept;
693 ActionAbortedError(
const std::string &)
noexcept;
virtual const std::string simple_name() const PALUDIS_ATTRIBUTE((warn_unused_result))=0
const ConfigActionOptions & options
Definition action.hh:547
const std::string simple_name() const override PALUDIS_ATTRIBUTE((warn_unused_result))
ConfigAction(const ConfigActionOptions &)
Definition visitor.hh:326
const FetchActionOptions & options
Options for the action.
Definition action.hh:352
const std::string simple_name() const override PALUDIS_ATTRIBUTE((warn_unused_result))
Definition visitor.hh:411
const InfoActionOptions & options
Definition action.hh:613
const std::string simple_name() const override PALUDIS_ATTRIBUTE((warn_unused_result))
InfoAction(const InfoActionOptions &)
const InstallActionOptions & options
Options for the action.
Definition action.hh:320
const std::string simple_name() const override PALUDIS_ATTRIBUTE((warn_unused_result))
Definition named_value.hh:51
PretendAction(const PretendActionOptions &)
const std::string simple_name() const override PALUDIS_ATTRIBUTE((warn_unused_result))
const PretendActionOptions & options
Definition action.hh:455
void set_failed()
Mark the action as failed.
bool failed() const PALUDIS_ATTRIBUTE((warn_unused_result))
Did our pretend phase fail?
const std::string simple_name() const override PALUDIS_ATTRIBUTE((warn_unused_result))
virtual void will_fetch(const FSPath &destination, const unsigned long size_in_bytes)=0
Signal that we will fetch a particular file.
const FetchActionOptions & options
Options for the FetchAction we will use.
Definition action.hh:487
const UninstallActionOptions & options
Options for the action.
Definition action.hh:384
const std::string simple_name() const override PALUDIS_ATTRIBUTE((warn_unused_result))
#define PALUDIS_ATTRIBUTE(x)
Definition attributes.hh:53
#define PALUDIS_VISIBLE
Definition attributes.hh:59
Definition about_metadata-fwd.hh:24
NamedValue< n::make_output_manager, std::function< std::shared_ptr< OutputManager >(const ConfigAction &)> > make_output_manager
Definition action.hh:513
NamedValue< n::make_output_manager, std::function< std::shared_ptr< OutputManager >(const FetchAction &)> > make_output_manager
Definition action.hh:134
NamedValue< n::exclude_unmirrorable, bool > exclude_unmirrorable
Definition action.hh:100
NamedValue< n::ignore_not_in_manifest, bool > ignore_not_in_manifest
Definition action.hh:116
NamedValue< n::ignore_unfetched, bool > ignore_unfetched
Definition action.hh:125
NamedValue< n::errors, std::shared_ptr< Sequence< FetchActionFailure > > > errors
Definition action.hh:95
NamedValue< n::want_phase, std::function< WantPhase(const std::string &)> > want_phase
Definition action.hh:143
NamedValue< n::fetch_parts, FetchParts > fetch_parts
Definition action.hh:107
NamedValue< n::make_output_manager, std::function< std::shared_ptr< OutputManager >(const InfoAction &)> > make_output_manager
Definition action.hh:572
NamedValue< n::replacing, std::shared_ptr< const PackageIDSequence > > replacing
Definition action.hh:185
NamedValue< n::perform_uninstall, std::function< void(const std::shared_ptr< const PackageID > &, const UninstallActionOptions &)> > perform_uninstall
Definition action.hh:178
NamedValue< n::make_output_manager, std::function< std::shared_ptr< OutputManager >(const InstallAction &)> > make_output_manager
Definition action.hh:164
Definition type_list-fwd.hh:31
NamedValue< n::make_output_manager, std::function< std::shared_ptr< OutputManager >(const PretendAction &)> > make_output_manager
Definition action.hh:409
NamedValue< n::replacing, std::shared_ptr< const PackageIDSequence > > replacing
Definition action.hh:416
NamedValue< n::is_overwrite, bool > is_overwrite
Definition action.hh:223
NamedValue< n::ignore_for_unmerge, std::function< bool(const FSPath &)> > ignore_for_unmerge
Definition action.hh:215
NamedValue< n::if_for_install_id, std::shared_ptr< const PackageID > > if_for_install_id
Definition action.hh:207
NamedValue< n::override_contents, std::shared_ptr< const Contents > > override_contents
Definition action.hh:243
NamedValue< n::make_output_manager, std::function< std::shared_ptr< OutputManager >(const UninstallAction &)> > make_output_manager
Definition action.hh:232
NamedValue< n::want_phase, std::function< WantPhase(const std::string &)> > want_phase
Definition action.hh:248