File: private-history.h

package info (click to toggle)
apt 3.1.12
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 22,736 kB
  • sloc: cpp: 71,048; sh: 31,750; xml: 5,553; perl: 217; python: 197; ansic: 191; makefile: 41
file content (41 lines) | stat: -rw-r--r-- 1,198 bytes parent folder | download | duplicates (2)
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
#ifndef APT_PRIVATE_HISTORY_H
#define APT_PRIVATE_HISTORY_H

#include <apt-pkg/cmndline.h>
#include <apt-pkg/history.h>
#include <apt-pkg/macros.h>
#include <apt-pkg/tagfile.h>

APT_PUBLIC bool DoHistoryInfo(CommandLine &Cmd);
APT_PUBLIC bool DoHistoryList(CommandLine &Cmd);
APT_PUBLIC bool DoHistoryRedo(CommandLine &Cmd);
APT_PUBLIC bool DoHistoryRollback(CommandLine &Cmd);
APT_PUBLIC bool DoHistoryUndo(CommandLine &Cmd);

namespace APT::Internal
{
using namespace History;
/** 
 * Flatten the changes contained within a history entry.
 *
 * This function extracts and returns a flat list of all changes
 * from the given entry, preserving their order if applicable.
 *
 * @param entry A history entry containing a map of changes.
 * @return A vector containing all individual changes from the entry.
 */
std::vector<Change> FlattenChanges(const Entry &entry);

/** 
 * Invert a change.
 *
 * This function inverts a change's effective action and version
 * such that a change followed by its inverse has no effective change.
 *
 * @param change A transactional change.
 * @return The given change's inverse.
 */
Change InvertChange(const Change &change);

} // namespace APT::Internal
#endif