1/* 2 * Copyright 2011, Ingo Weinhold, ingo_weinhold@gmx.de. 3 * Distributed under the terms of the MIT License. 4 */ 5#ifndef PACKAGE_LINK_SYMLINK_H 6#define PACKAGE_LINK_SYMLINK_H 7 8 9#include "Node.h" 10 11 12class Package; 13class PackageLinksListener; 14 15 16class PackageLinkSymlink : public Node { 17public: 18 PackageLinkSymlink(Package* package); 19 virtual ~PackageLinkSymlink(); 20 21 void Update(Package* package, 22 PackageLinksListener* listener); 23 24 virtual mode_t Mode() const; 25 virtual timespec ModifiedTime() const; 26 virtual off_t FileSize() const; 27 28 virtual status_t Read(off_t offset, void* buffer, 29 size_t* bufferSize); 30 virtual status_t Read(io_request* request); 31 32 virtual status_t ReadSymlink(void* buffer, size_t* bufferSize); 33 34private: 35 struct OldAttributes; 36 37private: 38 timespec fModifiedTime; 39 const char* fLinkPath; 40}; 41 42 43#endif // PACKAGE_LINK_SYMLINK_H 44