equal
deleted
inserted
replaced
101 const TDesC &aFileName, TInt aViewResId, TInt aEmptyListResId, |
101 const TDesC &aFileName, TInt aViewResId, TInt aEmptyListResId, |
102 TInt /*aSoftKeyResId*/) |
102 TInt /*aSoftKeyResId*/) |
103 |
103 |
104 { |
104 { |
105 TRACER("GLX_CLOUD::CGlxCloudViewImp::ConstructL"); |
105 TRACER("GLX_CLOUD::CGlxCloudViewImp::ConstructL"); |
|
106 TInt err = iHarvesterClient.Connect(); |
|
107 GLX_LOG_INFO1("iHarvesterClient.Connect() err = %d",err); |
|
108 if(err == KErrNone) |
|
109 { |
|
110 iHarvesterClient.AddHarvesterEventObserver(*this, EHEObserverTypeMMC, 1000); |
|
111 } |
106 TFileName resourceFile(KDC_APP_RESOURCE_DIR); |
112 TFileName resourceFile(KDC_APP_RESOURCE_DIR); |
107 resourceFile.Append (aFileName); |
113 resourceFile.Append (aFileName); |
108 CGlxResourceUtilities::GetResourceFilenameL (resourceFile); |
114 CGlxResourceUtilities::GetResourceFilenameL (resourceFile); |
109 iResourceOffset = iCoeEnv->AddResourceFileL (resourceFile); |
115 iResourceOffset = iCoeEnv->AddResourceFileL (resourceFile); |
110 BaseConstructL (aViewResId); |
116 BaseConstructL (aViewResId); |
130 // --------------------------------------------------------------------------- |
136 // --------------------------------------------------------------------------- |
131 // |
137 // |
132 CGlxCloudViewImp::~CGlxCloudViewImp() |
138 CGlxCloudViewImp::~CGlxCloudViewImp() |
133 { |
139 { |
134 TRACER("GLX_CLOUD::CGlxCloudViewImp::~CGlxCloudViewImp"); |
140 TRACER("GLX_CLOUD::CGlxCloudViewImp::~CGlxCloudViewImp"); |
|
141 iHarvesterClient.Close(); |
135 CleanupVisuals (); |
142 CleanupVisuals (); |
136 delete iEmptyListText; |
143 delete iEmptyListText; |
137 if ( iResourceOffset ) |
144 if ( iResourceOffset ) |
138 { |
145 { |
139 CCoeEnv::Static()->DeleteResourceFile (iResourceOffset); |
146 CCoeEnv::Static()->DeleteResourceFile (iResourceOffset); |
140 } |
147 } |
141 delete iTitletext; |
|
142 } |
148 } |
143 |
149 |
144 // --------------------------------------------------------------------------- |
150 // --------------------------------------------------------------------------- |
145 // From CAknView |
151 // From CAknView |
146 // Returns views id. |
152 // Returns views id. |
190 // --------------------------------------------------------------------------- |
196 // --------------------------------------------------------------------------- |
191 // |
197 // |
192 void CGlxCloudViewImp::DoMLViewActivateL(const TVwsViewId & /* aPrevViewId */, |
198 void CGlxCloudViewImp::DoMLViewActivateL(const TVwsViewId & /* aPrevViewId */, |
193 TUid /* aCustomMessageId */, const TDesC8 & /* aCustomMessage */) |
199 TUid /* aCustomMessageId */, const TDesC8 & /* aCustomMessage */) |
194 { |
200 { |
195 TRACER("GLX_CLOUD::CGlxCloudViewImp::DoMLViewActivateL"); |
201 TRACER("GLX_CLOUD::CGlxCloudViewImp::DoMLViewActivateL"); |
|
202 if(StatusPane()) |
|
203 { |
|
204 StatusPane()->MakeVisible(ETrue); |
|
205 } |
196 ConstructCloudControlL(); |
206 ConstructCloudControlL(); |
197 GLX_LOG_INFO("CGlxCloudViewImp::DoMLViewActivateL Cloud View Control Created" ); |
207 GLX_LOG_INFO("CGlxCloudViewImp::DoMLViewActivateL Cloud View Control Created" ); |
198 // set app state to tag-browser view |
208 // set app state to tag-browser view |
199 GlxSetAppState::SetState (EGlxInTagBrowserView); |
209 GlxSetAppState::SetState (EGlxInTagBrowserView); |
200 } |
210 } |
205 // --------------------------------------------------------------------------- |
215 // --------------------------------------------------------------------------- |
206 // |
216 // |
207 void CGlxCloudViewImp::DoMLViewDeactivate() |
217 void CGlxCloudViewImp::DoMLViewDeactivate() |
208 { |
218 { |
209 TRACER("GLX_CLOUD::CGlxCloudViewImp::DoMLViewDeactivate"); |
219 TRACER("GLX_CLOUD::CGlxCloudViewImp::DoMLViewDeactivate"); |
210 if(StatusPane()) |
|
211 { |
|
212 if(iTitletext) |
|
213 { |
|
214 delete iTitletext; |
|
215 iTitletext = NULL; |
|
216 } |
|
217 CEikStatusPane* statusPane = iEikonEnv->AppUiFactory()->StatusPane(); |
|
218 TRAP_IGNORE(CAknTitlePane* titlePane = ( CAknTitlePane* )statusPane->ControlL( |
|
219 TUid::Uid( EEikStatusPaneUidTitle )); |
|
220 iTitletext = titlePane->Text()->AllocL()); |
|
221 } |
|
222 //Hide softkeys and toolbar upon view de-activation. |
220 //Hide softkeys and toolbar upon view de-activation. |
223 iViewWidget->enableControlPane(EFalse); |
221 iViewWidget->enableControlPane(EFalse); |
224 if ( EGlxNavigationForwards == iUiUtility->ViewNavigationDirection() ) |
222 if ( EGlxNavigationForwards == iUiUtility->ViewNavigationDirection() ) |
225 { |
223 { |
226 iViewWidget->enableStatusPane(EFalse); |
224 iViewWidget->enableStatusPane(EFalse); |
430 if( aMenuId == R_TAGSBROWSER_MENU) |
428 if( aMenuId == R_TAGSBROWSER_MENU) |
431 { |
429 { |
432 iCloudControl->ShowContextItemMenu(EFalse); |
430 iCloudControl->ShowContextItemMenu(EFalse); |
433 } |
431 } |
434 } |
432 } |
|
433 // --------------------------------------------------------------------------- |
|
434 // HarvestingUpdated |
|
435 // |
|
436 // --------------------------------------------------------------------------- |
|
437 // |
|
438 void CGlxCloudViewImp::HarvestingUpdated( |
|
439 HarvesterEventObserverType HarvestingUpdated, |
|
440 HarvesterEventState /*aHarvesterEventState*/, |
|
441 TInt /*aItemsLeft*/ ) |
|
442 { |
|
443 TRACER("CGlxCloudViewImp::HarvestingUpdated()"); |
|
444 if(HarvestingUpdated == EHEObserverTypeMMC) |
|
445 { |
|
446 ProcessCommandL(EAknSoftkeyClose); |
|
447 } |
|
448 } |