equal
deleted
inserted
replaced
16 */ |
16 */ |
17 |
17 |
18 #include <apgcli.h> |
18 #include <apgcli.h> |
19 #include <swi/sisregistrysession.h> |
19 #include <swi/sisregistrysession.h> |
20 #include <swi/sisregistryentry.h> |
20 #include <swi/sisregistryentry.h> |
|
21 |
21 #include "cautils.h" |
22 #include "cautils.h" |
22 #include "cadef.h" |
23 #include "cadef.h" |
23 #include "cainnerentry.h" |
24 #include "cainnerentry.h" |
24 #include "cauninstalloperation.h" |
25 #include "cauninstalloperation.h" |
25 _LIT8(KAppMimeType, "x-epoc/x-sisx-app"); |
26 _LIT8(KAppMimeType, "x-epoc/x-sisx-app"); |
67 // CCaUninstallOperation::ConstructL |
68 // CCaUninstallOperation::ConstructL |
68 // --------------------------------------------------------------------------- |
69 // --------------------------------------------------------------------------- |
69 // |
70 // |
70 void CCaUninstallOperation::ConstructL(CCaInnerEntry &aEntry) |
71 void CCaUninstallOperation::ConstructL(CCaInnerEntry &aEntry) |
71 { |
72 { |
72 TBuf<KCaMaxAttrValueLen> uidAttr; |
|
73 TUint uid = aEntry.GetUid(); |
73 TUint uid = aEntry.GetUid(); |
74 |
74 |
75 TUid packageUid = KNullUid; |
75 TUid packageUid = KNullUid; |
76 TPtrC8 mimeType; |
76 TPtrC8 mimeType; |
77 |
77 |
110 |
110 |
111 User::LeaveIfError(apaLsSession.Connect()); |
111 User::LeaveIfError(apaLsSession.Connect()); |
112 CleanupClosePushL(apaLsSession); |
112 CleanupClosePushL(apaLsSession); |
113 User::LeaveIfError(apaLsSession.GetAllApps()); |
113 User::LeaveIfError(apaLsSession.GetAllApps()); |
114 |
114 |
115 TApaAppInfo appInfo; |
115 // TApaAppInfo size is greater then 1024 bytes |
116 User::LeaveIfError(apaLsSession.GetAppInfo(appInfo, aAppUid)); |
116 // so its instances should not be created on the stack. |
117 if (!GetInstallPkgUidL(appInfo.iFullName, aPackageUid)) { |
117 TApaAppInfo* appInfo = new(ELeave) TApaAppInfo(); |
|
118 CleanupStack::PushL(appInfo); |
|
119 User::LeaveIfError(apaLsSession.GetAppInfo(*appInfo, aAppUid)); |
|
120 if (!GetInstallPkgUidL(appInfo->iFullName, aPackageUid)) { |
118 aPackageUid = aAppUid; |
121 aPackageUid = aAppUid; |
119 } |
122 } |
|
123 CleanupStack::PopAndDestroy(appInfo); |
120 aMimeType.Set(KAppMimeType); |
124 aMimeType.Set(KAppMimeType); |
121 |
125 |
122 CleanupStack::PopAndDestroy(&apaLsSession); |
126 CleanupStack::PopAndDestroy(&apaLsSession); |
123 } |
127 } |
124 |
128 |