Update contrib.
2 * Copyright (c) 2005-2009 Nokia Corporation and/or its subsidiary(-ies).
4 * This component and the accompanying materials are made available
5 * under the terms of "Eclipse Public License v1.0"
6 * which accompanies this distribution, and is available
7 * at the URL "http://www.eclipse.org/legal/epl-v10.html".
9 * Initial Contributors:
10 * Nokia Corporation - initial contribution.
24 #include "d_mmcsdif.h"
27 * Do a kernel side control for DMMCMediChange
29 * @param TInt aFunction - Request Function ID
30 * @param TAny* a1 - Given parameter
31 * @param TAny* a2 - Given parameter
33 * @return TInt the error code
37 TInt DLddMmcCntrlInterface::MediaChangeDoControl(TInt aFunction, TAny* a1, TAny* a2)
39 MMCSDLOG("<--MediaChangeDoControl-->");
44 MMCSDLOG("DLddMmcCntrlInterface::MediaChangeDoControl - iSocket is NULL");
49 MMCSDLOG("DLddMmcCntrlInterface::MediaChangeDoControl - iClient is NULL");
53 switch(TTCFunctionId(aFunction).FunctionId())
55 case RMMCSDTestControllerInterface::EMediaChange:
57 r = Kern::ThreadRawWrite(iClient, a1, &iMediaChange, sizeof(iMediaChange));
61 case RMMCSDTestControllerInterface::EMediaStateInfo:
63 TMediaState doorState;
64 doorState = iMediaChange->MediaState();
65 MMCSDLOG2("EMediaStateInfo : %d",doorState);
66 r = Kern::ThreadRawWrite(iClient, a1, &doorState, sizeof(TMediaState));
69 case RMMCSDTestControllerInterface::EForceMediaChange:
71 iMediaChange->ForceMediaChange();
72 MMCSDLOG("Force MediaChange");
75 case RMMCSDTestControllerInterface::EMediaChangeCounter:
77 r = Kern::ThreadRawWrite(iClient, a1, &iMediaChange->iReplyCount, sizeof(iMediaChange->iReplyCount));
78 MMCSDLOG2("EMediaChangeCounter : %d",&iMediaChange->iReplyCount);