Main Page | Namespace List | Class Hierarchy | Class List | File List | Namespace Members | Class Members | File Members

MediaCurl Class Reference

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

#include <MediaCurl.h>

Inheritance diagram for MediaCurl:

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

void setCookieFile (const Pathname &)
void setCallbacks (Callbacks *c)

Protected Member Functions

virtual PMError disconnectFrom ()
virtual PMError getFileCopy (const Pathname &srcFilename, const Pathname &targetFilename) const

Static Protected Member Functions

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
bool _connected

Static Private Attributes

Pathname _cookieFile = "/var/lib/YaST2/cookies"
Callbacks_callbacks = 0

Detailed Description

Implementation class for FTP, HTTP and HTTPS MediaHandler.

See also:
MediaHandler


Constructor & Destructor Documentation

MediaCurl::MediaCurl const Url url_r,
const Pathname attach_point_hint_r
 

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


Member Function Documentation

PMError MediaCurl::disconnectFrom  )  [protected, virtual]
 

Call concrete handler to disconnect media.

Asserted that media is attached.

This is useful for media which e.g. holds open a connection to a server like FTP. After calling disconnect() the media object still is valid and files are present.

After calling disconnect() it's not possible to call provideFile() or provideDir() anymore.

Reimplemented from MediaHandler.

PMError MediaCurl::getFileCopy const Pathname srcFilename,
const Pathname targetFilename
const [protected, virtual]
 

Call concrete handler to provide a file under a different place in the file system (usually not under attach point) as a copy. Media must be attached before by callee.

Default implementation provided that calls getFile(srcFilename) and copies the result around.

Reimplemented from MediaHandler.

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

void MediaCurl::setCallbacks Callbacks c  )  [inline, static]
 

void MediaCurl::setCookieFile const Pathname  )  [static]
 


Member Data Documentation

MediaCurl::Callbacks * MediaCurl::_callbacks = 0 [static, private]
 

bool MediaCurl::_connected [private]
 

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

CURL* MediaCurl::_curl [private]
 

char MediaCurl::_curlError[ CURL_ERROR_SIZE ] [private]
 

std::string MediaCurl::_currentCookieFile [private]
 

std::string MediaCurl::_proxy [private]
 

std::string MediaCurl::_proxyuserpwd [private]
 

std::string MediaCurl::_userpwd [private]
 

MediaCurl::MEDIA_HANDLER_API [protected]
 


The documentation for this class was generated from the following files:
Generated on Fri Nov 9 14:30:32 2007 for yast2-packagemanager by doxygen 1.3.6