38 // ----------------------------------------------------------------------------- |
38 // ----------------------------------------------------------------------------- |
39 // |
39 // |
40 // ----------------------------------------------------------------------------- |
40 // ----------------------------------------------------------------------------- |
41 // |
41 // |
42 CCaWidgetStorageHandler::CCaWidgetStorageHandler( CCaStorageProxy* aStorage, |
42 CCaWidgetStorageHandler::CCaWidgetStorageHandler( CCaStorageProxy* aStorage, |
43 RFs& aFs ) |
43 Usif::RSoftwareComponentRegistry& aSoftwareRegistry, RFs& aFs ) : |
|
44 iSoftwareRegistry(aSoftwareRegistry) |
44 { |
45 { |
45 iStorage = aStorage; |
46 iStorage = aStorage; |
46 iFs = aFs; |
47 iFs = aFs; |
47 } |
48 } |
48 |
49 |
50 // |
51 // |
51 // ----------------------------------------------------------------------------- |
52 // ----------------------------------------------------------------------------- |
52 // |
53 // |
53 void CCaWidgetStorageHandler::ConstructL() |
54 void CCaWidgetStorageHandler::ConstructL() |
54 { |
55 { |
55 User::LeaveIfError( iSoftwareRegistry.Connect() ); |
|
56 iParser = CCaWidgetScannerParser::NewL( iFs ); |
56 iParser = CCaWidgetScannerParser::NewL( iFs ); |
57 } |
57 } |
58 |
58 |
59 // ----------------------------------------------------------------------------- |
59 // ----------------------------------------------------------------------------- |
60 // |
60 // |
61 // ----------------------------------------------------------------------------- |
61 // ----------------------------------------------------------------------------- |
62 // |
62 // |
63 CCaWidgetStorageHandler* CCaWidgetStorageHandler::NewL( |
63 CCaWidgetStorageHandler* CCaWidgetStorageHandler::NewL( |
64 CCaStorageProxy* aStorage, RFs& aFs ) |
64 CCaStorageProxy* aStorage, |
65 { |
65 Usif::RSoftwareComponentRegistry& aSoftwareRegistry, RFs& aFs ) |
66 CCaWidgetStorageHandler* self = NewLC( aStorage, aFs ); |
66 { |
|
67 CCaWidgetStorageHandler* self = NewLC( aStorage, aSoftwareRegistry, aFs ); |
67 CleanupStack::Pop( self ); |
68 CleanupStack::Pop( self ); |
68 return self; |
69 return self; |
69 } |
70 } |
70 |
71 |
71 // ----------------------------------------------------------------------------- |
72 // ----------------------------------------------------------------------------- |
72 // |
73 // |
73 // ----------------------------------------------------------------------------- |
74 // ----------------------------------------------------------------------------- |
74 // |
75 // |
75 CCaWidgetStorageHandler* CCaWidgetStorageHandler::NewLC( |
76 CCaWidgetStorageHandler* CCaWidgetStorageHandler::NewLC( |
76 CCaStorageProxy* aStorage, RFs& aFs ) |
77 CCaStorageProxy* aStorage, |
|
78 Usif::RSoftwareComponentRegistry& aSoftwareRegistry, RFs& aFs ) |
77 { |
79 { |
78 CCaWidgetStorageHandler* self = new ( ELeave ) CCaWidgetStorageHandler( |
80 CCaWidgetStorageHandler* self = new ( ELeave ) CCaWidgetStorageHandler( |
79 aStorage, aFs ); |
81 aStorage, aSoftwareRegistry, aFs ); |
80 CleanupStack::PushL( self ); |
82 CleanupStack::PushL( self ); |
81 self->ConstructL(); |
83 self->ConstructL(); |
82 return self; |
84 return self; |
83 } |
85 } |
84 |
86 |
87 // ----------------------------------------------------------------------------- |
89 // ----------------------------------------------------------------------------- |
88 // |
90 // |
89 CCaWidgetStorageHandler::~CCaWidgetStorageHandler() |
91 CCaWidgetStorageHandler::~CCaWidgetStorageHandler() |
90 { |
92 { |
91 delete iParser; |
93 delete iParser; |
92 iSoftwareRegistry.Close(); |
|
93 iWidgets.ResetAndDestroy(); |
94 iWidgets.ResetAndDestroy(); |
94 } |
95 } |
95 |
96 |
96 // ---------------------------------------------------------------------------- |
97 // ---------------------------------------------------------------------------- |
97 // |
98 // |