Imported Upstream version 16.3.2
[platform/upstream/libzypp.git] / zypp / RepoInfo.h
index 6397759..70a47e3 100644 (file)
@@ -85,6 +85,10 @@ namespace zypp
        */
       static unsigned defaultPriority();
       /**
+       * The least priority (<tt>unsigned(-1)</tt>). 
+       */
+      static unsigned noPriority();
+      /**
        * Repository priority for solver.
        * Some number between \c 1 (highest priority) and \c 99 (\ref defaultPriority).
        */
@@ -155,6 +159,10 @@ namespace zypp
        * Clears current base URL list and adds \a url.
        */
       void setBaseUrl( const Url &url );
+      /**
+       * Clears current base URL list and adds an \ref url_set.
+       */
+      void setBaseUrls( url_set urls );
 
       /**
        * \short Repository path
@@ -282,31 +290,27 @@ namespace zypp
       /** Set the value for \ref validRepoSignature (or \c indeterminate if unsigned). */
       void setValidRepoSignature( TriBool value_r );
 
-      /**
-       * \short Key to use for gpg checking of this repository
-       *
-       * \param url Url to the key in ASCII armored format
-       *
-       * \note This is a just a hint to the application and can
-       * be ignored.
-       *
-       */
+
+      /** Whether gpgkey URLs are defined */
+      bool gpgKeyUrlsEmpty() const;
+      /** Number of gpgkey URLs defined */
+      urls_size_type gpgKeyUrlsSize() const;
+
+      /** The list of gpgkey URLs defined for this repo */
+      url_set gpgKeyUrls() const;
+      /** The list of raw gpgkey URLs defined for this repo (no variables replaced) */
+      url_set rawGpgKeyUrls() const;
+      /** Set a list of gpgkey URLs defined for this repo */
+      void setGpgKeyUrls( url_set urls );
+
+      /** (leagcy API) The 1st gpgkey URL defined for this repo */
       Url gpgKeyUrl() const;
-      /**
-       * The raw gpgKeyUrl (no variables replaced).
-       */
+      /** (leagcy API) The 1st raw gpgkey URL defined for this repo (no variables replaced) */
       Url rawGpgKeyUrl() const;
-      /**
-       * \short Key to use for gpg checking of this repository
-       *
-       * \param url Url to the key in ASCII armored format
-       *
-       * \note This is a just a hint to the application and can
-       * be ignored.
-       *
-       */
+      /** (leagcy API) Set the gpgkey URL defined for this repo */
       void setGpgKeyUrl( const Url &gpgkey );
 
+
       /**
        * \short Whether packages downloaded from this repository will be kept in local cache
        */
@@ -343,38 +347,42 @@ namespace zypp
        */
       void setTargetDistribution(const std::string & targetDistribution);
 
+
+      /** Content keywords defined. */
+      const std::set<std::string> & contentKeywords() const;
+
       /** Add content keywords */
       void addContent( const std::string & keyword_r );
       /** \overload add keywords from container */
-      template <class _Iterator>
-      void addContentFrom( _Iterator begin_r, _Iterator end_r )
+      template <class TIterator>
+      void addContentFrom( TIterator begin_r, TIterator end_r )
       { for_( it, begin_r, end_r ) addContent( *it ); }
       /** \overload  */
-      template <class _Container>
-      void addContentFrom( const _Container & container_r )
+      template <class TContainer>
+      void addContentFrom( const TContainer & container_r )
       { addContentFrom( container_r.begin(), container_r.end() ); }
 
       /** Check for content keywords.
-       * Checking for an empty string returns whether content kewords are
-       * known at all. They may be missing due to missing metadata in disabled
-       * repos.
+       * They may be missing due to missing metadata in disabled repos.
        */
-      bool hasContent( const std::string & keyword_r = std::string() ) const;
+      bool hasContent() const;
+      /** \overload check for a keywords being present */
+      bool hasContent( const std::string & keyword_r ) const;
       /** \overload check for \b all keywords being present */
-      template <class _Iterator>
-      bool hasContentAll( _Iterator begin_r, _Iterator end_r ) const
+      template <class TIterator>
+      bool hasContentAll( TIterator begin_r, TIterator end_r ) const
       { for_( it, begin_r, end_r ) if ( ! hasContent( *it ) ) return false; return true; }
       /** \overload  */
-      template <class _Container>
-      bool hasContentAll( const _Container & container_r ) const
+      template <class TContainer>
+      bool hasContentAll( const TContainer & container_r ) const
       { return hasContentAll( container_r.begin(), container_r.end() ); }
       /** \overload check for \b any keyword being present */
-      template <class _Iterator>
-      bool hasContentAny( _Iterator begin_r, _Iterator end_r ) const
+      template <class TIterator>
+      bool hasContentAny( TIterator begin_r, TIterator end_r ) const
       { for_( it, begin_r, end_r ) if ( hasContent( *it ) ) return true; return false; }
       /** \overload  */
-      template <class _Container>
-      bool hasContentAny( const _Container & container_r ) const
+      template <class TContainer>
+      bool hasContentAny( const TContainer & container_r ) const
       { return hasContentAny( container_r.begin(), container_r.end() ); }
 
     public:
@@ -425,6 +433,10 @@ namespace zypp
 
       class Impl;
     private:
+      friend class RepoManager;
+      /** Raw values for RepoManager */
+      void getRawGpgChecks( TriBool & g_r, TriBool & r_r, TriBool & p_r ) const;
+
       /** Pointer to implementation */
       RWCOW_pointer<Impl> _pimpl;
   };