libzypp 17.36.5
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
18namespace 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:
45
46 protected:
47
52 Url getFileUrl(const Pathname & filename) const;
53
54
59 static zypp::Url findGeoIPRedirect ( const zypp::Url &url );
60
61 public:
62 static const char * anonymousIdHeader();
63
64 static const char * distributionFlavorHeader();
65
66 static const char *agentString();
67
68 protected:
71 };
72
73 } // namespace media
75} // namespace zypp
77#endif // ZYPP_MEDIA_MEDIANETWORKCOMMONHANDLER_H
Url manipulation class.
Definition Url.h:93
MediaHandler(Url url_r, const Pathname &attach_point_r, Pathname urlpath_below_attachpoint_r, const bool does_download_r)
If the concrete media handler provides a nonempty attach_point, it must be an existing directory.
Url getFileUrl(const Pathname &filename) const
concatenate the attach url and the filename to a complete download url
MediaNetworkCommonHandler(const Url &url_r, const Pathname &attach_point_r, const Pathname &urlpath_below_attachpoint_r, const bool does_download_r)
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...
Holds transfer setting.
Url details namespace.
Definition UrlBase.cc:58
Easy-to use interface to the ZYPP dependency resolver.