libzypp  17.8.0
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  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  MediaAccess
 Handle access to a medium. More...
 
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  MediaISO
 Implementation class for ISO MediaHandler. More...
 
class  MediaIsSharedException
 
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  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  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
 
class  MetaLinkParser
 
struct  ml_parsedata
 
struct  ml_url
 
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  stateswitch
 
struct  TmpUnsetEnv
 
class  TransferSettings
 Holds transfer setting. More...
 
class  UrlResolverPlugin
 
class  ZsyncParser
 

Typedefs

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

Enumerations

enum  state {
  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

static AuthData_Ptr findIn (const CredentialManager::CredentialSet &set, const Url &url, url::ViewOption vopt)
 
static int save_creds_in_file (const CredentialManager::CredentialSet creds, const Pathname &file, const mode_t mode)
 
std::ostream & operator<< (std::ostream &str, const MediaAccess &obj)
 
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)
 
string getShare (Pathname spath_r)
 
Pathname stripShare (Pathname spath_r)
 
void fillSettingsFromUrl (const Url &url, TransferSettings &s)
 Fills the settings structure using options passed on the url for example ?timeout=x&proxy=foo. More...
 
void fillSettingsSystemProxy (const Url &url, TransferSettings &s)
 Reads the system proxy configuration and fills the settings structure proxy information. More...
 
static const char *const anonymousIdHeader ()
 initialized only once, this gets the anonymous id from the target, which we pass in the http header More...
 
static const char *const distributionFlavorHeader ()
 initialized only once, this gets the distribution flavor from the target, which we pass in the http header More...
 
static const char *const agentString ()
 initialized only once, this gets the agent string which also includes the curl version More...
 
 ZYPP_DECLARE_OPERATORS_FOR_FLAGS (MediaCurl::RequestOptions)
 
ostream & operator<< (ostream &str, const MediaHandler &obj)
 
static double currentTime ()
 
static bool env_isset (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 AuthData &auth_data)
 
std::ostream & operator<< (std::ostream &str, const CurlAuthData &auth_data)
 
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)
 
static int hexstr2bytes (unsigned char *buf, const char *str, int buflen)
 
static bool urlcmp (const ml_url &a, const ml_url &b)
 
std::ostream & operator<< (std::ostream &str, const MountEntry &obj)
 
static pxProxyFactory * getProxyFactory ()
 
std::ostream & operator<< (std::ostream &str, const UrlResolverPlugin &obj)
 
static int hexstr2bytes (unsigned char *buf, const char *str, int buflen)
 

Variables

static struct stateswitch stateswitches []
 

Typedef Documentation

◆ MediaAccessRef

◆ MediaId

Definition at line 39 of file MediaManager.h.

◆ MediaNr

typedef unsigned int zypp::media::MediaNr

Definition at line 40 of file MediaManager.h.

◆ MediaVerifierRef

A shared reference to the MediaVerifier implementation.

Definition at line 124 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 69 of file MediaUserAuth.h.

◆ CurlAuthData_Ptr

Enumeration Type Documentation

◆ state

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 34 of file MetaLinkParser.cc.

Function Documentation

◆ findIn()

static AuthData_Ptr zypp::media::findIn ( const CredentialManager::CredentialSet set,
const Url url,
url::ViewOption  vopt 
)
static

Definition at line 173 of file CredentialManager.cc.

◆ save_creds_in_file()

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

Definition at line 246 of file CredentialManager.cc.

◆ operator<<() [1/9]

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

Definition at line 482 of file MediaAccess.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 248 of file MediaBlockList.cc.

◆ operator<<() [2/9]

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

Definition at line 144 of file MediaBlockList.h.

◆ getShare()

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.

◆ fillSettingsFromUrl()

void zypp::media::fillSettingsFromUrl ( const Url url,
TransferSettings s 
)

Fills the settings structure using options passed on the url for example ?timeout=x&proxy=foo.

Definition at line 325 of file MediaCurl.cc.

◆ fillSettingsSystemProxy()

void zypp::media::fillSettingsSystemProxy ( const Url url,
TransferSettings s 
)

Reads the system proxy configuration and fills the settings structure proxy information.

Definition at line 462 of file MediaCurl.cc.

◆ anonymousIdHeader()

static const char* const zypp::media::anonymousIdHeader ( )
static

initialized only once, this gets the anonymous id from the target, which we pass in the http header

Definition at line 490 of file MediaCurl.cc.

◆ distributionFlavorHeader()

static const char* const zypp::media::distributionFlavorHeader ( )
static

initialized only once, this gets the distribution flavor from the target, which we pass in the http header

Definition at line 508 of file MediaCurl.cc.

◆ agentString()

static const char* const zypp::media::agentString ( )
static

initialized only once, this gets the agent string which also includes the curl version

Definition at line 526 of file MediaCurl.cc.

◆ ZYPP_DECLARE_OPERATORS_FOR_FLAGS()

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

◆ operator<<() [3/9]

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

Definition at line 1219 of file MediaHandler.cc.

◆ currentTime()

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

Definition at line 170 of file MediaMultiCurl.cc.

◆ env_isset()

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

Definition at line 418 of file MediaMultiCurl.cc.

◆ looks_like_metalink_fd()

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

Definition at line 1207 of file MediaMultiCurl.cc.

◆ looks_like_metalink()

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

Definition at line 1232 of file MediaMultiCurl.cc.

◆ operator<<() [4/9]

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

Definition at line 18 of file MediaSource.cc.

◆ operator<<() [5/9]

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

Definition at line 23 of file MediaSource.cc.

◆ operator<<() [6/9]

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

Definition at line 163 of file MediaUserAuth.cc.

◆ operator<<() [7/9]

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

Definition at line 169 of file MediaUserAuth.cc.

◆ startElement()

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

Definition at line 192 of file MetaLinkParser.cc.

◆ endElement()

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

Definition at line 330 of file MetaLinkParser.cc.

◆ characterData()

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

Definition at line 400 of file MetaLinkParser.cc.

◆ find_attr()

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

Definition at line 177 of file MetaLinkParser.cc.

◆ hexstr2bytes() [1/2]

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

Definition at line 305 of file MetaLinkParser.cc.

◆ urlcmp()

static bool zypp::media::urlcmp ( const ml_url a,
const ml_url b 
)
static

Definition at line 461 of file MetaLinkParser.cc.

◆ operator<<() [8/9]

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

Definition at line 39 of file Mount.cc.

◆ getProxyFactory()

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

Definition at line 57 of file ProxyInfoLibproxy.cc.

◆ operator<<() [9/9]

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

Definition at line 92 of file UrlResolverPlugin.cc.

◆ hexstr2bytes() [2/2]

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

Definition at line 39 of file ZsyncParser.cc.

Variable Documentation

◆ stateswitches

struct stateswitch zypp::media::stateswitches[]
static
Initial value:
= {
{ STATE_START, "metalink", STATE_METALINK, 0 },
{ STATE_METALINK, "files", STATE_FILES, 0 },
{ STATE_METALINK, "file", STATE_M4FILE, 0 },
{ STATE_FILES, "file", STATE_FILE, 0 },
{ STATE_FILE, "size", STATE_SIZE, 1 },
{ STATE_FILE, "verification", STATE_VERIFICATION, 0 },
{ STATE_FILE, "resources", STATE_RESOURCES, 0 },
{ STATE_VERIFICATION, "hash", STATE_HASH, 1 },
{ STATE_VERIFICATION, "pieces", STATE_PIECES, 0 },
{ STATE_PIECES, "hash", STATE_PHASH, 1 },
{ STATE_RESOURCES, "url", STATE_URL, 1 },
{ STATE_M4FILE, "size", STATE_M4SIZE, 1 },
{ STATE_M4FILE, "hash", STATE_M4HASH, 1},
{ STATE_M4FILE, "url", STATE_M4URL, 1},
{ STATE_M4FILE, "pieces", STATE_M4PIECES, 0},
{ STATE_M4PIECES, "hash", STATE_M4PHASH, 1 },
}

Definition at line 62 of file MetaLinkParser.cc.