1 /* 2 * Copyright (C) 2019 Red Hat, Inc. 3 * 4 * Licensed under the GNU Lesser General Public License Version 2.1 5 * 6 * This library is free software; you can redistribute it and/or 7 * modify it under the terms of the GNU Lesser General Public 8 * License as published by the Free Software Foundation; either 9 * version 2.1 of the License, or (at your option) any later version. 10 * 11 * This library is distributed in the hope that it will be useful, 12 * but WITHOUT ANY WARRANTY; without even the implied warranty of 13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 14 * Lesser General Public License for more details. 15 * 16 * You should have received a copy of the GNU Lesser General Public 17 * License along with this library; if not, write to the Free Software 18 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA 19 */ 20 21 22 #ifndef __ADVISORY_MODULE_HPP 23 #define __ADVISORY_MODULE_HPP 24 25 #include "../dnf-types.h" 26 #include "advisory.hpp" 27 28 #include <memory> 29 30 #include <solv/pooltypes.h> 31 32 33 namespace libdnf { 34 35 struct AdvisoryModule { 36 public: 37 AdvisoryModule(DnfSack *sack, Id advisory, Id name, Id stream, Id version, Id context, Id arch); 38 AdvisoryModule(const AdvisoryModule & src); 39 AdvisoryModule(AdvisoryModule && src); 40 ~AdvisoryModule(); 41 AdvisoryModule & operator=(const AdvisoryModule & src); 42 AdvisoryModule & operator=(AdvisoryModule && src) noexcept; 43 bool nsvcaEQ(AdvisoryModule & other); 44 bool isApplicable() const; 45 Advisory * getAdvisory() const; 46 const char * getName() const; 47 const char * getStream() const; 48 const char * getVersion() const; 49 const char * getContext() const; 50 const char * getArch() const; 51 DnfSack * getSack(); 52 private: 53 class Impl; 54 std::unique_ptr<Impl> pImpl; 55 }; 56 57 } 58 59 #endif /* __ADVISORY_MODULE_HPP */ 60