summaryrefslogtreecommitdiffstats
path: root/src/cls/version/cls_version_client.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/cls/version/cls_version_client.h')
-rw-r--r--src/cls/version/cls_version_client.h32
1 files changed, 32 insertions, 0 deletions
diff --git a/src/cls/version/cls_version_client.h b/src/cls/version/cls_version_client.h
new file mode 100644
index 000000000..19457855a
--- /dev/null
+++ b/src/cls/version/cls_version_client.h
@@ -0,0 +1,32 @@
+// -*- mode:C++; tab-width:8; c-basic-offset:2; indent-tabs-mode:t -*-
+// vim: ts=8 sw=2 smarttab
+
+#ifndef CEPH_CLS_VERSION_CLIENT_H
+#define CEPH_CLS_VERSION_CLIENT_H
+
+#include "include/rados/librados_fwd.hpp"
+#include "cls_version_ops.h"
+
+/*
+ * version objclass
+ */
+
+void cls_version_set(librados::ObjectWriteOperation& op, obj_version& ver);
+
+/* increase anyway */
+void cls_version_inc(librados::ObjectWriteOperation& op);
+
+/* conditional increase, return -EAGAIN if condition fails */
+void cls_version_inc(librados::ObjectWriteOperation& op, obj_version& ver, VersionCond cond);
+
+void cls_version_read(librados::ObjectReadOperation& op, obj_version *objv);
+
+// these overloads which call io_ctx.operate() or io_ctx.exec() should not be called in the rgw.
+// rgw_rados_operate() should be called after the overloads w/o calls to io_ctx.operate()/exec()
+#ifndef CLS_CLIENT_HIDE_IOCTX
+int cls_version_read(librados::IoCtx& io_ctx, std::string& oid, obj_version *ver);
+#endif
+
+void cls_version_check(librados::ObjectOperation& op, obj_version& ver, VersionCond cond);
+
+#endif