mtptransports/mtpptpiptransport/filterapi/src/cptpiphostfilterinterface.cpp
changeset 0 d0791faffa3f
equal deleted inserted replaced
-1:000000000000 0:d0791faffa3f
       
     1 
       
     2 // Copyright (c) 2007-2009 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 #include "cptpiphostfilterinterface.h"
       
    18 
       
    19 /*
       
    20 Creates an implementation of an ECOM plugin with the specified UID
       
    21 */
       
    22 EXPORT_C CPTPIPHostFilterInterface* CPTPIPHostFilterInterface::NewL()
       
    23 	{		
       
    24 	const TUid KFilterImplUid ={0xA0004A5F};
       
    25 	
       
    26 	TAny* defaultFilter=NULL;
       
    27 	
       
    28 	TRAPD(error,defaultFilter=REComSession::CreateImplementationL(KFilterImplUid,_FOFF(CPTPIPHostFilterInterface,iID_offset)));
       
    29 	if(error==KErrNone)
       
    30 	{
       
    31 	return (reinterpret_cast<CPTPIPHostFilterInterface*>(defaultFilter));
       
    32 	}
       
    33 	else 
       
    34 		{
       
    35 		return NULL;	
       
    36 		}
       
    37 	}
       
    38 
       
    39 
       
    40 /*
       
    41 Lists all the implementations for that Interface identified by the Interface ID
       
    42 */
       
    43 EXPORT_C void CPTPIPHostFilterInterface::ListImplementations(RImplInfoPtrArray& aImplInfoArray)
       
    44 	{
       
    45 	const TUid KFilterInterfaceUid ={0xA0004A5E};
       
    46 	TRAPD(ret, REComSession::ListImplementationsL(KFilterInterfaceUid,aImplInfoArray));
       
    47 	if(ret != KErrNone)
       
    48 	{
       
    49 		RDebug::Print(_L("CPTPIPController::ListImplementations ERROR = %d\n") ,ret);
       
    50 	}
       
    51 
       
    52 	}
       
    53 
       
    54 
       
    55 /*
       
    56 Destructor
       
    57 */
       
    58 EXPORT_C CPTPIPHostFilterInterface::~CPTPIPHostFilterInterface()
       
    59 {
       
    60 
       
    61 }
       
    62 
       
    63 
       
    64 
       
    65