Changeset 99758 in vbox for trunk/src/VBox/Runtime/common/checksum
- Timestamp:
- May 11, 2023 9:37:59 PM (2 years ago)
- svn:sync-xref-src-repo-rev:
- 157349
- Location:
- trunk/src/VBox/Runtime/common/checksum
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Runtime/common/checksum/crc64.cpp
r98103 r99758 161 161 162 162 163 /**164 * Calculate CRC64 for a memory block.165 *166 * @returns CRC64 for the memory block.167 * @param pv Pointer to the memory block.168 * @param cb Size of the memory block in bytes.169 */170 163 RTDECL(uint64_t) RTCrc64(const void *pv, size_t cb) 171 164 { … … 179 172 180 173 181 /**182 * Start a multiblock CRC64 calculation.183 *184 * @returns Start CRC64.185 */186 174 RTDECL(uint64_t) RTCrc64Start(void) 187 175 { … … 191 179 192 180 193 /**194 * Processes a multiblock of a CRC64 calculation.195 *196 * @returns Intermediate CRC64 value.197 * @param uCRC64 Current CRC64 intermediate value.198 * @param pv The data block to process.199 * @param cb The size of the data block in bytes.200 */201 181 RTDECL(uint64_t) RTCrc64Process(uint64_t uCRC64, const void *pv, size_t cb) 202 182 { … … 209 189 210 190 211 /**212 * Complete a multiblock CRC64 calculation.213 *214 * @returns CRC64 value.215 * @param uCRC64 Current CRC64 intermediate value.216 */217 191 RTDECL(uint64_t) RTCrc64Finish(uint64_t uCRC64) 218 192 { -
trunk/src/VBox/Runtime/common/checksum/manifest2.cpp
r98103 r99758 192 192 193 193 194 /**195 * Creates an empty manifest.196 *197 * @returns IPRT status code.198 * @param fFlags Flags, MBZ.199 * @param phManifest Where to return the handle to the manifest.200 */201 194 RTDECL(int) RTManifestCreate(uint32_t fFlags, PRTMANIFEST phManifest) 202 195 { … … 223 216 } 224 217 225 /** 226 * Retains a reference to the manifest handle. 227 * 228 * @returns The new reference count, UINT32_MAX if the handle is invalid. 229 * @param hManifest The handle to retain. 230 */ 218 231 219 RTDECL(uint32_t) RTManifestRetain(RTMANIFEST hManifest) 232 220 { … … 268 256 269 257 270 /**271 * Releases a reference to the manifest handle.272 *273 * @returns The new reference count, 0 if free. UINT32_MAX is returned if the274 * handle is invalid.275 * @param hManifest The handle to release.276 * NIL is quietly ignored (returns 0).277 */278 258 RTDECL(uint32_t) RTManifestRelease(RTMANIFEST hManifest) 279 259 { … … 298 278 299 279 300 /**301 * Creates a duplicate of the specified manifest.302 *303 * @returns IPRT status code304 * @param hManifestSrc The manifest to clone.305 * @param phManifestDst Where to store the handle to the duplicate.306 */307 280 RTDECL(int) RTManifestDup(RTMANIFEST hManifestSrc, PRTMANIFEST phManifestDst) 308 281 { … … 740 713 741 714 742 /**743 * Sets a manifest attribute.744 *745 * @returns IPRT status code.746 * @param hManifest The manifest handle.747 * @param pszAttr The attribute name. If this already exists,748 * its value will be replaced.749 * @param pszValue The value string.750 * @param fType The attribute type, pass751 * RTMANIFEST_ATTR_UNKNOWN if not known.752 */753 715 RTDECL(int) RTManifestSetAttr(RTMANIFEST hManifest, const char *pszAttr, const char *pszValue, uint32_t fType) 754 716 { … … 784 746 785 747 786 /**787 * Unsets (removes) a manifest attribute if it exists.788 *789 * @returns IPRT status code.790 * @retval VWRN_NOT_FOUND if not found.791 *792 * @param hManifest The manifest handle.793 * @param pszAttr The attribute name.794 */795 748 RTDECL(int) RTManifestUnsetAttr(RTMANIFEST hManifest, const char *pszAttr) 796 749 { … … 1041 994 1042 995 1043 /**1044 * Sets an attribute of a manifest entry.1045 *1046 * @returns IPRT status code.1047 * @param hManifest The manifest handle.1048 * @param pszEntry The entry name. This will automatically be1049 * added if there was no previous call to1050 * RTManifestEntryAdd for this name. See1051 * RTManifestEntryAdd for the entry name rules.1052 * @param pszAttr The attribute name. If this already exists,1053 * its value will be replaced.1054 * @param pszValue The value string.1055 * @param fType The attribute type, pass1056 * RTMANIFEST_ATTR_UNKNOWN if not known.1057 */1058 996 RTDECL(int) RTManifestEntrySetAttr(RTMANIFEST hManifest, const char *pszEntry, const char *pszAttr, 1059 997 const char *pszValue, uint32_t fType) … … 1107 1045 1108 1046 1109 /**1110 * Unsets (removes) an attribute of a manifest entry if they both exist.1111 *1112 * @returns IPRT status code.1113 * @retval VWRN_NOT_FOUND if not found.1114 *1115 * @param hManifest The manifest handle.1116 * @param pszEntry The entry name.1117 * @param pszAttr The attribute name.1118 */1119 1047 RTDECL(int) RTManifestEntryUnsetAttr(RTMANIFEST hManifest, const char *pszEntry, const char *pszAttr) 1120 1048 { … … 1167 1095 1168 1096 1169 /**1170 * Adds a new entry to a manifest.1171 *1172 * The entry name rules:1173 * - The entry name can contain any character defined by unicode, except1174 * control characters, ':', '(' and ')'. The exceptions are mainly there1175 * because of uncertainty around how various formats handles these.1176 * - It is considered case sensitive.1177 * - Forward (unix) and backward (dos) slashes are considered path1178 * separators and converted to forward slashes.1179 *1180 * @returns IPRT status code.1181 * @retval VWRN_ALREADY_EXISTS if the entry already exists.1182 *1183 * @param hManifest The manifest handle.1184 * @param pszEntry The entry name (UTF-8).1185 *1186 * @remarks Some manifest formats will not be able to store an entry without1187 * any attributes. So, this is just here in case it comes in handy1188 * when dealing with formats which can.1189 */1190 1097 RTDECL(int) RTManifestEntryAdd(RTMANIFEST hManifest, const char *pszEntry) 1191 1098 { … … 1239 1146 1240 1147 1241 /**1242 * Removes an entry.1243 *1244 * @returns IPRT status code.1245 * @param hManifest The manifest handle.1246 * @param pszEntry The entry name.1247 */1248 1148 RTDECL(int) RTManifestEntryRemove(RTMANIFEST hManifest, const char *pszEntry) 1249 1149 { -
trunk/src/VBox/Runtime/common/checksum/manifest3.cpp
r98103 r99758 533 533 534 534 535 /**536 * Add an entry for an I/O stream using a passthru stream.537 *538 * The passthru I/O stream will hash all the data read from or written to the539 * stream and automatically add an entry to the manifest with the desired540 * attributes when it is released. Alternatively one can call541 * RTManifestPtIosAddEntryNow() to have more control over exactly when this542 * action is performed and which status it yields.543 *544 * @returns IPRT status code.545 * @param hManifest The manifest to add the entry to.546 * @param hVfsIos The I/O stream to pass thru to/from.547 * @param pszEntry The entry name.548 * @param fAttrs The attributes to create for this stream.549 * @param fReadOrWrite Whether it's a read or write I/O stream.550 * @param phVfsIosPassthru Where to return the new handle.551 */552 535 RTDECL(int) RTManifestEntryAddPassthruIoStream(RTMANIFEST hManifest, RTVFSIOSTREAM hVfsIos, const char *pszEntry, 553 536 uint32_t fAttrs, bool fReadOrWrite, PRTVFSIOSTREAM phVfsIosPassthru) … … 602 585 603 586 604 /**605 * Adds the entry to the manifest right now.606 *607 * @returns IPRT status code.608 * @param hVfsPtIos The manifest passthru I/O stream returned by609 * RTManifestEntryAddPassthruIoStream().610 */611 587 RTDECL(int) RTManifestPtIosAddEntryNow(RTVFSIOSTREAM hVfsPtIos) 612 588 { … … 621 597 622 598 623 /**624 * Checks if the give I/O stream is a manifest passthru instance or not.625 *626 * @returns true if it's a manifest passthru I/O stream, false if not.627 * @param hVfsPtIos Possible the manifest passthru I/O stream handle.628 */629 599 RTDECL(bool) RTManifestPtIosIsInstanceOf(RTVFSIOSTREAM hVfsPtIos) 630 600 { … … 639 609 640 610 641 /**642 * Adds an entry for a file with the specified set of attributes.643 *644 * @returns IPRT status code.645 *646 * @param hManifest The manifest handle.647 * @param hVfsIos The I/O stream handle of the entry. This will648 * be processed to its end on successful return.649 * (Must be positioned at the start to get650 * the expected results.)651 * @param pszEntry The entry name.652 * @param fAttrs The attributes to create for this stream.653 */654 611 RTDECL(int) RTManifestEntryAddIoStream(RTMANIFEST hManifest, RTVFSIOSTREAM hVfsIos, const char *pszEntry, uint32_t fAttrs) 655 612 {
Note:
See TracChangeset
for help on using the changeset viewer.