libzypp  17.38.7
checksumwf.h
Go to the documentation of this file.
1 /*---------------------------------------------------------------------\
2 | ____ _ __ __ ___ |
3 | |__ / \ / / . \ . \ |
4 | / / \ V /| _/ _/ |
5 | / /__ | | | | | | |
6 | /_____||_| |_| |_| |
7 | |
8 \---------------------------------------------------------------------*/
9 #ifndef ZYPP_NG_CHECKSUMWORKFLOW_INCLUDED
10 #define ZYPP_NG_CHECKSUMWORKFLOW_INCLUDED
11 
12 #include <zypp-core/ng/async/task.h>
13 #include <zypp-core/ng/pipelines/Expected>
14 #include <functional>
15 
16 #include <zypp/ng/context.h>
17 #include <zypp/ng/media/provide.h>
18 
19 namespace zypp {
20  namespace filesystem {
21  class Pathname;
22  }
23  using filesystem::Pathname;
24  class CheckSum;
25 }
26 
27 namespace zyppng {
28 
29  class ProvideRes;
31 
32  namespace CheckSumWorkflow {
33  MaybeAwaitable<expected<void>> verifyChecksum ( ContextRef zyppCtx, zypp::CheckSum checksum, zypp::Pathname file );
34 
39  std::function< MaybeAwaitable<expected<ProvideRes>>( ProvideRes && ) > checksumFileChecker( ContextRef zyppCtx, zypp::CheckSum checksum );
40 
41  }
42 }
43 
44 
45 
46 #endif
std::function< MaybeAwaitable< expected< ProvideRes > >ProvideRes &&)> checksumFileChecker(ContextRef zyppCtx, zypp::CheckSum checksum)
Definition: checksumwf.cc:117
Provide::Res ProvideRes
Definition: provide.h:154
MaybeAwaitable< expected< void > > verifyChecksum(ContextRef zyppCtx, zypp::CheckSum checksum, zypp::filesystem::Pathname file)
Definition: checksumwf.cc:111
ZYPP_FWD_DECL_TYPE_WITH_REFS(EventDispatcher)
std::string checksum(const Pathname &file, const std::string &algorithm)
Compute a files checksum.
Definition: PathInfo.cc:1070
Easy-to use interface to the ZYPP dependency resolver.
Definition: CodePitfalls.doc:1