1/* 2 * Copyright 2017-2020, Andrew Lindesay <apl@lindesay.co.nz>. 3 * All rights reserved. Distributed under the terms of the MIT License. 4 */ 5#ifndef STANDARD_META_DATA_H 6#define STANDARD_META_DATA_H 7 8#include <DateTime.h> 9#include <File.h> 10#include <HttpHeaders.h> 11#include <Locker.h> 12#include <String.h> 13 14 15/* This class models (some of) the meta-data that is bundled into data that is 16 * relayed from the HaikuDepotServer application server down to the client. 17 * This includes the tar-ball of icons as well as "bulk data" such as streams of 18 * information about repositories and packages. 19 */ 20 21 22class StandardMetaData { 23public: 24 StandardMetaData(); 25 26 uint64_t GetCreateTimestamp() const; 27 BDateTime GetCreateTimestampAsDateTime() const; 28 void SetCreateTimestamp(uint64_t value); 29 30 uint64_t GetDataModifiedTimestamp() const; 31 BDateTime GetDataModifiedTimestampAsDateTime() 32 const; 33 void SetDataModifiedTimestamp( 34 uint64_t value); 35 36 bool IsPopulated() const; 37private: 38 static BDateTime _CreateDateTime( 39 uint64_t millisSinceEpoc); 40 41private: 42 uint64_t fCreateTimestamp; 43 uint64_t fDataModifiedTimestamp; 44}; 45 46 47#endif // STANDARD_META_DATA_H 48