libzypp 17.37.17
rangedesc.h
Go to the documentation of this file.
1/*---------------------------------------------------------------------\
2| ____ _ __ __ ___ |
3| |__ / \ / / . \ . \ |
4| / / \ V /| _/ _/ |
5| / /__ | | | | | | |
6| /_____||_| |_| |_| |
7| |
8----------------------------------------------------------------------/
9*
10* This file contains private API, this might break at any time between releases.
11* You have been warned!
12*
13*/
14#ifndef ZYPP_CURL_NG_NETWORK_RANGEDESC_INCLUDED
15#define ZYPP_CURL_NG_NETWORK_RANGEDESC_INCLUDED
16
18#include <optional>
19#include <string>
20#include <sys/types.h>
21
22namespace zyppng {
23
27 struct RangeDesc {
28 size_t _start = 0;
29 size_t _len = 0;
30
35 std::string _chksumtype;
37 std::optional<size_t> _relevantDigestLen; //< initialized if only the first few bytes of the checksum should be considered
38 std::optional<size_t> _chksumPad; //< initialized if the hashed blocks for a digest need to be padded if a block is smaller ( e.g. last block in a zsync file )
39 };
40}
41
42#endif
std::string _chksumtype
Enables automated checking of downloaded contents against a checksum.
Definition rangedesc.h:35
UByteArray _checksum
Definition rangedesc.h:36
std::optional< size_t > _relevantDigestLen
Definition rangedesc.h:37
std::optional< size_t > _chksumPad
Definition rangedesc.h:38