119
|
1 |
/*
|
98
|
2 |
* Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies).
|
|
3 |
* All rights reserved.
|
|
4 |
* This component and the accompanying materials are made available
|
|
5 |
* under the terms of "Eclipse Public License v1.0"
|
|
6 |
* which accompanies this distribution, and is available
|
|
7 |
* at the URL "http://www.eclipse.org/legal/epl-v10.html".
|
85
|
8 |
*
|
98
|
9 |
* Initial Contributors:
|
|
10 |
* Nokia Corporation - initial contribution.
|
|
11 |
*
|
|
12 |
* Contributors:
|
|
13 |
*
|
|
14 |
* Description:
|
|
15 |
*
|
|
16 |
*/
|
85
|
17 |
|
|
18 |
// INCLUDE FILES
|
|
19 |
|
|
20 |
#include <ecom/implementationproxy.h>
|
|
21 |
#include <sacls.h>
|
|
22 |
|
|
23 |
#include "cawidgetscannerplugin.h"
|
|
24 |
#include "cawidgetstoragehandler.h"
|
|
25 |
|
|
26 |
// Function used to return an instance of the proxy table.
|
|
27 |
const TImplementationProxy ImplementationTable[] =
|
|
28 |
{
|
|
29 |
IMPLEMENTATION_PROXY_ENTRY(0x20028707, CCaWidgetScannerPlugin::NewL)
|
|
30 |
};
|
|
31 |
|
98
|
32 |
#ifdef COVERAGE_MEASUREMENT
|
|
33 |
#pragma CTC SKIP
|
|
34 |
#endif //COVERAGE_MEASUREMENT (proxy for instantiation)
|
85
|
35 |
// ----------------------------------------------------------------------------
|
119
|
36 |
//
|
85
|
37 |
// ----------------------------------------------------------------------------
|
|
38 |
//
|
119
|
39 |
EXPORT_C const TImplementationProxy* ImplementationGroupProxy(
|
|
40 |
TInt& aTableCount )
|
85
|
41 |
{
|
98
|
42 |
aTableCount = sizeof( ImplementationTable ) / sizeof(TImplementationProxy);
|
85
|
43 |
return ImplementationTable;
|
|
44 |
}
|
98
|
45 |
#ifdef COVERAGE_MEASUREMENT
|
|
46 |
#pragma CTC ENDSKIP
|
|
47 |
#endif //COVERAGE_MEASUREMENT
|
85
|
48 |
|
|
49 |
// ============================ MEMBER FUNCTIONS ===============================
|
|
50 |
|
98
|
51 |
// ----------------------------------------------------------------------------
|
119
|
52 |
//
|
98
|
53 |
// ----------------------------------------------------------------------------
|
85
|
54 |
//
|
|
55 |
CCaWidgetScannerPlugin::CCaWidgetScannerPlugin()
|
|
56 |
{
|
|
57 |
}
|
|
58 |
|
98
|
59 |
// ----------------------------------------------------------------------------
|
119
|
60 |
//
|
98
|
61 |
// ----------------------------------------------------------------------------
|
85
|
62 |
//
|
|
63 |
void CCaWidgetScannerPlugin::ConstructL( TPluginParams* aPluginParams )
|
|
64 |
{
|
|
65 |
User::LeaveIfError( iFs.Connect() );
|
92
|
66 |
iMmcWatcher = CCaMmcWatcher::NewL( iFs, this );
|
119
|
67 |
iInstallNotifier = CCaInstallNotifier::NewL( *this,
|
|
68 |
CCaInstallNotifier::ESisInstallNotification );
|
92
|
69 |
iStorageHandler = CCaWidgetStorageHandler::NewL(
|
102
|
70 |
aPluginParams->storageProxy,
|
119
|
71 |
*aPluginParams->softwareRegistry, iFs );
|
85
|
72 |
SynchronizeL();
|
|
73 |
}
|
|
74 |
|
98
|
75 |
// ----------------------------------------------------------------------------
|
119
|
76 |
//
|
98
|
77 |
// ----------------------------------------------------------------------------
|
85
|
78 |
//
|
92
|
79 |
CCaWidgetScannerPlugin * CCaWidgetScannerPlugin::NewL(
|
85
|
80 |
TPluginParams* aPluginParams )
|
|
81 |
{
|
|
82 |
CCaWidgetScannerPlugin * self = NewLC( aPluginParams );
|
|
83 |
CleanupStack::Pop( self );
|
|
84 |
return self;
|
|
85 |
}
|
|
86 |
|
98
|
87 |
// ----------------------------------------------------------------------------
|
119
|
88 |
//
|
98
|
89 |
// ----------------------------------------------------------------------------
|
85
|
90 |
//
|
92
|
91 |
CCaWidgetScannerPlugin * CCaWidgetScannerPlugin::NewLC(
|
85
|
92 |
TPluginParams* aPluginParams )
|
|
93 |
{
|
98
|
94 |
CCaWidgetScannerPlugin * self = new ( ELeave ) CCaWidgetScannerPlugin();
|
85
|
95 |
CleanupStack::PushL( self );
|
|
96 |
self->ConstructL( aPluginParams );
|
|
97 |
return self;
|
|
98 |
}
|
|
99 |
|
98
|
100 |
// ----------------------------------------------------------------------------
|
119
|
101 |
//
|
98
|
102 |
// ----------------------------------------------------------------------------
|
85
|
103 |
//
|
98
|
104 |
CCaWidgetScannerPlugin::~CCaWidgetScannerPlugin()
|
85
|
105 |
{
|
119
|
106 |
delete iStorageHandler;
|
85
|
107 |
delete iInstallNotifier;
|
119
|
108 |
delete iMmcWatcher;
|
85
|
109 |
iFs.Close();
|
|
110 |
}
|
|
111 |
|
|
112 |
// ----------------------------------------------------------------------------
|
92
|
113 |
//
|
85
|
114 |
// ----------------------------------------------------------------------------
|
87
|
115 |
//
|
85
|
116 |
void CCaWidgetScannerPlugin::SynchronizeL()
|
|
117 |
{
|
98
|
118 |
iStorageHandler->SynchronizeL();
|
85
|
119 |
}
|
92
|
120 |
|
119
|
121 |
|
|
122 |
// ----------------------------------------------------------------------------
|
|
123 |
//
|
|
124 |
// ----------------------------------------------------------------------------
|
|
125 |
//
|
|
126 |
void CCaWidgetScannerPlugin::HandleInstallNotifyL()
|
|
127 |
{
|
|
128 |
SynchronizeL();
|
|
129 |
}
|
85
|
130 |
// ----------------------------------------------------------------------------
|
92
|
131 |
//
|
85
|
132 |
// ----------------------------------------------------------------------------
|
92
|
133 |
//
|
85
|
134 |
void CCaWidgetScannerPlugin::MmcChangeL()
|
|
135 |
{
|
|
136 |
SynchronizeL();
|
|
137 |
}
|
|
138 |
|
|
139 |
// end of file
|