installationservices/swtransactionservices/source/client/stsrecovery.cpp
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 #include <usif/sts/sts.h>
       
    26 #ifdef SYMBIAN_ENABLE_SPLIT_HEADERS
       
    27 #include "stsrecovery.h"
       
    28 #endif //SYMBIAN_ENABLE_SPLIT_HEADERS
       
    29 #include "stscommon.h"
       
    30 #include <e32cmn.h>
       
    31 #include <e32uid.h>
       
    32 
       
    33 namespace Usif
       
    34 	{
       
    35 	void RStsRecoverySession::ConnectL()
       
    36 		{
       
    37 		TInt err = RScsClientBase::Connect(KStsServerName, 
       
    38 				                           TVersion(KStsVerMajor, KStsVerMinor, KStsVerBuild), 
       
    39 				                           KStsServerImgName, 
       
    40 				                           TUidType (KExecutableImageUid, KNullUid, TUid::Uid(KUidStsServer)));
       
    41 		User::LeaveIfError(err);
       
    42 		}
       
    43 	
       
    44 	EXPORT_C RStsRecoverySession::RStsRecoverySession()
       
    45 		:	RScsClientBase()
       
    46 		{
       
    47 		}
       
    48 
       
    49 	EXPORT_C void RStsRecoverySession::Close()
       
    50 		{
       
    51 		RScsClientBase::Close();
       
    52 		}
       
    53 
       
    54 	EXPORT_C void RStsRecoverySession::RollbackAllPendingL()
       
    55 		{
       
    56 		ConnectL();
       
    57 		User::LeaveIfError(CallSessionFunction(ERollBackAllPending));
       
    58 		Close();
       
    59 		}
       
    60 	}