Imported Upstream version 15.0.0
[platform/upstream/libzypp.git] / zypp / media / TransferSettings.cc
index 75cae08..faf57d7 100644 (file)
 
 using namespace std;
 
-#define ARIA2C_BINARY "/usr/bin/aria2c"
 #define CURL_BINARY "/usr/bin/curl"
 
 namespace zypp
 {
 namespace media
 {
-    
+
 class TransferSettings::Impl
 {
 public:
@@ -34,10 +33,11 @@ public:
         , _verify_host(false)
         , _verify_peer(false)
         , _ca_path("/etc/ssl/certs")
+        , _head_requests_allowed(true)
     {}
 
     virtual ~Impl()
-    {}    
+    {}
 
     /** Offer default Impl. */
     static shared_ptr<Impl> nullimpl()
@@ -61,6 +61,7 @@ public:
     string _proxy;
     string _proxy_username;
     string _proxy_password;
+    string _authtype;
     long _timeout;
     long _connect_timeout;
     Url _url;
@@ -74,8 +75,12 @@ public:
     bool _verify_host;
     bool _verify_peer;
     Pathname _ca_path;
+    Pathname _client_cert_path;
+
+    // workarounds
+    bool _head_requests_allowed;
 };
-    
+
 TransferSettings::TransferSettings()
     : _impl(new TransferSettings::Impl())
 {
@@ -272,6 +277,16 @@ bool TransferSettings::verifyPeerEnabled() const
     return _impl->_verify_peer;
 }
 
+Pathname TransferSettings::clientCertificatePath() const
+{
+    return _impl->_client_cert_path;
+}
+
+void TransferSettings::setClientCertificatePath( const zypp::Pathname &path )
+{
+    _impl->_client_cert_path = path;
+}
+
 
 void TransferSettings::setVerifyPeerEnabled( bool enabled )
 {
@@ -288,6 +303,25 @@ void TransferSettings::setCertificateAuthoritiesPath( const zypp::Pathname &path
     _impl->_ca_path = path;
 }
 
+void TransferSettings::setAuthType( const std::string &authtype)
+{
+    _impl->_authtype = authtype;
+}
+
+std::string TransferSettings::authType() const
+{
+    return _impl->_authtype;
+}
+
+void TransferSettings::setHeadRequestsAllowed(bool allowed)
+{
+    _impl->_head_requests_allowed = allowed;
+}
+
+bool TransferSettings::headRequestsAllowed() const
+{
+    return _impl->_head_requests_allowed;
+}
 
 } // ns media
 } // ns zypp