/* * Copyright 2017, Andrew Lindesay . * All rights reserved. Distributed under the terms of the MIT License. */ #ifndef SERVER_ICON_PROCESS_H #define SERVER_ICON_PROCESS_H #include "AbstractServerProcess.h" #include #include #include #include #include "IconMetaData.h" class ServerIconExportUpdateProcess : public AbstractServerProcess { public: ServerIconExportUpdateProcess( const BPath& localStorageDirectoryPath); status_t Run(); private: status_t _Download(BPath& tarGzFilePath); status_t _Download(BPath& tarGzFilePath, const BUrl& url, uint32 redirects, uint32 failures); BString _FormFullUrl(const BString& suffix) const; status_t _IfModifiedSinceHeaderValue( BString& headerValue) const; status_t _IfModifiedSinceHeaderValue( BString& headerValue, BPath& iconMetaDataPath) const; status_t _PopulateIconMetaData( IconMetaData& iconMetaData, BPath& path) const; status_t _PopulateIconMetaData( IconMetaData& iconMetaData, BString& jsonString) const; status_t _PopulateIconMetaData( IconMetaData& iconMetaData, BMessage& message) const; void _TimestampToRfc2822String( uint64_t timestampMillis, BString& rfc2822String) const; BString fBaseUrl; BPath fLocalStorageDirectoryPath; }; #endif // SERVER_ICON_PROCESS_H