Put PackageUpdateList into its own file

git-svn-id: svn://svn.code.sf.net/p/magicseteditor/code/trunk@904 0fc631ac-6414-0410-93d0-97cfa31319b6
This commit is contained in:
twanvl
2008-05-31 14:02:53 +00:00
parent a31f039d01
commit 9c18ed51e2
8 changed files with 427 additions and 362 deletions
+4 -4
View File
@@ -254,9 +254,9 @@ DownloadableInstaller::~DownloadableInstaller() {
// ----------------------------------------------------------------------------- : Installable package
InstallablePackage::InstallablePackage(const PackageVersionP& installed, const PackageDescriptionP& description)
: installed(installed)
, description(description)
InstallablePackage::InstallablePackage(const PackageDescriptionP& description, const PackageVersionP& installed)
: description(description)
, installed(installed)
, status(PACKAGE_INSTALLED)
, action(PACKAGE_NOTHING)
{}
@@ -586,5 +586,5 @@ InstallablePackageP mse_installable_package() {
mse_description->position_hint = -100;
mse_description->icon = load_resource_image(_("installer_program"));
//mse_description->description = _LABEL_("magic set editor package");
return new_intrusive2<InstallablePackage>(mse_version,mse_description);
return new_intrusive2<InstallablePackage>(mse_description, mse_version);
}
+11 -3
View File
@@ -18,6 +18,13 @@ DECLARE_POINTER_TYPE(PackageDescription);
DECLARE_POINTER_TYPE(DownloadableInstaller);
DECLARE_POINTER_TYPE(InstallablePackage);
// The installer system consists of several layers:
// - Installer = an actual package available in memory, containing packages to be installed
// - DownloadableInstaller = an installar (possibly) not yet available, i.e. just its URL
// - PackageDescription = description of a package version
// - InstallablePackage = the complete status of a package, both local and remote
// ----------------------------------------------------------------------------- : Installer
/// A package that contains other packages that can be installed
@@ -125,12 +132,13 @@ inline bool flag(int flags, int flag) { return (flags & flag) == flag; }
/// A package that can be installed, or is already installed
class InstallablePackage : public IntrusivePtrVirtualBase {
public:
//InstallablePackage();
/// A new package
InstallablePackage(const PackageDescriptionP&, const DownloadableInstallerP&);
InstallablePackage(const PackageVersionP&, const PackageDescriptionP&);
/// An installed package
InstallablePackage(const PackageDescriptionP&, const PackageVersionP&);
PackageVersionP installed; ///< The information of the installed package (if installed)
PackageDescriptionP description; ///< The details of the package. Either from the installed package or from an installer
PackageVersionP installed; ///< The information of the installed package (if installed)
DownloadableInstallerP installer; ///< The installer to install from (if updates are available)
PackageStatus status; ///< Status of installation
PackageAction action; ///< What to do with this package?