DirectPrint/DirectPrintServer/src/directprintnumofcopies.cpp
branchRCL_3
changeset 11 613a5ff70823
child 19 2275db202402
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/DirectPrint/DirectPrintServer/src/directprintnumofcopies.cpp	Wed Mar 31 00:04:55 2010 +0900
@@ -0,0 +1,67 @@
+/*
+* Copyright (c) 2010 Kanrikogaku Kenkyusho, Ltd.
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of the License "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Kanrikogaku Kenkyusho, Ltd. - Initial contribution
+*
+* Contributors:
+*
+* Description:  
+*
+*/
+
+
+#include "directprintnumofcopies.h"
+#include "clog.h"
+
+CDirectPrintNumOfCopies* CDirectPrintNumOfCopies::NewL()
+    {
+	CDirectPrintNumOfCopies* obj = new (ELeave) CDirectPrintNumOfCopies();
+    CleanupStack::PushL( obj ) ;
+    obj->ConstructL();
+	CleanupStack::Pop(); // obj
+    return obj;
+    }
+
+CDirectPrintNumOfCopies::~CDirectPrintNumOfCopies()
+    {
+    LOG("CDirectPrintNumOfCopies::~CDirectPrintNumOfCopies begin");
+	iNumsOfCopies.Close();
+	LOG("CDirectPrintNumOfCopies::~CDirectPrintNumOfCopies end");
+    }
+
+CDirectPrintNumOfCopies::CDirectPrintNumOfCopies() : iCount( 0 )
+    {
+    }
+
+void CDirectPrintNumOfCopies::ConstructL()
+    {
+    }
+    
+void CDirectPrintNumOfCopies::Reset( TInt aCount )
+    {
+    LOG("CDirectPrintNumOfCopies::Reset begin");
+    iCount = aCount;
+    iNumsOfCopies.Reset();
+    LOG("CDirectPrintNumOfCopies::Reset end");
+    }    
+    
+void CDirectPrintNumOfCopies::AddNumOfCopyL( TInt aNumOfCopies, TBool& aFull )
+	{
+	LOG1("CDirectPrintNumOfCopies::AddNumOfCopyL aNumOfCopies: %d", aNumOfCopies);
+	iNumsOfCopies.AppendL( aNumOfCopies );
+	aFull = ( iNumsOfCopies.Count() == iCount ) ? ETrue : EFalse;
+	LOG1("CDirectPrintNumOfCopies::AddNumOfCopyL end with aFull: %d", aFull);
+	}
+
+const RArray<TInt>& CDirectPrintNumOfCopies::NumsOfCopies() const
+	{
+	return iNumsOfCopies;
+	}
+
+//  End of File