CernVM-FS  2.12.0
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
swissknife_assistant.h
Go to the documentation of this file.
1 
5 #ifndef CVMFS_SWISSKNIFE_ASSISTANT_H_
6 #define CVMFS_SWISSKNIFE_ASSISTANT_H_
7 
8 #include <string>
9 
10 #include "crypto/hash.h"
11 
12 namespace catalog {
13 class Catalog;
14 }
15 namespace download {
16 class DownloadManager;
17 }
18 namespace history {
19 class History;
20 }
21 namespace manifest {
22 class Manifest;
23 }
24 
25 namespace swissknife {
26 
32 class Assistant {
33  public:
34  enum OpenMode {
37  };
38 
42  const std::string &r,
43  const std::string &t)
44  : download_mgr_(d)
45  , manifest_(m)
46  , repository_url_(r)
47  , tmp_dir_(t)
48  { }
49 
51  catalog::Catalog *GetCatalog(const shash::Any &catalog_hash,
52  OpenMode open_mode);
53 
54  private:
55  bool FetchObject(const shash::Any &id, const std::string &local_path);
56 
59  std::string repository_url_;
60  std::string tmp_dir_;
61 };
62 
63 } // namespace swissknife
64 
65 #endif // CVMFS_SWISSKNIFE_ASSISTANT_H_
const manifest::Manifest * manifest() const
Definition: repository.h:125
const history::History * history() const
Assistant(download::DownloadManager *d, manifest::Manifest *m, const std::string &r, const std::string &t)
bool FetchObject(const shash::Any &id, const std::string &local_path)
manifest::Manifest * manifest_
catalog::Catalog * GetCatalog(const shash::Any &catalog_hash, OpenMode open_mode)
history::History * GetHistory(OpenMode open_mode)
download::DownloadManager * download_mgr_