commonappservices/alarmserver/AlarmAlert/Include/ASAltClientSession.h
changeset 0 2e3d3ce01487
equal deleted inserted replaced
-1:000000000000 0:2e3d3ce01487
       
     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 __ASALTCLIENTSESSION_H__
       
    17 #define __ASALTCLIENTSESSION_H__
       
    18 
       
    19 // System includes
       
    20 #include <e32base.h>
       
    21 #include <babitflags.h>
       
    22 
       
    23 #include <asshddefs.h>
       
    24 
       
    25 // Classes referenced
       
    26 class TASShdAlarm;  
       
    27 
       
    28 //
       
    29 // ----> RASAltClientSession (header)
       
    30 //
       
    31 /**
       
    32  * The client-side interface to the Alarm Alert Server
       
    33  */
       
    34 class RASAltClientSession : public RSessionBase
       
    35 	{
       
    36 //
       
    37 public:										// CONSTRUCT
       
    38 //
       
    39 	RASAltClientSession();
       
    40 
       
    41 //
       
    42 public:										// FROM RSessionBase
       
    43 //
       
    44 
       
    45 	/**
       
    46 	 * Connect to the Alarm Alert Server
       
    47 	 */
       
    48     TInt									Connect();
       
    49 
       
    50 //
       
    51 public:										// ACCESS
       
    52 //
       
    53 
       
    54 	/**
       
    55 	 * Be notified if the alarm alert server dies for any reason.
       
    56 	 */
       
    57 	void									NotifyAlertServerDeath(TRequestStatus& aStatus) const;
       
    58 
       
    59 
       
    60 	/**
       
    61 	 * Cancel the previous server-death notification
       
    62 	 */
       
    63 	void									NotifyOnResponseCancel() const;
       
    64 
       
    65 
       
    66 	/**
       
    67 	 * Ask the alarm alert server to stop playing sound.
       
    68 	 */
       
    69 	void									StopPlayingSound() const;
       
    70 
       
    71 	/**
       
    72 	 * Change the visibility of the screen furniture in the Alarm Alert Server thread
       
    73 	 */
       
    74 	void									SetVisibility(TBool aVisible) const;
       
    75 
       
    76 	/**
       
    77 	 * Inform the Alarm Alert Server that a quiet period has been set
       
    78 	 */
       
    79 	void									SetQuietPeriod(const TTime& aTimeToRemainQuietUntil) const;
       
    80 
       
    81 	/**
       
    82 	 * Update the Alarm Alert Server's flags
       
    83 	 */
       
    84 	TInt									SetAlertServerState(TBitFlags aAlarmAlertFlags) const;
       
    85 
       
    86 	/**
       
    87 	 * Tell the Alarm Alert Server that an alarm is due, pass the owner
       
    88 	 * information, and any client-data associated with the alarm
       
    89 	 */
       
    90 	void									SetAlarm(TRequestStatus& aStatus,const TASShdAlarm& aAlarm, const TFullName& aOwner, const TDesC8& aAlarmData);
       
    91 
       
    92 	/**
       
    93 	 * Request the time at which the current alarm should be snoozed until.
       
    94 	 */
       
    95 	void 									TimeWhenQuietPeriodShouldEnd(TRequestStatus& aStatus,TPckgBuf<TTime>& aTimeBuf) const;
       
    96 
       
    97 
       
    98 	void		NotifyOnResponse(TRequestStatus& aStatus, TTime& aTimeThatSnoozeShouldEnd, TAlarmId& aAlarmId);
       
    99 	void		StartPlayingSound(const TDesC& aSoundFile, TAlarmId aAlarmId) const;
       
   100 	void 		StopPlayingSound(TAlarmId aAlarmId) const;	
       
   101 	TInt		SetAlertServerState(TBitFlags aAlarmAlertFlags, TAlarmId aAlarmId) const;	
       
   102 	void 		SetVisibility(TBool aVisible, TAlarmId aAlarmId) const;
       
   103 	void 		GetMaxNumberOfAlarms(TInt& aMaxNumberOfAlarms) const;
       
   104 	void		DeleteAlarm(TAlarmId aAlarmId) const;
       
   105 	void		DeleteAlarm() const;
       
   106 
       
   107 
       
   108 
       
   109 //
       
   110 private:									// MEMBER DATA
       
   111 //
       
   112 
       
   113 	/**
       
   114 	 * Update the pointer to refer to the specified time
       
   115 	 */
       
   116 	void									PrepareTimePointer(TTime& aTime);
       
   117 
       
   118 //
       
   119 private:									// MEMBER DATA
       
   120 //
       
   121 
       
   122 	/**
       
   123 	 * A pointer to a modifiable TTime object.
       
   124 	 */
       
   125 	TPtr8									iTimePointer;
       
   126 	
       
   127 	/**
       
   128 	 * A package of a constant TASShdAlarm object. 
       
   129 	 */
       
   130 	TPckgC<TASShdAlarm>						iAlarmPckg;
       
   131 
       
   132 	/**
       
   133 	 * A pointer to a constant alarm data buffer
       
   134 	 */
       
   135 	TPtrC8									iAlarmData;
       
   136 
       
   137 	/**
       
   138 	 * A TFullName alarm owner object
       
   139 	 */
       
   140 	TFullName								iAlarmOwner;
       
   141 	
       
   142 	/**
       
   143 	 * A pointer to a modifiable TAlarmId.
       
   144 	 */
       
   145 	 
       
   146 	TPtr8									iAlarmIdPointer;
       
   147 
       
   148 	//TTime time
       
   149 	};
       
   150 
       
   151 #endif
       
   152