installationservices/swi/test/tintegrityservices/tintegrityservicesclientserver.h
changeset 0 ba25891c3a9e
equal deleted inserted replaced
-1:000000000000 0:ba25891c3a9e
       
     1 /*
       
     2 * Copyright (c) 2006-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 * Common header for the server and the client.
       
    16 *
       
    17 */
       
    18 
       
    19 
       
    20 #ifndef __INTEGRITYSERVICESCLIENTSERVER_H__
       
    21 #define __INTEGRITYSERVICESCLIENTSERVER_H__
       
    22 
       
    23 #include <e32std.h>
       
    24 #include "integrityservices.h"
       
    25 #include "integrityservicesevent.h"
       
    26 
       
    27 namespace Swi
       
    28 {
       
    29   namespace Test
       
    30   {
       
    31     const TUid KIntegrityServicesServerUid3 = { 0x101FE68A };
       
    32 
       
    33 /**
       
    34  * @test
       
    35  * @internalTechnology
       
    36  */
       
    37 enum TIntegrityServicesServerMessage
       
    38 	{ 
       
    39 	EAdd,
       
    40 	ERemove,
       
    41 	ETemporary,
       
    42 	ECommit,
       
    43 	ERollBack,
       
    44 	ESetSimulatedFailure,
       
    45 	ECreateNewTestFile,
       
    46 	ECreateTempTestFile
       
    47 	};
       
    48 
       
    49 /**
       
    50  * @test
       
    51  * @internalTechnology
       
    52  */
       
    53 class RIntegrityServicesServerSession : public RSessionBase
       
    54 	{
       
    55 public:
       
    56 	/**
       
    57 	 * Connect to the server, attempt to start it if it is not yet running
       
    58 	 * @return KErrNone if successful, or an error code
       
    59 	 */
       
    60 	IMPORT_C TInt Connect();
       
    61 	IMPORT_C void AddL(const TDesC& aFileName);
       
    62 	IMPORT_C void RemoveL(const TDesC& aFileName);
       
    63 	IMPORT_C void TemporaryL(const TDesC& aFileName);
       
    64 	IMPORT_C void CommitL();
       
    65 	IMPORT_C void RollBackL(TBool aAllTransactions);
       
    66 	IMPORT_C void SetSimulatedFailure(TPtrC aFailType, TPtrC aFailPosition, TPtrC aFileName);
       
    67 	IMPORT_C void CreateNewTestFileL(const TDesC& aFileName);
       
    68 	IMPORT_C void CreateTempTestFileL(const TDesC& aFileName);
       
    69 	};
       
    70 
       
    71   } // namespace Test
       
    72 } // namespace Swi
       
    73 
       
    74 #endif // #ifndef __INTEGRITYSERVICESCLIENTSERVER_H__