BPicture: Fix archive constructor.
[haiku.git] / src / add-ons / kernel / file_systems / nfs4 / Delegation.h
blob807d52617ccb5d457546eab7820a1b642fef3991
1 /*
2 * Copyright 2012 Haiku, Inc. All rights reserved.
3 * Distributed under the terms of the MIT License.
5 * Authors:
6 * Paweł Dziepak, pdziepak@quarnos.org
7 */
8 #ifndef DELEGATION_H
9 #define DELEGATION_H
12 #include <lock.h>
13 #include <SupportDefs.h>
15 #include "NFS4Object.h"
18 class Inode;
20 class Delegation : public NFS4Object,
21 public DoublyLinkedListLinkImpl<Delegation> {
22 public:
23 Delegation(const OpenDelegationData& data, Inode* inode,
24 uint64 clientID, bool attr = false);
26 status_t GiveUp(bool truncate = false);
28 inline void SetData(const OpenDelegationData& data);
29 inline Inode* GetInode();
30 inline OpenDelegation Type();
32 protected:
33 status_t ReturnDelegation();
35 private:
36 uint64 fClientID;
37 OpenDelegationData fData;
38 Inode* fInode;
39 bool fAttribute;
43 inline void
44 Delegation::SetData(const OpenDelegationData& data)
46 fData = data;
50 inline Inode*
51 Delegation::GetInode()
53 return fInode;
57 inline OpenDelegation
58 Delegation::Type()
60 return fData.fType;
64 #endif // DELEGATION_H