Mercurial > hg > orthanc
comparison OrthancFramework/Sources/FileStorage/FileInfo.h @ 5080:d7274e43ea7c attach-custom-data
allow plugins to store a customData in the Attachments table to e.g. store custom paths without requiring an external DB
author | Alain Mazy <am@osimis.io> |
---|---|
date | Thu, 08 Sep 2022 17:42:08 +0200 |
parents | 43e613a7756b |
children |
comparison
equal
deleted
inserted
replaced
5079:4366b4c41441 | 5080:d7274e43ea7c |
---|---|
39 uint64_t uncompressedSize_; | 39 uint64_t uncompressedSize_; |
40 std::string uncompressedMD5_; | 40 std::string uncompressedMD5_; |
41 CompressionType compressionType_; | 41 CompressionType compressionType_; |
42 uint64_t compressedSize_; | 42 uint64_t compressedSize_; |
43 std::string compressedMD5_; | 43 std::string compressedMD5_; |
44 std::string customData_; | |
44 | 45 |
45 public: | 46 public: |
46 FileInfo(); | 47 FileInfo(); |
47 | 48 |
48 /** | 49 /** |
49 * Constructor for an uncompressed attachment. | 50 * Constructor for an uncompressed attachment. |
50 **/ | 51 **/ |
51 FileInfo(const std::string& uuid, | 52 FileInfo(const std::string& uuid, |
52 FileContentType contentType, | 53 FileContentType contentType, |
53 uint64_t size, | 54 uint64_t size, |
54 const std::string& md5); | 55 const std::string& md5, |
56 const std::string& customData); | |
55 | 57 |
56 /** | 58 /** |
57 * Constructor for a compressed attachment. | 59 * Constructor for a compressed attachment. |
58 **/ | 60 **/ |
59 FileInfo(const std::string& uuid, | 61 FileInfo(const std::string& uuid, |
60 FileContentType contentType, | 62 FileContentType contentType, |
61 uint64_t uncompressedSize, | 63 uint64_t uncompressedSize, |
62 const std::string& uncompressedMD5, | 64 const std::string& uncompressedMD5, |
63 CompressionType compressionType, | 65 CompressionType compressionType, |
64 uint64_t compressedSize, | 66 uint64_t compressedSize, |
65 const std::string& compressedMD5); | 67 const std::string& compressedMD5, |
68 const std::string& customData); | |
66 | 69 |
67 bool IsValid() const; | 70 bool IsValid() const; |
68 | 71 |
69 const std::string& GetUuid() const; | 72 const std::string& GetUuid() const; |
70 | 73 |
77 uint64_t GetCompressedSize() const; | 80 uint64_t GetCompressedSize() const; |
78 | 81 |
79 const std::string& GetCompressedMD5() const; | 82 const std::string& GetCompressedMD5() const; |
80 | 83 |
81 const std::string& GetUncompressedMD5() const; | 84 const std::string& GetUncompressedMD5() const; |
85 | |
86 const std::string& GetCustomData() const; | |
82 }; | 87 }; |
83 } | 88 } |