alarmui/inc/AlmAlarmInfo.h
author Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
Tue, 02 Feb 2010 10:12:19 +0200
changeset 0 f979ecb2b13e
child 18 c198609911f9
permissions -rw-r--r--
Revision: 201003 Kit: 201005

/*
* Copyright (c) 2006-2006 Nokia Corporation and/or its subsidiary(-ies).
* All rights reserved.
* This component and the accompanying materials are made available
* under the terms of "Eclipse Public License v1.0"
* which accompanies this distribution, and is available
* at the URL "http://www.eclipse.org/legal/epl-v10.html".
*
* Initial Contributors:
* Nokia Corporation - initial contribution.
*
* Contributors:
*
* Description: This class provides the text for an alarm notification.
*
*/



#ifndef ALMALARMINFO_H
#define ALMALARMINFO_H

// INCLUDES
#include <e32base.h>
#include "alarmutils.h"

// FORWARD DECLARATIONS
class CCalEntry;


// CLASS DECLARATION
/**
 * @lib AknAlarmService.lib
 * @since 1.0
 **/
NONSHARABLE_CLASS( CAlmAlarmInfo ) : public CBase
{
 public: // destructor
 
    /**
    * Constructor.
    */
    CAlmAlarmInfo(CAlarmUtils* aAlarmUtils);

    /**
     * Destructor.
     */
    ~CAlmAlarmInfo();

 public:
    /**
     * Gets text and time values for alarm note.
     * @since 2.0
     * @param aAlarm Alarm data
     * @param aText Text part of alarm note's text.
     * @param aAlarmType Alarm type.
     **/
    void GetAlarmLabelL(const TASShdAlarm& aAlarm, HBufC*& aText, const CAlarmUtils::TAlarmType& aAlarmType);

    /**
     * Gets the label for wakeup note.
     * @since 2.0
     **/
    void GetWakeupLabelL(HBufC*& aLabel);

 private:
    /**
     * Functions to set the alarm notification string.
     **/
    void SetupUnknownAlarmL(HBufC*& aText);
    void SetupClockAlarmL(HBufC*& aText);
    void SetupAppointmentAlarmL(HBufC*& aText);
    void SetupToDoAlarmL(HBufC*& aText);
    void SetupAnniversaryAlarmL(HBufC*& aText);

    void GetCoverUIParamsForCalendarL(const CCalEntry* aEntry);
    void GetCoverUIParamsForClockAndOtherL(const TASShdAlarm& aAlarm, const CAlarmUtils::TAlarmType aType);

    void AppendSubjectLocationText(TPtr& aDest, const TDesC& aSeparator);

 private: // data members
    /**
    * Pointer to the utils class.
    * Not own.
    */
    CAlarmUtils* iAlarmUtils;

    HBufC* iSubject;
    HBufC* iLocation;
    HBufC* iDate;
    HBufC* iTime;
    HBufC* iCoverTime;
    HBufC* iCoverDate;

};

#endif  // ALMALARMINFO_H


// End of File