14 #include <zypp-core/Pathname.h> 15 #include <zypp-core/base/String.h> 52 if ( section ==
"main" ) {
53 if ( entry ==
"credentials.global.dir" ) {
54 d->credentials_global_dir_path =
Pathname(value);
56 }
else if ( entry ==
"credentials.global.file" ) {
57 d->credentials_global_file_path =
Pathname(value);
60 }
else if ( entry ==
"download.max_concurrent_connections" ) {
64 }
else if ( entry ==
"download.min_download_speed" ) {
68 }
else if ( entry ==
"download.max_download_speed" ) {
72 }
else if ( entry ==
"download.max_silent_tries" ) {
76 }
else if ( entry ==
"download.transfer_timeout" ) {
78 if ( d->download_transfer_timeout < 0 ) d->download_transfer_timeout = 0;
79 else if ( d->download_transfer_timeout > 3600 ) d->download_transfer_timeout = 3600;
89 return ( d->credentials_global_dir_path.empty() ?
90 Pathname(
"/etc/zypp/credentials.d") : d->credentials_global_dir_path );
96 return ( d->credentials_global_file_path.empty() ?
97 Pathname(
"/etc/zypp/credentials.cat") : d->credentials_global_file_path );
101 {
return d_func()->download_max_concurrent_connections; }
104 {
return d_func()->download_min_download_speed; }
107 {
return d_func()->download_max_download_speed; }
110 {
return d_func()->download_max_silent_tries; }
113 {
return d_func()->download_transfer_timeout; }
ZYPP_IMPL_PRIVATE(Provide)
TInt strtonum(const C_Str &str)
Parsing numbers from string.
Easy-to use interface to the ZYPP dependency resolver.