meetingui/meetingrequestviewers/src/CMRDataFillerReply.cpp
changeset 0 f979ecb2b13e
equal deleted inserted replaced
-1:000000000000 0:f979ecb2b13e
       
     1 /*
       
     2 * Copyright (c) 2002-2004 Nokia Corporation and/or its subsidiary(-ies).
       
     3 * All rights reserved.
       
     4 * This component and the accompanying materials are made available
       
     5 * under the terms of "Eclipse Public License v1.0"
       
     6 * which accompanies this distribution, and is available
       
     7 * at the URL "http://www.eclipse.org/legal/epl-v10.html".
       
     8 *
       
     9 * Initial Contributors:
       
    10 * Nokia Corporation - initial contribution.
       
    11 *
       
    12 * Contributors:
       
    13 *
       
    14 * Description:   Implementation for meeting request reply data filler
       
    15 *
       
    16 */
       
    17 
       
    18 
       
    19 
       
    20 // INCLUDE FILES
       
    21 #include "CMRDataFillerReply.h"
       
    22 #include <meetingrequestviewersuires.rsg>
       
    23 #include <CalEntry.h>
       
    24 
       
    25 // ============================ MEMBER FUNCTIONS ===============================
       
    26 
       
    27 CMRDataFillerReply::~CMRDataFillerReply()
       
    28     {
       
    29     }
       
    30 
       
    31 void CMRDataFillerReply::DoFillViewerL()
       
    32     {
       
    33 	FillDescriptionDataL();
       
    34 	if(MeetingOnSameDayL())
       
    35 		{
       
    36 		FillWhenDataL();
       
    37 		}
       
    38 	else
       
    39 		{
       
    40 		FillStartTimeDataL();
       
    41 		FillEndTimeDataL();
       
    42 		}
       
    43 	FillLocationDataL();
       
    44 	FillStatusDataL();
       
    45 	FillAttendanceDataL();
       
    46     }
       
    47 
       
    48 
       
    49 CMRDataFillerReply* CMRDataFillerReply::NewL(
       
    50     CRichBio& aRichBio,
       
    51     MMRModelInterface& aModel,
       
    52     CCoeEnv& aCoeEnv,
       
    53     CMRMailboxUtils& aUtils,
       
    54     MAgnEntryUi::TAgnEntryUiInParams& aParams )
       
    55     {
       
    56     CMRDataFillerReply* self =
       
    57         new( ELeave ) CMRDataFillerReply( aRichBio,
       
    58                                           aModel,
       
    59                                           aCoeEnv,
       
    60                                           aUtils,
       
    61                                           aParams );
       
    62     CleanupStack::PushL( self );
       
    63     self->ConstructL();
       
    64     CleanupStack::Pop();
       
    65     return self;
       
    66     }
       
    67 
       
    68 CMRDataFillerReply::CMRDataFillerReply(
       
    69     CRichBio& aRichBio,
       
    70     MMRModelInterface& aModel,
       
    71     CCoeEnv& aCoeEnv,
       
    72     CMRMailboxUtils& aMRUtils,
       
    73     MAgnEntryUi::TAgnEntryUiInParams& aParams )
       
    74     : CMRDataFillerBase( aRichBio, aModel, aCoeEnv, aMRUtils, aParams )
       
    75     {
       
    76     }
       
    77 
       
    78 void CMRDataFillerReply::ConstructL()
       
    79     {
       
    80     CMRDataFillerBase::ConstructL();
       
    81     }
       
    82 
       
    83 void CMRDataFillerReply::FillStatusDataL()
       
    84 	{	
       
    85 	// status of respondent (i.e. the first and only attendee in the entry)
       
    86 	CCalAttendee* attendee = iEntry->AttendeesL()[0];
       
    87 	TInt retVal = GetAttendeeStatusL( *attendee );
       
    88 	if ( retVal != 0 )
       
    89 	    {		    
       
    90 	    AddItemL( iRichBio, R_QTN_MAIL_MTG_STATUS, retVal );
       
    91 	    }
       
    92 	}
       
    93 
       
    94 void CMRDataFillerReply::FillAttendanceDataL()
       
    95 	{
       
    96     // attendance of respondent (i.e. the first and only attendee in the entry)
       
    97 	CCalAttendee* attendee = iEntry->AttendeesL()[0];	
       
    98 	TInt retVal = GetAttendanceStatusL( *attendee );
       
    99 	if ( retVal != 0 )
       
   100 	    {	    
       
   101 		AddItemL( iRichBio, R_QTN_MAIL_MTG_ATTENDANCE, retVal );
       
   102 	    }
       
   103 	}
       
   104 
       
   105 //  End of File