commonappservices/alarmserver/Test/unit/inc/TEAlarmTestMANEventObserver.h
changeset 0 2e3d3ce01487
equal deleted inserted replaced
-1:000000000000 0:2e3d3ce01487
       
     1 // Copyright (c) 2005-2009 Nokia Corporation and/or its subsidiary(-ies).
       
     2 // All rights reserved.
       
     3 // This component and the accompanying materials are made available
       
     4 // under the terms of "Eclipse Public License v1.0"
       
     5 // which accompanies this distribution, and is available
       
     6 // at the URL "http://www.eclipse.org/legal/epl-v10.html".
       
     7 //
       
     8 // Initial Contributors:
       
     9 // Nokia Corporation - initial contribution.
       
    10 //
       
    11 // Contributors:
       
    12 //
       
    13 // Description:
       
    14 //
       
    15 
       
    16 #ifndef __TEALARMTESTMANEVENTOBSERVER_H
       
    17 #define __TEALARMTESTMANEVENTOBSERVER_H
       
    18 
       
    19 
       
    20 #include "TEAlarmTestMANEventEntry.h"
       
    21 #include <asshdalarm.h>
       
    22 
       
    23 class RANTestClient;
       
    24 
       
    25 
       
    26 // //
       
    27 //
       
    28 // MMANEventHandler
       
    29 //
       
    30 // //
       
    31 
       
    32 class MMANEventHandler
       
    33 	{
       
    34 public:
       
    35 	virtual void HandleEventL(TEventEntry aEvent) = 0;
       
    36 	};
       
    37 
       
    38 
       
    39 // //
       
    40 //
       
    41 // CMANEventObserver
       
    42 //
       
    43 // //
       
    44 
       
    45 class CMANEventObserver : public CActive
       
    46 	{
       
    47 public:
       
    48 	static CMANEventObserver* NewL(const TEventEntry& aEventEntry, RANTestClient& aANTestClient, 
       
    49 								MMANEventHandler& aEventHandler);
       
    50 
       
    51 	virtual ~CMANEventObserver();
       
    52 	virtual void RunL();
       
    53 	virtual void DoCancel() {};
       
    54 	
       
    55 	void RegisterForNextEventL();
       
    56 
       
    57 private:
       
    58 	CMANEventObserver(const TEventEntry& aEventEntry, RANTestClient& aANTestClient, 
       
    59 						MMANEventHandler& aEventHandler);						
       
    60 	
       
    61 private:
       
    62 	RANTestClient&		iCAASClient;
       
    63 	MMANEventHandler& 	iEventHandler;
       
    64 	
       
    65 	TEventEntry	iObserveEvent;
       
    66 	
       
    67 	TASShdAlarm	iASShdAlarm;		// used in NotifyOnAlarm
       
    68 	TBuf<256>	iSoundFileName;		// used in NotifyOnSoundStart
       
    69 	};
       
    70 
       
    71 
       
    72 // //
       
    73 //
       
    74 // CMANDelayedActionHandler
       
    75 //
       
    76 // //
       
    77 
       
    78 class CMANDelayedActionHandler : public CTimer
       
    79 	{
       
    80 public:
       
    81 	static CMANDelayedActionHandler* NewL(const TEventEntry& aEventEntry, 
       
    82 								MMANEventHandler& aEventHandler);
       
    83 
       
    84 	virtual ~CMANDelayedActionHandler();
       
    85 	virtual void RunL();
       
    86 
       
    87 private:
       
    88 	CMANDelayedActionHandler(const TEventEntry& aAction, MMANEventHandler& aEventHandler);						
       
    89 
       
    90 private:
       
    91 	MMANEventHandler& 	iEventHandler;
       
    92 	TEventEntry	iDelayedAction;
       
    93 	};
       
    94 
       
    95 
       
    96 
       
    97 
       
    98 #endif	// __TEALARMTESTMANEVENTOBSERVER_H
       
    99 
       
   100