35 class CMailMailboxDetails; |
35 class CMailMailboxDetails; |
36 class CMailCpsSettings; |
36 class CMailCpsSettings; |
37 class CMailExternalAccount; |
37 class CMailExternalAccount; |
38 class CMailPluginProxy; |
38 class CMailPluginProxy; |
39 class CEmailObserverPlugin; |
39 class CEmailObserverPlugin; |
|
40 class CMailCpsUpdateHelper; |
40 |
41 |
41 /** |
42 /** |
42 * CMail ContentPublishingService Handler class |
43 * CMail ContentPublishingService Handler class |
43 * Class implementing a handler functionality towards rest of the MailServer |
44 * Class implementing a handler functionality towards rest of the MailServer |
44 * |
45 * |
451 HBufC* iWaitingForNewMailbox; |
458 HBufC* iWaitingForNewMailbox; |
452 // |
459 // |
453 TFSMailMsgId iWaitingForNewWidget; |
460 TFSMailMsgId iWaitingForNewWidget; |
454 // |
461 // |
455 CAknGlobalNote* iQuery; |
462 CAknGlobalNote* iQuery; |
|
463 // Helper for limiting rate of updates to Homescreen widget |
|
464 CMailCpsUpdateHelper* iUpdateHelper; |
456 }; |
465 }; |
457 |
466 |
|
467 //----------------------------------------------------------------------------- |
|
468 //----------------------------------------------------------------------------- |
|
469 |
|
470 // Helper class for limiting rate of updates to Homescreen widget |
|
471 |
|
472 // Don't make widget updates more often than this delay (milliseconds) |
|
473 #define KMailCpsHandlerUpdateDelay 1000 |
|
474 |
|
475 class CMailCpsUpdateHelper : public CTimer |
|
476 { |
|
477 public: |
|
478 static CMailCpsUpdateHelper* NewLC( CMailCpsHandler *aHandler ); |
|
479 static CMailCpsUpdateHelper* NewL( CMailCpsHandler *aHandler ); |
|
480 |
|
481 virtual ~CMailCpsUpdateHelper(); |
|
482 |
|
483 // Notify that Homescreen widget(s) should be updated |
|
484 void UpdateL(); |
|
485 |
|
486 protected: |
|
487 void ConstructL(); |
|
488 virtual void RunL(); |
|
489 TInt RunError( TInt aError ); |
|
490 |
|
491 private: |
|
492 CMailCpsUpdateHelper( CMailCpsHandler *aHandler ); |
|
493 |
|
494 // Performs the update, resets the timer, etc. |
|
495 void DoUpdateL(); |
|
496 |
|
497 // Handler to use to do updates (not owned) |
|
498 CMailCpsHandler *iCpsHandler; |
|
499 // Whether or not an update is pending |
|
500 TBool iPending; |
|
501 }; |
|
502 |
|
503 |
458 #endif //__CMAILCPSHANDLER_H__ |
504 #endif //__CMAILCPSHANDLER_H__ |