libzypp  10.5.0
zypp::media::CurlAuthData Class Reference

Curl HTTP authentication data. More...

#include <MediaUserAuth.h>

Inheritance diagram for zypp::media::CurlAuthData:

List of all members.

Public Member Functions

 CurlAuthData ()
 Default constructor.
 CurlAuthData (const AuthData &authData)
 CurlAuthData (std::string &username, std::string &password, std::string &auth_type)
 CurlAuthData (std::string &username, std::string &password, long auth_type)
virtual bool valid () const
 Checks validity of authentication data.
void setAuthType (std::string auth_type)
 Set HTTP authentication type(s) to use.
void setAuthType (long auth_type)
long authType ()
const std::string authTypeAsString ()
const std::string getUserPwd () const
virtual std::ostream & dumpOn (std::ostream &str) const

Static Public Member Functions

static long auth_type_str2long (std::string &auth_type_str)
 Converts a string of comma separated list of authetication type names into a long of ORed CURLAUTH_* identifiers.
static std::string auth_type_long2str (long auth_type)
 Converts a long of ORed CURLAUTH_* identifiers into a string of comma separated list of authentication type names.

Private Attributes

std::string _auth_type_str
long _auth_type

Detailed Description

Curl HTTP authentication data.

Definition at line 74 of file MediaUserAuth.h.


Constructor & Destructor Documentation

zypp::media::CurlAuthData::CurlAuthData ( )

Default constructor.

Initializes username and password to empty strings and authetication type to CURLAUTH_NONE.

Definition at line 69 of file MediaUserAuth.cc.

zypp::media::CurlAuthData::CurlAuthData ( const AuthData authData)

Definition at line 75 of file MediaUserAuth.cc.

zypp::media::CurlAuthData::CurlAuthData ( std::string &  username,
std::string &  password,
std::string &  auth_type 
) [inline]

Definition at line 84 of file MediaUserAuth.h.

zypp::media::CurlAuthData::CurlAuthData ( std::string &  username,
std::string &  password,
long  auth_type 
) [inline]

Definition at line 90 of file MediaUserAuth.h.


Member Function Documentation

bool zypp::media::CurlAuthData::valid ( ) const [virtual]

Checks validity of authentication data.

Returns:
true if the object contains non-empty username, non-empty password, and specifies authentication type; false otherwise.

Reimplemented from zypp::media::AuthData.

Definition at line 81 of file MediaUserAuth.cc.

void zypp::media::CurlAuthData::setAuthType ( std::string  auth_type) [inline]

Set HTTP authentication type(s) to use.

Parameters:
commaseparated list of HTTP authentication type names

Definition at line 107 of file MediaUserAuth.h.

void zypp::media::CurlAuthData::setAuthType ( long  auth_type) [inline]

Definition at line 117 of file MediaUserAuth.h.

long zypp::media::CurlAuthData::authType ( ) [inline]

Definition at line 123 of file MediaUserAuth.h.

const std::string zypp::media::CurlAuthData::authTypeAsString ( ) [inline]

Definition at line 124 of file MediaUserAuth.h.

const std::string zypp::media::CurlAuthData::getUserPwd ( ) const [inline]

Definition at line 126 of file MediaUserAuth.h.

long zypp::media::CurlAuthData::auth_type_str2long ( std::string &  auth_type_str) [static]

Converts a string of comma separated list of authetication type names into a long of ORed CURLAUTH_* identifiers.

The method also automatically leaves out any auth types declared not supported by curl_version_info().

Exceptions:
MediaExceptionif an invalid authentication type name is encountered.

Definition at line 93 of file MediaUserAuth.cc.

std::string zypp::media::CurlAuthData::auth_type_long2str ( long  auth_type) [static]

Converts a long of ORed CURLAUTH_* identifiers into a string of comma separated list of authentication type names.

Definition at line 145 of file MediaUserAuth.cc.

std::ostream & zypp::media::CurlAuthData::dumpOn ( std::ostream &  str) const [virtual]

Reimplemented from zypp::media::AuthData.

Definition at line 86 of file MediaUserAuth.cc.


Member Data Documentation

Definition at line 149 of file MediaUserAuth.h.

Definition at line 150 of file MediaUserAuth.h.


The documentation for this class was generated from the following files: