libzypp: zypp::media Namespace Reference

libzypp 17.38.6

zypp::media Namespace Reference

## Classes
class | MediaCD
| Implementation class for CD/DVD MediaHandler. More...
class | MediaCIFS
| Implementation class for CIFS MediaHandler. More...
class | MediaCurl
| Implementation class for FTP, HTTP and HTTPS MediaHandler. More...
class | MediaCurl2
| Implementation class for FTP, HTTP and HTTPS MediaHandler. More...
class | MediaDIR
| Implementation class for DIR MediaHandler. More...
class | MediaDISK
| Implementation class for DISK MediaHandler. More...
class | MediaHandler
| Abstract base class for 'physical' MediaHandler like MediaCD, etc. More...
class | MediaHandlerFactory
class | MediaISO
| Implementation class for ISO MediaHandler. More...
class | MediaManager_Impl
class | MediaVerifierBase
| Interface to implement a media verifier. More...
class | NoVerifier
| Dummy default media verifier, which is always happy. More...
class | MediaManager
| Manages access to the 'physical' media, e.g CDROM drives, Disk volumes, directory trees, etc, using Media Access Url's. More...
class | MediaNetworkCommonHandler
| Baseclass for MediaCurl. More...
class | MediaNFS
| Implementation class for NFS MediaHandler. More...
class | MediaPlugin
| Implementation class for plugin MediaHandler. More...
class | MediaPriority
| Derive a numeric priority from Url scheme according to zypp.conf(download.media_preference). More...
class | MediaSource
| Media source internally used by MediaManager and MediaHandler. More...
class | AttachPoint
| Attach point of a media source. More...
struct | AttachedMedia
| A simple structure containing references to a media source and its attach point. More...
class | UrlResolverPlugin
struct | MediaChangeReport
class | ScopedDisableMediaChangeReport
| Temporarily disable MediaChangeReport Sometimes helpful to suppress interactive messages connected to MediaChangeReport while fallback URLs are avaialble. More...
struct | DownloadProgressReport
struct | CommitPreloadReport
struct | AuthenticationReport
class | CurlAuthData
| Curl HTTP authentication data. More...
struct | CurlConfig
| Structure holding values of curlrc options. More...
struct | MediaBlock
| a single block from the blocklist, consisting of an offset and a size More...
class | MediaBlockList
struct | transition
struct | ml_parsedata
struct | MetalinkMirror
class | MetaLinkParser
class | ZsyncParser
class | ProxyInfo
struct | TmpUnsetEnv
class | ProxyInfoLibproxy
class | ProxyInfoSysconfig
class | TransferSettings
| Holds transfer setting. More...
class | AuthData
| Class for handling media authentication data. More...
class | CredentialFileReader
| Parse credentials files and catalogs. More...
struct | CredManagerOptions
struct | AuthDataComparator
class | CredentialManager
class | CDTools
class | MediaException
| Just inherits Exception to separate media exceptions. More...
class | MediaMountException
class | MediaUnmountException
class | MediaJammedException
class | MediaBadFilenameException
class | MediaNotOpenException
class | MediaFileNotFoundException
class | MediaWriteException
class | MediaNotAttachedException
class | MediaBadAttachPointException
class | MediaCurlInitException
class | MediaSystemException
class | MediaNotAFileException
class | MediaNotADirException
class | MediaBadUrlException
class | MediaBadUrlEmptyHostException
class | MediaBadUrlEmptyFilesystemException
class | MediaBadUrlEmptyDestinationException
class | MediaUnsupportedUrlSchemeException
class | MediaNotSupportedException
class | MediaCurlException
class | MediaCurlSetOptException
class | MediaNotDesiredException
class | MediaIsSharedException
class | MediaNotEjectedException
class | MediaUnauthorizedException
class | MediaForbiddenException
class | MediaTimeoutException
class | MediaFileSizeExceededException
class | MediaTemporaryProblemException
| For HTTP 503 and similar. More...
class | MediaBadCAException
class | MediaInvalidCredentialsException
class | MediaRequestCancelledException
struct | MountEntry
| A "struct mntent" like mount entry structure, but using std::strings. More...
class | Mount
| Interface to the mount program. More...

## Typedefs
using | MediaNr = unsigned int
using | MediaVerifierRef = zypp::RW_pointer<MediaVerifierBase>
| A shared reference to the MediaVerifier implementation.
using | MediaAccessId = unsigned int
| Media manager access Id type.
using | MediaSourceRef = zypp::RW_pointer<MediaSource>
using | AttachPointRef = zypp::RW_pointer<AttachPoint>
using | CurlAuthData_Ptr = shared_ptr<CurlAuthData>
template<typename ProxyFactoryType>
using | CreateFactorySig = ProxyFactoryType *(*) (void)
template<typename ProxyFactoryType>
using | DelFactorySig = void (*) (ProxyFactoryType *self)
template<typename ProxyFactoryType>
using | GetProxiesSig = char **(*) (ProxyFactoryType *self, const char *url)
using | FreeProxiesCb = void (*) (char **proxies)
using | AuthData_Ptr = shared_ptr<AuthData>
using | MountEntries = std::vector<MountEntry>
| relates: MountEntry A vector of mount entries.

## Enumerations
enum class | MetaDataType { None = 0 , Zsync , MetaLink }
enum | ParserState { STATE_START , STATE_METALINK , STATE_FILES , STATE_FILE , STATE_M4FILE , STATE_SIZE , STATE_M4SIZE , STATE_VERIFICATION , STATE_HASH , STATE_M4HASH , STATE_PIECES , STATE_M4PIECES , STATE_PHASH , STATE_M4PHASH , STATE_RESOURCES , STATE_URL , STATE_M4URL , NUMSTATES }

## Functions
std::string | getShare (const Pathname &spath_r)
Pathname | stripShare (const Pathname &spath_r)
| ZYPP_DECLARE_OPERATORS_FOR_FLAGS (MediaCurl2::RequestOptions)
std::ostream & | operator<< (std::ostream &str, const MediaHandler &obj)
std::ostream & | operator<< (std::ostream &str, const AttachPoint &obj)
| relates: AttachPoint Stream output
std::ostream & | operator<< (std::ostream &str, const AttachedMedia &obj)
| relates: AttachedMedia Stream output
std::ostream & | operator<< (std::ostream &str, const MediaSource &obj)
| relates: MediaSource Stream output
std::ostream & | operator<< (std::ostream &str, const UrlResolverPlugin::Impl &obj)
| relates: UrlResolverPlugin::Impl Stream output
std::ostream & | operator<< (std::ostream &str, const UrlResolverPlugin &obj)
| relates: UrlResolverPlugin Stream output
std::ostream & | operator<< (std::ostream &str, const CurlAuthData &auth_data)
static size_t | fetchnext (FILE *fp, unsigned char *bp, size_t blksize, size_t pushback, unsigned char *pushbackp)
std::ostream & | operator<< (std::ostream &str, const MediaBlockList &bl)
MetaDataType | looks_like_meta_data (const std::vector< char > &data)
MetaDataType | looks_like_meta_file (const Pathname &file)
MetaDataType | looks_like_meta_file (FILE *file)
const std::unordered_map< ParserState, std::vector< transition > > & | transitions ()
static void XMLCALL | startElement (void *userData, const xmlChar *name, const xmlChar **atts)
static void XMLCALL | endElement (void *userData, const xmlChar *name)
static void XMLCALL | characterData (void *userData, const xmlChar *s, int len)
static void XMLCALL | parseError (void *userData, const xmlError *error)
static const char * | find_attr (const char *txt, const xmlChar **atts)
| Look up a xml attribute in the passed array atts.
UByteArray | hexstr2bytes (const std::string &str)
static int | hexstr2bytes (unsigned char *buf, const char *str, int buflen)
static pxProxyFactoryType * | getProxyFactory ()
std::ostream & | dumpOn (std::ostream &str, const TransferSettings &obj)
| relates: TransferSettings
std::ostream & | operator<< (std::ostream &str, const AuthData &auth_data)
static int | save_creds_in_file (CredentialManager::CredentialSet &creds, const Pathname &file, const mode_t mode)
std::ostream & | operator<< (std::ostream &str, const MountEntry &obj)
| relates: MountEntry Stream output

## Variables
constexpr auto | minMetalinkProbeSize = 256

## Typedef Documentation

## ◆ MediaNr

using zypp::media::MediaNr = unsigned int

Definition at line 32 of file MediaManager.h.

## ◆ MediaVerifierRef

using zypp::media::MediaVerifierRef = zypp::RW_pointer<MediaVerifierBase>

A shared reference to the MediaVerifier implementation.

Definition at line 107 of file MediaManager.h.

## ◆ MediaAccessId

using zypp::media::MediaAccessId = unsigned int

Media manager access Id type.

Definition at line 30 of file MediaSource.h.

## ◆ MediaSourceRef

using zypp::media::MediaSourceRef = zypp::RW_pointer<MediaSource>

Definition at line 125 of file MediaSource.h.

## ◆ AttachPointRef

using zypp::media::AttachPointRef = zypp::RW_pointer<AttachPoint>

Definition at line 126 of file MediaSource.h.

## ◆ CurlAuthData_Ptr

using zypp::media::CurlAuthData_Ptr = shared_ptr<CurlAuthData>

Definition at line 102 of file curlauthdata.h.

## ◆ CreateFactorySig

template<typename ProxyFactoryType>

using zypp::media::CreateFactorySig = ProxyFactoryType *(*) (void)

Definition at line 29 of file proxyinfolibproxy.h.

## ◆ DelFactorySig

template<typename ProxyFactoryType>

using zypp::media::DelFactorySig = void (*) (ProxyFactoryType *self)

Definition at line 32 of file proxyinfolibproxy.h.

## ◆ GetProxiesSig

template<typename ProxyFactoryType>

using zypp::media::GetProxiesSig = char **(*) (ProxyFactoryType *self, const char *url)

Definition at line 35 of file proxyinfolibproxy.h.

## ◆ FreeProxiesCb

using zypp::media::FreeProxiesCb = void (*) (char **proxies)

Definition at line 37 of file proxyinfolibproxy.h.

## ◆ AuthData_Ptr

using zypp::media::AuthData_Ptr = shared_ptr<AuthData>

Definition at line 81 of file authdata.h.

## ◆ MountEntries

using zypp::media::MountEntries = std::vector<MountEntry>

relates: MountEntry A vector of mount entries.

Definition at line 67 of file mount.h.

## Enumeration Type Documentation

## ◆ MetaDataType

enum class zypp::media::MetaDataType
| strong

Enumerator
None |
Zsync |
MetaLink |

Definition at line 24 of file metadatahelper.h.

## ◆ ParserState

enum zypp::media::ParserState

Enumerator
STATE_START |
STATE_METALINK |
STATE_FILES |
STATE_FILE |
STATE_M4FILE |
STATE_SIZE |
STATE_M4SIZE |
STATE_VERIFICATION |
STATE_HASH |
STATE_M4HASH |
STATE_PIECES |
STATE_M4PIECES |
STATE_PHASH |
STATE_M4PHASH |
STATE_RESOURCES |
STATE_URL |
STATE_M4URL |
NUMSTATES |

Definition at line 41 of file metalinkparser.cc.

## Function Documentation

## ◆ getShare()

std::string zypp::media::getShare | ( | const Pathname & | spath_r | ) |
| inline

Definition at line 46 of file MediaCIFS.cc.

## ◆ stripShare()

Pathname zypp::media::stripShare | ( | const Pathname & | spath_r | ) |
| inline

Definition at line 74 of file MediaCIFS.cc.

## ◆ ZYPP_DECLARE_OPERATORS_FOR_FLAGS()

zypp::media::ZYPP_DECLARE_OPERATORS_FOR_FLAGS | ( | MediaCurl2::RequestOptions |  | ) |

## ◆ operator<<() [1/10]

std::ostream & zypp::media::operator<< | ( | std::ostream & | str,
|  | const MediaHandler & | obj )

Definition at line 1181 of file MediaHandler.cc.

## ◆ operator<<() [2/10]

std::ostream & zypp::media::operator<< | ( | std::ostream & | str,
|  | const AttachPoint & | obj )

relates: AttachPoint Stream output

Definition at line 18 of file MediaSource.cc.

## ◆ operator<<() [3/10]

std::ostream & zypp::media::operator<< | ( | std::ostream & | str,
|  | const AttachedMedia & | obj )

relates: AttachedMedia Stream output

Definition at line 23 of file MediaSource.cc.

## ◆ operator<<() [4/10]

std::ostream & zypp::media::operator<< | ( | std::ostream & | str,
|  | const MediaSource & | obj )
| inline

relates: MediaSource Stream output

Definition at line 99 of file MediaSource.h.

## ◆ operator<<() [5/10]

std::ostream & zypp::media::operator<< | ( | std::ostream & | str,
|  | const UrlResolverPlugin::Impl & | obj )
| inline

relates: UrlResolverPlugin::Impl Stream output

Definition at line 84 of file UrlResolverPlugin.cc.

## ◆ operator<<() [6/10]

std::ostream & zypp::media::operator<< | ( | std::ostream & | str,
|  | const UrlResolverPlugin & | obj )

relates: UrlResolverPlugin Stream output

Definition at line 92 of file UrlResolverPlugin.cc.

## ◆ operator<<() [7/10]

std::ostream & zypp::media::operator<< | ( | std::ostream & | str,
|  | const CurlAuthData & | auth_data )

Definition at line 123 of file curlauthdata.cc.

## ◆ fetchnext()

size_t zypp::media::fetchnext | ( | FILE * | fp,
|  | unsigned char * | bp,
|  | size_t | blksize,
|  | size_t | pushback,
|  | unsigned char * | pushbackp )
| static

Definition at line 415 of file mediablocklist.cc.

## ◆ operator<<() [8/10]

std::ostream & zypp::media::operator<< | ( | std::ostream & | str,
|  | const MediaBlockList & | bl )
| inline

Definition at line 158 of file mediablocklist.h.

## ◆ looks_like_meta_data()

MetaDataType zypp::media::looks_like_meta_data | ( | const std::vector< char > & | data | ) |

Definition at line 16 of file metadatahelper.cc.

## ◆ looks_like_meta_file() [1/2]

MetaDataType zypp::media::looks_like_meta_file | ( | const Pathname & | file | ) |

Definition at line 46 of file metadatahelper.cc.

## ◆ looks_like_meta_file() [2/2]

MetaDataType zypp::media::looks_like_meta_file | ( | FILE * | file | ) |

Definition at line 52 of file metadatahelper.cc.

## ◆ transitions()

const std::unordered_map< ParserState, std::vector< transition > > & zypp::media::transitions | ( |  | ) |

Returns a map of all state transitions that are supported. Key of the map is the current state, the value is a list of all supported transitions of the the current state.

Definition at line 73 of file metalinkparser.cc.

## ◆ startElement()

void XMLCALL zypp::media::startElement | ( | void * | userData,
|  | const xmlChar * | name,
|  | const xmlChar ** | atts )
| static

Definition at line 234 of file metalinkparser.cc.

## ◆ endElement()

void XMLCALL zypp::media::endElement | ( | void * | userData,
|  | const xmlChar * | name )
| static

Definition at line 359 of file metalinkparser.cc.

## ◆ characterData()

void XMLCALL zypp::media::characterData | ( | void * | userData,
|  | const xmlChar * | s,
|  | int | len )
| static

Definition at line 422 of file metalinkparser.cc.

## ◆ parseError()

void XMLCALL zypp::media::parseError | ( | void * | userData,
|  | const xmlError * | error )
| static

Definition at line 433 of file metalinkparser.cc.

## ◆ find_attr()

const char * zypp::media::find_attr | ( | const char * | txt,
|  | const xmlChar ** | atts )
| static

Look up a xml attribute in the passed array atts.

Returns a pointer to the value of the attribute if one is found, otherwise nullptr.

Definition at line 219 of file metalinkparser.cc.

## ◆ hexstr2bytes() [1/2]

UByteArray zypp::media::hexstr2bytes | ( | const std::string & | str | ) |

Definition at line 353 of file metalinkparser.cc.

## ◆ hexstr2bytes() [2/2]

int zypp::media::hexstr2bytes | ( | unsigned char * | buf,
|  | const char * | str,
|  | int | buflen )
| static

Definition at line 52 of file zsyncparser.cc.

## ◆ getProxyFactory()

pxProxyFactoryType * zypp::media::getProxyFactory | ( |  | ) |
| static

Definition at line 128 of file proxyinfolibproxy.cc.

## ◆ dumpOn()

std::ostream & zypp::media::dumpOn | ( | std::ostream & | str,
|  | const TransferSettings & | obj )

relates: TransferSettings

Definition at line 337 of file transfersettings.cc.

## ◆ operator<<() [9/10]

std::ostream & zypp::media::operator<< | ( | std::ostream & | str,
|  | const AuthData & | auth_data )

Definition at line 89 of file authdata.cc.

## ◆ save_creds_in_file()

int zypp::media::save_creds_in_file | ( | CredentialManager::CredentialSet & | creds,
|  | const Pathname & | file,
|  | const mode_t | mode )
| static

Definition at line 274 of file credentialmanager.cc.

## ◆ operator<<() [10/10]

std::ostream & zypp::media::operator<< | ( | std::ostream & | str,
|  | const MountEntry & | obj )

relates: MountEntry Stream output

Definition at line 40 of file mount.cc.

## Variable Documentation

## ◆ minMetalinkProbeSize

auto zypp::media::minMetalinkProbeSize = 256
| constexpr

Definition at line 30 of file metadatahelper.h.