os/graphics/graphicstest/graphicstestharness/inc/GraphicsTestUtils.h
author sl
Tue, 10 Jun 2014 14:32:02 +0200
changeset 1 260cb5ec6c19
permissions -rw-r--r--
Update contrib.
sl@0
     1
// Copyright (c) 2005-2009 Nokia Corporation and/or its subsidiary(-ies).
sl@0
     2
// All rights reserved.
sl@0
     3
// This component and the accompanying materials are made available
sl@0
     4
// under the terms of "Eclipse Public License v1.0"
sl@0
     5
// which accompanies this distribution, and is available
sl@0
     6
// at the URL "http://www.eclipse.org/legal/epl-v10.html".
sl@0
     7
//
sl@0
     8
// Initial Contributors:
sl@0
     9
// Nokia Corporation - initial contribution.
sl@0
    10
//
sl@0
    11
// Contributors:
sl@0
    12
//
sl@0
    13
// Description:
sl@0
    14
//
sl@0
    15
sl@0
    16
/**
sl@0
    17
 @file
sl@0
    18
 @test
sl@0
    19
 @internalComponent - Internal Symbian test code 
sl@0
    20
*/
sl@0
    21
sl@0
    22
#ifndef __GRAPHICSTESTUTILS_H__
sl@0
    23
#define __GRAPHICSTESTUTILS_H__
sl@0
    24
sl@0
    25
#include <e32std.h>
sl@0
    26
sl@0
    27
typedef TUint8 TWipeItems;
sl@0
    28
sl@0
    29
_LIT(KTestServerName,"!GraphicsTestUtilsServer");
sl@0
    30
_LIT(KTestServerImg,"GraphicsTestUtilsServer");		// EXE name
sl@0
    31
sl@0
    32
sl@0
    33
enum TSmlProfileTransportType
sl@0
    34
	{
sl@0
    35
	ELocalTransport,
sl@0
    36
	ENetworkTransport,
sl@0
    37
	};
sl@0
    38
sl@0
    39
class RSmlTestUtils : public RSessionBase
sl@0
    40
	{
sl@0
    41
public:
sl@0
    42
	IMPORT_C TInt Connect();
sl@0
    43
	IMPORT_C void SetDevIdL(const TDesC8& aDevId);
sl@0
    44
	IMPORT_C void GetDevIdL(TDes8& aDevId);
sl@0
    45
	IMPORT_C TInt WipeDataStoreL(TWipeItems aItemsToClean);
sl@0
    46
	IMPORT_C TInt RenameDirectoryL(const TDesC16& aSrc,const TDesC16& aDest);
sl@0
    47
	IMPORT_C TInt CreateDirectoryL(const TDesC& aPath);
sl@0
    48
	IMPORT_C TInt DeleteDirectoryL(const TDesC& aPath);
sl@0
    49
	IMPORT_C TInt CreateFileL(const TDesC& aPath);
sl@0
    50
	IMPORT_C TInt DeleteFileUsingWildcardL(const TDesC& aPath);
sl@0
    51
	IMPORT_C TInt DeleteFileL(const TDesC& aPath);
sl@0
    52
	IMPORT_C TInt CopyFileL(const TDesC& aSrc,const TDesC& aDest);
sl@0
    53
	IMPORT_C TInt ReplaceFileL(const TDesC& aName,TUint aFileMode);
sl@0
    54
	IMPORT_C TInt IsFilePresent(const TDesC& aName, TBool &aPresent);
sl@0
    55
	IMPORT_C TInt GetAtt( const TDesC &aName, TUint &aAttValue );
sl@0
    56
	IMPORT_C TInt SetAtt( const TDesC &aName, TUint aSetAttMask, TUint aClearAttMask );
sl@0
    57
	IMPORT_C void SetHomeTimeL(const TTime aTime);
sl@0
    58
	IMPORT_C TInt SetReadOnly(const TDesC& aName,TUint aSetAttMask);
sl@0
    59
	IMPORT_C TInt CopyDirectoryL(const TDesC& aSource,const TDesC& aTarget);
sl@0
    60
	IMPORT_C TInt ChangeFilePermissionL(const TDesC& aPath);
sl@0
    61
sl@0
    62
	};
sl@0
    63
sl@0
    64
enum TSmlTestUtilsService //Services provided by the SmlTestUtils server
sl@0
    65
	{
sl@0
    66
	EChangeDevId,
sl@0
    67
	EGetDevId,
sl@0
    68
	EWipeDataStore,
sl@0
    69
	ECreateDir,
sl@0
    70
	ERenameDir,
sl@0
    71
	EDeleteDir,
sl@0
    72
	ECreateFile,
sl@0
    73
	EDeleteFile,
sl@0
    74
	EDeleteFileUsingWildcard,
sl@0
    75
	ECreateDSJob,
sl@0
    76
	EStopDSJob,
sl@0
    77
	ECreateDSProfile,
sl@0
    78
	ESetHomeTime,
sl@0
    79
	ECopyFile,
sl@0
    80
	EReplaceFile,
sl@0
    81
	EIsFilePresent,
sl@0
    82
	ESetReadOnly,
sl@0
    83
	EGetAttributes,
sl@0
    84
	ESetAttributes,
sl@0
    85
	ECopyDirectory,
sl@0
    86
	EChangeFilePermission,
sl@0
    87
sl@0
    88
	};
sl@0
    89
	
sl@0
    90
enum TStoreType //Types of store that can be deleted using WipeDataStoreL()
sl@0
    91
	{
sl@0
    92
	ECenRep		= 0x01,		
sl@0
    93
	ELocalSDS	= 0x02,
sl@0
    94
	EDMTree		= 0x04,
sl@0
    95
	ECenRepFiles = 0x08,// Deletes all the cen rep data files. This is a lengthy and volatile operation
sl@0
    96
					    // and should be used with caution. Note that this is not covered by "EAll"
sl@0
    97
					    // and should be called explicitly
sl@0
    98
	ESDS		= ELocalSDS | ECenRep,
sl@0
    99
	EAll		= 0xff
sl@0
   100
	};
sl@0
   101
sl@0
   102
#endif