commonappservices/alarmserver/Server/Include/ASSrvNotifyingAlarmMngr.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 // Declares CASSrvNotifyingAlarmMngr
       
    15 // 
       
    16 //
       
    17 
       
    18 /**
       
    19  @file
       
    20  @internalTechnology
       
    21 */
       
    22 
       
    23 #ifndef __ASSRVNOTIFYINGALARMMNGR_H__
       
    24 #define __ASSRVNOTIFYINGALARMMNGR_H__
       
    25 
       
    26 #include "ASSrvTimerObserver.h"
       
    27 
       
    28 class CASSrvNotificationCoordinator;
       
    29 class CASSrvServerWideData;
       
    30 
       
    31 /**
       
    32 This case manage the list of notifying alarms in alarm server
       
    33 */
       
    34 class CASSrvNotifyingAlarmMngr : public CBase, public MASSrvAlarmTimerObserver
       
    35 	{
       
    36 public:
       
    37 	static CASSrvNotifyingAlarmMngr* NewL(CASSrvNotificationCoordinator& aParent, CASSrvServerWideData& aServerWideData);
       
    38 	~CASSrvNotifyingAlarmMngr();
       
    39 	
       
    40 	void SetMaxNumberOfAlarms(TInt aMaxAlarms);
       
    41 	TBool AmNotifyingAboutAlarm() const;
       
    42 	TBool AlarmIsNotifying(TAlarmId aAlarmId) const;
       
    43 	void FindAndExecuteNextAlarmAwaitingNotification(TBool aUpdate = ETrue);
       
    44 	TBool RemoveNotifyingAlarm(TAlarmId aAlarmId);
       
    45 	void RemoveAllNotifyingAlarms();
       
    46 	TInt NumberOfNotifyingAlarm();
       
    47 	void AcknowledgeAllNotifyingAlarms();
       
    48 
       
    49 private:
       
    50 	CASSrvNotifyingAlarmMngr(CASSrvNotificationCoordinator& aParent, CASSrvServerWideData& aServerWideData);
       
    51 	void ConstructL();
       
    52 
       
    53 	// from MASSrvAlarmTimerObserver
       
    54 	void MATimerHandleAlarmExpired(TAlarmTimerEvent aEvent, TAlarmId aAlarmId);
       
    55 
       
    56 	CASSrvServerWideData& ServerWideData() const;
       
    57 	void SetAsNextNotifyingAlarm(TAlarmId aAlarmId);
       
    58 	TBool AllowMoreNotifyingAlarms() const;
       
    59 	TAlarmId YoungestNotifyingAlarmId() const;
       
    60 	TBool SoleNotifyingAlarmHasSoundPaused() const;
       
    61 
       
    62 private:	
       
    63 	/** Pointer to notification coordinator */
       
    64 	CASSrvNotificationCoordinator& iParent;
       
    65 
       
    66 	/** Pointer to server wide data */
       
    67 	CASSrvServerWideData& iServerWideData;
       
    68 	
       
    69 	/** The maximum number of alarms supported by Alert Server */
       
    70 	TInt iMaxNumberOfAlarms;
       
    71 
       
    72 	/** The list of notifying alarm ids, ordered by expiration time */
       
    73 	RArray<TAlarmId> iCurrentlyNotifyingAlarmIds;
       
    74 	};
       
    75 
       
    76 #endif	//__ASSRVNOTIFYINGALARMMNGR_H__