summaryrefslogtreecommitdiff
path: root/src/git2/odb_backend.h
diff options
context:
space:
mode:
authorVicent Marti <tanoku@gmail.com>2010-12-06 23:03:16 +0200
committerVicent Marti <tanoku@gmail.com>2010-12-06 23:03:16 +0200
commit44908fe763b1a2097b65c86130ac679c458df7d2 (patch)
treed4b2e597ec985cabff2236895c4515100a5063e4 /src/git2/odb_backend.h
parentd12299fe22e549a20e632668fdbe13cab9def9df (diff)
downloadlibgit2-44908fe763b1a2097b65c86130ac679c458df7d2.tar.gz
Change the library include file
Libgit2 is now officially include as #include "<git2.h>" or indidividual files may be included as #include <git2/index.h> Signed-off-by: Vicent Marti <tanoku@gmail.com>
Diffstat (limited to 'src/git2/odb_backend.h')
-rw-r--r--src/git2/odb_backend.h40
1 files changed, 40 insertions, 0 deletions
diff --git a/src/git2/odb_backend.h b/src/git2/odb_backend.h
new file mode 100644
index 000000000..747f4e97a
--- /dev/null
+++ b/src/git2/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