1 // -*- mode:C++; tab-width:8; c-basic-offset:2; indent-tabs-mode:t -*-
2 // vim: ts=8 sw=2 smarttab
4 #ifndef CEPH_LIBRBD_MANAGED_LOCK_TYPES_H
5 #define CEPH_LIBRBD_MANAGED_LOCK_TYPES_H
7 #include "msg/msg_types.h"
11 namespace managed_lock {
21 Locker(const entity_name_t& entity, const std::string &cookie,
22 const std::string &address, uint64_t handle)
23 : entity(entity), cookie(cookie), address(address), handle(handle) {
26 inline bool operator==(const Locker &rhs) const {
27 return (entity == rhs.entity &&
28 cookie == rhs.cookie &&
29 address == rhs.address &&
30 handle == rhs.handle);
32 inline bool operator!=(const Locker &rhs) const {
33 return !(*this == rhs);
43 } // namespace managed_lock
46 #endif // CEPH_LIBRBD_MANAGED_LOCK_TYPES_H