X-Git-Url: https://gerrit.opnfv.org/gerrit/gitweb?a=blobdiff_plain;f=src%2Fceph%2Fsrc%2Fcls%2Ftimeindex%2Fcls_timeindex_client.h;fp=src%2Fceph%2Fsrc%2Fcls%2Ftimeindex%2Fcls_timeindex_client.h;h=0000000000000000000000000000000000000000;hb=7da45d65be36d36b880cc55c5036e96c24b53f00;hp=30efccdc8dec87154636383ae98fdfab7a0a48ac;hpb=691462d09d0987b47e112d6ee8740375df3c51b2;p=stor4nfv.git diff --git a/src/ceph/src/cls/timeindex/cls_timeindex_client.h b/src/ceph/src/cls/timeindex/cls_timeindex_client.h deleted file mode 100644 index 30efccd..0000000 --- a/src/ceph/src/cls/timeindex/cls_timeindex_client.h +++ /dev/null @@ -1,99 +0,0 @@ -// -*- mode:C++; tab-width:8; c-basic-offset:2; indent-tabs-mode:t -*- -// vim: ts=8 sw=2 smarttab - -#ifndef CEPH_CLS_TIMEINDEX_CLIENT_H -#define CEPH_CLS_TIMEINDEX_CLIENT_H - -#include "include/rados/librados.hpp" - -#include "cls_timeindex_ops.h" - -namespace librados { - class ObjectWriteOperation; - class ObjectReadOperation; - class IoCtx; -} - -/** - * timeindex objclass - */ -class TimeindexListCtx : public librados::ObjectOperationCompletion { - std::list *entries; - std::string *marker; - bool *truncated; - -public: - ///* ctor - TimeindexListCtx( - std::list *_entries, - std::string *_marker, - bool *_truncated) - : entries(_entries), marker(_marker), truncated(_truncated) {} - - ///* dtor - ~TimeindexListCtx() {} - - void handle_completion(int r, bufferlist& bl) override { - if (r >= 0) { - cls_timeindex_list_ret ret; - try { - bufferlist::iterator iter = bl.begin(); - ::decode(ret, iter); - if (entries) - *entries = ret.entries; - if (truncated) - *truncated = ret.truncated; - if (marker) - *marker = ret.marker; - } catch (buffer::error& err) { - // nothing we can do about it atm - } - } - } -}; - -void cls_timeindex_add_prepare_entry( - cls_timeindex_entry& entry, - const utime_t& key_timestamp, - const std::string& key_ext, - bufferlist& bl); - -void cls_timeindex_add( - librados::ObjectWriteOperation& op, - const std::list& entry); - -void cls_timeindex_add( - librados::ObjectWriteOperation& op, - const cls_timeindex_entry& entry); - -void cls_timeindex_add( - librados::ObjectWriteOperation& op, - const utime_t& timestamp, - const std::string& name, - const bufferlist& bl); - -void cls_timeindex_list( - librados::ObjectReadOperation& op, - const utime_t& from, - const utime_t& to, - const std::string& in_marker, - const int max_entries, - std::list& entries, - std::string *out_marker, - bool *truncated); - -void cls_timeindex_trim( - librados::ObjectWriteOperation& op, - const utime_t& from_time, - const utime_t& to_time, - const std::string& from_marker = std::string(), - const std::string& to_marker = std::string()); - -int cls_timeindex_trim( - librados::IoCtx& io_ctx, - const std::string& oid, - const utime_t& from_time, - const utime_t& to_time, - const std::string& from_marker = std::string(), - const std::string& to_marker = std::string()); -#endif