os/persistentdata/featuremgmt/featuremgr/test/helper/test_plugins/src/invalidplugin.cpp
First public contribution.
1 // Copyright (c) 2002-2009 Nokia Corporation and/or its subsidiary(-ies).
2 // All rights reserved.
3 // This component and the accompanying materials are made available
4 // under the terms of "Eclipse Public License v1.0"
5 // which accompanies this distribution, and is available
6 // at the URL "http://www.eclipse.org/legal/epl-v10.html".
8 // Initial Contributors:
9 // Nokia Corporation - initial contribution.
18 #include "invalidplugin.h"
19 #include <featmgr/featureinfoplugin.h>
20 #include "featmgrdebug.h"
21 #include "efm_test_consts.h"
22 #include <ecom/implementationproxy.h>
23 #include <e32property.h>
25 // Map the interface implementation UIDs to implementation factory functions
26 const TImplementationProxy ImplementationTable[] =
28 IMPLEMENTATION_PROXY_ENTRY(0x10283708, CFeatMgrInvalidPlugin::NewL),
31 // Exported proxy for instantiation method resolution.
32 EXPORT_C const TImplementationProxy* ImplementationGroupProxy( TInt& aTableCount )
34 aTableCount = sizeof(ImplementationTable) / sizeof(TImplementationProxy);
35 return ImplementationTable;
38 CFeatMgrInvalidPlugin* CFeatMgrInvalidPlugin::NewL()
40 CFeatMgrInvalidPlugin* self = new(ELeave) CFeatMgrInvalidPlugin();
41 CleanupStack::PushL(self);
43 CleanupStack::Pop(self);
47 CFeatMgrInvalidPlugin::~CFeatMgrInvalidPlugin()
51 CFeatMgrInvalidPlugin::CFeatMgrInvalidPlugin()
55 void CFeatMgrInvalidPlugin::ProcessCommandL( const FeatureInfoCommand::TFeatureInfoCmd aCommandId,
56 const TUint8 aTransId,
59 INFO_LOG2( "FeatMgrPlugin: Processing command: 0x%x, TransId: 0x%x",
60 aCommandId, aTransId );
64 case FeatureInfoCommand::ELoadFeatureInfoCmdId:
66 INFO_LOG( "FeatMgrPlugin: Processed ELoadFeatureInfoCmdId" );
67 User::Leave(KErrNotSupported);
70 case FeatureInfoCommand::ELoadEnhancedFeatureInfoCmdId:
72 INFO_LOG( "FeatMgrPlugin: Processed ELoadEnhancedFeatureInfoCmdId" );
73 User::Leave(KErrNotSupported);
78 INFO_LOG1( "FeatMgrPlugin: Unknown Command: 0x%x", aCommandId );
79 User::Leave(KErrNotSupported);
84 TInt retval(KErrNone);
85 TInt timeout( 50 ); // microseconds
90 if ( iTimer && !iTimer->IsActive() )
96 iTimer = CPluginTimer::NewL(timeout, *iResponseCallback, aCommandId, aTransId, retval,this);
100 void CFeatMgrInvalidPlugin::ConstructL()
104 void CFeatMgrInvalidPlugin::GenericTimerFiredL(
105 MFeatureInfoPluginCallback& /*aService*/,
106 FeatureInfoCommand::TFeatureInfoCmd /*aCommandId*/,