1 /* -*- Mode: C; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- 2 * 3 * Copyright (C) 2012-2013 Red Hat, Inc. 4 * Copyright (C) 2015 Richard Hughes <richard@hughsie.com> 5 * 6 * Licensed under the GNU Lesser General Public License Version 2.1 7 * 8 * This library is free software; you can redistribute it and/or 9 * modify it under the terms of the GNU Lesser General Public 10 * License as published by the Free Software Foundation; either 11 * version 2.1 of the License, or (at your option) any later version. 12 * 13 * This library is distributed in the hope that it will be useful, 14 * but WITHOUT ANY WARRANTY; without even the implied warranty of 15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 16 * Lesser General Public License for more details. 17 * 18 * You should have received a copy of the GNU Lesser General Public 19 * License along with this library; if not, write to the Free Software 20 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA 21 */ 22 23 #ifndef __DNF_PACKAGESET_H 24 #define __DNF_PACKAGESET_H 25 26 #include "dnf-sack.h" 27 #include "hy-types.h" 28 29 #ifdef __cplusplus 30 extern "C" { 31 #endif 32 33 DnfPackageSet *dnf_packageset_new (DnfSack *sack); 34 void dnf_packageset_free (DnfPackageSet *pset); 35 DnfPackageSet *dnf_packageset_clone (DnfPackageSet *pset); 36 void dnf_packageset_add (DnfPackageSet *pset, DnfPackage *pkg); 37 size_t dnf_packageset_count (DnfPackageSet *pset); 38 int dnf_packageset_has (DnfPackageSet *pset, DnfPackage *pkg); 39 40 DnfPackageSet *dnf_packageset_from_bitmap (DnfSack *sack, Map *m); 41 Map *dnf_packageset_get_map (DnfPackageSet *pset); 42 43 G_DEFINE_AUTOPTR_CLEANUP_FUNC(DnfPackageSet, dnf_packageset_free) 44 45 #ifdef __cplusplus 46 } 47 #endif 48 49 #endif /* __DNF_PACKAGESET_H */ 50