2016-08-23 01:40:56 +03:00
|
|
|
// manifest_fetcher.h - c++ declarations for a fetcher for manifests
|
|
|
|
//
|
|
|
|
// Copyright 2016 Facebook, Inc.
|
|
|
|
//
|
|
|
|
// This software may be used and distributed according to the terms of the
|
|
|
|
// GNU General Public License version 2 or any later version.
|
|
|
|
//
|
|
|
|
// no-check-code
|
|
|
|
|
|
|
|
#ifndef REMOTEFILELOG_MANIFEST_FETCHER_H
|
|
|
|
#define REMOTEFILELOG_MANIFEST_FETCHER_H
|
|
|
|
|
2016-08-30 02:19:52 +03:00
|
|
|
#include "pythonutil.h"
|
|
|
|
|
2016-08-23 01:40:56 +03:00
|
|
|
#include <string>
|
|
|
|
|
|
|
|
class ManifestFetcher;
|
|
|
|
|
|
|
|
#include "manifest.h"
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Class used to obtain Manifests, given a path and node.
|
|
|
|
*/
|
|
|
|
class ManifestFetcher {
|
|
|
|
private:
|
|
|
|
PythonObj _get;
|
|
|
|
public:
|
|
|
|
ManifestFetcher(PythonObj &store);
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Fetches the Manifest from the store for the provided manifest key.
|
|
|
|
* Returns the manifest if found, or throws an exception if not found.
|
|
|
|
*/
|
2016-10-15 02:01:12 +03:00
|
|
|
ManifestPtr get(
|
2016-08-23 01:42:03 +03:00
|
|
|
const char *path, size_t pathlen,
|
|
|
|
std::string &node) const;
|
2016-08-23 01:40:56 +03:00
|
|
|
};
|
|
|
|
|
|
|
|
#endif //REMOTEFILELOG_MANIFEST_FETCHER_H
|