39 // 2nd constructor |
39 // 2nd constructor |
40 // ----------------------------------------------------------------------------- |
40 // ----------------------------------------------------------------------------- |
41 // |
41 // |
42 void CSilentUninstaller::ConstructL() |
42 void CSilentUninstaller::ConstructL() |
43 { |
43 { |
44 iConnected = EFalse; |
44 iConnected = EFalse; |
45 |
|
46 iSifOptions = Usif::COpaqueNamedParams::NewL(); |
45 iSifOptions = Usif::COpaqueNamedParams::NewL(); |
47 iSifResults = Usif::COpaqueNamedParams::NewL(); |
46 iSifResults = Usif::COpaqueNamedParams::NewL(); |
48 |
47 // Set parameters for silent uninstall. |
49 // Set parameters for silent uninstall. |
48 iSifOptions->AddIntL( Usif::KSifInParam_InstallSilently, ETrue ); |
50 // iSifOptions->AddIntL( Usif::KSifInParam_AllowAppShutdown, ETrue ); |
49 iSifOptions->AddIntL( Usif::KSifInParam_AllowAppShutdown, ETrue ); |
51 // iSifOptions->AddIntL( Usif::KSifInParam_AllowAppBreakDependency, EFalse ); |
50 iSifOptions->AddIntL( Usif::KSifInParam_AllowAppBreakDependency, EFalse ); |
52 // TODO: Should "silent install" be defined also for uninstall |
|
53 //iSifOptions->AddIntL( Usif::KSifInParam_InstallSilently, ETrue ); |
|
54 } |
51 } |
55 |
52 |
56 |
53 |
57 // ----------------------------------------------------------------------------- |
54 // ----------------------------------------------------------------------------- |
58 // Two-phased constructor. |
55 // Two-phased constructor. |
92 // ----------------------------------------------------------------------------- |
89 // ----------------------------------------------------------------------------- |
93 // |
90 // |
94 void CSilentUninstaller::UninstallL( |
91 void CSilentUninstaller::UninstallL( |
95 TUid& aUid, |
92 TUid& aUid, |
96 TRequestStatus& aReqStatus, |
93 TRequestStatus& aReqStatus, |
97 TDesC8& aMIME ) |
94 TDesC& aMIME ) |
98 { |
95 { |
99 FLOG_1( _L("Daemon: UninstallL: UID = 0x%x"), aUid.iUid ); |
96 FLOG_1( _L("Daemon: UninstallL: UID = 0x%x"), aUid.iUid ); |
100 |
97 |
101 if ( !iConnected ) |
98 if ( !iConnected ) |
102 { |
99 { |
103 FLOG( _L("[CSilentUninstaller] Connect to sif installer server") ); |
100 FLOG( _L("[CSilentUninstaller] Connect to sif installer server") ); |
104 User::LeaveIfError( iSWInstallerFW.Connect() ); |
101 User::LeaveIfError( iSWInstallerFW.Connect() ); |
105 |
|
106 FLOG( _L("[CSilentUninstaller] Connect to SisRegistery") ); |
102 FLOG( _L("[CSilentUninstaller] Connect to SisRegistery") ); |
107 User::LeaveIfError( iRegistrySession.Connect() ); |
103 User::LeaveIfError( iRegistrySession.Connect() ); |
108 |
|
109 iConnected = ETrue; |
104 iConnected = ETrue; |
110 } |
105 } |
111 |
106 |
112 // TODO: How is mime type set ? |
|
113 // Set MIME type. |
107 // Set MIME type. |
114 //iSifOptions->AddStringL( Usif::KSifInParam_MimeType, aMIME ); |
108 iSifOptions->AddStringL( Usif::KSifInParam_MimeType, aMIME ); |
115 |
109 |
116 // Usif need the component ID, so we need to map the package UID to |
110 // Usif need the component ID, so we need to map the package UID to |
117 // component ID. To do this simple we need SisRegistry. |
111 // component ID. To do this simple we need SisRegistry. |
118 Usif::TComponentId componentId; |
112 Usif::TComponentId componentId; |
119 componentId = iRegistrySession.GetComponentIdForUidL( aUid ); |
113 componentId = iRegistrySession.GetComponentIdForUidL( aUid ); |