sapling/eden/scm/lib/backingstore/c_api/HgNativeBackingStore.h
Adam Simpkins ab3a7cb21f Move fb-mercurial sources into an eden/scm subdirectory.
Summary:
In preparation for merging fb-mercurial sources to the Eden repository,
move everything from the top-level directory into an `eden/scm`
subdirectory.
2019-11-13 16:04:48 -08:00

42 lines
991 B
C++

/*
* Copyright (c) Facebook, Inc. and its affiliates.
*
* This software may be used and distributed according to the terms of the
* GNU General Public License version 2.
*/
#pragma once
#include <folly/Range.h>
#include <memory>
// This is relative path because of the CMake build since it does not preserve
// the directory structure we have in the repository
#include "RustBackingStore.h" // @manual
namespace folly {
class IOBuf;
template <typename T>
class Optional;
} // namespace folly
namespace facebook {
namespace eden {
class HgNativeBackingStore {
public:
explicit HgNativeBackingStore(folly::StringPiece repository);
folly::Optional<folly::IOBuf> getBlob(
folly::ByteRange name,
folly::ByteRange node);
folly::Optional<folly::IOBuf> getTree(
folly::ByteRange name,
folly::ByteRange node);
private:
std::unique_ptr<RustBackingStore, std::function<void(RustBackingStore*)>>
store_;
};
} // namespace eden
} // namespace facebook