eventsui/eventshandlerui/eventshandlerserver/inc/evthandlerserver.h
branchRCL_3
changeset 17 1fc85118c3ae
parent 16 8173571d354e
child 18 870918037e16
equal deleted inserted replaced
16:8173571d354e 17:1fc85118c3ae
     1 /*
       
     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".
       
     8 *
       
     9 * Initial Contributors:
       
    10 * Nokia Corporation - initial contribution.
       
    11 *
       
    12 * Contributors:
       
    13 *
       
    14 * Description:  Server class for Events Handler Server
       
    15 *
       
    16 */
       
    17 
       
    18 
       
    19 #ifndef C_EVTHANDLERSERVER_H
       
    20 #define C_EVTHANDLERSERVER_H
       
    21 
       
    22 #include <e32base.h>
       
    23 
       
    24 #include "evthandlershutdowntimer.h"
       
    25 #include "evtnotifierobserver.h"
       
    26 #include "evtdefs.h"
       
    27 #include "evteventinfo.h"
       
    28 #include "evtsnoozehandler.h"
       
    29 
       
    30 // CONSTANTS
       
    31 
       
    32 // MACROS
       
    33 
       
    34 // DATA TYPES
       
    35 
       
    36 // FUNCTION  PROTOTYPES
       
    37 
       
    38 // FORWARD DECLARATIONS
       
    39 class CEvtMgmtUiEngine;
       
    40 class CEvtNotifierHandler;
       
    41 
       
    42 // CLASS DECLARATION
       
    43 
       
    44 /**
       
    45  * Events Handler Server class. This class extends the CServer2
       
    46  * class for Events Handler Server.
       
    47  *
       
    48  * @lib evthandlerserver.exe
       
    49  * @since S60 v9.1
       
    50  */
       
    51 class CEvtHandlerServer : public CServer2, 
       
    52 		                  public MEvtNotifierObserver, 
       
    53 		                  public MEvtSnoozeObserver
       
    54 	{
       
    55 public:
       
    56 	static CServer2* NewLC();
       
    57 	virtual ~CEvtHandlerServer();
       
    58 	
       
    59 	/**
       
    60 	 * Handles the Event
       
    61 	 */
       
    62 	void HandleNewEventL( const TEvtEventId aEventId, const TInt aAccuracy );
       
    63 	
       
    64 private:
       
    65 	CEvtHandlerServer();
       
    66 	void ConstructL();
       
    67 	CSession2* NewSessionL( const TVersion& aVersion, const RMessage2& aMessage ) const;
       
    68 	void HandleEventIdL( const TDesC& aMessage );
       
    69 	void HandleNextEventL();
       
    70 	void UpdateEventsQueueL( CEvtEvent* aEvent );
       
    71 	
       
    72     void LaunchAppL(       TUid       aApplicationUid,
       
    73                      const TDesC8&     aCmdLineArg );
       
    74     
       
    75     void ChangeStateL( TEvtEventId aEvtId );
       
    76 	
       
    77 private: // derived methods	
       
    78 	// derived from MEvtNotifierObserver
       
    79     void HandlerCompleteL( 
       
    80     	TEvtInfoNoteResult aResult,
       
    81         CEvtEvent* aEvent );
       
    82 	
       
    83 	// derived from MEvtSnoozeObserver
       
    84     void SnoozeCompleteL( 
       
    85     	TEvtSnoozeItem& aSnoozeItem, 
       
    86     	TBool aSnoozeAgain );
       
    87 	
       
    88 private:
       
    89 	TInt iSessionCount;
       
    90     /**
       
    91     * event handler shutdown timer
       
    92     * Owns
       
    93     */
       
    94 	CEvtHandlerShutdownTimer iShutdownTimer;
       
    95 
       
    96     /**
       
    97     * event notifier handler 
       
    98     * Owns
       
    99     */    
       
   100     CEvtNotifierHandler*	iEvtNotifierHandler;	    
       
   101 
       
   102     /**
       
   103     * event snooze handler 
       
   104     * Owns
       
   105     */    
       
   106     CEvtSnoozeHandler*	iEvtSnoozeHandler;	   
       
   107 
       
   108     /**
       
   109     * event managment engine
       
   110     * Owns
       
   111     */    
       
   112     CEvtMgmtUiEngine*		iEvtMgmtUiEngine;
       
   113 
       
   114     /**
       
   115     * events id queue for notifier handler
       
   116     * Owns
       
   117     */    
       
   118 	RArray<TEvtEventInfo> iEventsQueue;
       
   119 	};
       
   120 	
       
   121 #endif  // C_EVTHANDLERSERVER_H
       
   122 
       
   123 // End of File