10df6decfSAndrew Lindesay /* 23369e03dSAndrew Lindesay * Copyright 2017-2018, Andrew Lindesay <apl@lindesay.co.nz>. 30df6decfSAndrew Lindesay * All rights reserved. Distributed under the terms of the MIT License. 40df6decfSAndrew Lindesay */ 50df6decfSAndrew Lindesay 63369e03dSAndrew Lindesay 70df6decfSAndrew Lindesay #ifndef ABSTRACT_SINGLE_FILE_SERVER_PROCESS_H 80df6decfSAndrew Lindesay #define ABSTRACT_SINGLE_FILE_SERVER_PROCESS_H 90df6decfSAndrew Lindesay 100df6decfSAndrew Lindesay 110df6decfSAndrew Lindesay #include "AbstractServerProcess.h" 120df6decfSAndrew Lindesay 130df6decfSAndrew Lindesay 140df6decfSAndrew Lindesay class AbstractSingleFileServerProcess : public AbstractServerProcess { 150df6decfSAndrew Lindesay public: 163369e03dSAndrew Lindesay AbstractSingleFileServerProcess(uint32 options); 170df6decfSAndrew Lindesay virtual ~AbstractSingleFileServerProcess(); 180df6decfSAndrew Lindesay 19*3538133fSAndrew Lindesay virtual BString LogReport(); 20*3538133fSAndrew Lindesay 210df6decfSAndrew Lindesay protected: 220df6decfSAndrew Lindesay virtual status_t RunInternal(); 230df6decfSAndrew Lindesay 240df6decfSAndrew Lindesay virtual status_t ProcessLocalData() = 0; 250df6decfSAndrew Lindesay 260df6decfSAndrew Lindesay virtual BString UrlPathComponent() = 0; 270df6decfSAndrew Lindesay 283369e03dSAndrew Lindesay virtual status_t GetLocalPath(BPath& path) const = 0; 293369e03dSAndrew Lindesay 303369e03dSAndrew Lindesay virtual status_t GetStandardMetaDataPath(BPath& path) const; 31*3538133fSAndrew Lindesay 32*3538133fSAndrew Lindesay protected: 33*3538133fSAndrew Lindesay double fDownloadDurationSeconds; 34*3538133fSAndrew Lindesay double fProcessLocalDataDurationSeconds; 350df6decfSAndrew Lindesay }; 360df6decfSAndrew Lindesay 370df6decfSAndrew Lindesay #endif // ABSTRACT_SINGLE_FILE_SERVER_PROCESS_H