libzypp: zypp-curl/parser/metadatahelper.h Source File

libzypp 17.38.8

metadatahelper.h
Go to the documentation of this file.
1/*---------------------------------------------------------------------\
2| ____ _ __ __ ___ |
3| |__ / \ / / . \ . \ |
4| / / \ V /| _/ _/ |
5| / /__ | | | | | | |
6| /_____||_| |_| |_| |
7| |
8\---------------------------------------------------------------------*/
9#ifndef ZYPP_CURL_PARSER_METADATAHELPER_H
10#define ZYPP_CURL_PARSER_METADATAHELPER_H
11
16
17
18#include <zypp-core/Pathname.h>
19#include <cstdio>
20#include <vector>
21
22namespace zypp::media {
23
24 enum class MetaDataType {
25 None = 0,
26 Zsync,
27 MetaLink
28 };
29
30 constexpr auto minMetalinkProbeSize = 256; //< The nr of bytes we download to decide if we got a metadata file or not
31
32 MetaDataType looks_like_meta_data( const std::vector<char> &data );
33 MetaDataType looks_like_meta_file( const zypp::Pathname &file );
34 MetaDataType looks_like_meta_file( FILE *file );
35}
36
37
38#endif
Pathname.h
zypp::filesystem::Pathname
Pathname.
Definition Pathname.h:48
zypp::media
Definition MediaNetworkRequestExecutor.h:22
zypp::media::looks_like_meta_data
MetaDataType looks_like_meta_data(const std::vector< char > &data)
Definition metadatahelper.cc:16
zypp::media::MetaDataType
MetaDataType
Definition metadatahelper.h:24
zypp::media::MetaDataType::None
@ None
Definition metadatahelper.h:25
zypp::media::MetaDataType::MetaLink
@ MetaLink
Definition metadatahelper.h:27
zypp::media::MetaDataType::Zsync
@ Zsync
Definition metadatahelper.h:26
zypp::media::minMetalinkProbeSize
constexpr auto minMetalinkProbeSize
Definition metadatahelper.h:30
zypp::media::looks_like_meta_file
MetaDataType looks_like_meta_file(const Pathname &file)
Definition metadatahelper.cc:46