X-Git-Url: https://gerrit.opnfv.org/gerrit/gitweb?a=blobdiff_plain;f=src%2Fceph%2Fsrc%2Ftools%2Frbd_mirror%2FBaseRequest.h;fp=src%2Fceph%2Fsrc%2Ftools%2Frbd_mirror%2FBaseRequest.h;h=0000000000000000000000000000000000000000;hb=7da45d65be36d36b880cc55c5036e96c24b53f00;hp=f865f600fd8fa0809fa6c21dd686db4f741dd05f;hpb=691462d09d0987b47e112d6ee8740375df3c51b2;p=stor4nfv.git diff --git a/src/ceph/src/tools/rbd_mirror/BaseRequest.h b/src/ceph/src/tools/rbd_mirror/BaseRequest.h deleted file mode 100644 index f865f60..0000000 --- a/src/ceph/src/tools/rbd_mirror/BaseRequest.h +++ /dev/null @@ -1,42 +0,0 @@ -// -*- mode:C++; tab-width:8; c-basic-offset:2; indent-tabs-mode:t -*- -// vim: ts=8 sw=2 smarttab - -#ifndef CEPH_RBD_MIRROR_BASE_REQUEST_H -#define CEPH_RBD_MIRROR_BASE_REQUEST_H - -#include "common/RefCountedObj.h" - -namespace rbd { -namespace mirror { - -class BaseRequest : public RefCountedObject { -public: - BaseRequest(const std::string& name, CephContext *cct, Context *on_finish) - : RefCountedObject(cct, 1), m_name(name), m_cct(cct), - m_on_finish(on_finish) { - } - - virtual void send() = 0; - virtual void cancel() {} - -protected: - virtual void finish(int r) { - if (m_cct) { - lsubdout(m_cct, rbd_mirror, 20) << m_name << "::finish: r=" << r << dendl; - } - if (m_on_finish) { - m_on_finish->complete(r); - } - put(); - } - -private: - const std::string m_name; - CephContext *m_cct; - Context *m_on_finish; -}; - -} // namespace mirror -} // namespace rbd - -#endif // CEPH_RBD_MIRROR_BASE_REQUEST_H