Horizon
pool_cache_status.hpp
1 #pragma once
2 #include "common/common.hpp"
3 #include "util/uuid.hpp"
4 #include "pool_cache_status.hpp"
5 #include "nlohmann/json.hpp"
6 #include <list>
7 
8 namespace horizon {
9 using json = nlohmann::json;
10 
12 public:
13  class Item {
14  public:
15  std::string name;
16  std::string filename_cached;
17  ObjectType type;
18  UUID uuid;
19  enum class State { CURRENT, OUT_OF_DATE, MISSING_IN_POOL };
20 
21  State state;
22  json delta;
23  };
24 
25  std::list<Item> items;
26  unsigned int n_total = 0;
27  unsigned int n_current = 0;
28  unsigned int n_missing = 0;
29  unsigned int n_out_of_date = 0;
30 };
31 } // namespace horizon
horizon::PoolCacheStatus::Item
Definition: pool_cache_status.hpp:13
horizon::PoolCacheStatus
Definition: pool_cache_status.hpp:11
nlohmann::basic_json
a class to store JSON values
Definition: json.hpp:166
horizon::UUID
This class encapsulates a UUID and allows it to be uses as a value type.
Definition: uuid.hpp:16
nlohmann::json
basic_json<> json
default JSON class
Definition: json_fwd.hpp:61