meetingrequest/mricalviewer/src/cesmricalviewercommandbase.cpp
branchRCL_3
changeset 25 3533d4323edc
parent 0 8466d47a6819
equal deleted inserted replaced
24:d189ee25cf9d 25:3533d4323edc
       
     1 /*
       
     2 * Copyright (c) 2007 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:  ESMR command base class implementation
       
    15 *
       
    16 */
       
    17 
       
    18 
       
    19 // INCLUDE FILES
       
    20 #include "emailtrace.h"
       
    21 #include "cesmricalviewercommandbase.h"
       
    22 #include <calsession.h>
       
    23 
       
    24 /// Unnamed namespace for local definitions
       
    25 namespace {
       
    26 
       
    27 #ifdef _DEBUG
       
    28 
       
    29 // Panic literal
       
    30 _LIT( KESMRIcalViewerCommandBase, "ESMRIcalViewerCommandBase" );
       
    31 
       
    32 /** Panic codes */
       
    33 enum TESMRIcalViewerCommandBasePanic
       
    34 	{
       
    35 	EObserverChanged = 0,
       
    36 	EMailMessageNotSet = 1, // Email message is not set
       
    37 	};
       
    38 
       
    39 void Panic( TESMRIcalViewerCommandBasePanic aPanic )
       
    40 	{
       
    41 	User::Panic( KESMRIcalViewerCommandBase, aPanic );	
       
    42 	}
       
    43 
       
    44 #endif
       
    45 
       
    46 }  // namespace
       
    47 
       
    48 // ======== MEMBER FUNCTIONS ========
       
    49 
       
    50 // -----------------------------------------------------------------------------
       
    51 // CESMRIcalViewerCommandBase::CESMRIcalViewerCommandBase
       
    52 // -----------------------------------------------------------------------------
       
    53 //
       
    54 CESMRIcalViewerCommandBase::CESMRIcalViewerCommandBase(
       
    55 		TESMRIcalViewerOperationType aType,
       
    56 		CCalSession& aCalSession )
       
    57 :	iOperationType( aType ),
       
    58 	iCalSession( aCalSession )
       
    59 	{
       
    60     FUNC_LOG;
       
    61 	
       
    62 	}
       
    63 
       
    64 // -----------------------------------------------------------------------------
       
    65 // CESMRIcalViewerCommandBase::CESMRIcalViewerCommandBase
       
    66 // -----------------------------------------------------------------------------
       
    67 //
       
    68 CESMRIcalViewerCommandBase::~CESMRIcalViewerCommandBase()
       
    69 	{
       
    70     FUNC_LOG;
       
    71 	
       
    72 	}
       
    73 
       
    74 // -----------------------------------------------------------------------------
       
    75 // CESMRIcalViewerCommandBase::CESMRIcalViewerCommandBase
       
    76 // -----------------------------------------------------------------------------
       
    77 //
       
    78 void CESMRIcalViewerCommandBase::BaseConstructL()
       
    79 	{
       
    80     FUNC_LOG;
       
    81 	// not yet implementation
       
    82 	}
       
    83 
       
    84 // -----------------------------------------------------------------------------
       
    85 // CESMRIcalViewerCommandBase::CESMRIcalViewerCommandBase
       
    86 // -----------------------------------------------------------------------------
       
    87 //
       
    88 TESMRIcalViewerOperationType CESMRIcalViewerCommandBase::OperationType() const
       
    89 	{
       
    90     FUNC_LOG;
       
    91 	return iOperationType;
       
    92 	}
       
    93 
       
    94 // -----------------------------------------------------------------------------
       
    95 // CESMRIcalViewerCommandBase::CESMRIcalViewerCommandBase
       
    96 // -----------------------------------------------------------------------------
       
    97 //
       
    98 CCalSession& CESMRIcalViewerCommandBase::CalSession()
       
    99 	{
       
   100     FUNC_LOG;
       
   101 	return iCalSession;
       
   102 	}
       
   103 
       
   104 // -----------------------------------------------------------------------------
       
   105 // CESMRIcalViewerCommandBase::CESMRIcalViewerCommandBase
       
   106 // -----------------------------------------------------------------------------
       
   107 //
       
   108 void CESMRIcalViewerCommandBase::SetObserver( 
       
   109 			MESMRIcalViewerObserver* aObserver )
       
   110 	{
       
   111     FUNC_LOG;
       
   112 	if ( iObserver && iObserver != aObserver )
       
   113 		{
       
   114 		__ASSERT_DEBUG( !iObserver, Panic( EObserverChanged ) );
       
   115 		}
       
   116 
       
   117 	iObserver = aObserver;
       
   118 	}
       
   119 	
       
   120 // -----------------------------------------------------------------------------
       
   121 // CESMRIcalViewerCommandBase::CESMRIcalViewerCommandBase
       
   122 // -----------------------------------------------------------------------------
       
   123 //
       
   124 MESMRIcalViewerObserver* CESMRIcalViewerCommandBase::Observer()
       
   125 	{
       
   126     FUNC_LOG;
       
   127 	return iObserver;
       
   128 	}
       
   129 
       
   130 // -----------------------------------------------------------------------------
       
   131 // CESMRIcalViewerCommandBase::CESMRIcalViewerCommandBase
       
   132 // -----------------------------------------------------------------------------
       
   133 //
       
   134 void CESMRIcalViewerCommandBase::SetMessage( 
       
   135 		CFSMailMessage* aMessage )
       
   136 	{
       
   137     FUNC_LOG;
       
   138 	iMessage = aMessage;
       
   139 	}
       
   140 
       
   141 // -----------------------------------------------------------------------------
       
   142 // CESMRIcalViewerCommandBase::CESMRIcalViewerCommandBase
       
   143 // -----------------------------------------------------------------------------
       
   144 //
       
   145 CFSMailMessage* CESMRIcalViewerCommandBase::Message()
       
   146 	{
       
   147     FUNC_LOG;
       
   148 	__ASSERT_DEBUG( iMessage, Panic( EMailMessageNotSet ) ); 
       
   149 	return iMessage;
       
   150 	}
       
   151 
       
   152 // EOF
       
   153