summaryrefslogtreecommitdiff
path: root/src/git/odb_backend.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/git/odb_backend.h')
-rw-r--r--src/git/odb_backend.h40
1 files changed, 40 insertions, 0 deletions
diff --git a/src/git/odb_backend.h b/src/git/odb_backend.h
new file mode 100644
index 000000000..747f4e97a
--- /dev/null
+++ b/src/git/odb_backend.h
@@ -0,0 +1,40 @@
+#ifndef INCLUDE_git_odb_backend_h__
+#define INCLUDE_git_odb_backend_h__
+
+#include "common.h"
+#include "types.h"
+#include "oid.h"
+
+GIT_BEGIN_DECL
+
+struct git_odb_backend {
+ git_odb *odb;
+
+ int priority;
+
+ int (* read)(
+ git_rawobj *,
+ struct git_odb_backend *,
+ const git_oid *);
+
+ int (* read_header)(
+ git_rawobj *,
+ struct git_odb_backend *,
+ const git_oid *);
+
+ int (* write)(
+ git_oid *id,
+ struct git_odb_backend *,
+ git_rawobj *obj);
+
+ int (* exists)(
+ struct git_odb_backend *,
+ const git_oid *);
+
+ void (* free)(struct git_odb_backend *);
+
+};
+
+GIT_END_DECL
+
+#endif