/usr/include/x86_64-linux-gnu/zypp/ProblemSolution.h is in libzypp-dev 15.3.0-1build1.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 | /**
*
* Easy-to use interface to the ZYPP dependency resolver
*
* Author: Stefan Hundhammer <sh@suse.de>
*
**/
#ifndef ZYPP_PROBLEMSOLUTION_H
#define ZYPP_PROBLEMSOLUTION_H
#include <list>
#include <string>
#include "zypp/base/ReferenceCounted.h"
#include "zypp/base/PtrTypes.h"
#include "zypp/solver/detail/Resolver.h"
#include "zypp/ResolverProblem.h"
#include "zypp/solver/detail/SolutionAction.h"
#include "zypp/solver/detail/Types.h"
/////////////////////////////////////////////////////////////////////////
namespace zypp
{ ///////////////////////////////////////////////////////////////////////
/**
* Class representing one possible solution to one problem found during resolving
*
* All problems should have at least 2-3 (mutually exclusive) solutions:
*
* - Undo: Do not perform the offending transaction
* (do not install the package that had unsatisfied requirements,
* do not remove the package that would break other packages' requirements)
*
* - Remove referrers: Remove all packages that would break because
* they depend on the package that is requested to be removed
*
* - Ignore: Inject artificial "provides" for a missing requirement
* (pretend that requirement is satisfied)
**/
class ProblemSolution : public base::ReferenceCounted
{
protected:
/**
* Clear all data.
* In particular, delete all members of _actions.
**/
void clear();
//
// Data members
//
ResolverProblem_Ptr _problem;
solver::detail::CSolutionActionList _actions;
std::string _description;
std::string _details;
public:
/**
* Constructor.
**/
ProblemSolution( ResolverProblem_Ptr parent, const std::string & description, const std::string & details );
/**
* Destructor.
**/
~ProblemSolution();
// ---------------------------------- I/O
friend std::ostream& operator<<(std::ostream&, const ProblemSolution & solution);
friend std::ostream& operator<<(std::ostream&, const ProblemSolutionList & solutionlist);
friend std::ostream& operator<<(std::ostream&, const CProblemSolutionList & solutionlist);
// ---------------------------------- accessors
/**
* Return a one-line text description of this solution.
**/
std::string description() const { return _description; }
/**
* Return a (possibly multi-line) detailed description of this
* solution or an empty string if there are no useful details.
**/
std::string details() const { return _details; }
/**
* Return the parent dependency problem.
**/
ResolverProblem_Ptr problem() const { return _problem; }
// ---------------------------------- methods
/**
* Apply this solution, i.e. execute all of its actions.
*
* Returns 'true' on success, 'false' if actions could not be performed.
**/
bool apply (solver::detail::Resolver & resolver);
/**
* Add an action to the actions list.
**/
void addAction( solver::detail::SolutionAction_constPtr action );
solver::detail::CSolutionActionList actions() {return _actions;}
};
///////////////////////////////////////////////////////////////////////
};// namespace zypp
/////////////////////////////////////////////////////////////////////////
#endif // ZYPP_PROBLEMSOLUTION_H
|