aboutsummaryrefslogtreecommitdiff
path: root/paludis/action.cc
diff options
context:
space:
mode:
authorAvatar Ciaran McCreesh <ciaran.mccreesh@googlemail.com> 2008-04-12 21:53:11 +0000
committerAvatar Ciaran McCreesh <ciaran.mccreesh@googlemail.com> 2008-04-12 21:53:11 +0000
commit68b4f3d25b131b53a749624778a6c6ab5e058373 (patch)
treefe276d5c0cee03c70fe1fb736c696b102969a775 /paludis/action.cc
parent05ccb6326bad0de2cf0fe7728cabda851f8a6e24 (diff)
downloadpaludis-68b4f3d25b131b53a749624778a6c6ab5e058373.tar.gz
paludis-68b4f3d25b131b53a749624778a6c6ab5e058373.tar.xz
Use PretendFetchAction to get download sizes. Fixes: ticket:504
Diffstat (limited to 'paludis/action.cc')
-rw-r--r--paludis/action.cc29
1 files changed, 29 insertions, 0 deletions
diff --git a/paludis/action.cc b/paludis/action.cc
index 849eb39bc..719a92704 100644
--- a/paludis/action.cc
+++ b/paludis/action.cc
@@ -158,6 +158,30 @@ PretendAction::set_failed()
_imp->failed = true;
}
+namespace paludis
+{
+ template <>
+ struct Implementation<PretendFetchAction>
+ {
+ const FetchActionOptions options;
+
+ Implementation(const FetchActionOptions & o) :
+ options(o)
+ {
+ }
+ };
+}
+
+PretendFetchAction::PretendFetchAction(const FetchActionOptions & o) :
+ PrivateImplementationPattern<PretendFetchAction>(new Implementation<PretendFetchAction>(o)),
+ options(_imp->options)
+{
+}
+
+PretendFetchAction::~PretendFetchAction()
+{
+}
+
SupportsActionTestBase::~SupportsActionTestBase()
{
}
@@ -217,6 +241,11 @@ namespace
{
s << "fetch";
}
+
+ void visit(const PretendFetchAction &)
+ {
+ s << "pretend fetch";
+ }
};
}