changeset 50:89b2b8ae97c3

objstore/posix: a skeleton for the posix backend Currently, this backend does *nothing* because it doesn't implement a single operation. Signed-off-by: Josef 'Jeff' Sipek <jeffpc@josefsipek.net>
author Josef 'Jeff' Sipek <jeffpc@josefsipek.net>
date Wed, 01 Jul 2015 20:27:33 -0400
parents 5bfd1f433513
children 2debfd8f9736
files src/objstore/CMakeLists.txt src/objstore/posix/.gitignore src/objstore/posix/CMakeLists.txt src/objstore/posix/main.c
diffstat 4 files changed, 71 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/src/objstore/CMakeLists.txt	Wed Jul 01 20:22:14 2015 -0400
+++ b/src/objstore/CMakeLists.txt	Wed Jul 01 20:27:33 2015 -0400
@@ -34,4 +34,6 @@
 		include/nomad/objstore_impl.h
 	DESTINATION include/nomad
 	PERMISSIONS OWNER_READ GROUP_READ WORLD_READ)
+
 add_subdirectory(mem)
+add_subdirectory(posix)
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/objstore/posix/.gitignore	Wed Jul 01 20:27:33 2015 -0400
@@ -0,0 +1,1 @@
+libnomad_objstore_posix.so
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/objstore/posix/CMakeLists.txt	Wed Jul 01 20:27:33 2015 -0400
@@ -0,0 +1,32 @@
+#
+# Copyright (c) 2015 Josef 'Jeff' Sipek <jeffpc@josefsipek.net>
+#
+# Permission is hereby granted, free of charge, to any person obtaining a copy
+# of this software and associated documentation files (the "Software"), to deal
+# in the Software without restriction, including without limitation the rights
+# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+# copies of the Software, and to permit persons to whom the Software is
+# furnished to do so, subject to the following conditions:
+#
+# The above copyright notice and this permission notice shall be included in
+# all copies or substantial portions of the Software.
+#
+# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+# SOFTWARE.
+#
+
+add_library(nomad_objstore_posix MODULE
+	main.c
+)
+
+target_link_libraries(nomad_objstore_posix
+	${BASE_LIBS}
+)
+
+install(TARGETS nomad_objstore_posix DESTINATION lib
+	PERMISSIONS OWNER_READ GROUP_READ WORLD_READ)
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/objstore/posix/main.c	Wed Jul 01 20:27:33 2015 -0400
@@ -0,0 +1,36 @@
+/*
+ * Copyright (c) 2015 Josef 'Jeff' Sipek <jeffpc@josefsipek.net>
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a copy
+ * of this software and associated documentation files (the "Software"), to deal
+ * in the Software without restriction, including without limitation the rights
+ * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+ * copies of the Software, and to permit persons to whom the Software is
+ * furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be included in
+ * all copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+ * SOFTWARE.
+ */
+
+#include <nomad/error.h>
+#include <nomad/objstore_impl.h>
+
+static const struct objstore_ops store_ops = {
+};
+
+static const struct obj_ops obj_ops = {
+};
+
+const struct objstore_def objstore = {
+	.name = "posix",
+	.store_ops = &store_ops,
+	.obj_ops = &obj_ops,
+};