#include <MediaCurl.h>
Inheritance diagram for zypp::media::MediaCurl:

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 | attachTo (bool next=false) | |||
| virtual void | releaseFrom (bool eject) | |||
| Call concrete handler to release the media. | ||||
| virtual void | getFile (const Pathname &filename) const | |||
| Call concrete handler to provide file below attach point. | ||||
| virtual void | getDir (const Pathname &dirname, bool recurse_r) const | |||
| Call concrete handler to provide directory content (not recursive!) below attach point. | ||||
| virtual void | getDirInfo (std::list< std::string > &retlist, const Pathname &dirname, bool dots=true) const | |||
| Call concrete handler to provide a content list of directory on media via retlist. | ||||
| virtual void | getDirInfo (filesystem::DirContent &retlist, const Pathname &dirname, bool dots=true) const | |||
| Basically the same as getDirInfo above. | ||||
| virtual bool | getDoesFileExist (const Pathname &filename) const | |||
| check if a file exists | ||||
| virtual void | disconnectFrom () | |||
| ||||
| virtual void | getFileCopy (const Pathname &srcFilename, const Pathname &targetFilename) const | |||
| ||||
| virtual void | doGetFileCopy (const Pathname &srcFilename, const Pathname &targetFilename, callback::SendReport< DownloadProgressReport > &_report) const | |||
| ||||
| 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) | |||
Private Attributes | ||||
| CURL * | _curl | |||
| char | _curlError [CURL_ERROR_SIZE] | |||
| long | _curlDebug | |||
| 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 | |||
Definition at line 30 of file MediaCurl.h.
|
||||||||||||
|
|
Definition at line 72 of file MediaCurl.h. References zypp::media::MediaHandler::release(). |
|
|
|
Call concrete handler to release the media. If eject is true, and the media is used in one handler instance only, physically eject the media (i.e. CD-ROM). Asserted that media is attached.
Implements zypp::media::MediaHandler. Definition at line 699 of file MediaCurl.cc. References zypp::media::MediaHandler::disconnect(). |
|
|
Call concrete handler to provide file below attach point. Default implementation provided, that returns whether a file is located at 'localRoot + filename'. Asserted that media is attached.
Implements zypp::media::MediaHandler. Definition at line 711 of file MediaCurl.cc. References getFileCopy(), and zypp::media::MediaHandler::localPath(). Referenced by getDir(). |
|
||||||||||||
|
Call concrete handler to provide directory content (not recursive!) below attach point. Return E_not_supported_by_media if media does not support retrieval of directory content. Default implementation provided, that returns whether a directory is located at 'localRoot + dirname'. Asserted that media is attached.
Implements zypp::media::MediaHandler. Definition at line 1247 of file MediaCurl.cc. References zypp::filesystem::assert_dir(), zypp::filesystem::FT_DIR, zypp::filesystem::FT_FILE, zypp::filesystem::FT_NOT_AVAIL, getDirInfo(), getFile(), zypp::media::MediaHandler::localPath(), and WAR. |
|
||||||||||||||||
|
Call concrete handler to provide a content list of directory on media via retlist. If dots is false entries starting with '.' are not reported. Return E_not_supported_by_media if media does not support retrieval of directory content. Default implementation provided, that returns the content of a directory at 'localRoot + dirnname' retrieved via 'readdir'. Asserted that media is attached and retlist is empty.
Implements zypp::media::MediaHandler. Definition at line 1286 of file MediaCurl.cc. References zypp::media::MediaHandler::getDirectoryYast(). Referenced by getDir(). |
|
||||||||||||||||
|
Basically the same as getDirInfo above. The content list is returned as filesystem::DirContent, which includes name and filetype of each directory entry. Retrieving the filetype usg. requires an additional stat call for each entry, thus it's more expensive than a simple readdir. Asserted that media is attached and retlist is empty.
Implements zypp::media::MediaHandler. Definition at line 1300 of file MediaCurl.cc. References zypp::media::MediaHandler::getDirectoryYast(). |
|
|
check if a file exists Asserted that url is a file and not a dir.
Implements zypp::media::MediaHandler. Definition at line 738 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. |
|
|
Reimplemented from zypp::media::MediaHandler. Definition at line 682 of file MediaCurl.cc. Referenced by attachTo(). |
|
||||||||||||
|
Reimplemented from zypp::media::MediaHandler. Definition at line 719 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. Referenced by getFile(). |
|
||||||||||||||||
|
Definition at line 952 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(). |
|
|
Verify if the specified directory as attach point (root) as requires by the particular media handler implementation.
Reimplemented from zypp::media::MediaHandler. Definition at line 671 of file MediaCurl.cc. References zypp::media::MediaHandler::checkAttachPoint(). |
|
|
Definition at line 202 of file MediaCurl.cc. References _cookieFile. |
|
||||||||||||||||||||||||
|
Definition at line 1314 of file MediaCurl.cc. |
|
|
Definition at line 89 of file MediaCurl.h. Referenced by attachTo(). |
|
|
Definition at line 90 of file MediaCurl.h. Referenced by attachTo(), and MediaCurl(). |
|
|
Definition at line 91 of file MediaCurl.h. Referenced by attachTo(), and MediaCurl(). |
|
|
Definition at line 93 of file MediaCurl.h. |
|
|
Definition at line 94 of file MediaCurl.h. |
|
|
Definition at line 95 of file MediaCurl.h. |
|
|
Definition at line 96 of file MediaCurl.h. |
|
|
Definition at line 97 of file MediaCurl.h. |
|
|
Definition at line 98 of file MediaCurl.h. Referenced by attachTo(). |
|
|
Definition at line 100 of file MediaCurl.h. Referenced by setCookieFile(). |
|
|
Definition at line 101 of file MediaCurl.h. |
1.4.6