libzypp  17.31.31
provideres.h
Go to the documentation of this file.
1 /*---------------------------------------------------------------------\
2 | ____ _ __ __ ___ |
3 | |__ / \ / / . \ . \ |
4 | / / \ V /| _/ _/ |
5 | / /__ | | | | | | |
6 | /_____||_| |_| |_| |
7 | |
8 \---------------------------------------------------------------------*/
11 #ifndef ZYPP_MEDIA_PROVIDERES_H_INCLUDED
12 #define ZYPP_MEDIA_PROVIDERES_H_INCLUDED
13 
14 #include <zypp-media/ng/ProvideFwd>
15 #include <zypp-core/Pathname.h>
16 #include <zypp-core/ManagedFile.h>
17 #include <memory>
18 
19 
20 namespace zyppng
21 {
22 
23  struct ProvideResourceData;
24 
35  class ProvideRes
36  {
37  public:
38  ProvideRes( std::shared_ptr<ProvideResourceData> dataPtr );
39  virtual ~ProvideRes();
40 
44  const zypp::Pathname file () const;
45 
51  const zypp::ManagedFile & asManagedFile () const;
52 
56  const ProvideMediaHandle &mediaHandle () const;
57 
61  const zypp::Url &resourceUrl () const;
62 
66  const HeaderValueMap &headers () const;
67 
68  private:
69  std::shared_ptr<ProvideResourceData> _data;
70  };
71 }
72 
73 
74 #endif
const ProvideMediaHandle & mediaHandle() const
Definition: provideres.cc:33
ProvideRes(std::shared_ptr< ProvideResourceData > dataPtr)
Definition: provideres.cc:17
A ProvideRes object is a reference counted ownership of a resource in the cache provided by a Provide...
Definition: provideres.h:35
const zypp::ManagedFile & asManagedFile() const
Definition: provideres.cc:28
const HeaderValueMap & headers() const
Definition: provideres.cc:43
virtual ~ProvideRes()
Definition: provideres.cc:20
const zypp::Url & resourceUrl() const
Definition: provideres.cc:38
std::shared_ptr< ProvideResourceData > _data
Definition: provideres.h:69
const zypp::Pathname file() const
Definition: provideres.cc:23
Url manipulation class.
Definition: Url.h:91