buildverification/smoketest/Timew/ConsoleAlarmAlertServer/Include/ConsoleAlarmAlertSession.h
changeset 15 5b5908ec640f
parent 13 3a35f7917fa6
child 17 03d9ade4748d
equal deleted inserted replaced
13:3a35f7917fa6 15:5b5908ec640f
     1 // Copyright (c) 1999-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 __CONSOLEALARMALERTSESSION_H__
       
    17 #define __CONSOLEALARMALERTSESSION_H__
       
    18 
       
    19 // System includes
       
    20 #include <e32base.h>
       
    21 
       
    22 // User includes
       
    23 #include "asaltdefs.h"
       
    24 #include "asshdalarm.h"
       
    25 
       
    26 // Type definitions
       
    27 
       
    28 // Constants
       
    29 
       
    30 // Classes referenced
       
    31 class CConsoleAlarmAlertConsole;
       
    32 class CConsoleAlarmAlertLEDFlasher;
       
    33 class CConsoleAlarmAlertServer;
       
    34 // Enumerations
       
    35 
       
    36 
       
    37 struct TAgnAlarmInfo
       
    38 	/**
       
    39 	Copy of System-Wide Unique Agenda Entry Reference defined in agmalarm.h
       
    40 	*/
       
    41 	{
       
    42 	TUid iAlarmCategory;
       
    43 	TUint32 iAgnUniqueId;
       
    44 	TFileName iFileName;
       
    45 	};
       
    46 
       
    47 //
       
    48 // ----> CConsoleAlarmAlertSession (header)
       
    49 //
       
    50 class CConsoleAlarmAlertSession : public CSession2
       
    51 	{
       
    52 //
       
    53 public:										// STATIC CONSTRUCT / DESTRUCT
       
    54 //
       
    55 	static CConsoleAlarmAlertSession*		NewL(CConsoleAlarmAlertServer* aServer);
       
    56 	~CConsoleAlarmAlertSession();
       
    57 
       
    58 //
       
    59 private:									// INTERNAL CONSTRUCT
       
    60 //
       
    61 	CConsoleAlarmAlertSession(CConsoleAlarmAlertServer* aServer);
       
    62 	void									ConstructL();
       
    63 
       
    64 //
       
    65 public:										// ACCESS
       
    66 //
       
    67 
       
    68 	TTime									DeferTime() const;
       
    69 
       
    70 	inline const TASShdAlarm& 				Alarm() const { return iAlarm; }
       
    71 
       
    72 	inline TInt								AlarmDataSize() const { return iAlarmAssociatedDataSize; }
       
    73 
       
    74 	inline const TAgnAlarmInfo&				AlarmData() const { return iAlarmData; }
       
    75 
       
    76 	void									Notify(TASAltAlertServerResponse aFlag);
       
    77 
       
    78 	void									Notify(TASAltAlertServerResponse aFlag, const TTime& aDeferTime);
       
    79 
       
    80 	TAny *									InstructionSet();
       
    81 
       
    82 //
       
    83 private:									// FROM CSession2
       
    84 //
       
    85 	void									ServiceL(const RMessage2& aMessage);
       
    86 
       
    87 //
       
    88 private:									// CMD - DEBUG ONLY
       
    89 //
       
    90 	TBool									CmdL();
       
    91 
       
    92 //
       
    93 private:									// INTERNAL METHODS
       
    94 //
       
    95 
       
    96 	void									SetAlarmL(const RMessage2& aMessage);
       
    97 
       
    98 	void									GetUserTimeL(const RMessage2& aMessage);
       
    99 
       
   100 	void									SetDeferTimeL(const RMessage2& aMessage);
       
   101 
       
   102 	static TBool							SoundPlaybackCallbackL(TAny* aSelf);
       
   103 
       
   104 //
       
   105 private:									// MEMBER DATA
       
   106 //
       
   107 
       
   108 	TTime									iDeferTime;
       
   109 
       
   110 	TASShdAlarm								iAlarm;
       
   111 
       
   112 	TInt									iAlarmAssociatedDataSize;
       
   113 
       
   114 	TAgnAlarmInfo							iAlarmData;
       
   115 
       
   116 	TBool									iLoggedOn;
       
   117 
       
   118 	TBool									iHasMessage;
       
   119 
       
   120 	TBool									iMsgComplete;
       
   121 
       
   122 	RMessage2								iMsgPtr;
       
   123 
       
   124 	CPeriodic*								iSoundCallbackTimer;
       
   125 
       
   126 	CConsoleAlarmAlertLEDFlasher*			iSoundLEDFlasher;
       
   127 
       
   128 	CConsoleAlarmAlertConsole*				iConsole;
       
   129 
       
   130 	CConsoleAlarmAlertServer*				iServer;
       
   131 
       
   132 	TAny*									iInstructionSet;
       
   133 
       
   134 	TBool									iInstructionSetFound;
       
   135 	};
       
   136 
       
   137 #endif