1 /* 2 * Copyright 2011, Ingo Weinhold, ingo_weinhold@gmx.de. 3 * Distributed under the terms of the MIT License. 4 */ 5 #ifndef UNPACKING_ATTRIBUTE_DIRECTORY_COOKIE_H 6 #define UNPACKING_ATTRIBUTE_DIRECTORY_COOKIE_H 7 8 9 #include "AttributeDirectoryCookie.h" 10 #include "AutoPackageAttributes.h" 11 12 13 struct dirent; 14 15 class PackageNode; 16 class PackageNodeAttribute; 17 18 19 class UnpackingAttributeDirectoryCookie : public AttributeDirectoryCookie { 20 public: 21 UnpackingAttributeDirectoryCookie( 22 PackageNode* packageNode); 23 virtual ~UnpackingAttributeDirectoryCookie(); 24 25 static status_t Open(PackageNode* packageNode, 26 AttributeDirectoryCookie*& _cookie); 27 28 virtual status_t Read(dev_t volumeID, ino_t nodeID, 29 struct dirent* buffer, size_t bufferSize, 30 uint32* _count); 31 virtual status_t Rewind(); 32 33 private: 34 PackageNode* fPackageNode; 35 PackageNodeAttribute* fAttribute; 36 uint32 fState; 37 }; 38 39 40 #endif // UNPACKING_ATTRIBUTE_DIRECTORY_COOKIE_H 41