First public contribution.
1 // Copyright (c) 1997-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 the License "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.
14 // e32test\system\d_mstim.h
18 #if !defined(__D_MSTIM_H__)
21 #ifndef __KERNEL_MODE__
25 _LIT(KMsTimerLddName,"MsTim");
41 struct SRandomTestInfo
52 class RMsTim : public RBusLogicalChannel
57 EControlStartPeriodicInt,
58 EControlStartPeriodicDfc,
61 EControlBeginRandomTest,
62 EControlEndRandomTest,
63 EControlGetRandomTestInfo,
72 ERequestOneShotIntAgain,
73 ERequestOneShotUserDfc,
74 ERequestOneShotUserDfcAgain
77 #ifndef __KERNEL_MODE__
79 { return DoCreate(KMsTimerLddName(),TVersion(0,1,1),KNullUnit,NULL,NULL); }
80 inline TInt StartPeriodicInt(TInt aId, TInt aInterval)
81 { return DoControl(EControlStartPeriodicInt, (TAny*)aId, (TAny*)aInterval); }
82 inline TInt StartPeriodicDfc(TInt aId, TInt aInterval)
83 { return DoControl(EControlStartPeriodicDfc, (TAny*)aId, (TAny*)aInterval); }
84 inline TInt StopPeriodic(TInt aId)
85 { return DoControl(EControlStopPeriodic, (TAny*)aId); }
86 inline TInt GetInfo(TInt aId, SMsTimerInfo& anInfo)
87 { return DoControl(EControlGetInfo, (TAny*)aId, &anInfo); }
88 inline TInt BeginRandomTest()
89 { return DoControl(EControlBeginRandomTest); }
90 inline TInt EndRandomTest()
91 { return DoControl(EControlEndRandomTest); }
92 inline TInt GetRandomTestInfo(SRandomTestInfo& anInfo)
93 { return DoControl(EControlGetRandomTestInfo, &anInfo); }
94 inline TInt GetIdleTime()
95 { return DoControl(EControlGetIdleTime); }
96 inline void StartOneShotInt(TRequestStatus& aStatus, TInt aId, TInt aInterval)
97 { DoRequest(ERequestOneShotInt, aStatus, (TAny*)aId, (TAny*)aInterval); }
98 inline void StartOneShotDfc(TRequestStatus& aStatus, TInt aId, TInt aInterval)
99 { DoRequest(ERequestOneShotDfc, aStatus, (TAny*)aId, (TAny*)aInterval); }
100 inline void IntCancel(TRequestStatus& aStatus, TInt aId, TInt aInterval)
101 { DoRequest(ERequestIntCancel, aStatus, (TAny*)aId, (TAny*)aInterval); }
102 inline void StartOneShotIntAgain(TRequestStatus& aStatus, TInt aId, TInt aInterval)
103 { DoRequest(ERequestOneShotIntAgain, aStatus, (TAny*)aId, (TAny*)aInterval); }
104 inline void StartOneShotUserDfc(TRequestStatus& aStatus, TInt aId, TInt aInterval)
105 { DoRequest(ERequestOneShotUserDfc, aStatus, (TAny*)aId, (TAny*)aInterval); }
106 inline void StartOneShotUserDfcAgain(TRequestStatus& aStatus, TInt aId, TInt aInterval)
107 { DoRequest(ERequestOneShotUserDfcAgain, aStatus, (TAny*)aId, (TAny*)aInterval); }