libzypp  17.31.31
MediaNetworkCommonHandler.h
Go to the documentation of this file.
1 /*---------------------------------------------------------------------\
2 | ____ _ __ __ ___ |
3 | |__ / \ / / . \ . \ |
4 | / / \ V /| _/ _/ |
5 | / /__ | | | | | | |
6 | /_____||_| |_| |_| |
7 | |
8 \---------------------------------------------------------------------*/
11 #ifndef ZYPP_MEDIA_MEDIANETWORKCOMMONHANDLER_H
12 #define ZYPP_MEDIA_MEDIANETWORKCOMMONHANDLER_H
13 
15 #include <zypp-curl/TransferSettings>
16 
18 namespace zypp
19 {
21  namespace media
22  {
28  // to avoid duplicated code.
31  {
32  public:
34  const Pathname & attach_point_r,
35  const Pathname & urlpath_below_attachpoint_r,
36  const bool does_download_r )
37  : MediaHandler( url_r, attach_point_r, urlpath_below_attachpoint_r, does_download_r )
39 
40  {}
41 
42  public:
44  { return _settings; }
45 
46  protected:
47 
52  Url getFileUrl(const Pathname & filename) const;
53 
54 
59  static zypp::Url findGeoIPRedirect ( const zypp::Url &url );
60 
61  protected:
64  };
65 
66  } // namespace media
68 } // namespace zypp
70 #endif // ZYPP_MEDIA_MEDIANETWORKCOMMONHANDLER_H
Url getFileUrl(const Pathname &filename) const
concatenate the attach url and the filename to a complete download url
Holds transfer setting.
MediaNetworkCommonHandler(const Url &url_r, const Pathname &attach_point_r, const Pathname &urlpath_below_attachpoint_r, const bool does_download_r)
Abstract base class for &#39;physical&#39; MediaHandler like MediaCD, etc.
Definition: MediaHandler.h:51
Common baseclass for MediaCurl and MediaNetwork.
Url url() const
Url used.
Definition: MediaHandler.h:503
static zypp::Url findGeoIPRedirect(const zypp::Url &url)
Rewrites the baseURL to the geoIP target if one is found in the metadata cache, otherwise simply retu...
Easy-to use interface to the ZYPP dependency resolver.
Definition: CodePitfalls.doc:1
Url manipulation class.
Definition: Url.h:91