17 */ |
17 */ |
18 |
18 |
19 #include "WidgetRegistrationManager.h" |
19 #include "WidgetRegistrationManager.h" |
20 #include "WidgetInstaller.h" |
20 #include "WidgetInstaller.h" |
21 #include <apgcli.h> |
21 #include <apgcli.h> |
22 #include <apgicnfl.h> |
22 #include <APGICNFL.h> |
23 |
|
24 #ifdef SYMBIAN_ENABLE_SPLIT_HEADERS |
23 #ifdef SYMBIAN_ENABLE_SPLIT_HEADERS |
25 #include <apgicnflpartner.h> |
24 #include <apgicnflpartner.h> |
26 //#include <apgicnflinternal.h> // missing |
25 //#include <apgicnflinternal.h> // missing |
27 #endif |
26 #endif |
28 |
27 #include <S32MEM.H> |
29 #include <s32mem.h> |
28 #include <widgetregistrydata.h> |
30 #include <WidgetRegistryData.h> |
|
31 |
29 |
32 // CONSTANTS |
30 // CONSTANTS |
33 _LIT(KMBMExt, ".mbm"); |
31 _LIT(KMBMExt, ".mbm"); |
34 |
32 |
35 |
33 |
98 { |
96 { |
99 RApaLsSession apparcSession; |
97 RApaLsSession apparcSession; |
100 User::LeaveIfError( apparcSession.Connect() ); |
98 User::LeaveIfError( apparcSession.Connect() ); |
101 |
99 |
102 apparcSession.PrepareNonNativeApplicationsUpdatesL(); |
100 apparcSession.PrepareNonNativeApplicationsUpdatesL(); |
103 apparcSession.DeregisterNonNativeApplicationL( aUid ); |
101 apparcSession.DeregisterNonNativeApplicationL( aUid ); |
104 apparcSession.DeregisterNonNativeApplicationTypeL( aUid ); |
|
105 apparcSession.CommitNonNativeApplicationsUpdatesL(); |
102 apparcSession.CommitNonNativeApplicationsUpdatesL(); |
106 apparcSession.Close(); |
103 apparcSession.Close(); |
107 } |
104 } |
|
105 |
|
106 // ============================================================================ |
|
107 // CWidgetRegistrationManager::DeregisterWidgetL() |
|
108 // Deregister installed widgets as non native app |
|
109 // |
|
110 // @since 5.1 |
|
111 // ============================================================================ |
|
112 // |
|
113 void CWidgetRegistrationManager::DeregisterWidgetsL( const RArray<TUid>& aUidList ) |
|
114 { |
|
115 RApaLsSession apparcSession; |
|
116 User::LeaveIfError( apparcSession.Connect() ); |
|
117 |
|
118 apparcSession.PrepareNonNativeApplicationsUpdatesL(); |
|
119 for(TInt i = 0;i<aUidList.Count();i++) |
|
120 { |
|
121 apparcSession.DeregisterNonNativeApplicationL( aUidList[i] ); |
|
122 } |
|
123 apparcSession.CommitNonNativeApplicationsUpdatesL(); |
|
124 apparcSession.Close(); |
|
125 } |
108 |
126 |
109 // ============================================================================ |
127 // ============================================================================ |
110 // CWidgetRegistrationManager::RegisterWidgetL() |
128 // CWidgetRegistrationManager::RegisterWidgetL() |
111 // Register installed widget as non native app |
129 // Register installed widget as non native app |
112 // |
130 // |
125 const TUid& aUid ) |
143 const TUid& aUid ) |
126 { |
144 { |
127 RApaLsSession apparcSession; |
145 RApaLsSession apparcSession; |
128 CleanupClosePushL( apparcSession ); |
146 CleanupClosePushL( apparcSession ); |
129 User::LeaveIfError( apparcSession.Connect() ); |
147 User::LeaveIfError( apparcSession.Connect() ); |
130 // TODO move this where it is only done once |
|
131 apparcSession.PrepareNonNativeApplicationsUpdatesL(); |
|
132 apparcSession.DeregisterNonNativeApplicationL( KUidWidgetLauncher ); |
|
133 apparcSession.DeregisterNonNativeApplicationTypeL( KUidWidgetLauncher ); |
|
134 apparcSession.CommitNonNativeApplicationsUpdatesL(); |
|
135 // TODO end |
|
136 |
148 |
137 // reasonably like an acceptable file name |
149 // reasonably like an acceptable file name |
138 TBuf<KWidgetRegistryVal> appName; |
150 TBuf<KWidgetRegistryVal> appName; |
139 appName.Append( aMainHTML ); |
151 appName.Append( aMainHTML ); |
140 |
152 |