~thopiekar/zypper/libzypp-manual-import

« back to all changes in this revision

Viewing changes to zypp/media/UrlResolverPlugin.h

  • Committer: Thomas-Karl Pietrowski
  • Date: 2014-01-29 22:44:28 UTC
  • Revision ID: thopiekar@googlemail.com-20140129224428-gpcqnsdakby362n8
firstĀ import

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/*---------------------------------------------------------------------\
 
2
|                          ____ _   __ __ ___                          |
 
3
|                         |__  / \ / / . \ . \                         |
 
4
|                           / / \ V /|  _/  _/                         |
 
5
|                          / /__ | | | | | |                           |
 
6
|                         /_____||_| |_| |_|                           |
 
7
|                                                                      |
 
8
\---------------------------------------------------------------------*/
 
9
/** \file       zypp/media/UrlResolverPlugin.h
 
10
 *
 
11
*/
 
12
#ifndef ZYPP_MEDIA_URLRESOLVERPLUGIN_H
 
13
#define ZYPP_MEDIA_URLRESOLVERPLUGIN_H
 
14
 
 
15
#include <iosfwd>
 
16
#include <map>
 
17
#include <string>
 
18
 
 
19
#include "zypp/base/PtrTypes.h"
 
20
#include "zypp/Url.h"
 
21
#include "zypp/PathInfo.h"
 
22
 
 
23
///////////////////////////////////////////////////////////////////
 
24
namespace zypp
 
25
{ /////////////////////////////////////////////////////////////////
 
26
  ///////////////////////////////////////////////////////////////////
 
27
  namespace media
 
28
  { /////////////////////////////////////////////////////////////////
 
29
 
 
30
    /** 
 
31
     *
 
32
     */
 
33
    class UrlResolverPlugin
 
34
    {
 
35
      friend std::ostream & operator<<( std::ostream & str, const UrlResolverPlugin & obj );
 
36
 
 
37
    public:
 
38
 
 
39
      class Impl;
 
40
 
 
41
      typedef std::multimap<std::string, std::string> HeaderList;
 
42
 
 
43
      /**
 
44
       * Resolves an url using the installed plugins
 
45
       * If no plugin is found the url is resolved as
 
46
       * its current value.
 
47
       *
 
48
       * Custom headers are inserted in the provided header list
 
49
       */
 
50
      static Url resolveUrl(const Url &url, HeaderList &headers);
 
51
 
 
52
    public:
 
53
      /** Dtor */
 
54
      ~UrlResolverPlugin();
 
55
 
 
56
    private:
 
57
 
 
58
      /** Default ctor */
 
59
      UrlResolverPlugin();
 
60
 
 
61
      /** Pointer to implementation */
 
62
      RW_pointer<Impl> _pimpl;
 
63
    };
 
64
    ///////////////////////////////////////////////////////////////////
 
65
 
 
66
    /** \relates UrlResolverPlugin Stream output */
 
67
    std::ostream & operator<<( std::ostream & str, const UrlResolverPlugin & obj );
 
68
 
 
69
    /////////////////////////////////////////////////////////////////
 
70
  } // namespace media
 
71
  ///////////////////////////////////////////////////////////////////
 
72
  /////////////////////////////////////////////////////////////////
 
73
} // namespace zypp
 
74
///////////////////////////////////////////////////////////////////
 
75
#endif // ZYPP_MEDIA_URLRESOLVERPLUGIN_H