multimediacommscontroller/mmccmultiplexer/tsrc/ut_multiplexer/Stubs/src/ecom_stubs.cpp
changeset 0 1bce908db942
equal deleted inserted replaced
-1:000000000000 0:1bce908db942
       
     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:    
       
    15 *
       
    16 */
       
    17 
       
    18 
       
    19 
       
    20 #include <ecom/ecom.h>
       
    21 #include <ecom/implementationinformation.h>
       
    22 #include "MccRtpDataSource.h"
       
    23 #include "MccRtpDataSink.h"
       
    24 
       
    25 #define KImplUidRtpDataSource           0x1020740B
       
    26 const TUid KRtpDataSource =  { KImplUidRtpDataSource };
       
    27 
       
    28 // REComSession:
       
    29 
       
    30 // -----------------------------------------------------------------------------
       
    31 // REComSession::REComSession
       
    32 // -----------------------------------------------------------------------------
       
    33 //
       
    34 REComSession::REComSession()
       
    35     {
       
    36     }
       
    37     
       
    38      
       
    39 // -----------------------------------------------------------------------------
       
    40 // REComSession::ListImplementationsL
       
    41 // -----------------------------------------------------------------------------
       
    42 //
       
    43 void REComSession::ListImplementationsL(
       
    44                             TUid aInterfaceUid,
       
    45 							RImplInfoPtrArray& aImplInfoArray)
       
    46     {
       
    47     TUid uid(aInterfaceUid); 
       
    48 	TInt version = 1; 
       
    49 	HBufC*  name = _L("dummy").AllocLC();
       
    50 	HBufC8* dataType = _L8("0_IETF").AllocLC();
       
    51 	HBufC8* opaqueData = _L8("dummy").AllocLC();
       
    52     TDriveUnit drive;
       
    53 	TBool romOnly(ETrue);
       
    54 	TBool romBased(ETrue);
       
    55     CImplementationInformation* info = 
       
    56     				CImplementationInformation::NewL(uid,version,name,dataType,
       
    57     								opaqueData,drive,romOnly,romBased);
       
    58     CleanupStack::Pop(3);
       
    59     CleanupStack::PushL(info);
       
    60     aImplInfoArray.AppendL(info);
       
    61     CleanupStack::Pop(info);
       
    62 	
       
    63     }
       
    64 
       
    65 // -----------------------------------------------------------------------------
       
    66 // REComSession::DestroyedImplementation
       
    67 // -----------------------------------------------------------------------------
       
    68 //
       
    69 void REComSession::DestroyedImplementation(
       
    70                             TUid /*aDtorIDKey*/)
       
    71     {
       
    72     }
       
    73     
       
    74 // -----------------------------------------------------------------------------
       
    75 // REComSession::FinalClose
       
    76 // -----------------------------------------------------------------------------
       
    77 //
       
    78 void REComSession::FinalClose()
       
    79     {
       
    80     }
       
    81    
       
    82 // -----------------------------------------------------------------------------
       
    83 // REComSession::CreateImplementationL
       
    84 // -----------------------------------------------------------------------------
       
    85 //
       
    86 TAny* REComSession::CreateImplementationL(
       
    87                             TUid aImplementationUid, 
       
    88 							TInt32 /*aKeyOffset*/)
       
    89     {
       
    90     if ( aImplementationUid == KRtpDataSource )
       
    91     	{
       
    92     	return CMccRtpDataSource::NewSourceL(aImplementationUid,KNullDesC8 );
       
    93     	}
       
    94     else
       
    95     	{
       
    96     	return CMccRtpDataSink::NewSinkL( aImplementationUid, KNullDesC8 );
       
    97     	}
       
    98     
       
    99     }
       
   100     
       
   101