equal
deleted
inserted
replaced
21 |
21 |
22 #include <ccpixindexer.h> |
22 #include <ccpixindexer.h> |
23 #include <csearchdocument.h> |
23 #include <csearchdocument.h> |
24 #include <e32base.h> |
24 #include <e32base.h> |
25 //#include <menu2internalcrkeys.h> //for KCRUidMenu |
25 //#include <menu2internalcrkeys.h> //for KCRUidMenu |
26 #include <WidgetPropertyValue.h> // EBundleDisplayName |
26 //#include <WidgetPropertyValue.h> // EBundleDisplayName |
27 #include <centralrepository.h> |
27 #include <centralrepository.h> |
28 #include <opensystemtrace.h> |
28 #include <opensystemtrace.h> |
29 #include "OstTraceDefinitions.h" |
29 #include "OstTraceDefinitions.h" |
30 #ifdef OST_TRACE_COMPILER_IN_USE |
30 #ifdef OST_TRACE_COMPILER_IN_USE |
31 #include "applicationspluginTraces.h" |
31 #include "applicationspluginTraces.h" |
79 CApplicationsPlugin::~CApplicationsPlugin() |
79 CApplicationsPlugin::~CApplicationsPlugin() |
80 { |
80 { |
81 if (iAsynchronizer) |
81 if (iAsynchronizer) |
82 iAsynchronizer->CancelCallback(); |
82 iAsynchronizer->CancelCallback(); |
83 iApplicationServerSession.Close(); |
83 iApplicationServerSession.Close(); |
84 iWidgetRegistry.Close(); |
84 //iWidgetRegistry.Close(); |
85 //delete iHiddenApplicationsRepository; |
85 //delete iHiddenApplicationsRepository; |
86 delete iAsynchronizer; |
86 delete iAsynchronizer; |
87 delete iNotifier; |
87 delete iNotifier; |
88 delete iIndexer; |
88 delete iIndexer; |
89 } |
89 } |
92 void CApplicationsPlugin::ConstructL() |
92 void CApplicationsPlugin::ConstructL() |
93 { |
93 { |
94 iAsynchronizer = CDelayedCallback::NewL( CActive::EPriorityIdle ); |
94 iAsynchronizer = CDelayedCallback::NewL( CActive::EPriorityIdle ); |
95 iNotifier = CApaAppListNotifier::NewL( this, CActive::EPriorityHigh ); |
95 iNotifier = CApaAppListNotifier::NewL( this, CActive::EPriorityHigh ); |
96 //iHiddenApplicationsRepository = CRepository::NewL( KHiddenAppRepositoryUid ); |
96 //iHiddenApplicationsRepository = CRepository::NewL( KHiddenAppRepositoryUid ); |
97 User::LeaveIfError( iWidgetRegistry.Connect() ); |
97 //User::LeaveIfError( iWidgetRegistry.Connect() ); |
98 } |
98 } |
99 |
99 |
100 // ----------------------------------------------------------------------------- |
100 // ----------------------------------------------------------------------------- |
101 void CApplicationsPlugin::StartPluginL() |
101 void CApplicationsPlugin::StartPluginL() |
102 { |
102 { |
122 iStartTime.UniversalTime(); |
122 iStartTime.UniversalTime(); |
123 #endif |
123 #endif |
124 iAsynchronizer->Start( 0, this, KHarvestingDelay ); |
124 iAsynchronizer->Start( 0, this, KHarvestingDelay ); |
125 } |
125 } |
126 |
126 |
127 // ----------------------------------------------------------------------------- |
127 //Removing Widget Registry support |
|
128 /* ----------------------------------------------------------------------------- |
128 void CApplicationsPlugin::AddWidgetInfoL( CSearchDocument* aDocument, TUid aUid ) |
129 void CApplicationsPlugin::AddWidgetInfoL( CSearchDocument* aDocument, TUid aUid ) |
129 { |
130 { |
130 TBuf<KMaxFileName> temp;//we can reuse this. |
131 TBuf<KMaxFileName> temp;//we can reuse this. |
131 |
132 |
132 iWidgetRegistry.GetWidgetPath( aUid, temp ); |
133 iWidgetRegistry.GetWidgetPath( aUid, temp ); |
143 //aDocument->AddExcerptL( temp ); |
144 //aDocument->AddExcerptL( temp ); |
144 aDocument->AddExcerptL( KNullDesC ); |
145 aDocument->AddExcerptL( KNullDesC ); |
145 |
146 |
146 OstTraceExt1( TRACE_NORMAL, DUP1_CAPPLICATIONSPLUGIN_ADDWIDGETINFOL, "CApplicationsPlugin::AddWidgetInfoL;DisplayName=%S", &temp ); |
147 OstTraceExt1( TRACE_NORMAL, DUP1_CAPPLICATIONSPLUGIN_ADDWIDGETINFOL, "CApplicationsPlugin::AddWidgetInfoL;DisplayName=%S", &temp ); |
147 CPIXLOGSTRING2("AddApplicationInfo(): DisplayName = %S ", &temp ); |
148 CPIXLOGSTRING2("AddApplicationInfo(): DisplayName = %S ", &temp ); |
148 } |
149 }*/ |
149 |
150 |
150 // ----------------------------------------------------------------------------- |
151 // ----------------------------------------------------------------------------- |
151 //This need not be a member function. |
152 //This need not be a member function. |
152 void AddApplicationInfoL( CSearchDocument* aDocument, TApaAppInfo& aAppInfo ) |
153 void AddApplicationInfoL( CSearchDocument* aDocument, TApaAppInfo& aAppInfo ) |
153 { |
154 { |
246 TPtr excerptPtr = excerpt->Des(); |
247 TPtr excerptPtr = excerpt->Des(); |
247 CleanupStack::PushL(excerpt); |
248 CleanupStack::PushL(excerpt); |
248 document->AddExcerptL(excerptPtr); |
249 document->AddExcerptL(excerptPtr); |
249 CleanupStack::PopAndDestroy(excerpt); |
250 CleanupStack::PopAndDestroy(excerpt); |
250 #endif |
251 #endif |
251 if( iWidgetRegistry.IsWidget( aAppInfo.iUid ) ) |
252 |
|
253 /*if( iWidgetRegistry.IsWidget( aAppInfo.iUid ) ) //Widget support |
252 AddWidgetInfoL( document, aAppInfo.iUid ); |
254 AddWidgetInfoL( document, aAppInfo.iUid ); |
253 else |
255 else*/ |
254 AddApplicationInfoL( document, aAppInfo ); |
256 AddApplicationInfoL( document, aAppInfo ); |
255 |
257 |
256 TRAPD( error, iIndexer->AddL( *document ) ); |
258 TRAPD( error, iIndexer->AddL( *document ) ); |
257 if( KErrNone == error ) |
259 if( KErrNone == error ) |
258 { |
260 { |
259 OstTrace0( TRACE_NORMAL, CAPPLICATIONSPLUGIN_CREATEAPPLICATIONSINDEXITEML, "CApplicationsPlugin::CreateApplicationsIndexItemL : No Error" ); |
261 OstTrace0( TRACE_NORMAL, CAPPLICATIONSPLUGIN_CREATEAPPLICATIONSINDEXITEML, "CApplicationsPlugin::CreateApplicationsIndexItemL : No Error" ); |