1 /* 2 * Copyright 2017, 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 22 class StandardMetaData { 23 public: 24 StandardMetaData(); 25 26 uint64_t GetCreateTimestamp(); 27 BDateTime GetCreateTimestampAsDateTime(); 28 void SetCreateTimestamp(uint64_t value); 29 30 uint64_t GetDataModifiedTimestamp(); 31 BDateTime GetDataModifiedTimestampAsDateTime(); 32 void SetDataModifiedTimestamp( 33 uint64_t value); 34 35 bool IsPopulated(); 36 private: 37 BDateTime _CreateDateTime( 38 uint64_t millisSinceEpoc); 39 uint64_t fCreateTimestamp; 40 uint64_t fDataModifiedTimestamp; 41 }; 42 43 44 #endif // STANDARD_META_DATA_H 45