installationservices/swtransactionservices/inc_private/transactionwrapper.h
branchRCL_3
changeset 25 7333d7932ef7
equal deleted inserted replaced
24:5cc91383ab1e 25:7333d7932ef7
       
     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 *
       
    16 */
       
    17 
       
    18 
       
    19 /**
       
    20  @file
       
    21  @internalComponent
       
    22  @released
       
    23 */
       
    24 
       
    25 
       
    26 #ifndef __TRANSACTIOWRAPPER_H__
       
    27 #define __TRANSACTIOWRAPPER_H__
       
    28 
       
    29 #include <e32def.h>
       
    30 #include <e32base.h>
       
    31 #include "integrityservices.h"
       
    32 #include <usif/sts/stsdefs.h>
       
    33 
       
    34 namespace Usif
       
    35 {
       
    36 	class CReferenceCountedTransactionWrapper : public CBase
       
    37 	{
       
    38 	public:
       
    39 		static CReferenceCountedTransactionWrapper* NewLC(TStsTransactionId aTransactionID);
       
    40 		~CReferenceCountedTransactionWrapper();
       
    41 		CIntegrityServices* Attach();
       
    42 		TInt Detach();
       
    43 		TStsTransactionId TransactionId() const {return iTrPtr->TransactionId();}
       
    44 		TBool IsCompleted(){return iCompleted;}
       
    45 		void SetCompleted(){iCompleted=ETrue;}
       
    46 	private:
       
    47 		CReferenceCountedTransactionWrapper();
       
    48 		void ConstructL(TStsTransactionId aTransactionID);
       
    49 		
       
    50 	private:
       
    51 		TInt iRefCount;
       
    52 		CIntegrityServices* iTrPtr;
       
    53 		TBool iCompleted;
       
    54 	};
       
    55 
       
    56 }//namespace Usif
       
    57 
       
    58 #endif