- add flags to retrieve the flags (it is useless to set them wihtout seeing them...
authorDuncan Mac-Vicar P <dmacvicar@suse.de>
Wed, 13 Aug 2008 14:55:53 +0000 (14:55 +0000)
committerDuncan Mac-Vicar P <dmacvicar@suse.de>
Wed, 13 Aug 2008 14:55:53 +0000 (14:55 +0000)
- add the new sat solver flag to search in files

VERSION.cmake
zypp/PoolQuery.cc
zypp/PoolQuery.h

index f560a2e..cae6aab 100644 (file)
@@ -60,7 +60,7 @@
 #
 SET(LIBZYPP_MAJOR "5")
 SET(LIBZYPP_COMPATMINOR "4")
-SET(LIBZYPP_MINOR "4")
+SET(LIBZYPP_MINOR "5")
 SET(LIBZYPP_PATCH "1")
 #
 # LAST RELEASED: 5.4.0 (4)
index 003bfa6..892a264 100644 (file)
@@ -811,6 +811,10 @@ attremptycheckend:
       _pimpl->_flags |= SEARCH_NOCASE;
   }
 
+  void PoolQuery::setMatchFiles()
+  {
+    _pimpl->_flags = (_pimpl->_flags & ~SEARCH_STRINGMASK) | SEARCH_FILES;
+  }
 
   void PoolQuery::setMatchSubstring()
   { _pimpl->_flags = (_pimpl->_flags & ~SEARCH_STRINGMASK) | SEARCH_SUBSTRING; }
@@ -829,6 +833,8 @@ attremptycheckend:
   void PoolQuery::setFlags(int flags)
   { _pimpl->_flags = flags; }
 
+  int PoolQuery::flags() const
+  { return _pimpl->_flags; }
 
   void PoolQuery::setInstalledOnly()
   { _pimpl->_status_flags = INSTALLED_ONLY; }
@@ -885,7 +891,9 @@ attremptycheckend:
   { return (_pimpl->_flags & SEARCH_STRINGMASK) == SEARCH_REGEX; }
   int PoolQuery::matchType() const
   { return _pimpl->_flags & SEARCH_STRINGMASK; }
-
+  bool PoolQuery::matchFiles() const
+  { return (_pimpl->_flags & SEARCH_STRINGMASK) == SEARCH_FILES; }
+  
   bool PoolQuery::matchWord() const
   { return _pimpl->_match_word; }
 
index ac35f0a..ca17da7 100644 (file)
@@ -259,7 +259,8 @@ namespace zypp
     void setMatchWord();
     //void setLocale(const Locale & locale);
     //@}
-
+    /* set to match file type attributes (like file lists ) */
+    void setMatchFiles();
 
     /**
      * Require that all of the values set by addString or addAttribute
@@ -301,6 +302,16 @@ namespace zypp
     bool matchWord() const;
 
     /**
+     * match file list types
+     *
+     * For attributes like \ref sat::SolvAttr::filelist
+     * you need to activate this one if you want to
+     * match them.
+     *
+     */
+    bool matchFiles() const;
+
+    /**
      * Returns currently used string matching type.
      * \see satsolver/repo.h
      */
@@ -357,9 +368,18 @@ namespace zypp
      * \see SEARCH_REGEX
      * \see SEARCH_NOCASE
      * \see SEARCH_NO_STORAGE_SOLVABLE
+     * \see SEARCH_FILES
      */
     void setFlags(int flags);
 
+    /**
+     * Free function to get the satsolver repo search
+     * flags.
+     *
+     * \see setFlags
+     */
+    int flags() const;
+
     class Impl;
   private:
     /** Pointer to implementation */