libzypp 17.31.23
zyppng Namespace Reference

Namespaces

namespace  AttachMsgFields
 
namespace  AuthDataRequestMsgFields
 
namespace  AuthInfoMsgFields
 
namespace  constants
 
namespace  DetachMsgFields
 
namespace  EjectMsgFields
 
namespace  ErrMsgFields
 
namespace  MediaChangeRequestMsgFields
 
namespace  MetalinkRedirectMsgFields
 
namespace  ProvideFinishedMsgFields
 
namespace  ProvideMsgFields
 
namespace  ProvideStartedMsgFields
 
namespace  RedirectMsgFields
 
namespace  worker
 

Classes

struct  AttachedMediaInfo
 
class  AttachMediaItem
 
struct  BasicDownloaderStateBase
 
struct  DetectMetalinkState
 
struct  DlMetaLinkInfoState
 
struct  DlMetalinkState
 
struct  DlNormalFileState
 
class  Download
 
class  Downloader
 The Downloader class. More...
 
class  DownloaderPrivate
 
class  DownloadPrivate
 
class  DownloadPrivateBase
 
class  DownloadSpec
 
class  DownloadSpecPrivate
 
struct  FinishedState
 
class  HeaderValue
 
class  HeaderValueMap
 
struct  InitialState
 
class  MediaDataVerifier
 
class  MirrorControl
 
struct  MirrorHandlingStateBase
 
class  NetworkRequest
 
class  NetworkRequestDispatcherPrivate
 
class  NetworkRequestError
 The NetworkRequestError class Represents a error that occured in. More...
 
class  NetworkRequestErrorPrivate
 
class  NetworkRequestPrivate
 
struct  PrepareMultiState
 
class  Provide
 
class  ProvideFileItem
 
class  ProvideFileSpec
 
class  ProvideItem
 
class  ProvideItemPrivate
 
class  ProvideMediaHandle
 
class  ProvideMediaSpec
 
class  ProvideMessage
 
class  ProvidePrivate
 
class  ProvidePromise
 
class  ProvideQueue
 
class  ProvideRequest
 
class  ProvideRes
 A ProvideRes object is a reference counted ownership of a resource in the cache provided by a Provide instance. More...
 
struct  ProvideResourceData
 
class  ProvideSpecBasePrivate
 
class  ProvideStatus
 
struct  RangeDownloaderBaseState
 
class  SuseMediaDataVerifier
 

Typedefs

using RpcMessageStreamPtr = std::shared_ptr< RpcMessageStream >
 
template<typename T >
using ProvidePromiseRef = std::shared_ptr< ProvidePromise< T > >
 
template<typename T >
using ProvidePromiseWeakRef = std::weak_ptr< ProvidePromise< T > >
 
using AnyMap = std::unordered_map< std::string, boost::any >
 
using AuthData = zypp::media::AuthData
 
using AuthData_Ptr = zypp::media::AuthData_Ptr
 
using NetworkAuthData = zypp::media::CurlAuthData
 
using NetworkAuthData_Ptr = zypp::media::CurlAuthData_Ptr
 
using TransferSettings = zypp::media::TransferSettings
 
template<typename Derived >
using DownloadStatemachine = Statemachine< Derived, Download::State, Transition< InitialState, &InitialState::sigTransitionToDetectMetalinkState, DetectMetalinkState >, Transition< InitialState, &InitialState::sigTransitionToDlMetaLinkInfoState, DlMetaLinkInfoState >, Transition< InitialState, &InitialState::sigTransitionToDlNormalFileState, DlNormalFileState >, Transition< DetectMetalinkState, &DetectMetalinkState::sigFinished, DlMetaLinkInfoState, &DetectMetalinkState::toMetalinkGuard, &DetectMetalinkState::toDlMetaLinkInfoState >, Transition< DetectMetalinkState, &DetectMetalinkState::sigFinished, DlNormalFileState, &DetectMetalinkState::toSimpleDownloadGuard >, Transition< DlMetaLinkInfoState, &DlMetaLinkInfoState::sigFinished, FinishedState, DefaultStateCondition, &DlMetaLinkInfoState::transitionToFinished >, Transition< DlMetaLinkInfoState, &DlMetaLinkInfoState::sigGotMetadata, PrepareMultiState, DefaultStateCondition, &DlMetaLinkInfoState::transitionToPrepareMulti >, Transition< DlMetaLinkInfoState, &DlMetaLinkInfoState::sigFailed, FinishedState, DefaultStateCondition, &DlMetaLinkInfoState::transitionToFinished >, Transition< PrepareMultiState, &PrepareMultiState::sigFinished, DlMetalinkState, &PrepareMultiState::toMetalinkDownloadGuard, &PrepareMultiState::transitionToMetalinkDl >, Transition< PrepareMultiState, &PrepareMultiState::sigFallback, DlNormalFileState, DefaultStateCondition, &PrepareMultiState::fallbackToNormalTransition >, Transition< PrepareMultiState, &PrepareMultiState::sigFailed, DlNormalFileState >, Transition< DlMetalinkState, &DlMetalinkState::sigFinished, FinishedState, DefaultStateCondition, &DlMetalinkState::transitionToFinished >, Transition< DlMetalinkState, &DlMetalinkState::sigFailed, FinishedState, &DlMetalinkState::toFinalStateCondition, &DlMetalinkState::transitionToFinished >, Transition< DlMetalinkState, &DlMetalinkState::sigFailed, DlNormalFileState, &DlMetalinkState::toSimpleDownloadCondition >, Transition< DlNormalFileState, &DlNormalFileState::sigFinished, FinishedState, DefaultStateCondition, &DlNormalFileState::transitionToFinished >, Transition< DlNormalFileState, &DlNormalFileState::sigFailed, FinishedState, DefaultStateCondition, &DlNormalFileState::transitionToFinished > >
 our known states: InitialState //< initial state before we start downloading DetectMetalinkState //< First attempt to get the zchunk header, but we might receive metalink data instead DlMetaLinkInfoState //< We got Metalink, lets get the full metalink file or we got no zchunk in the first place PrepareMultiState //< Parsing the metalink file and preparing the mirrors DLZckHeadState //< Download the ZChunk Header DLZckState //< Download the File in ZChunk Mode DlMetalinkState //< Download the File in Metalink Mode DlNormalFileState //< Simple Plain download, no chunking FinishedState //< We are done
 

Enumerations

enum class  MetaDataType { None = 0 , Zsync , MetaLink }
 

Functions

 ZYPP_FWD_DECL_TYPE_WITH_REFS (SuseMediaDataVerifier)
 
std::ostream & operator<< (std::ostream &str, const MediaDataVerifierRef &obj)
 
bool provideDebugEnabled ()
 
 ZYPP_FWD_DECL_TYPE_WITH_REFS (ProvideQueue)
 
 ZYPP_FWD_DECL_TYPE_WITH_REFS (ProvideWorker)
 
 ZYPP_FWD_DECL_TYPE_WITH_REFS (ProvideFileItem)
 
 ZYPP_FWD_DECL_TYPE_WITH_REFS (AttachMediaItem)
 
 ZYPP_FWD_DECL_TYPE_WITH_REFS (DetachMediaItem)
 
 ZYPP_FWD_DECL_TYPE_WITH_REFS (ProvideRequest)
 
constexpr std::string_view AGENT_STRING_CONF ("zconfig://media/UserAgent")
 
constexpr std::string_view DISTRO_FLAV_CONF ("zconfig://media/DistributionFlavor")
 
constexpr std::string_view ANON_ID_CONF ("zconfig://media/AnonymousId")
 
constexpr std::string_view ATTACH_POINT ("zconfig://media/AttachPoint")
 
constexpr std::string_view PROVIDER_ROOT ("zconfig://media/ProviderRoot")
 
constexpr std::string_view NETWORK_METALINK_ENABLED ("zypp-nw-metalink-enabled")
 
constexpr std::string_view HANDLER_SPECIFIC_DEVICES ("zypp-req-specific-devices")
 
 ZYPP_IMPL_PRIVATE (Provide)
 
 ZYPP_FWD_DECL_TYPE_WITH_REFS (Provide)
 
 ZYPP_FWD_DECL_TYPE_WITH_REFS (ProvideMediaSpec)
 
 ZYPP_FWD_DECL_TYPE_WITH_REFS (ProvideFileSpec)
 
 ZYPP_FWD_DECL_TYPE_WITH_REFS (ProvideItem)
 
 ZYPP_FWD_DECL_TYPE_WITH_REFS (MediaDataVerifier)
 
 ZYPP_FWD_DECL_TYPE_WITH_REFS (ProvideStatus)
 
static constexpr std::string_view DEFAULT_MEDIA_VERIFIER ("SuseMediaV1")
 
 ZYPP_IMPL_PRIVATE (ProvideItem)
 
static ProvideMessage::FieldVal fieldValFromProto (const zypp::proto::DataField &field)
 
static void fieldValToProto (const ProvideMessage::FieldVal &val, zypp::proto::DataField &field)
 
static expected< void > validateMessage (const ProvideMessage &msg)
 
std::ostream & operator<< (std::ostream &str, const ProvideFileSpec &obj)
 
std::ostream & dumpOn (std::ostream &str, const ProvideFileSpec &obj)
 
 ZYPP_FWD_DECL_TYPE_WITH_REFS (Downloader)
 
 ZYPP_FWD_DECL_TYPE_WITH_REFS (Download)
 
static const std::string & defaultAgentString ()
 
 ZYPP_IMPL_PRIVATE (NetworkRequestError)
 
std::vector< char > peek_data_fd (FILE *fd, off_t offset, size_t count)
 

Variables

constexpr uint penaltyIncrease = 100
 
constexpr uint defaultSampleTime = 2
 
constexpr uint defaultMaxConnections = 5
 
constexpr std::string_view CurlNativeErrorCodeDescKey = "nativeErrorCodeDesc"
 
constexpr std::string_view CurlNativeErrorDescKey = "nativeErrorDesc"
 

Detailed Description

@TODO Fix bsc#1174011 "auth=basic ignored in some cases" for provider We should proactively add the password to the request if basic auth is configured and a password is available in the credentials but not in the URL.

We should be a bit paranoid here and require that the URL has a user embedded, otherwise we go the default route and ask the server first about the auth method

Typedef Documentation

◆ RpcMessageStreamPtr

typedef std::shared_ptr< RpcMessageStream > zyppng::RpcMessageStreamPtr

Definition at line 47 of file provide_p.h.

◆ ProvidePromiseRef

template<typename T >
using zyppng::ProvidePromiseRef = typedef std::shared_ptr<ProvidePromise<T> >

Definition at line 31 of file providefwd_p.h.

◆ ProvidePromiseWeakRef

template<typename T >
using zyppng::ProvidePromiseWeakRef = typedef std::weak_ptr<ProvidePromise<T> >

Definition at line 33 of file providefwd_p.h.

◆ AnyMap

using zyppng::AnyMap = typedef std::unordered_map<std::string, boost::any>

Definition at line 41 of file provide.h.

◆ AuthData

Definition at line 21 of file authdata.h.

◆ AuthData_Ptr

Definition at line 22 of file authdata.h.

◆ NetworkAuthData

Definition at line 24 of file authdata.h.

◆ NetworkAuthData_Ptr

Definition at line 25 of file authdata.h.

◆ TransferSettings

◆ DownloadStatemachine

template<typename Derived >
using zyppng::DownloadStatemachine = typedef Statemachine< Derived, Download::State, Transition< InitialState, &InitialState::sigTransitionToDetectMetalinkState, DetectMetalinkState >, Transition< InitialState, &InitialState::sigTransitionToDlMetaLinkInfoState, DlMetaLinkInfoState >, Transition< InitialState, &InitialState::sigTransitionToDlNormalFileState, DlNormalFileState >, Transition< DetectMetalinkState, &DetectMetalinkState::sigFinished, DlMetaLinkInfoState, &DetectMetalinkState::toMetalinkGuard, &DetectMetalinkState::toDlMetaLinkInfoState >, Transition< DetectMetalinkState, &DetectMetalinkState::sigFinished, DlNormalFileState, &DetectMetalinkState::toSimpleDownloadGuard >, Transition< DlMetaLinkInfoState, &DlMetaLinkInfoState::sigFinished, FinishedState, DefaultStateCondition, &DlMetaLinkInfoState::transitionToFinished >, Transition< DlMetaLinkInfoState, &DlMetaLinkInfoState::sigGotMetadata, PrepareMultiState, DefaultStateCondition, &DlMetaLinkInfoState::transitionToPrepareMulti >, Transition< DlMetaLinkInfoState, &DlMetaLinkInfoState::sigFailed, FinishedState, DefaultStateCondition, &DlMetaLinkInfoState::transitionToFinished >, Transition< PrepareMultiState, &PrepareMultiState::sigFinished, DlMetalinkState, &PrepareMultiState::toMetalinkDownloadGuard , &PrepareMultiState::transitionToMetalinkDl >, Transition< PrepareMultiState, &PrepareMultiState::sigFallback, DlNormalFileState, DefaultStateCondition, &PrepareMultiState::fallbackToNormalTransition >, Transition< PrepareMultiState, &PrepareMultiState::sigFailed, DlNormalFileState >, Transition< DlMetalinkState, &DlMetalinkState::sigFinished, FinishedState, DefaultStateCondition, &DlMetalinkState::transitionToFinished >, Transition< DlMetalinkState, &DlMetalinkState::sigFailed, FinishedState, &DlMetalinkState::toFinalStateCondition, &DlMetalinkState::transitionToFinished >, Transition< DlMetalinkState, &DlMetalinkState::sigFailed, DlNormalFileState, &DlMetalinkState::toSimpleDownloadCondition >, Transition< DlNormalFileState, &DlNormalFileState::sigFinished, FinishedState, DefaultStateCondition, &DlNormalFileState::transitionToFinished >, Transition< DlNormalFileState, &DlNormalFileState::sigFailed, FinishedState, DefaultStateCondition, &DlNormalFileState::transitionToFinished > >

our known states: InitialState //< initial state before we start downloading DetectMetalinkState //< First attempt to get the zchunk header, but we might receive metalink data instead DlMetaLinkInfoState //< We got Metalink, lets get the full metalink file or we got no zchunk in the first place PrepareMultiState //< Parsing the metalink file and preparing the mirrors DLZckHeadState //< Download the ZChunk Header DLZckState //< Download the File in ZChunk Mode DlMetalinkState //< Download the File in Metalink Mode DlNormalFileState //< Simple Plain download, no chunking FinishedState //< We are done

Definition at line 47 of file downloader_p.h.

Enumeration Type Documentation

◆ MetaDataType

enum class zyppng::MetaDataType
strong
Enumerator
None 
Zsync 
MetaLink 

Definition at line 26 of file metalinkinfo_p.h.

Function Documentation

◆ ZYPP_FWD_DECL_TYPE_WITH_REFS() [1/15]

zyppng::ZYPP_FWD_DECL_TYPE_WITH_REFS ( SuseMediaDataVerifier  )

◆ operator<<() [1/2]

std::ostream & zyppng::operator<< ( std::ostream &  str,
const MediaDataVerifierRef &  obj 
)

Definition at line 130 of file mediaverifier.cc.

◆ provideDebugEnabled()

bool zyppng::provideDebugEnabled ( )
inline

Definition at line 28 of file providedbg_p.h.

◆ ZYPP_FWD_DECL_TYPE_WITH_REFS() [2/15]

zyppng::ZYPP_FWD_DECL_TYPE_WITH_REFS ( ProvideQueue  )

◆ ZYPP_FWD_DECL_TYPE_WITH_REFS() [3/15]

zyppng::ZYPP_FWD_DECL_TYPE_WITH_REFS ( ProvideWorker  )

◆ ZYPP_FWD_DECL_TYPE_WITH_REFS() [4/15]

zyppng::ZYPP_FWD_DECL_TYPE_WITH_REFS ( ProvideFileItem  )

◆ ZYPP_FWD_DECL_TYPE_WITH_REFS() [5/15]

zyppng::ZYPP_FWD_DECL_TYPE_WITH_REFS ( AttachMediaItem  )

◆ ZYPP_FWD_DECL_TYPE_WITH_REFS() [6/15]

zyppng::ZYPP_FWD_DECL_TYPE_WITH_REFS ( DetachMediaItem  )

◆ ZYPP_FWD_DECL_TYPE_WITH_REFS() [7/15]

zyppng::ZYPP_FWD_DECL_TYPE_WITH_REFS ( ProvideRequest  )

◆ AGENT_STRING_CONF()

constexpr std::string_view zyppng::AGENT_STRING_CONF ( "zconfig://media/UserAgent"  )
constexpr

◆ DISTRO_FLAV_CONF()

constexpr std::string_view zyppng::DISTRO_FLAV_CONF ( "zconfig://media/DistributionFlavor"  )
constexpr

◆ ANON_ID_CONF()

constexpr std::string_view zyppng::ANON_ID_CONF ( "zconfig://media/AnonymousId"  )
constexpr

◆ ATTACH_POINT()

constexpr std::string_view zyppng::ATTACH_POINT ( "zconfig://media/AttachPoint"  )
constexpr

◆ PROVIDER_ROOT()

constexpr std::string_view zyppng::PROVIDER_ROOT ( "zconfig://media/ProviderRoot"  )
constexpr

◆ NETWORK_METALINK_ENABLED()

constexpr std::string_view zyppng::NETWORK_METALINK_ENABLED ( "zypp-nw-metalink-enabled"  )
constexpr

◆ HANDLER_SPECIFIC_DEVICES()

constexpr std::string_view zyppng::HANDLER_SPECIFIC_DEVICES ( "zypp-req-specific-devices"  )
constexpr

◆ ZYPP_IMPL_PRIVATE() [1/3]

zyppng::ZYPP_IMPL_PRIVATE ( Provide  )

◆ ZYPP_FWD_DECL_TYPE_WITH_REFS() [8/15]

zyppng::ZYPP_FWD_DECL_TYPE_WITH_REFS ( Provide  )

◆ ZYPP_FWD_DECL_TYPE_WITH_REFS() [9/15]

zyppng::ZYPP_FWD_DECL_TYPE_WITH_REFS ( ProvideMediaSpec  )

◆ ZYPP_FWD_DECL_TYPE_WITH_REFS() [10/15]

zyppng::ZYPP_FWD_DECL_TYPE_WITH_REFS ( ProvideFileSpec  )

◆ ZYPP_FWD_DECL_TYPE_WITH_REFS() [11/15]

zyppng::ZYPP_FWD_DECL_TYPE_WITH_REFS ( ProvideItem  )

◆ ZYPP_FWD_DECL_TYPE_WITH_REFS() [12/15]

zyppng::ZYPP_FWD_DECL_TYPE_WITH_REFS ( MediaDataVerifier  )

◆ ZYPP_FWD_DECL_TYPE_WITH_REFS() [13/15]

zyppng::ZYPP_FWD_DECL_TYPE_WITH_REFS ( ProvideStatus  )

◆ DEFAULT_MEDIA_VERIFIER()

static constexpr std::string_view zyppng::DEFAULT_MEDIA_VERIFIER ( "SuseMediaV1"  )
staticconstexpr

◆ ZYPP_IMPL_PRIVATE() [2/3]

zyppng::ZYPP_IMPL_PRIVATE ( ProvideItem  )

◆ fieldValFromProto()

static ProvideMessage::FieldVal zyppng::fieldValFromProto ( const zypp::proto::DataField &  field)
static

Definition at line 18 of file providemessage.cc.

◆ fieldValToProto()

static void zyppng::fieldValToProto ( const ProvideMessage::FieldVal val,
zypp::proto::DataField &  field 
)
static

Definition at line 44 of file providemessage.cc.

◆ validateMessage()

static expected< void > zyppng::validateMessage ( const ProvideMessage msg)
static

Definition at line 60 of file providemessage.cc.

◆ operator<<() [2/2]

std::ostream & zyppng::operator<< ( std::ostream &  str,
const ProvideFileSpec obj 
)

Definition at line 264 of file providespec.cc.

◆ dumpOn()

std::ostream & zyppng::dumpOn ( std::ostream &  str,
const ProvideFileSpec obj 
)

Definition at line 267 of file providespec.cc.

◆ ZYPP_FWD_DECL_TYPE_WITH_REFS() [14/15]

zyppng::ZYPP_FWD_DECL_TYPE_WITH_REFS ( Downloader  )

◆ ZYPP_FWD_DECL_TYPE_WITH_REFS() [15/15]

zyppng::ZYPP_FWD_DECL_TYPE_WITH_REFS ( Download  )

◆ defaultAgentString()

static const std::string & zyppng::defaultAgentString ( )
static

Definition at line 31 of file networkrequestdispatcher.cc.

◆ ZYPP_IMPL_PRIVATE() [3/3]

zyppng::ZYPP_IMPL_PRIVATE ( NetworkRequestError  )

◆ peek_data_fd()

std::vector< char > zyppng::peek_data_fd ( FILE *  fd,
off_t  offset,
size_t  count 
)

Definition at line 57 of file request.cc.

Variable Documentation

◆ penaltyIncrease

constexpr uint zyppng::penaltyIncrease = 100
constexpr

Definition at line 18 of file mirrorcontrol.cc.

◆ defaultSampleTime

constexpr uint zyppng::defaultSampleTime = 2
constexpr

Definition at line 19 of file mirrorcontrol.cc.

◆ defaultMaxConnections

constexpr uint zyppng::defaultMaxConnections = 5
constexpr

Definition at line 20 of file mirrorcontrol.cc.

◆ CurlNativeErrorCodeDescKey

constexpr std::string_view zyppng::CurlNativeErrorCodeDescKey = "nativeErrorCodeDesc"
constexpr

Definition at line 20 of file networkrequesterror.cc.

◆ CurlNativeErrorDescKey

constexpr std::string_view zyppng::CurlNativeErrorDescKey = "nativeErrorDesc"
constexpr

Definition at line 21 of file networkrequesterror.cc.