libzypp 17.31.23
zypp::media Namespace Reference

Classes

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

Typedefs

typedef unsigned int MediaNr
 
typedef zypp::RW_pointer< MediaVerifierBaseMediaVerifierRef
 A shared reference to the MediaVerifier implementation.
 
typedef unsigned int MediaAccessId
 Media manager access Id type.
 
typedef zypp::RW_pointer< MediaSourceMediaSourceRef
 
typedef zypp::RW_pointer< AttachPointAttachPointRef
 
typedef shared_ptr< AuthDataAuthData_Ptr
 
typedef shared_ptr< CurlAuthDataCurlAuthData_Ptr
 

Enumerations

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 (Pathname spath_r)
 
Pathname stripShare (Pathname spath_r)
 
 ZYPP_DECLARE_OPERATORS_FOR_FLAGS (MediaCurl::RequestOptions)
 
std::ostream & operator<< (std::ostream &str, const MediaHandler &obj)
 
static double currentTime ()
 
static bool env_isset (std::string name)
 
static bool looks_like_metalink_fd (int fd)
 
static bool looks_like_metalink (const Pathname &file)
 
std::ostream & operator<< (std::ostream &str, const AttachPoint &obj)
 
std::ostream & operator<< (std::ostream &str, const AttachedMedia &obj)
 
std::ostream & operator<< (std::ostream &str, const UrlResolverPlugin &obj)
 
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)
 
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)
 
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 const char * find_attr (const char *txt, const xmlChar **atts)
 Look up a xml attribute in the passed array atts.
 
UByteArray hexstr2bytes (std::string str)
 
static int hexstr2bytes (unsigned char *buf, const char *str, int buflen)
 
static pxProxyFactory * getProxyFactory ()
 

Variables

constexpr auto MIN_REQ_MIRRS = 4
 
constexpr auto MAXURLS = 10
 

Typedef Documentation

◆ MediaNr

typedef unsigned int zypp::media::MediaNr

Definition at line 32 of file MediaManager.h.

◆ MediaVerifierRef

A shared reference to the MediaVerifier implementation.

Definition at line 107 of file MediaManager.h.

◆ MediaAccessId

typedef unsigned int zypp::media::MediaAccessId

Media manager access Id type.

Definition at line 29 of file MediaSource.h.

◆ MediaSourceRef

◆ AttachPointRef

◆ AuthData_Ptr

Definition at line 79 of file authdata.h.

◆ CurlAuthData_Ptr

Enumeration Type Documentation

◆ 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 40 of file metalinkparser.cc.

Function Documentation

◆ getShare()

std::string zypp::media::getShare ( Pathname  spath_r)
inline

Definition at line 46 of file MediaCIFS.cc.

◆ stripShare()

Pathname zypp::media::stripShare ( Pathname  spath_r)
inline

Definition at line 74 of file MediaCIFS.cc.

◆ ZYPP_DECLARE_OPERATORS_FOR_FLAGS()

zypp::media::ZYPP_DECLARE_OPERATORS_FOR_FLAGS ( MediaCurl::RequestOptions  )

◆ operator<<() [1/8]

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

Definition at line 1180 of file MediaHandler.cc.

◆ currentTime()

static double zypp::media::currentTime ( )
static

Definition at line 176 of file MediaMultiCurl.cc.

◆ env_isset()

static bool zypp::media::env_isset ( std::string  name)
inlinestatic

Definition at line 424 of file MediaMultiCurl.cc.

◆ looks_like_metalink_fd()

static bool zypp::media::looks_like_metalink_fd ( int  fd)
static

Definition at line 1226 of file MediaMultiCurl.cc.

◆ looks_like_metalink()

static bool zypp::media::looks_like_metalink ( const Pathname file)
static

Definition at line 1251 of file MediaMultiCurl.cc.

◆ operator<<() [2/8]

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

Definition at line 18 of file MediaSource.cc.

◆ operator<<() [3/8]

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

Definition at line 23 of file MediaSource.cc.

◆ operator<<() [4/8]

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

Definition at line 92 of file UrlResolverPlugin.cc.

◆ operator<<() [5/8]

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

Definition at line 89 of file authdata.cc.

◆ save_creds_in_file()

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

Definition at line 268 of file credentialmanager.cc.

◆ operator<<() [6/8]

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

Definition at line 40 of file mount.cc.

◆ operator<<() [7/8]

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

Definition at line 123 of file curlauthdata.cc.

◆ fetchnext()

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

Definition at line 414 of file mediablocklist.cc.

◆ operator<<() [8/8]

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

Definition at line 158 of file mediablocklist.h.

◆ 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 72 of file metalinkparser.cc.

◆ startElement()

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

Definition at line 218 of file metalinkparser.cc.

◆ endElement()

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

Definition at line 343 of file metalinkparser.cc.

◆ characterData()

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

Definition at line 406 of file metalinkparser.cc.

◆ find_attr()

static 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 203 of file metalinkparser.cc.

◆ hexstr2bytes() [1/2]

UByteArray zypp::media::hexstr2bytes ( std::string  str)

Definition at line 337 of file metalinkparser.cc.

◆ hexstr2bytes() [2/2]

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

Definition at line 52 of file zsyncparser.cc.

◆ getProxyFactory()

static pxProxyFactory * zypp::media::getProxyFactory ( )
static

Definition at line 57 of file proxyinfolibproxy.cc.

Variable Documentation

◆ MIN_REQ_MIRRS

constexpr auto zypp::media::MIN_REQ_MIRRS = 4
constexpr

Definition at line 170 of file MediaMultiCurl.cc.

◆ MAXURLS

constexpr auto zypp::media::MAXURLS = 10
constexpr

Definition at line 171 of file MediaMultiCurl.cc.