apt: apt-pkg/edsp.h Source File

apt 3.3.0 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 <cstdio>
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
107 APT_PUBLIC bool WriteLimitedScenario(pkgDepCache &Cache, FileFd &output,
108 OpProgress *Progress = NULL);
109
124 APT_PUBLIC bool ReadResponse(int const input, pkgDepCache &Cache, OpProgress *Progress = NULL);
125
142 APT_PUBLIC bool ReadRequest(int const input, std::list<std::string> &install,
143 std::list<std::string> &remove, unsigned int &flags);
144
157 APT_PUBLIC bool ApplyRequest(std::list<std::string> const &install,
158 std::list<std::string> const &remove,
159 pkgDepCache &Cache);
160
173 APT_PUBLIC bool WriteSolutionStanza(FileFd &output, char const * const Type, pkgCache::VerIterator const &Ver);
174
181 APT_PUBLIC bool WriteProgress(unsigned short const percent, const char* const message, FileFd &output);
182
198 APT_PUBLIC bool WriteError(char const * const uuid, std::string const &message, FileFd &output);
199
200
212 APT_PUBLIC pid_t ExecuteSolver(const char* const solver, int * const solver_in, int * const solver_out, bool /*overload*/);
213
226 APT_PUBLIC bool ResolveExternal(const char* const solver, pkgDepCache &Cache,
227 unsigned int const flags = 0,
228 OpProgress *Progress = NULL);
229}
230 /*}}}*/
231class pkgPackageManager;
232namespace EIPP /*{{{*/
233{
234 namespace Request
235 {
236 enum Flags
237 {
238 IMMEDIATE_CONFIGURATION_ALL = (1 << 0),
239 NO_IMMEDIATE_CONFIGURATION = (1 << 1),
240 ALLOW_TEMPORARY_REMOVE_OF_ESSENTIALS = (1 << 2),
241 };
242 }
243
244 APT_HIDDEN bool WriteRequest(pkgDepCache &Cache, FileFd &output,
245 unsigned int const flags, OpProgress * const Progress);
246 APT_HIDDEN bool WriteScenario(pkgDepCache &Cache, FileFd &output,
247 OpProgress * const Progress);
248
249 APT_HIDDEN bool OrderInstall(char const * const planner, pkgPackageManager * const PM,
250 unsigned int const version, OpProgress * const Progress);
251 APT_HIDDEN bool ReadResponse(int const input, pkgPackageManager * const PM,
252 OpProgress * const Progress);
253
254 enum class PKG_ACTION
255 {
256 NOOP,
257 INSTALL,
258 REINSTALL,
259 REMOVE
260 };
261 APT_PUBLIC bool ReadRequest(int const input,
262 std::list<std::pair<std::string,PKG_ACTION>> &actions,
263 unsigned int &flags);
264 APT_PUBLIC bool ApplyRequest(std::list<std::pair<std::string,PKG_ACTION>> &actions,
265 pkgDepCache &Cache);
266}
267 /*}}}*/
268#endif
cacheset.h
FileFd
Definition fileutl.h:43
OpProgress
Definition progress.h:30
pkgCache::VerIterator
Definition cacheiterators.h:218
pkgDepCache
Definition depcache.h:63
pkgPackageManager
Definition packagemanager.h:49
EDSP::Request::Flags
Flags
Definition edsp.h:31
EDSP::Request::AUTOREMOVE
@ AUTOREMOVE
Definition edsp.h:32
EDSP::Request::FORBID_REMOVE
@ FORBID_REMOVE
Definition edsp.h:35
EIPP::Request::NO_IMMEDIATE_CONFIGURATION
@ NO_IMMEDIATE_CONFIGURATION
Definition edsp.h:239
EIPP::Request::ALLOW_TEMPORARY_REMOVE_OF_ESSENTIALS
@ ALLOW_TEMPORARY_REMOVE_OF_ESSENTIALS
Definition edsp.h:240
EDSP::Request::FORBID_NEW_INSTALL
@ FORBID_NEW_INSTALL
Definition edsp.h:34
EDSP::Request::UPGRADE_ALL
@ UPGRADE_ALL
Definition edsp.h:33
EIPP::Request::IMMEDIATE_CONFIGURATION_ALL
@ IMMEDIATE_CONFIGURATION_ALL
Definition edsp.h:238
pkgcache.h
pkgCache - Structure definitions for the cache file