Attempt to represent the S^2->S^3 header reorganisation as a series of "hg rename" operations
1 // Copyright (c) 2007-2009 Nokia Corporation and/or its subsidiary(-ies).
2 // All rights reserved.
3 // This component and the accompanying materials are made available
4 // under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members
5 // which accompanies this distribution, and is available
6 // at the URL "http://www.symbianfoundation.org/legal/licencesv10.html".
8 // Initial Contributors:
9 // Nokia Corporation - initial contribution.
14 // Interface class for listing/removing uninstalled packages from a removable drive
26 #ifndef __PKGREMOVER_H__
27 #define __PKGREMOVER_H__
36 class CUninstalledPackageEntry;
40 * This class provides static methods for managing uninstalled native packages
41 * (SIS files) that are taking up space on removable drives.
47 NONSHARABLE_CLASS(UninstalledSisPackages)
52 * Get the list of uninstalled packages on a specified removable drive. In
53 * this context uninstalled means 'not known by this phone'. This will list
54 * uninstalled PA & PP files found in the SWI Daemon's private directory, and
55 * will also search the sis registry files on the drive for uninstalled
58 * @param aDrive Removable drive number (@see TDriveNumber)
59 * @param aPackageList Array of pointers to the uninstalled packages
60 * found on the specified drive (@see
61 * CUninstalledPackageEntry). This array is assumed to be empty.
62 * The caller takes ownership of the elements added to the array.
63 * @leave One of the system-wide error codes.
64 * @leave KErrNotRemovable If the drive is not removable or is substed
65 * @leave KErrPackageFileCorrupt If an error occurs during the processing of files
66 * @capability ReadDeviceData Required to access protected directories during listing operation
67 * @capability ProtServ Required to access services of software installer
68 * @capability TrustedUI Required to access services of software installer
70 IMPORT_C static void ListL(TDriveNumber aDrive, RPointerArray<CUninstalledPackageEntry>& aPackageList);
73 * Remove the specified uninstalled package. The following restrictions apply to the files that will be removed:
75 * <li> For security reasons only files on the same drive as the package controller will be removed. Files on other drives will be orphaned.
76 * <li> Files belonging to other packages will not be removed.
79 * @param aPackage The uninstalled package to remove (@see CUninstalledPackageEntry)
80 * @leave One of the system-wide error codes.
81 * @leave KErrNotRemovable If the drive is not removable or is substed
82 * @leave KErrPackageIsInstalled If the specified package is installed on the device
83 * @leave KErrPackageFileCorrupt If an error occurs during the processing of files
84 * @capability WriteDeviceData Required to write to protected directories during remove operation
85 * @capability ProtServ Required to access services of software installer
86 * @capability TrustedUI Required to access services of software installer
88 IMPORT_C static void RemoveL(const CUninstalledPackageEntry& aPackage);
93 * Uninstalled application entry class.
95 * This class is not externally instantiable. It is returned as a result of
96 * querying for a list of uninstalled packages present on a removable drive.
97 * Each object of this type represents one uninstalled package. Methods can
98 * be called on this object to retrieve the package details such as
99 * Package UID, Name, Vendor, Version and Type.
105 NONSHARABLE_CLASS(CUninstalledPackageEntry) : public CBase
110 ESaPackage, ///< Standard Application
111 ESpPackage, ///< Standard Patch (augmentation)
112 EPuPackage, ///< Partial Upgrade
113 EPaPackage, ///< Preinstalled Application
114 EPpPackage ///< Preinstalled Patch
118 * Get the package Uid
120 * @return The Uid of this package
122 IMPORT_C const TUid& Uid() const;
125 * Get the package name
127 * @return The name of this package as reference to TDesC
129 IMPORT_C const TDesC& Name() const;
132 * Get the package unique vendor name
134 * @return The unique vendor name of this package as reference to TDesC
136 IMPORT_C const TDesC& Vendor() const;
139 * Get the package version
141 * @return The version number of this package
143 IMPORT_C const TVersion& Version() const;
146 * Get the package type
148 * @return The package type of this package
150 IMPORT_C const TPackageType& PackageType() const;
155 virtual ~CUninstalledPackageEntry();
158 static CUninstalledPackageEntry* NewLC(const TUid& aUid, const TDesC& aPackageName,
159 const TDesC& aVendorName, const TVersion& aVersion, const TPackageType aPackageType,
160 const TDesC& aPackageFile, const TDesC& aAssocStubSisFile);
163 CUninstalledPackageEntry();
166 void ConstructL(const TUid& aUid, const TDesC& aPackageName, const TDesC& aVendorName,
167 const TVersion& aVersion, const TPackageType aPackageType, const TDesC& aPackageFile,
168 const TDesC& aAssocStubSisFile);
170 const TDesC& PackageFile() const;
171 const TDesC& AssociatedStubSisFile() const;
180 /// The package unique vendor name
183 /// The package version
189 // The sis/controller file name with full path
192 // The stub sis file name with full path (if the package file is a controller file)
193 HBufC* iAssocStubSisFile;
195 friend class UninstalledSisPackages;
200 #endif // __PKGREMOVER_H__