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 |
23 #ifdef SYMBIAN_ENABLE_SPLIT_HEADERS |
24 #ifdef SYMBIAN_ENABLE_SPLIT_HEADERS |
24 #include <apgicnflpartner.h> |
25 #include <apgicnflpartner.h> |
25 //#include <apgicnflinternal.h> // missing |
26 //#include <apgicnflinternal.h> // missing |
26 #endif |
27 #endif |
27 #include <S32MEM.H> |
28 |
28 #include <widgetregistrydata.h> |
29 #include <s32mem.h> |
|
30 #include <WidgetRegistryData.h> |
29 |
31 |
30 // CONSTANTS |
32 // CONSTANTS |
31 _LIT(KMBMExt, ".mbm"); |
33 _LIT(KMBMExt, ".mbm"); |
32 |
34 |
33 |
35 |
96 { |
98 { |
97 RApaLsSession apparcSession; |
99 RApaLsSession apparcSession; |
98 User::LeaveIfError( apparcSession.Connect() ); |
100 User::LeaveIfError( apparcSession.Connect() ); |
99 |
101 |
100 apparcSession.PrepareNonNativeApplicationsUpdatesL(); |
102 apparcSession.PrepareNonNativeApplicationsUpdatesL(); |
101 apparcSession.DeregisterNonNativeApplicationL( aUid ); |
103 apparcSession.DeregisterNonNativeApplicationL( aUid ); |
|
104 apparcSession.DeregisterNonNativeApplicationTypeL( aUid ); |
102 apparcSession.CommitNonNativeApplicationsUpdatesL(); |
105 apparcSession.CommitNonNativeApplicationsUpdatesL(); |
103 apparcSession.Close(); |
106 apparcSession.Close(); |
104 } |
107 } |
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 } |
|
126 |
108 |
127 // ============================================================================ |
109 // ============================================================================ |
128 // CWidgetRegistrationManager::RegisterWidgetL() |
110 // CWidgetRegistrationManager::RegisterWidgetL() |
129 // Register installed widget as non native app |
111 // Register installed widget as non native app |
130 // |
112 // |
143 const TUid& aUid ) |
125 const TUid& aUid ) |
144 { |
126 { |
145 RApaLsSession apparcSession; |
127 RApaLsSession apparcSession; |
146 CleanupClosePushL( apparcSession ); |
128 CleanupClosePushL( apparcSession ); |
147 User::LeaveIfError( apparcSession.Connect() ); |
129 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 |
148 |
136 |
149 // reasonably like an acceptable file name |
137 // reasonably like an acceptable file name |
150 TBuf<KWidgetRegistryVal> appName; |
138 TBuf<KWidgetRegistryVal> appName; |
151 appName.Append( aMainHTML ); |
139 appName.Append( aMainHTML ); |
152 |
140 |