19 #ifndef WIDGETUIWINDOWMANAGER_H_ |
19 #ifndef WIDGETUIWINDOWMANAGER_H_ |
20 #define WIDGETUIWINDOWMANAGER_H_ |
20 #define WIDGETUIWINDOWMANAGER_H_ |
21 |
21 |
22 // INCLUDES FILES |
22 // INCLUDES FILES |
23 |
23 |
24 #include <widgetregistryclient.h> |
24 #include <WidgetRegistryClient.h> |
25 #include <aknglobalconfirmationquery.h> |
25 #include <AknGlobalConfirmationQuery.h> |
26 #include <coecntrl.h> |
26 #include <coecntrl.h> |
27 #include "WidgetUiObserver.h" |
27 #include "WidgetUiObserver.h" |
28 #include "browser_platform_variant.hrh" |
28 #include "Browser_platform_variant.hrh" |
29 // CONSTANTS |
29 // CONSTANTS |
30 |
30 |
31 enum TNetworkMode |
31 enum TNetworkMode |
32 { |
32 { |
33 EUnknownMode = 0, |
33 EUnknownMode = 0, |
46 class CWidgetUiWindowView; |
46 class CWidgetUiWindowView; |
47 class CWidgetUiWindow; |
47 class CWidgetUiWindow; |
48 class CWidgetUiAppUi; |
48 class CWidgetUiAppUi; |
49 class CWidgetUiCpsObserver; |
49 class CWidgetUiCpsObserver; |
50 class CAknNoteDialog; |
50 class CAknNoteDialog; |
|
51 class CBrowserDialogsProvider; |
51 class CBrCtlInterface; |
52 class CBrCtlInterface; |
52 class CLiwServiceHandler; |
53 class CLiwServiceHandler; |
53 class MLiwInterface; |
54 class MLiwInterface; |
54 class CInternetConnectionManager; |
55 class CInternetConnectionManager; |
55 class CSchemeHandler; |
56 class CSchemeHandler; |
56 class CWidgetUiNetworkListener; |
57 class CWidgetUiNetworkListener; |
57 class CWidgetUiPSNotifier; |
|
58 |
58 |
59 #ifdef BRDO_WRT_HS_FF |
59 #ifdef BRDO_WRT_HS_FF |
60 class CCpsPublisher; |
60 class CCpsPublisher; |
61 #endif |
61 #endif |
62 // CLASS DECLARATION |
62 // CLASS DECLARATION |
63 #ifdef BRDO_OCC_ENABLED_FF |
63 |
64 #include <connectionobservers.h> |
|
65 #endif |
|
66 |
|
67 class CRepository; |
|
68 |
|
69 class MCenrepWatcher |
|
70 { |
|
71 public: |
|
72 virtual void CenrepChanged(TInt aHSModeOnline) = 0; |
|
73 }; |
|
74 class CCenrepNotifyHandler : public CActive |
|
75 { |
|
76 public: |
|
77 static CCenrepNotifyHandler* NewL( MCenrepWatcher& aObserver); |
|
78 static CCenrepNotifyHandler* NewLC( MCenrepWatcher& aObserver); |
|
79 void StartObservingL(); |
|
80 void StopObserving(); |
|
81 virtual ~CCenrepNotifyHandler(); |
|
82 void RunL(); |
|
83 void RunErrorL(TInt aError); |
|
84 void DoCancel(); |
|
85 protected: |
|
86 CCenrepNotifyHandler(MCenrepWatcher& aObserver); |
|
87 void ConstructL(); |
|
88 private: |
|
89 CRepository* iRepository; |
|
90 TUint32 iKey; |
|
91 TUid iUid; |
|
92 MCenrepWatcher& iObserver; //class using the observer |
|
93 }; |
|
94 /** |
64 /** |
95 * CWidgetUiWindowManager |
65 * CWidgetUiWindowManager |
96 * @lib WidgetUi.app |
66 * @lib WidgetUi.app |
97 * @since 3.1 |
67 * @since 3.1 |
98 */ |
68 */ |
99 class CWidgetUiWindowManager : public CBase, |
69 class CWidgetUiWindowManager : public CBase |
100 public MCenrepWatcher |
|
101 #ifdef BRDO_OCC_ENABLED_FF |
|
102 ,public MConnectionStageObserver |
|
103 #endif |
|
104 { |
70 { |
105 public: // constructors / destructor |
71 public: // constructors / destructor |
106 |
72 |
107 /** |
73 /** |
108 * NewL |
74 * NewL |
276 * @since 3.1 |
234 * @since 3.1 |
277 */ |
235 */ |
278 void HandleOOMEventL( TBool aForeground ); |
236 void HandleOOMEventL( TBool aForeground ); |
279 |
237 |
280 // Utility stuff. |
238 // Utility stuff. |
281 /** |
239 |
282 * ExitNow |
|
283 * Exits the AppUi |
|
284 * @since 5.0 |
|
285 * @param none |
|
286 * @return none |
|
287 */ |
|
288 void ExitNow(); |
|
289 |
|
290 /** |
240 /** |
291 * WindowList |
241 * WindowList |
292 * Gets the list of running windows |
242 * Gets the list of running windows |
293 * @since 3.1 |
243 * @since 3.1 |
294 * @param none |
244 * @param none |
295 * @return CArrayPtrFlat<CWidgetUiWindow>* |
245 * @return CArrayPtrFlat<CWidgetUiWindow>* |
296 */ |
246 */ |
297 void WindowList( RPointerArray<CWidgetUiWindow>& aWindowList) { aWindowList = iWindowList; } |
247 void WindowList( RPointerArray<CWidgetUiWindow>& ) { /*return iWindowList; */ User::Invariant(); } |
298 |
248 |
299 /** |
249 /** |
300 * WidgetUIClientSession |
250 * WidgetUIClientSession |
301 * @since 3.1 |
251 * @since 3.1 |
302 * @param none |
252 * @param none |
303 * @return RWidgetUIRegistryClientSession* |
253 * @return RWidgetUIRegistryClientSession* |
304 */ |
254 */ |
305 RWidgetRegistryClientSession& WidgetUIClientSession() { return iClientSession; } |
255 RWidgetRegistryClientSession& WidgetUIClientSession() { return iClientSession; } |
306 |
256 |
307 |
257 /** |
|
258 * DialogsProvider |
|
259 * @since 3.1 |
|
260 * @param none |
|
261 * @return CBrowserDialogsProvider |
|
262 */ |
|
263 CBrowserDialogsProvider* DialogsProvider() { return iDialogsProvider; } |
|
264 |
308 /** |
265 /** |
309 * HandleLSKCommandL |
266 * HandleLSKCommandL |
310 * @since 5.0 |
267 * @since 5.0 |
311 * @param TInt - command to execute |
268 * @param TInt - command to execute |
312 * @return TBool - True if LSK handler is executed |
269 * @return TBool - True if LSK handler is executed |
441 * Checks to see if any widget is Publishing on HS |
398 * Checks to see if any widget is Publishing on HS |
442 * @since 5.0 |
399 * @since 5.0 |
443 * @return TBool |
400 * @return TBool |
444 */ |
401 */ |
445 TBool AnyWidgetPublishing(); |
402 TBool AnyWidgetPublishing(); |
446 |
403 |
447 /** |
|
448 * Returns a reference to the Appui of WidgetUi |
|
449 * @return reference to CWidgetUiAppUi |
|
450 */ |
|
451 CWidgetUiAppUi& AppUi(){ return iAppUi; } |
|
452 |
|
453 /** |
|
454 * Returns the count of the windows in the widget |
|
455 * @return count of the windows |
|
456 */ |
|
457 TInt WindowListCount(){ return iWindowList.Count(); } |
|
458 |
404 |
459 #ifdef OOM_WIDGET_CLOSEALL |
405 #ifdef OOM_WIDGET_CLOSEALL |
460 /** |
406 /** |
461 * CloseAllWidgetsUnderOOM |
407 * CloseAllWidgetsUnderOOM |
462 * @param none |
408 * @param none |
609 * @since 5.0 |
555 * @since 5.0 |
610 * @param aUid |
556 * @param aUid |
611 * @return none |
557 * @return none |
612 */ |
558 */ |
613 void SendWidgetToBackground( const TUid& aUid ); |
559 void SendWidgetToBackground( const TUid& aUid ); |
614 #ifdef BRDO_OCC_ENABLED_FF |
560 |
615 protected: // from MConnectionStageObserver |
|
616 |
|
617 // Connection stage achieved. |
|
618 void ConnectionStageAchievedL(); |
|
619 public: |
|
620 |
|
621 //Retry flags |
|
622 void SetRetryFlag(TBool flag); |
|
623 TBool GetRetryFlag(); |
|
624 |
|
625 //For Call back for reconnectivity |
|
626 static TInt RetryConnectivity(TAny* aWindowManager); |
|
627 TInt RetryInternetConnection(); |
|
628 |
|
629 CPeriodic *iRetryConnectivity; |
|
630 TBool reConnectivityFlag; |
|
631 void ConnNeededStatusL( TInt aErr ); |
|
632 void StopConnectionObserving(); |
|
633 #endif |
|
634 |
|
635 private: |
561 private: |
636 |
562 |
637 CWidgetUiWindow* iActiveFsWindow; // reference. |
563 CWidgetUiWindow* iActiveFsWindow; // reference. |
638 CWidgetUiWindowView* iContentView; // not owned, not responsible for deleting |
564 CWidgetUiWindowView* iContentView; // not owned, not responsible for deleting |
639 RPointerArray<CWidgetUiWindow> iWindowList; // owned, responsible for deleting |
565 RPointerArray<CWidgetUiWindow> iWindowList; // owned, responsible for deleting |
641 CWidgetUiNetworkListener* iNetworkListener; // owned, responsible for deleting |
567 CWidgetUiNetworkListener* iNetworkListener; // owned, responsible for deleting |
642 CDocumentHandler* iHandler; // own |
568 CDocumentHandler* iHandler; // own |
643 RWidgetRegistryClientSession iClientSession; // owned |
569 RWidgetRegistryClientSession iClientSession; // owned |
644 TBool iServerConnected; // connected to Widget Registry server ? |
570 TBool iServerConnected; // connected to Widget Registry server ? |
645 TBool iStrictMode; |
571 TBool iStrictMode; |
|
572 CBrowserDialogsProvider* iDialogsProvider;// owned, responsible for deleting |
646 CInternetConnectionManager* iConnection; // owned, responsible for deleting |
573 CInternetConnectionManager* iConnection; // owned, responsible for deleting |
647 TNetworkMode iNetworkMode; // unknown mode = 0, online mode = 1, offline mode = 2 |
574 TNetworkMode iNetworkMode; // unknown mode = 0, online mode = 1, offline mode = 2 |
648 TBool iNetworkConnected; // ETrue if there is an active network connection, else EFalse |
575 TBool iNetworkConnected; // ETrue if there is an active network connection, else EFalse |
649 TBrCtlDefs::TCursorSettings iWidgetCursorMode; |
576 TBrCtlDefs::TCursorSettings iWidgetCursorMode; |
650 TBrCtlDefs::TEnterKeySettings iWidgetEnterKeyMode; |
577 TBrCtlDefs::TEnterKeySettings iWidgetEnterKeyMode; |
651 CWidgetUiPSNotifier* iWidgetNotifier; |
578 |
652 CWidgetUiPSNotifier* iWidgetSapiNotifier; |
|
653 CWidgetUiPSNotifier* iWidgetSapiClearNotifier; |
|
654 #ifdef BRDO_WRT_HS_FF |
579 #ifdef BRDO_WRT_HS_FF |
655 CCpsPublisher* iCpsPublisher; // Owned, interface to publish bitmap to CPS |
580 CCpsPublisher* iCpsPublisher; // Owned, interface to publish bitmap to CPS |
656 CCenrepNotifyHandler* iCenrepNotifyHandler; |
|
657 #endif |
581 #endif |
658 // TODO should this be created only when needed? |
582 // TODO should this be created only when needed? |
659 CActiveApDb* iDb; // owned, responsible for deleting |
583 CActiveApDb* iDb; // owned, responsible for deleting |
660 CPeriodic* iNotifyOOMFlagTimer;//Timer for one min timeout before next oom note is shown |
584 CPeriodic* iNotifyOOMFlagTimer;//Timer for one min timeout before next oom note is shown |
661 CPeriodic* iNotifyHarvester;//Notify harvester to send next event |
585 CPeriodic* iNotifyHarvester;//Notify harvester to send next event |
662 #ifdef OOM_WIDGET_CLOSEALL |
586 #ifdef OOM_WIDGET_CLOSEALL |
663 TTime iTimeLastWidgetOpen; |
587 TTime iTimeLastWidgetOpen; |
664 #endif |
588 #endif |
665 #ifdef BRDO_OCC_ENABLED_FF |
|
666 CConnectionStageNotifierWCB* iConnStageNotifier; |
|
667 #endif |
|
668 }; |
589 }; |
669 |
590 |
670 #endif // WIDGETUIWINDOWMANAGER_H_ |
591 #endif // WIDGETUIWINDOWMANAGER_H_ |
671 |
592 |
672 // End of File |
593 // End of File |