installationservices/swtransactionservices/source/server/transactionwrapper.cpp
branchRCL_3
changeset 26 8b7f4e561641
parent 25 7333d7932ef7
child 27 e8965914fac7
equal deleted inserted replaced
25:7333d7932ef7 26:8b7f4e561641
     1 /*
       
     2 * Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies).
       
     3 * All rights reserved.
       
     4 * This component and the accompanying materials are made available
       
     5 * under the terms of the License "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".
       
     8 *
       
     9 * Initial Contributors:
       
    10 * Nokia Corporation - initial contribution.
       
    11 *
       
    12 * Contributors:
       
    13 *
       
    14 * Description: 
       
    15 * Implements CStsServer.
       
    16 *
       
    17 */
       
    18 
       
    19 
       
    20 /**
       
    21  @file
       
    22  @internalComponent
       
    23  @released
       
    24 */
       
    25 
       
    26 #include "transactionwrapper.h"
       
    27 
       
    28 namespace Usif
       
    29 {
       
    30 CReferenceCountedTransactionWrapper::CReferenceCountedTransactionWrapper()
       
    31 	{
       
    32 	
       
    33 	}
       
    34 
       
    35 CReferenceCountedTransactionWrapper::~CReferenceCountedTransactionWrapper()
       
    36 	{
       
    37 	delete iTrPtr;
       
    38 	}
       
    39 
       
    40 /*static*/ CReferenceCountedTransactionWrapper* CReferenceCountedTransactionWrapper::NewLC(TStsTransactionId aTransactionID)
       
    41 	{
       
    42 	CReferenceCountedTransactionWrapper* wrapper= new (ELeave) CReferenceCountedTransactionWrapper();
       
    43 	CleanupStack::PushL(wrapper);
       
    44 	wrapper->ConstructL(aTransactionID);
       
    45 	return wrapper;
       
    46 	}
       
    47 
       
    48 void CReferenceCountedTransactionWrapper::ConstructL(TStsTransactionId aTransactionID)
       
    49 	{
       
    50 	iTrPtr = CIntegrityServices::NewL(aTransactionID);
       
    51 	iRefCount=0;
       
    52 	iCompleted=EFalse;
       
    53 	}
       
    54 
       
    55 CIntegrityServices* CReferenceCountedTransactionWrapper::Attach()
       
    56 	{
       
    57 	++iRefCount; 
       
    58 	return iTrPtr; 
       
    59 	}
       
    60 
       
    61 TInt CReferenceCountedTransactionWrapper::Detach() 
       
    62 	{
       
    63 	return --iRefCount;
       
    64 	}
       
    65 }//end of namespace Usif