sl@0: /* sl@0: * Copyright (c) 2004-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: * CDHParams.cpp sl@0: * sl@0: */ sl@0: sl@0: sl@0: #include "fsdatatypes.h" sl@0: sl@0: EXPORT_C CDHParams::~CDHParams() sl@0: { sl@0: iN.Close(); sl@0: iG.Close(); sl@0: } sl@0: sl@0: EXPORT_C CDHParams::CDHParams(const RInteger aN, const RInteger aG) sl@0: : iN(aN), iG(aG) sl@0: { sl@0: } sl@0: sl@0: EXPORT_C CDHParams* CDHParams::NewL(const TInteger& aN, const TInteger& aG) sl@0: { sl@0: RInteger n = RInteger::NewL(aN); sl@0: CleanupStack::PushL(n); sl@0: RInteger g = RInteger::NewL(aG); sl@0: CleanupStack::PushL(g); sl@0: CDHParams* self = new (ELeave) CDHParams(n, g); sl@0: CleanupStack::Pop(2); // g, n sl@0: return self; sl@0: } sl@0: sl@0: EXPORT_C RInteger CDHParams::TakeN() sl@0: { sl@0: RInteger result = iN; sl@0: iN = RInteger(); sl@0: return result; sl@0: } sl@0: sl@0: EXPORT_C RInteger CDHParams::TakeG() sl@0: { sl@0: RInteger result = iG; sl@0: iG = RInteger(); sl@0: return result; sl@0: } sl@0: