Author: dmacvicar Date: Wed Aug 13 16:55:53 2008 New Revision: 10839 URL: http://svn.opensuse.org/viewcvs/zypp?rev=10839&view=rev Log: - add flags to retrieve the flags (it is useless to set them wihtout seeing them, or you can't append) - add the new sat solver flag to search in files Modified: trunk/libzypp/VERSION.cmake trunk/libzypp/zypp/PoolQuery.cc trunk/libzypp/zypp/PoolQuery.h Modified: trunk/libzypp/VERSION.cmake URL: http://svn.opensuse.org/viewcvs/zypp/trunk/libzypp/VERSION.cmake?rev=10839&r1=10838&r2=10839&view=diff ============================================================================== --- trunk/libzypp/VERSION.cmake (original) +++ trunk/libzypp/VERSION.cmake Wed Aug 13 16:55:53 2008 @@ -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) Modified: trunk/libzypp/zypp/PoolQuery.cc URL: http://svn.opensuse.org/viewcvs/zypp/trunk/libzypp/zypp/PoolQuery.cc?rev=10839&r1=10838&r2=10839&view=diff ============================================================================== --- trunk/libzypp/zypp/PoolQuery.cc (original) +++ trunk/libzypp/zypp/PoolQuery.cc Wed Aug 13 16:55:53 2008 @@ -811,6 +811,10 @@ _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 @@ 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 @@ { 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; } Modified: trunk/libzypp/zypp/PoolQuery.h URL: http://svn.opensuse.org/viewcvs/zypp/trunk/libzypp/zypp/PoolQuery.h?rev=10839&r1=10838&r2=10839&view=diff ============================================================================== --- trunk/libzypp/zypp/PoolQuery.h (original) +++ trunk/libzypp/zypp/PoolQuery.h Wed Aug 13 16:55:53 2008 @@ -259,7 +259,8 @@ 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 @@ 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 @@ * \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 */ -- To unsubscribe, e-mail: zypp-commit+unsubscribe@opensuse.org For additional commands, e-mail: zypp-commit+help@opensuse.org