~thopiekar/zypper/libzypp-manual-import

« back to all changes in this revision

Viewing changes to zypp/repo/SUSEMediaVerifier.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
 
 
10
#ifndef ZYPP_SUSE_MEDIAVERIFIER_H
 
11
#define ZYPP_SUSE_MEDIAVERIFIER_H
 
12
 
 
13
#include "zypp/media/MediaManager.h"
 
14
#include "zypp/media/MediaAccess.h"
 
15
 
 
16
namespace zypp
 
17
{
 
18
  namespace repo
 
19
  {
 
20
 
 
21
    /**
 
22
     * \short Implementation of the traditional SUSE media verifier
 
23
     */
 
24
    class SUSEMediaVerifier : public zypp::media::MediaVerifierBase
 
25
    {
 
26
      public:
 
27
      /**
 
28
       * \short create a verifier from attributes
 
29
       *
 
30
       * Creates a verifier for the media using
 
31
       * the attributes
 
32
       *
 
33
       * \param vendor_r i.e. "SUSE Linux Products GmbH"
 
34
       * \param id_r i.e. "20070718164719"
 
35
       * \param media_nr media number
 
36
       */
 
37
      SUSEMediaVerifier(const std::string & vendor_r,
 
38
                        const std::string & id_r,
 
39
                        const media::MediaNr media_nr = 1);
 
40
      
 
41
      /**
 
42
       * \short creates a verifier from a media file
 
43
       *
 
44
       * \param path_r Path to media.1/media kind file
 
45
       */
 
46
      SUSEMediaVerifier( int media_nr, const Pathname &path_r );
 
47
      
 
48
      /**
 
49
        * \short Check if it is the desider media
 
50
        *
 
51
        * Check if the specified attached media contains
 
52
        * the desired media number (e.g. SLES10 CD1).
 
53
        *
 
54
        * Reimplementation of virtual function, will be
 
55
        * called by the component verifying the media.
 
56
        */
 
57
      virtual bool isDesiredMedia(const media::MediaAccessRef &ref);
 
58
      
 
59
      private:
 
60
        std::string _media_vendor;
 
61
        std::string _media_id;
 
62
        media::MediaNr _media_nr;
 
63
    };
 
64
 
 
65
  }
 
66
}
 
67
#endif