apt: apt-pkg/edsp.h Source File

apt 2.3.15 commandline package manager

edsp.h
Go to the documentation of this file.
1// -*- mode: cpp; mode: fold -*-
8 /*}}}*/
9#ifndef PKGLIB_EDSP_H
10#define PKGLIB_EDSP_H
11
12#include <apt-pkg/cacheset.h>
13#include <apt-pkg/macros.h>
14#include <apt-pkg/pkgcache.h>
15
16#include <stdio.h>
17
18#include <list>
19#include <string>
20#include <vector>
21
22
23class pkgDepCache;
24class OpProgress;
25
26namespace EDSP /*{{{*/
27{
28 namespace Request
29 {
30 enum Flags
31 {
32 AUTOREMOVE = (1 << 0),
33 UPGRADE_ALL = (1 << 1),
34 FORBID_NEW_INSTALL = (1 << 2),
35 FORBID_REMOVE = (1 << 3),
36 };
37 }
52 APT_PUBLIC bool WriteRequest(pkgDepCache &Cache, FileFd &output,
53 unsigned int const flags = 0,
54 OpProgress *Progress = NULL);
55
73 APT_PUBLIC bool WriteScenario(pkgDepCache &Cache, FileFd &output, OpProgress *Progress = NULL);
74
90 APT_PUBLIC bool WriteLimitedScenario(pkgDepCache &Cache, FileFd &output,
91 std::vector<bool> const &pkgset,
92 OpProgress *Progress = NULL);
93
108 APT_PUBLIC bool ReadResponse(int const input, pkgDepCache &Cache, OpProgress *Progress = NULL);
109
126 APT_PUBLIC bool ReadRequest(int const input, std::list<std::string> &install,
127 std::list<std::string> &remove, unsigned int &flags);
128
141 APT_PUBLIC bool ApplyRequest(std::list<std::string> const &install,
142 std::list<std::string> const &remove,
143 pkgDepCache &Cache);
144
157 APT_PUBLIC bool WriteSolutionStanza(FileFd &output, char const * const Type, pkgCache::VerIterator const &Ver);
158
165 APT_PUBLIC bool WriteProgress(unsigned short const percent, const char* const message, FileFd &output);
166
182 APT_PUBLIC bool WriteError(char const * const uuid, std::string const &message, FileFd &output);
183
184
196 APT_PUBLIC pid_t ExecuteSolver(const char* const solver, int * const solver_in, int * const solver_out, bool /*overload*/);
197
210 APT_PUBLIC bool ResolveExternal(const char* const solver, pkgDepCache &Cache,
211 unsigned int const flags = 0,
212 OpProgress *Progress = NULL);
213}
214 /*}}}*/
215class pkgPackageManager;
216namespace EIPP /*{{{*/
217{
218 namespace Request
219 {
220 enum Flags
221 {
222 IMMEDIATE_CONFIGURATION_ALL = (1 << 0),
223 NO_IMMEDIATE_CONFIGURATION = (1 << 1),
224 ALLOW_TEMPORARY_REMOVE_OF_ESSENTIALS = (1 << 2),
225 };
226 }
227
228 APT_HIDDEN bool WriteRequest(pkgDepCache &Cache, FileFd &output,
229 unsigned int const flags, OpProgress * const Progress);
230 APT_HIDDEN bool WriteScenario(pkgDepCache &Cache, FileFd &output,
231 OpProgress * const Progress);
232
233 APT_HIDDEN bool OrderInstall(char const * const planner, pkgPackageManager * const PM,
234 unsigned int const version, OpProgress * const Progress);
235 APT_HIDDEN bool ReadResponse(int const input, pkgPackageManager * const PM,
236 OpProgress * const Progress);
237
238 enum class PKG_ACTION
239 {
240 NOOP,
241 INSTALL,
242 REINSTALL,
243 REMOVE
244 };
245 APT_PUBLIC bool ReadRequest(int const input,
246 std::list<std::pair<std::string,PKG_ACTION>> &actions,
247 unsigned int &flags);
248 APT_PUBLIC bool ApplyRequest(std::list<std::pair<std::string,PKG_ACTION>> &actions,
249 pkgDepCache &Cache);
250}
251 /*}}}*/
252#endif
cacheset.h
FileFd
Definition: fileutl.h:39
OpProgress
Definition: progress.h:30
pkgDepCache
Definition: depcache.h:62
pkgPackageManager
Definition: packagemanager.h:48
EDSP::ApplyRequest
APT_PUBLIC bool ApplyRequest(std::list< std::string > const &install, std::list< std::string > const &remove, pkgDepCache &Cache)
takes the request lists and applies it on the cache
Definition: edsp.cc:606
EDSP::ReadRequest
APT_PUBLIC bool ReadRequest(int const input, std::list< std::string > &install, std::list< std::string > &remove, unsigned int &flags)
search and read the request stanza for action later
Definition: edsp.cc:554
EDSP::Request::Flags
Flags
Definition: edsp.h:31
EDSP::Request::AUTOREMOVE
@ AUTOREMOVE
Definition: edsp.h:32
EIPP::Request::ALLOW_TEMPORARY_REMOVE_OF_ESSENTIALS
@ ALLOW_TEMPORARY_REMOVE_OF_ESSENTIALS
Definition: edsp.h:224
EDSP::Request::FORBID_NEW_INSTALL
@ FORBID_NEW_INSTALL
Definition: edsp.h:34
EIPP::Request::IMMEDIATE_CONFIGURATION_ALL
@ IMMEDIATE_CONFIGURATION_ALL
Definition: edsp.h:222
pkgcache.h
pkgCache - Structure definitions for the cache file