repository_infos: Enable automatic updates on the main Haiku repostiory.
[haiku.git] / src / apps / haikudepot / server / StandardMetaData.h
blob0b1ed9057bd50b15280cdb74a81f2c7bc88e6b69
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
8 #include <DateTime.h>
9 #include <File.h>
10 #include <HttpHeaders.h>
11 #include <Locker.h>
12 #include <String.h>
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.
22 class StandardMetaData {
23 public:
24 StandardMetaData();
26 uint64_t GetCreateTimestamp();
27 BDateTime GetCreateTimestampAsDateTime();
28 void SetCreateTimestamp(uint64_t value);
30 uint64_t GetDataModifiedTimestamp();
31 BDateTime GetDataModifiedTimestampAsDateTime();
32 void SetDataModifiedTimestamp(
33 uint64_t value);
35 bool IsPopulated();
36 private:
37 BDateTime _CreateDateTime(
38 uint64_t millisSinceEpoc);
39 uint64_t fCreateTimestamp;
40 uint64_t fDataModifiedTimestamp;
44 #endif // STANDARD_META_DATA_H