24#if !defined(E22949C2ACEF4F1DB1F4008919909456)
25#define E22949C2ACEF4F1DB1F4008919909456
35#include <miktex/Util/OptionSet>
36#include <miktex/Util/PathName>
38#include "RepositoryInfo.h"
39#include "definitions.h"
41MIKTEX_PACKAGES_BEGIN_NAMESPACE;
84 virtual void MIKTEXTHISCALL
ReportLine(
const std::string& str) = 0;
115 virtual void MIKTEXTHISCALL
SetRepository(
const std::string& repository) = 0;
124 virtual void MIKTEXTHISCALL
UpdateDb(UpdateDbOptionSet options) = 0;
182 virtual std::vector<UpdateInfo> MIKTEXTHISCALL
GetUpdates() = 0;
209 virtual std::vector<UpgradeInfo> MIKTEXTHISCALL
GetUpgrades() = 0;
348 virtual void MIKTEXTHISCALL
SetFileLists(
const std::vector<std::string>& toBeInstalled,
const std::vector<std::string>& toBeRemoved) = 0;
358 virtual void MIKTEXTHISCALL
SetFileList(
const std::vector<std::string>& toBeInstalled) = 0;
374 InitInfo() =
default;
375 InitInfo(
const InitInfo& other) =
default;
376 InitInfo& operator=(
const InitInfo& other) =
default;
377 InitInfo(InitInfo&& other) =
default;
378 InitInfo& operator=(InitInfo&& other) =
default;
379 ~InitInfo() =
default;
391MIKTEX_PACKAGES_END_NAMESPACE;
Callback interface.
Definition PackageInstaller.h:79
virtual bool OnRetryableError(const std::string &message)=0
virtual void ReportLine(const std::string &str)=0
virtual bool OnProgress(Notification nf)=0
Definition PackageInstaller.h:103
virtual void InstallRemoveAsync(Role role)=0
virtual void SetDownloadDirectory(const MiKTeX::Util::PathName &directory)=0
virtual void UpdateDb(UpdateDbOptionSet options)=0
Synchronizes the package database.
virtual void Dispose()=0
Releases all resources used by this package installer object.
virtual void FindUpgrades(PackageLevel packageLevel)=0
virtual void FindUpdatesAsync()=0
virtual void SetRepository(const std::string &repository)=0
virtual void UpdateDbAsync()=0
virtual void SetPackageLevel(PackageLevel packageLevel)=0
virtual void RegisterComponents(bool postInstall)=0
virtual void SetCallback(PackageInstallerCallback *callback)=0
virtual void WaitForCompletion()=0
Waits for the started thread to complete.
virtual void FindUpgradesAsync(PackageLevel packageLevel)=0
virtual bool IsRunning() const =0
virtual std::vector< UpgradeInfo > GetUpgrades()=0
virtual void DownloadAsync()=0
virtual ProgressInfo GetProgressInfo()=0
virtual void FindUpdates()=0
Checks for updates.
virtual void Download()=0
virtual std::vector< UpdateInfo > GetUpdates()=0
virtual void SetFileLists(const std::vector< std::string > &toBeInstalled, const std::vector< std::string > &toBeRemoved)=0
virtual void SetFileList(const std::vector< std::string > &toBeInstalled)=0
Role
Installation role.
Definition PackageInstaller.h:214
@ Updater
Updater.
Definition PackageInstaller.h:220
@ Installer
Installer (setup) program.
Definition PackageInstaller.h:218
@ Application
Regular application.
Definition PackageInstaller.h:216
virtual void InstallRemove(Role role)=0
Definition OptionSet.h:26
Instances of this class can be used to store path names.
Definition PathName.h:64
Notification
Installer notifications.
Definition PackageInstaller.h:53
@ RemoveFileStart
File removal is about to start.
Definition PackageInstaller.h:68
@ InstallFileStart
File installation is about to start.
Definition PackageInstaller.h:60
@ DownloadPackageEnd
Package download has finished.
Definition PackageInstaller.h:58
@ RemoveFileEnd
File removal has finished.
Definition PackageInstaller.h:70
@ DownloadPackageStart
Package download is about to start.
Definition PackageInstaller.h:56
@ RemovePackageEnd
Package removal has finished.
Definition PackageInstaller.h:74
@ InstallPackageStart
Package installation is about to start.
Definition PackageInstaller.h:64
@ RemovePackageStart
Package removal is about to start.
Definition PackageInstaller.h:72
@ InstallPackageEnd
Package installation has finished.
Definition PackageInstaller.h:66
@ InstallFileEnd
File installation has finished.
Definition PackageInstaller.h:62
constexpr std::time_t InvalidTimeT
An invalid timestamp.
Definition definitions.h:30
UpdateDbOption
UpdateDb options.
Definition PackageInstaller.h:45
PackageLevel
Package level.
Definition RepositoryInfo.h:40
bool unattended
Indicates whether to operate in unattended mode.
Definition PackageInstaller.h:385
bool enablePostProcessing
Indicates whether to enable or disable post-processing.
Definition PackageInstaller.h:387
PackageInstallerCallback * callback
Pointer to an object implementing the callback interface.
Definition PackageInstaller.h:381
Progress information.
Definition PackageInstaller.h:254
unsigned long cFilesRemoveTotal
Number of files to be removed.
Definition PackageInstaller.h:268
std::size_t cbPackageInstallTotal
Number of bytes to be written (current package).
Definition PackageInstaller.h:310
unsigned long cFilesRemoveCompleted
Number of removed files.
Definition PackageInstaller.h:265
unsigned long cFilesInstallTotal
Number of files to be installed.
Definition PackageInstaller.h:298
std::string packageId
ID of the current package.
Definition PackageInstaller.h:256
MiKTeX::Util::PathName fileName
Path name of current file.
Definition PackageInstaller.h:262
unsigned long bytesPerSecond
Current transfer speed.
Definition PackageInstaller.h:319
std::size_t cbPackageDownloadTotal
Number of bytes to be received (current package).
Definition PackageInstaller.h:280
std::size_t cbPackageInstallCompleted
Number of written bytes (current package).
Definition PackageInstaller.h:307
std::size_t cbDownloadCompleted
Number of bytes received.
Definition PackageInstaller.h:283
unsigned long cPackagesInstallTotal
Number of packages to be installed.
Definition PackageInstaller.h:304
std::size_t cbDownloadTotal
Number of bytes to be received.
Definition PackageInstaller.h:286
unsigned long cFilesInstallCompleted
Number of installed files.
Definition PackageInstaller.h:295
std::string displayName
Display name of package.
Definition PackageInstaller.h:259
std::size_t cFilesPackageInstallCompleted
Number of installed files (current package).
Definition PackageInstaller.h:289
unsigned long cPackagesRemoveCompleted
Number of removed packages.
Definition PackageInstaller.h:271
std::size_t cbPackageDownloadCompleted
Number of received bytes (current package).
Definition PackageInstaller.h:277
unsigned numErrors
Number of errors.
Definition PackageInstaller.h:328
bool cancelled
Indicates whether the current operation has been cancelled.
Definition PackageInstaller.h:331
bool ready
Ready flag.
Definition PackageInstaller.h:325
std::size_t cbInstallTotal
Number of bytes to be written.
Definition PackageInstaller.h:316
unsigned long cPackagesInstallCompleted
Number of installed packages.
Definition PackageInstaller.h:301
std::size_t cbInstallCompleted
Number of bytes written.
Definition PackageInstaller.h:313
unsigned long cFilesPackageInstallTotal
Number of files to be installed (current package).
Definition PackageInstaller.h:292
unsigned long cPackagesRemoveTotal
Number of packages to be removed.
Definition PackageInstaller.h:274
unsigned long timeRemaining
Estimated time of arrival (millisecs remaining).
Definition PackageInstaller.h:322
Update information record.
Definition PackageInstaller.h:143
Action action
The action to take.
Definition PackageInstaller.h:176
Action
Update actions.
Definition PackageInstaller.h:154
@ KeepAdmin
No permission to remove.
Definition PackageInstaller.h:160
@ Update
Optional update.
Definition PackageInstaller.h:164
@ Repair
Package has been tampered with.
Definition PackageInstaller.h:170
@ KeepObsolete
Should be removed.
Definition PackageInstaller.h:162
@ Keep
Definition PackageInstaller.h:158
@ ForceRemove
Required deletion.
Definition PackageInstaller.h:168
@ ForceUpdate
Required update.
Definition PackageInstaller.h:166
@ ReleaseStateChange
Release channel has changed.
Definition PackageInstaller.h:172
std::string packageId
Package ID.
Definition PackageInstaller.h:145
std::time_t timePackaged
Date/Time the package was created.
Definition PackageInstaller.h:148
std::string version
Informal version informtion.
Definition PackageInstaller.h:151
Upgrade information record.
Definition PackageInstaller.h:197
std::time_t timePackaged
Packaging timestamp.
Definition PackageInstaller.h:201
std::string packageId
ID of an upgradaeble package.
Definition PackageInstaller.h:199
std::string version
Informal version information.
Definition PackageInstaller.h:203