zypp::media::MediaCurl Class Reference

Implementation class for FTP, HTTP and HTTPS MediaHandler. More...

#include <MediaCurl.h>

Inheritance diagram for zypp::media::MediaCurl:

zypp::media::MediaHandler List of all members.

Public Member Functions

 MediaCurl (const Url &url_r, const Pathname &attach_point_hint_r)
virtual ~MediaCurl ()

Static Public Member Functions

static void setCookieFile (const Pathname &)

Protected Member Functions

virtual void disconnectFrom ()
 
Exceptions:
MediaException 

virtual void getFileCopy (const Pathname &srcFilename, const Pathname &targetFilename) const
 
Exceptions:
MediaException 

virtual void doGetFileCopy (const Pathname &srcFilename, const Pathname &targetFilename, callback::SendReport< DownloadProgressReport > &_report) const
 
Exceptions:
MediaException 

virtual bool checkAttachPoint (const Pathname &apoint) const
 Verify if the specified directory as attach point (root) as requires by the particular media handler implementation.

Static Protected Member Functions

static int progressCallback (void *clientp, double dltotal, double dlnow, double ultotal, double ulnow)

Protected Attributes

 MEDIA_HANDLER_API

Private Attributes

CURL * _curl
char _curlError [CURL_ERROR_SIZE]
std::string _userpwd
std::string _proxy
std::string _proxyuserpwd
std::string _currentCookieFile
std::string _ca_path
long _xfer_timeout

Static Private Attributes

static Pathname _cookieFile = "/var/lib/YaST2/cookies"
static std::string _agent = "Novell ZYPP Installer"

Classes

class  Callbacks

Detailed Description

Implementation class for FTP, HTTP and HTTPS MediaHandler.

See also:
MediaHandler

Definition at line 30 of file MediaCurl.h.


Constructor & Destructor Documentation

zypp::media::MediaCurl::MediaCurl const Url url_r,
const Pathname attach_point_hint_r
 

Definition at line 139 of file MediaCurl.cc.

References _curlError, zypp::filesystem::Pathname::asString(), zypp::media::MediaHandler::attachPoint(), zypp::Url::getScheme(), globalInitOnce(), zypp::filesystem::PathInfo::isDir(), MIL, zypp::filesystem::PathInfo::path(), zypp::filesystem::rmdir(), zypp::media::MediaHandler::setAttachPoint(), zypp::filesystem::PathInfo::userMayRWX(), and WAR.

virtual zypp::media::MediaCurl::~MediaCurl  )  [inline, virtual]
 

Definition at line 63 of file MediaCurl.h.

References zypp::media::MediaHandler::release().


Member Function Documentation

void zypp::media::MediaCurl::disconnectFrom  )  [protected, virtual]
 

Exceptions:
MediaException 

Reimplemented from zypp::media::MediaHandler.

Definition at line 638 of file MediaCurl.cc.

void zypp::media::MediaCurl::getFileCopy const Pathname srcFilename,
const Pathname targetFilename
const [protected, virtual]
 

Exceptions:
MediaException 

Reimplemented from zypp::media::MediaHandler.

Definition at line 675 of file MediaCurl.cc.

References zypp::media::MediaHandler::_url, doGetFileCopy(), zypp::Exception::msg(), zypp::media::DownloadProgressReport::NO_ERROR, zypp::media::DownloadProgressReport::NOT_FOUND, report, zypp::media::MediaHandler::url(), and ZYPP_RETHROW.

void zypp::media::MediaCurl::doGetFileCopy const Pathname srcFilename,
const Pathname targetFilename,
callback::SendReport< DownloadProgressReport > &  _report
const [protected, virtual]
 

Exceptions:
MediaException 

Definition at line 694 of file MediaCurl.cc.

References zypp::media::MediaHandler::_url, zypp::filesystem::Pathname::absolute(), zypp::filesystem::Pathname::asString(), DBG, zypp::Url::getHost(), zypp::Url::getPathName(), zypp::Url::isValid(), and ZYPP_THROW.

Referenced by getFileCopy().

bool zypp::media::MediaCurl::checkAttachPoint const Pathname apoint  )  const [protected, virtual]
 

Verify if the specified directory as attach point (root) as requires by the particular media handler implementation.

Parameters:
apoint The directory to check.
Returns:
True, if the directory checks succeeded.

Reimplemented from zypp::media::MediaHandler.

Definition at line 627 of file MediaCurl.cc.

References zypp::media::MediaHandler::checkAttachPoint().

void zypp::media::MediaCurl::setCookieFile const Pathname  )  [static]
 

Definition at line 173 of file MediaCurl.cc.

References _cookieFile.

int zypp::media::MediaCurl::progressCallback void *  clientp,
double  dltotal,
double  dlnow,
double  ultotal,
double  ulnow
[static, protected]
 

Definition at line 1038 of file MediaCurl.cc.


Member Data Documentation

zypp::media::MediaCurl::MEDIA_HANDLER_API [protected]
 

Definition at line 34 of file MediaCurl.h.

CURL* zypp::media::MediaCurl::_curl [private]
 

Definition at line 80 of file MediaCurl.h.

char zypp::media::MediaCurl::_curlError[CURL_ERROR_SIZE] [private]
 

Definition at line 81 of file MediaCurl.h.

Referenced by MediaCurl().

std::string zypp::media::MediaCurl::_userpwd [private]
 

Definition at line 83 of file MediaCurl.h.

std::string zypp::media::MediaCurl::_proxy [private]
 

Definition at line 84 of file MediaCurl.h.

std::string zypp::media::MediaCurl::_proxyuserpwd [private]
 

Definition at line 85 of file MediaCurl.h.

std::string zypp::media::MediaCurl::_currentCookieFile [private]
 

Definition at line 86 of file MediaCurl.h.

std::string zypp::media::MediaCurl::_ca_path [private]
 

Definition at line 87 of file MediaCurl.h.

long zypp::media::MediaCurl::_xfer_timeout [private]
 

Definition at line 88 of file MediaCurl.h.

Pathname zypp::media::MediaCurl::_cookieFile = "/var/lib/YaST2/cookies" [static, private]
 

Definition at line 90 of file MediaCurl.h.

Referenced by setCookieFile().

std::string zypp::media::MediaCurl::_agent = "Novell ZYPP Installer" [static, private]
 

Definition at line 91 of file MediaCurl.h.


The documentation for this class was generated from the following files:
Generated on Thu Jul 6 00:07:32 2006 for zypp by  doxygen 1.4.6