phoneapp/phonemediatorcenter/src/cphonemediatormessagefactory.cpp
changeset 0 5f000ab63145
child 21 92ab7f8d0eab
equal deleted inserted replaced
-1:000000000000 0:5f000ab63145
       
     1 /*
       
     2 * Copyright (c) 2008 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 of CPhoneMediatorMessageFactory class.
       
    15 *
       
    16 */
       
    17 
       
    18 
       
    19 // INCLUDE FILES
       
    20 #include "pevirtualengine.h"
       
    21 #include "phoneui.pan"
       
    22 #include "cphonemediatormessagefactory.h"
       
    23 #include "cphonedataportmessage.h"
       
    24 #include "phonelogger.h"
       
    25 
       
    26 // ================= MEMBER FUNCTIONS =======================
       
    27 
       
    28 // ---------------------------------------------------------
       
    29 // CPhoneMediatorMessageFactory::CPhoneMediatorMessageFactory
       
    30 // ---------------------------------------------------------
       
    31 //
       
    32 CPhoneMediatorMessageFactory::CPhoneMediatorMessageFactory( MPEEngineInfo& aEngineInfo ) : 
       
    33 	iEngineInfo( aEngineInfo )
       
    34     {
       
    35     }
       
    36 
       
    37 // ---------------------------------------------------------
       
    38 // CPhoneMediatorMessageFactory::ConstructL
       
    39 // ---------------------------------------------------------
       
    40 //
       
    41 void CPhoneMediatorMessageFactory::ConstructL()
       
    42     {
       
    43     }
       
    44 
       
    45 // ---------------------------------------------------------
       
    46 // CPhoneMediatorMessageFactory::NewL
       
    47 // ---------------------------------------------------------
       
    48 //
       
    49 CPhoneMediatorMessageFactory* CPhoneMediatorMessageFactory::NewL( MPEEngineInfo& aEngineInfo )
       
    50     {
       
    51     CPhoneMediatorMessageFactory* self = new( ELeave ) CPhoneMediatorMessageFactory( aEngineInfo );
       
    52     
       
    53     CleanupStack::PushL( self );
       
    54     self->ConstructL();
       
    55     CleanupStack::Pop( self );
       
    56 
       
    57     return self;
       
    58     }
       
    59     
       
    60 // ---------------------------------------------------------
       
    61 // CPhoneMediatorMessageFactory::~CPhoneMediatorMessageFactory
       
    62 // ---------------------------------------------------------
       
    63 //
       
    64 CPhoneMediatorMessageFactory::~CPhoneMediatorMessageFactory()
       
    65     {
       
    66     }
       
    67 
       
    68 // ---------------------------------------------------------
       
    69 // CPhoneMediatorMessageFactory::CreateMessageL
       
    70 // ---------------------------------------------------------
       
    71 //
       
    72 MPhoneMediatorMessage* CPhoneMediatorMessageFactory::CreateMessageL( 
       
    73 	const TInt aMessage, TInt aCallId )
       
    74 	{
       
    75     __LOGMETHODSTARTEND( EPhoneMediatorCenter, "CPhoneMediatorMessageFactory::CreateMessageL( ) ");
       
    76     __PHONELOG2( EBasic, EPhoneMediatorCenter, 
       
    77     	"CPhoneMediatorMessageFactory::CreateMessageL - aMessage=%d, aCallId=%d", aMessage, aCallId );
       
    78 
       
    79 	MPhoneMediatorMessage* message = NULL;
       
    80 
       
    81 	switch( aMessage )
       
    82 		{
       
    83 		case MEngineMonitor::EPEMessageDataPortLoaned:
       
    84 			message = CPhoneDataPortMessage::NewL( iEngineInfo );
       
    85 			break;
       
    86 			
       
    87 		default:
       
    88 			break;
       
    89 		}
       
    90 			
       
    91 	return message;
       
    92 	}
       
    93 
       
    94 //  End of File