equal
deleted
inserted
replaced
14 * Description: |
14 * Description: |
15 * |
15 * |
16 */ |
16 */ |
17 |
17 |
18 |
18 |
19 #include <e32base.h> |
19 #include <e32base.h> |
|
20 #include <bautils.h> |
20 #include <msvids.h> |
21 #include <msvids.h> |
21 #include <msvuids.h> |
22 #include <msvuids.h> |
22 #include <mmsconst.h> |
23 #include <mmsconst.h> |
23 #include <mmsclient.h> |
24 #include <mmsclient.h> |
24 #include <smsclnt.h> |
25 #include <smsclnt.h> |
44 |
45 |
45 |
46 |
46 // maximum length that the fully qualified msg Plugin base app class descriptor can be |
47 // maximum length that the fully qualified msg Plugin base app class descriptor can be |
47 // e.g. "@c:root msg" |
48 // e.g. "@c:root msg" |
48 const TInt KMsgPluginBaseAppClassMaxLen = 64; |
49 const TInt KMsgPluginBaseAppClassMaxLen = 64; |
49 |
50 _LIT(KManagerFileName, "MessageStore.temp"); |
50 |
51 |
51 // local declarations and functions |
52 // local declarations and functions |
52 namespace { |
53 namespace { |
53 |
54 |
54 _LIT(KCPixSearchServerPrivateDirectory, "\\Private\\2001f6f7\\"); |
55 _LIT(KCPixSearchServerPrivateDirectory, "\\Private\\2001f6f7\\"); |
156 iMessageHarvester = CMessageHarvester::NewL( *this, *iMsvSession ); |
157 iMessageHarvester = CMessageHarvester::NewL( *this, *iMsvSession ); |
157 iMessageDataHandler = CMessageDataHandler::NewL( *this, *iMsvSession ); |
158 iMessageDataHandler = CMessageDataHandler::NewL( *this, *iMsvSession ); |
158 for (TInt i=EDriveA; i<=EDriveZ; i++) |
159 for (TInt i=EDriveA; i<=EDriveZ; i++) |
159 { |
160 { |
160 iIndexer[i] = NULL; //Initialize to NULL |
161 iIndexer[i] = NULL; //Initialize to NULL |
161 } |
162 } |
|
163 // Load the configuration |
|
164 TFileName pathWithoutDrive; |
|
165 iFs.CreatePrivatePath(EDriveC); |
|
166 iFilePath = _L("C:"); |
|
167 iFs.PrivatePath( pathWithoutDrive ); |
|
168 iFilePath.Append(pathWithoutDrive); |
|
169 iFilePath.Append(KManagerFileName); |
|
170 iMessageDataHandler->SetFilePath( iFilePath ); |
162 } |
171 } |
163 |
172 |
164 // --------------------------------------------------------------------------- |
173 // --------------------------------------------------------------------------- |
165 // CMessagePlugin::StartPluginL |
174 // CMessagePlugin::StartPluginL |
166 // --------------------------------------------------------------------------- |
175 // --------------------------------------------------------------------------- |
171 iCurrentDrive = iMsvSession->CurrentDriveL(); |
180 iCurrentDrive = iMsvSession->CurrentDriveL(); |
172 OstTrace1( TRACE_NORMAL, CMESSAGEPLUGIN_STARTPLUGINL, "CMessagePlugin::StartPluginL;Current Drive for Messaging =%d", iCurrentDrive ); |
181 OstTrace1( TRACE_NORMAL, CMESSAGEPLUGIN_STARTPLUGINL, "CMessagePlugin::StartPluginL;Current Drive for Messaging =%d", iCurrentDrive ); |
173 CPIXLOGSTRING2("currentDrive from messaging app : %d", iCurrentDrive ); |
182 CPIXLOGSTRING2("currentDrive from messaging app : %d", iCurrentDrive ); |
174 MountL(TDriveNumber(iCurrentDrive)); //Mount current drive |
183 MountL(TDriveNumber(iCurrentDrive)); //Mount current drive |
175 // Define this base application class, use default location |
184 // Define this base application class, use default location |
|
185 if( BaflUtils::FileExists(iFs,iFilePath) ) |
|
186 LoadL(); |
176 } |
187 } |
177 |
188 |
178 // --------------------------------------------------------------------------- |
189 // --------------------------------------------------------------------------- |
179 // CMessagePlugin::StartHarvestingL |
190 // CMessagePlugin::StartHarvestingL |
180 // --------------------------------------------------------------------------- |
191 // --------------------------------------------------------------------------- |
553 } |
564 } |
554 |
565 |
555 void CMessagePlugin::ResumePluginL() |
566 void CMessagePlugin::ResumePluginL() |
556 { |
567 { |
557 OstTraceFunctionEntry0( CMESSAGEPLUGIN_RESUMEPLUGINL_ENTRY ); |
568 OstTraceFunctionEntry0( CMESSAGEPLUGIN_RESUMEPLUGINL_ENTRY ); |
558 iIndexState = ETrue; |
569 iIndexState = ETrue; |
559 //IndexQueuedItems(); |
570 //IndexQueuedItems(); |
560 iMessageDataHandler->ResumeL(); |
571 iMessageDataHandler->ResumeL(); |
561 iMessageMonitor->ResumeL(); |
572 iMessageMonitor->ResumeL(); |
562 iMessageHarvester->ResumeRequest(); |
573 iMessageHarvester->ResumeRequest(); |
563 MountAvailableDrivesInQueue(); |
574 MountAvailableDrivesInQueue(); |
577 } |
588 } |
578 |
589 |
579 TBool CMessagePlugin::GetHarvesterState() |
590 TBool CMessagePlugin::GetHarvesterState() |
580 { |
591 { |
581 return iIndexState; |
592 return iIndexState; |
|
593 } |
|
594 |
|
595 void CMessagePlugin::SaveL() |
|
596 { |
|
597 iMessageDataHandler->SaveRecordsL(); |
|
598 } |
|
599 |
|
600 void CMessagePlugin::LoadL() |
|
601 { |
|
602 iMessageDataHandler->LoadRecordsL(); |
582 } |
603 } |
583 |
604 |
584 // --------------------------------------------------------------------------- |
605 // --------------------------------------------------------------------------- |
585 // CMessagePlugin::UpdatePerformaceDataL |
606 // CMessagePlugin::UpdatePerformaceDataL |
586 // --------------------------------------------------------------------------- |
607 // --------------------------------------------------------------------------- |