libzypp 17.37.10

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
17#include <zypp-core/zyppng/core/bytearray.h>
18#include <optional>
19#include <string>
20#include <sys/types.h>
21
22 namespace zyppng {
23
27 struct RangeDesc {
28 size_t _start = 0;
29 size_t _len = 0;
30
35 std::string _chksumtype;
36 UByteArray _checksum;
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
bytearray.h
zypp::UByteArray
Definition ByteArray.h:46
zyppng
Definition MediaNetworkRequestExecutor.h:16
zyppng::RangeDesc
Definition rangedesc.h:27
zyppng::RangeDesc::_chksumtype
std::string _chksumtype
Enables automated checking of downloaded contents against a checksum.
Definition rangedesc.h:35
zyppng::RangeDesc::_start
size_t _start
Definition rangedesc.h:28
zyppng::RangeDesc::_len
size_t _len
Definition rangedesc.h:29
zyppng::RangeDesc::_checksum
UByteArray _checksum
Definition rangedesc.h:36
zyppng::RangeDesc::_relevantDigestLen
std::optional< size_t > _relevantDigestLen
Definition rangedesc.h:37
zyppng::RangeDesc::_chksumPad
std::optional< size_t > _chksumPad
Definition rangedesc.h:38