libyui-qt-pkg  2.45.27
YQPkgFilters.h
1 /**************************************************************************
2 Copyright (C) 2018 SUSE LLC
3 All Rights Reserved.
4 
5 This program is free software; you can redistribute it and/or modify
6 it under the terms of the GNU General Public License as published by
7 the Free Software Foundation; either version 2 of the License, or
8 (at your option) any later version.
9 
10 This program is distributed in the hope that it will be useful,
11 but WITHOUT ANY WARRANTY; without even the implied warranty of
12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 GNU General Public License for more details.
14 
15 You should have received a copy of the GNU General Public License along
16 with this program; if not, write to the Free Software Foundation, Inc.,
17 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
18 
19 */
20 
21 #ifndef YQPkgFilters_h
22 #define YQPkgFilters_h
23 
24 #include "YQZypp.h"
25 
26 /**
27  * @short Zypp filtering helpers
28  **/
30 {
31 
32 public:
33 
34  /**
35  * Returns the product if the filter finds a single product
36  * or null product if there are no or multiple products.
37  * @param filter filtering function, the parameter is the product pool item,
38  * returning true if it matches the expectations
39  * @return Found zypp product or null
40  */
41  static ZyppProduct singleProductFilter( std::function<bool(const zypp::PoolItem& item)> filter);
42 
43 };
44 
45 #endif // ifndef YQPkgFilters_h
static ZyppProduct singleProductFilter(std::function< bool(const zypp::PoolItem &item)> filter)
Returns the product if the filter finds a single product or null product if there are no or multiple ...
Definition: YQPkgFilters.cc:35
Zypp filtering helpers.
Definition: YQPkgFilters.h:29