sl@0: // Copyright (c) 1997-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: // e32test\pccd\d_medch.h sl@0: // This header provides the interface to MEDCH.LDD so that user mode sl@0: // code such as test programs can use it. sl@0: // sl@0: // sl@0: sl@0: #if !defined(__D_MEDCH_H__) sl@0: #define __D_MEDCH_H__ sl@0: sl@0: #include sl@0: sl@0: #ifndef __KERNEL_MODE__ sl@0: #include sl@0: #endif sl@0: sl@0: class TCapsMediaChangeV01 sl@0: { sl@0: public: sl@0: TVersion version; sl@0: }; sl@0: sl@0: class RMedCh : public RBusLogicalChannel sl@0: { sl@0: public: sl@0: enum sl@0: { sl@0: EMajorVersionNumber=1, sl@0: EMinorVersionNumber=0, sl@0: EBuildVersionNumber=1 sl@0: }; sl@0: sl@0: enum TControl sl@0: { sl@0: EDoorNormal, sl@0: EDoorOpen, sl@0: EDoorClose, sl@0: EDoubleDoorOpen sl@0: }; sl@0: sl@0: enum TRequest sl@0: { sl@0: EDelayedDoorOpen, sl@0: EDelayedDoorClose sl@0: }; sl@0: sl@0: public: sl@0: inline void Cancel(); sl@0: sl@0: inline TInt Open(TInt aSocket, const TVersion& aVer) sl@0: { sl@0: return(DoCreate(_L("MedCh"), aVer, aSocket, NULL, NULL)); sl@0: } sl@0: sl@0: inline TVersion VersionRequired() const sl@0: { sl@0: return(TVersion(EMajorVersionNumber,EMinorVersionNumber,EBuildVersionNumber)); sl@0: } sl@0: sl@0: inline TInt DoorOpen() sl@0: { sl@0: return(DoControl(EDoorOpen)); sl@0: } sl@0: sl@0: inline TInt DoorClose(TBool aMediaPresent) sl@0: { sl@0: return(DoControl(EDoorClose, (TAny*)aMediaPresent)); sl@0: } sl@0: sl@0: inline TInt DoorNormal() sl@0: { sl@0: return(DoControl(EDoorNormal)); sl@0: } sl@0: sl@0: inline void DelayedDoorOpen(TRequestStatus &aReqStat, TInt aMsDelay) sl@0: { sl@0: DoRequest(EDelayedDoorOpen, aReqStat, (TAny*)aMsDelay); sl@0: } sl@0: sl@0: inline void DelayedDoorClose(TRequestStatus &aReqStat, TInt aMsDelay, TBool aMediaPresent) sl@0: { sl@0: DoRequest(EDelayedDoorClose, aReqStat, (TAny*)aMsDelay, (TAny*)aMediaPresent); sl@0: } sl@0: sl@0: inline TInt DoubleDoorOpen() sl@0: { sl@0: return(DoControl(EDoubleDoorOpen)); sl@0: } sl@0: sl@0: }; sl@0: sl@0: #endif