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\pccd\d_medch.h
 
    15 // This header provides the interface to MEDCH.LDD so that user mode 
 
    16 // code such as test programs can use it.
 
    20 #if !defined(__D_MEDCH_H__)
 
    25 #ifndef __KERNEL_MODE__
 
    29 class TCapsMediaChangeV01
 
    35 class RMedCh : public RBusLogicalChannel
 
    40 		EMajorVersionNumber=1,
 
    41 		EMinorVersionNumber=0,
 
    62 	inline TInt Open(TInt aSocket, const TVersion& aVer)
 
    64 		return(DoCreate(_L("MedCh"), aVer, aSocket, NULL, NULL));
 
    67 	inline TVersion VersionRequired() const
 
    69 		return(TVersion(EMajorVersionNumber,EMinorVersionNumber,EBuildVersionNumber));
 
    72 	inline TInt DoorOpen()
 
    74 		return(DoControl(EDoorOpen));
 
    77 	inline TInt DoorClose(TBool aMediaPresent)
 
    79 		return(DoControl(EDoorClose, (TAny*)aMediaPresent));
 
    82 	inline TInt DoorNormal()
 
    84 		return(DoControl(EDoorNormal));
 
    87 	inline void DelayedDoorOpen(TRequestStatus &aReqStat, TInt aMsDelay)
 
    89 		DoRequest(EDelayedDoorOpen, aReqStat, (TAny*)aMsDelay);
 
    92 	inline void DelayedDoorClose(TRequestStatus &aReqStat, TInt aMsDelay, TBool aMediaPresent)
 
    94 		DoRequest(EDelayedDoorClose, aReqStat, (TAny*)aMsDelay, (TAny*)aMediaPresent);
 
    97 	inline TInt DoubleDoorOpen()
 
    99 		return(DoControl(EDoubleDoorOpen));