diff -r 7333d7932ef7 -r 8b7f4e561641 installationservices/swi/source/uiss/client/nativecomponentinfo.cpp --- a/installationservices/swi/source/uiss/client/nativecomponentinfo.cpp Tue Aug 31 15:21:33 2010 +0300 +++ b/installationservices/swi/source/uiss/client/nativecomponentinfo.cpp Wed Sep 01 12:22:02 2010 +0100 @@ -56,105 +56,6 @@ namespace Swi { - -CNativeComponentInfo::CNativeApplicationInfo::CNativeApplicationInfo() - { - } - -EXPORT_C CNativeComponentInfo::CNativeApplicationInfo::~CNativeApplicationInfo() - { - delete iName; - delete iGroupName; - delete iIconFileName; - } - -EXPORT_C CNativeComponentInfo::CNativeApplicationInfo* CNativeComponentInfo::CNativeApplicationInfo::NewLC(const TUid& aAppUid, const TDesC& aName, const TDesC& aGroupName, const TDesC& aIconFileName) - { - _LIT(emptyString,""); - // Leave if aName, aGroupName or aIconFileName exceeds KMaxDescriptorLength - if ((&aName != NULL && aName.Length() > KMaxDescriptorLength) || - (&aGroupName != NULL && aGroupName.Length() > KMaxDescriptorLength) || - (&aIconFileName != NULL && aIconFileName.Length() > KMaxDescriptorLength)) - { - User::Leave(KErrOverflow); - } - - CNativeComponentInfo::CNativeApplicationInfo* self = new (ELeave) CNativeComponentInfo::CNativeApplicationInfo(); - CleanupStack::PushL(self); - - self->iAppUid = aAppUid; - if(&aName == NULL) - { - self->iName = emptyString().AllocL(); - } - else - { - self->iName = aName.AllocL(); - } - - if(&aGroupName == NULL) - { - self->iGroupName = emptyString().AllocL(); - } - else - { - self->iGroupName = aGroupName.AllocL(); - } - - if(&aIconFileName == NULL) - { - self->iIconFileName = emptyString().AllocL(); - } - else - { - self->iIconFileName = aIconFileName.AllocL(); - } - - return self; - } - -EXPORT_C const TUid& CNativeComponentInfo::CNativeApplicationInfo::AppUid() const - { - return iAppUid; - } - -EXPORT_C const TDesC& CNativeComponentInfo::CNativeApplicationInfo::Name() const - { - return *iName; - } - -EXPORT_C const TDesC& CNativeComponentInfo::CNativeApplicationInfo::GroupName() const - { - return *iGroupName; - } - -EXPORT_C const TDesC& CNativeComponentInfo::CNativeApplicationInfo::IconFileName() const - { - return *iIconFileName; - } - -CNativeComponentInfo::CNativeApplicationInfo* CNativeComponentInfo::CNativeApplicationInfo::NewL(RReadStream& aStream) - { - CNativeComponentInfo::CNativeApplicationInfo* self = new (ELeave) CNativeComponentInfo::CNativeApplicationInfo(); - CleanupStack::PushL(self); - - self->iAppUid = TUid::Uid(aStream.ReadInt32L()); - self->iName = HBufC::NewL(aStream, KMaxDescriptorLength); - self->iGroupName = HBufC::NewL(aStream, KMaxDescriptorLength); - self->iIconFileName = HBufC::NewL(aStream, KMaxDescriptorLength); - - CleanupStack::Pop(self); - return self; - } - -void CNativeComponentInfo::CNativeApplicationInfo::ExternalizeL(RWriteStream& aStream) const - { - aStream.WriteInt32L(iAppUid.iUid); - aStream << *iName; - aStream << *iGroupName; - aStream << *iIconFileName; - } - CNativeComponentInfo::CNativeComponentInfo() : iAuthenticity(Usif::ENotAuthenticated) { iUserGrantableCaps.SetEmpty(); @@ -165,8 +66,8 @@ delete iComponentName; delete iGlobalComponentId; delete iVersion; - delete iVendor; - iApplications.ResetAndDestroy(); + delete iVendor; + iChildren.Close(); } @@ -203,14 +104,6 @@ aStream.WriteInt32L(PackCapabilitySet(iUserGrantableCaps)); aStream.WriteInt32L(iMaxInstalledSize); aStream.WriteInt32L(iHasExe); - aStream.WriteInt32L(iIsDriveSelectionRequired); - - const TInt numApplications = iApplications.Count(); - aStream.WriteInt32L(numApplications); - for (TInt i=0; iExternalizeL(aStream); - } // Recursively internalize all other childrens as well. const TInt numChildren = iChildren.Count(); @@ -258,16 +151,6 @@ UnpackCapabilitySet(capsBitMask, iUserGrantableCaps); iMaxInstalledSize = aStream.ReadInt32L(); iHasExe = aStream.ReadInt32L(); - iIsDriveSelectionRequired = aStream.ReadInt32L(); - - const TInt numApplications = aStream.ReadInt32L(); - for (TInt i=0; i