os/kernelhwsrv/kerneltest/f32test/bench/t_notify_perf.inl
author sl@SLION-WIN7.fritz.box
Fri, 15 Jun 2012 03:10:57 +0200
changeset 0 bde4ae8d615e
permissions -rw-r--r--
First public contribution.
sl@0
     1
// Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
sl@0
     2
// All rights reserved.
sl@0
     3
// This component and the accompanying materials are made available
sl@0
     4
// under the terms of the License "Eclipse Public License v1.0"
sl@0
     5
// which accompanies this distribution, and is available
sl@0
     6
// at the URL "http://www.eclipse.org/legal/epl-v10.html".
sl@0
     7
//
sl@0
     8
// Initial Contributors:
sl@0
     9
// Nokia Corporation - initial contribution.
sl@0
    10
//
sl@0
    11
// Contributors:
sl@0
    12
//
sl@0
    13
// Description:
sl@0
    14
// f32test\bench\t_notify_perf.inl
sl@0
    15
// 
sl@0
    16
//
sl@0
    17
sl@0
    18
// start timing
sl@0
    19
inline TInt CTimerLogger::MeasureStart()
sl@0
    20
	{
sl@0
    21
	if (iTiming)
sl@0
    22
		return KErrGeneral;
sl@0
    23
	iTickNumber = User::NTickCount();
sl@0
    24
	iTiming = ETrue;
sl@0
    25
	
sl@0
    26
	return KErrNone;
sl@0
    27
	}
sl@0
    28
sl@0
    29
// stop timing
sl@0
    30
inline TInt CTimerLogger::MeasureEnd()
sl@0
    31
	{
sl@0
    32
	if(!iTiming)
sl@0
    33
		return KErrGeneral;
sl@0
    34
	TUint32 tick =  User::NTickCount();
sl@0
    35
	iTickNumber = tick - iTickNumber;
sl@0
    36
	iTiming = EFalse;
sl@0
    37
	
sl@0
    38
	return KErrNone;
sl@0
    39
	}
sl@0
    40
sl@0
    41
inline TBool CTimerLogger::Timing()
sl@0
    42
	{
sl@0
    43
	return iTiming;
sl@0
    44
	}
sl@0
    45
sl@0
    46
//---------------------------------------------------------------------------
sl@0
    47
sl@0
    48
inline void TTestSetting::Reset()
sl@0
    49
	{
sl@0
    50
	iNumFiles = 0;
sl@0
    51
	iOption = 0;
sl@0
    52
	iOperationList = NULL;
sl@0
    53
	}
sl@0
    54
sl@0
    55
//---------------------------------------------------------------------------
sl@0
    56
sl@0
    57
inline void CTestExecutor::SetTestSetting(TTestSetting& aSetting)
sl@0
    58
	{
sl@0
    59
	iTestSetting = aSetting;
sl@0
    60
	}
sl@0
    61
sl@0
    62
//---------------------------------------------------------------------------
sl@0
    63
sl@0
    64
// enable the plugin
sl@0
    65
inline TInt CMdsPluginControl::Enable()
sl@0
    66
	{
sl@0
    67
	return DoControl( EMdsFSPOpEnable );
sl@0
    68
	}
sl@0
    69
sl@0
    70
// disable the plugin
sl@0
    71
inline TInt CMdsPluginControl::Disable()
sl@0
    72
	{
sl@0
    73
	return DoControl( EMdsFSPOpDisable );
sl@0
    74
	}
sl@0
    75
sl@0
    76
// request notification from plugin
sl@0
    77
inline void CMdsPluginControl::RegisterNotification(TMdsFSPStatusPckg& aMdsFSPStatus, TRequestStatus& aStat )
sl@0
    78
	{
sl@0
    79
	DoRequest( EMdsFSPOpRegisterNotification, aStat, aMdsFSPStatus );
sl@0
    80
	}
sl@0
    81
sl@0
    82
// add monitoring path
sl@0
    83
inline void CMdsPluginControl::AddNotificationPath( const TDesC& aPath )
sl@0
    84
	{
sl@0
    85
	TMdsFSPStatusPckg pckg;
sl@0
    86
	TRequestStatus rs;
sl@0
    87
	TMdsFSPStatus& status = pckg();
sl@0
    88
	
sl@0
    89
	status.iFileName.Zero();
sl@0
    90
	status.iFileName.Copy( aPath );
sl@0
    91
	
sl@0
    92
	DoRequest( EMdsFSPOpAddNotificationPath, rs, pckg );
sl@0
    93
	User::WaitForRequest( rs );
sl@0
    94
	}
sl@0
    95
sl@0
    96
// remove the monitoring path
sl@0
    97
inline void CMdsPluginControl::RemoveNotificationPath( const TDesC& aPath )
sl@0
    98
	{
sl@0
    99
	TMdsFSPStatusPckg pckg;
sl@0
   100
	TRequestStatus rs;
sl@0
   101
	TMdsFSPStatus& status = pckg();
sl@0
   102
	
sl@0
   103
	status.iFileName.Zero();
sl@0
   104
	status.iFileName.Copy( aPath );
sl@0
   105
	
sl@0
   106
	DoRequest( EMdsFSPOpRemoveNotificationPath, rs, pckg );
sl@0
   107
	User::WaitForRequest( rs );
sl@0
   108
	}
sl@0
   109
sl@0
   110
// cancel notification
sl@0
   111
inline void CMdsPluginControl::NotificationCancel()
sl@0
   112
	{
sl@0
   113
	DoCancel( EMdsFSPOpNotificationCancel );
sl@0
   114
	}
sl@0
   115