os/ossrv/lowlevellibsandfws/pluginfw/Framework/nullExample/nullExample.cpp
changeset 0 bde4ae8d615e
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/os/ossrv/lowlevellibsandfws/pluginfw/Framework/nullExample/nullExample.cpp	Fri Jun 15 03:10:57 2012 +0200
     1.3 @@ -0,0 +1,103 @@
     1.4 +// Copyright (c) 1997-2009 Nokia Corporation and/or its subsidiary(-ies).
     1.5 +// All rights reserved.
     1.6 +// This component and the accompanying materials are made available
     1.7 +// under the terms of "Eclipse Public License v1.0"
     1.8 +// which accompanies this distribution, and is available
     1.9 +// at the URL "http://www.eclipse.org/legal/epl-v10.html".
    1.10 +//
    1.11 +// Initial Contributors:
    1.12 +// Nokia Corporation - initial contribution.
    1.13 +//
    1.14 +// Contributors:
    1.15 +//
    1.16 +// Description:
    1.17 +//
    1.18 +
    1.19 +// Includes
    1.20 +#include <ecom/ecom.h>
    1.21 +#include <ecom/implementationinformation.h>
    1.22 +#include <ecom/implementationproxy.h>
    1.23 +#include    "nullExample.h"
    1.24 +
    1.25 +
    1.26 +// ================= MEMBER FUNCTIONS =======================
    1.27 +
    1.28 +// C++ default constructor can NOT contain any code, that
    1.29 +// might leave.
    1.30 +//
    1.31 +CInterfaceImpl::CInterfaceImpl():
    1.32 +	CExampleInterface()
    1.33 +    {
    1.34 +    
    1.35 +    }
    1.36 +
    1.37 +// Two-phased constructor.
    1.38 +CInterfaceImpl* CInterfaceImpl::NewL(TAny* aConstructionParams)
    1.39 +    {
    1.40 +    __ASSERT_ALWAYS(aConstructionParams == NULL, User::Leave(KErrArgument));
    1.41 +    //return new (ELeave) CInterfaceImpl;
    1.42 +    CInterfaceImpl* self= new (ELeave) CInterfaceImpl();
    1.43 +	return self;
    1.44 +    }
    1.45 +
    1.46 +// Destructor
    1.47 +CInterfaceImpl::~CInterfaceImpl()
    1.48 +    {
    1.49 +    }
    1.50 +
    1.51 +TInt CInterfaceImpl::Version() const
    1.52 +    {
    1.53 +    return 2;
    1.54 +    }
    1.55 +    
    1.56 +void CInterfaceImpl::DoMethodL()
    1.57 +	{
    1.58 +	// Access TLS to ensure it has been set properly
    1.59 +	REINTERPRET_CAST(TInt*, Dll::Tls());
    1.60 +	}
    1.61 +	
    1.62 +TInt CInterfaceImpl::FireAndForget()
    1.63 +	{
    1.64 +	TRAPD(error,DoMethodL());
    1.65 +	return error;			// Always KErrNotSupported
    1.66 +	}
    1.67 +	
    1.68 +TUid CInterfaceImpl::ImplId()
    1.69 +	{
    1.70 +	TUid idVal = {0x01aa500c};
    1.71 +	return (idVal);
    1.72 +	}
    1.73 +	
    1.74 +// Provide the CActive overloads
    1.75 +void CInterfaceImpl::RunL()
    1.76 +	{
    1.77 +	// Do nothing : should never be called
    1.78 +	__ASSERT_DEBUG(EFalse,User::Invariant());
    1.79 +	}
    1.80 +
    1.81 +void CInterfaceImpl::DoCancel()
    1.82 +	{
    1.83 +	// Do nothing
    1.84 +	}
    1.85 +
    1.86 +TInt CInterfaceImpl::RunError(TInt aError)
    1.87 +	{
    1.88 +	return aError;
    1.89 +	}
    1.90 +
    1.91 +// __________________________________________________________________________
    1.92 +// Exported proxy for instantiation method resolution
    1.93 +// Define the interface UIDs
    1.94 +const TImplementationProxy KImplTable[] = 
    1.95 +    {
    1.96 +    //{{0x01aa500c},	CInterfaceImpl::NewL}
    1.97 +    IMPLEMENTATION_PROXY_ENTRY(0x01aa500c, CInterfaceImpl::NewL)
    1.98 +    };
    1.99 +
   1.100 +EXPORT_C const TImplementationProxy* ImplementationGroupProxy(TInt& aTableCount)
   1.101 +    {
   1.102 +    aTableCount = sizeof(KImplTable) / sizeof(TImplementationProxy);
   1.103 +    return KImplTable;
   1.104 +    }
   1.105 +
   1.106 +//  End of File