#include <iostream>
#include <list>
#include "zypp/base/Logger.h"
#include "zypp/ExternalProgram.h"
#include "zypp/base/String.h"
#include "zypp/base/Gettext.h"
#include "zypp/base/Sysconfig.h"
#include "zypp/media/MediaCurl.h"
#include "zypp/media/proxyinfo/ProxyInfos.h"
#include "zypp/media/ProxyInfo.h"
#include "zypp/media/MediaUserAuth.h"
#include "zypp/media/CredentialManager.h"
#include "zypp/media/CurlConfig.h"
#include "zypp/thread/Once.h"
#include "zypp/Target.h"
#include "zypp/ZYppFactory.h"
#include <cstdlib>
#include <sys/types.h>
#include <sys/stat.h>
#include <sys/mount.h>
#include <errno.h>
#include <dirent.h>
#include <unistd.h>
#include <boost/format.hpp>
Go to the source code of this file.
Namespaces | |
namespace | zypp |
Easy-to use interface to the ZYPP dependency resolver. | |
namespace | zypp::media |
Defines | |
#define | DETECT_DIR_INDEX 0 |
#define | CONNECT_TIMEOUT 60 |
#define | TRANSFER_TIMEOUT 60 * 3 |
#define | TRANSFER_TIMEOUT_MAX 60 * 60 |
#define | SET_OPTION(opt, val) |
#define | SET_OPTION_OFFT(opt, val) SET_OPTION(opt,(curl_off_t)val) |
#define | SET_OPTION_LONG(opt, val) SET_OPTION(opt,(LONG)val) |
#define | SET_OPTION_VOID(opt, val) SET_OPTION(opt,(void*)val) |
Functions | |
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. | |
void | zypp::media::fillSettingsSystemProxy (const Url &url, TransferSettings &s) |
Reads the system proxy configuration and fills the settings structure proxy information. | |
static const char *const | zypp::media::anonymousIdHeader () |
initialized only once, this gets the anonymous id from the target, which we pass in the http header | |
static const char *const | zypp::media::distributionFlavorHeader () |
initialized only once, this gets the distribution flavor from the target, which we pass in the http header | |
static const char *const | zypp::media::agentString () |
initialized only once, this gets the agent string which also includes the curl version | |
static Url | zypp::media::getFileUrl (const Url &url, const Pathname &filename) |
Definition in file MediaCurl.cc.
#define DETECT_DIR_INDEX 0 |
Definition at line 42 of file MediaCurl.cc.
#define CONNECT_TIMEOUT 60 |
Definition at line 43 of file MediaCurl.cc.
#define TRANSFER_TIMEOUT 60 * 3 |
Definition at line 44 of file MediaCurl.cc.
#define TRANSFER_TIMEOUT_MAX 60 * 60 |
Definition at line 45 of file MediaCurl.cc.
#define SET_OPTION | ( | opt, | |||
val | ) |
do { \ ret = curl_easy_setopt ( _curl, opt, val ); \ if ( ret != 0) { \ disconnectFrom(); \ ZYPP_THROW(MediaCurlSetOptException(_url, _curlError)); \ } \ } while ( false )
Definition at line 371 of file MediaCurl.cc.
Referenced by zypp::media::MediaCurl::attachTo().
#define SET_OPTION_OFFT | ( | opt, | |||
val | ) | SET_OPTION(opt,(curl_off_t)val) |
Definition at line 379 of file MediaCurl.cc.
Referenced by zypp::media::MediaCurl::attachTo().
#define SET_OPTION_LONG | ( | opt, | |||
val | ) | SET_OPTION(opt,(LONG)val) |
Definition at line 380 of file MediaCurl.cc.
#define SET_OPTION_VOID | ( | opt, | |||
val | ) | SET_OPTION(opt,(void*)val) |
Definition at line 381 of file MediaCurl.cc.
long timeout |
Definition at line 171 of file MediaCurl.cc.
bool reached |
Definition at line 172 of file MediaCurl.cc.
callback::SendReport<DownloadProgressReport>* report |
Definition at line 173 of file MediaCurl.cc.
Referenced by zypp::RepoManager::addRepository(), zypp::RepoManager::buildCache(), zypp::target::rpm::convertV3toV4(), zypp::media::MediaCurl::getFileCopy(), zypp::media::MediaAria2c::getFileCopy(), zypp::target::rpm::RpmDb::installPackage(), zypp::Locks::merge(), zypp::ChecksumFileChecker::operator()(), zypp::MediaSetAccess::provide(), zypp::target::rpm::RpmDb::rebuildDatabase(), zypp::Locks::removeEmpty(), zypp::RepoManager::removeRepository(), zypp::Locks::save(), and zypp::KeyRing::Impl::verifyFileSignatureWorkflow().
double drate_period |
Definition at line 175 of file MediaCurl.cc.
double dload_period |
Definition at line 177 of file MediaCurl.cc.
long secs |
Definition at line 179 of file MediaCurl.cc.
double drate_avg |
Definition at line 181 of file MediaCurl.cc.
time_t ltime |
Definition at line 183 of file MediaCurl.cc.
double dload |
Definition at line 185 of file MediaCurl.cc.
double uload |
Definition at line 187 of file MediaCurl.cc.
Definition at line 188 of file MediaCurl.cc.
Referenced by zypp::url::UrlBase::asString(), zypp::repo::PackageProvider::doProvidePackage(), zypp::MediaSetAccess::getMediaAccessId(), zypp::Url::operator=(), zypp::Url::parseUrl(), zypp::repo::RepoMediaAccess::provideFile(), zypp::repo::PackageProvider::providePackage(), zypp::RepoManager::refreshMetadata(), zypp::RepoManager::refreshService(), zypp::MediaSetAccess::rewriteUrl(), zypp::Url::setScheme(), and zypp::Product::urls().