1 /* 2 * Copyright 2011-2013, Ingo Weinhold, ingo_weinhold@gmx.de. 3 * Distributed under the terms of the MIT License. 4 */ 5 #ifndef UNPACKING_NODE_H 6 #define UNPACKING_NODE_H 7 8 9 #include <SupportDefs.h> 10 11 12 class Node; 13 class PackageNode; 14 15 16 class UnpackingNode { 17 public: 18 virtual ~UnpackingNode(); 19 20 virtual Node* GetNode() = 0; 21 22 virtual status_t AddPackageNode(PackageNode* packageNode, 23 dev_t deviceID) = 0; 24 virtual void RemovePackageNode(PackageNode* packageNode, 25 dev_t deviceID) = 0; 26 27 virtual PackageNode* GetPackageNode() = 0; 28 virtual bool IsOnlyPackageNode(PackageNode* node) const = 0; 29 virtual bool WillBeFirstPackageNode( 30 PackageNode* packageNode) const = 0; 31 32 virtual void PrepareForRemoval() = 0; 33 virtual status_t CloneTransferPackageNodes(ino_t id, 34 UnpackingNode*& _newNode); 35 36 protected: 37 status_t NodeInitVFS(dev_t deviceID, ino_t nodeID, 38 PackageNode* packageNode); 39 void NodeUninitVFS(PackageNode* packageNode, 40 uint32& nodeFlags); 41 void NodeReinitVFS(dev_t deviceID, ino_t nodeID, 42 PackageNode* packageNode, 43 PackageNode* previousPackageNode, 44 uint32& nodeFlags); 45 }; 46 47 48 #endif // UNPACKING_NODE_H 49