2 #ifndef TRANSFER_PROGRAM_H_
3 #define TRANSFER_PROGRAM_H_
7 #include "zypp/base/Flags.h"
8 #include "zypp/base/PtrTypes.h"
9 #include "zypp/Pathname.h"
18 * Easy access to the transfer command line program no matter
22 class TransferSettings
26 * Constructs a transfer program cmd line access.
31 * Constructs the settings from a url object where.
32 * authentication/proxy information can be extracted
35 TransferSettings( const zypp::Url &url );
37 typedef std::vector<std::string> Headers;
39 * add a header, on the form "Foo: Bar"
41 void addHeader( const std::string &header );
44 * begin iterators to additional headers
46 Headers::const_iterator headersBegin() const;
49 * end iterators to additional headers
51 Headers::const_iterator headersEnd() const;
54 * sets the user agent ie: "Mozilla v3"
56 void setUserAgentString( const std::string &agent );
61 std::string userAgentString() const;
64 * sets the auth username
66 void setUsername( const std::string &username );
71 std::string username() const;
74 * sets the auth password
76 void setPassword( const std::string &password );
81 std::string password() const;
84 * whether the proxy is used or not
86 void setProxyEnabled( bool enabled );
91 bool proxyEnabled() const;
94 * proxy to use if it is enabled
96 void setProxy( const std::string &proxyhost );
101 std::string proxy() const;
104 * sets the proxy user
106 void setProxyUsername( const std::string &proxyuser );
109 * proxy auth username
111 std::string proxyUsername() const;
114 * sets the proxy password
116 void setProxyPassword( const std::string &proxypass );
119 * proxy auth password
121 std::string proxyPassword() const;
124 * set the connect timeout
126 void setConnectTimeout( long t );
131 long connectTimeout() const;
134 * set the transfer timeout
136 void setTimeout( long t );
141 long timeout() const;
145 RWCOW_pointer<Impl> _impl;