sl@0: // Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). sl@0: // All rights reserved. sl@0: // This component and the accompanying materials are made available sl@0: // under the terms of the License "Eclipse Public License v1.0" sl@0: // which accompanies this distribution, and is available sl@0: // at the URL "http://www.eclipse.org/legal/epl-v10.html". sl@0: // sl@0: // Initial Contributors: sl@0: // Nokia Corporation - initial contribution. sl@0: // sl@0: // Contributors: sl@0: // sl@0: // Description: sl@0: // f32test\bench\t_notify_perf.inl sl@0: // sl@0: // sl@0: sl@0: // start timing sl@0: inline TInt CTimerLogger::MeasureStart() sl@0: { sl@0: if (iTiming) sl@0: return KErrGeneral; sl@0: iTickNumber = User::NTickCount(); sl@0: iTiming = ETrue; sl@0: sl@0: return KErrNone; sl@0: } sl@0: sl@0: // stop timing sl@0: inline TInt CTimerLogger::MeasureEnd() sl@0: { sl@0: if(!iTiming) sl@0: return KErrGeneral; sl@0: TUint32 tick = User::NTickCount(); sl@0: iTickNumber = tick - iTickNumber; sl@0: iTiming = EFalse; sl@0: sl@0: return KErrNone; sl@0: } sl@0: sl@0: inline TBool CTimerLogger::Timing() sl@0: { sl@0: return iTiming; sl@0: } sl@0: sl@0: //--------------------------------------------------------------------------- sl@0: sl@0: inline void TTestSetting::Reset() sl@0: { sl@0: iNumFiles = 0; sl@0: iOption = 0; sl@0: iOperationList = NULL; sl@0: } sl@0: sl@0: //--------------------------------------------------------------------------- sl@0: sl@0: inline void CTestExecutor::SetTestSetting(TTestSetting& aSetting) sl@0: { sl@0: iTestSetting = aSetting; sl@0: } sl@0: sl@0: //--------------------------------------------------------------------------- sl@0: sl@0: // enable the plugin sl@0: inline TInt CMdsPluginControl::Enable() sl@0: { sl@0: return DoControl( EMdsFSPOpEnable ); sl@0: } sl@0: sl@0: // disable the plugin sl@0: inline TInt CMdsPluginControl::Disable() sl@0: { sl@0: return DoControl( EMdsFSPOpDisable ); sl@0: } sl@0: sl@0: // request notification from plugin sl@0: inline void CMdsPluginControl::RegisterNotification(TMdsFSPStatusPckg& aMdsFSPStatus, TRequestStatus& aStat ) sl@0: { sl@0: DoRequest( EMdsFSPOpRegisterNotification, aStat, aMdsFSPStatus ); sl@0: } sl@0: sl@0: // add monitoring path sl@0: inline void CMdsPluginControl::AddNotificationPath( const TDesC& aPath ) sl@0: { sl@0: TMdsFSPStatusPckg pckg; sl@0: TRequestStatus rs; sl@0: TMdsFSPStatus& status = pckg(); sl@0: sl@0: status.iFileName.Zero(); sl@0: status.iFileName.Copy( aPath ); sl@0: sl@0: DoRequest( EMdsFSPOpAddNotificationPath, rs, pckg ); sl@0: User::WaitForRequest( rs ); sl@0: } sl@0: sl@0: // remove the monitoring path sl@0: inline void CMdsPluginControl::RemoveNotificationPath( const TDesC& aPath ) sl@0: { sl@0: TMdsFSPStatusPckg pckg; sl@0: TRequestStatus rs; sl@0: TMdsFSPStatus& status = pckg(); sl@0: sl@0: status.iFileName.Zero(); sl@0: status.iFileName.Copy( aPath ); sl@0: sl@0: DoRequest( EMdsFSPOpRemoveNotificationPath, rs, pckg ); sl@0: User::WaitForRequest( rs ); sl@0: } sl@0: sl@0: // cancel notification sl@0: inline void CMdsPluginControl::NotificationCancel() sl@0: { sl@0: DoCancel( EMdsFSPOpNotificationCancel ); sl@0: } sl@0: