os/security/cryptomgmtlibs/securitycommonutils/test/inc_private/scstestcommon.h
author sl
Tue, 10 Jun 2014 14:32:02 +0200
changeset 1 260cb5ec6c19
permissions -rw-r--r--
Update contrib.
sl@0
     1
/*
sl@0
     2
* Copyright (c) 2007-2009 Nokia Corporation and/or its subsidiary(-ies).
sl@0
     3
* All rights reserved.
sl@0
     4
* This component and the accompanying materials are made available
sl@0
     5
* under the terms of the License "Eclipse Public License v1.0"
sl@0
     6
* which accompanies this distribution, and is available
sl@0
     7
* at the URL "http://www.eclipse.org/legal/epl-v10.html".
sl@0
     8
*
sl@0
     9
* Initial Contributors:
sl@0
    10
* Nokia Corporation - initial contribution.
sl@0
    11
*
sl@0
    12
* Contributors:
sl@0
    13
*
sl@0
    14
* Description: 
sl@0
    15
* Data structures and values which are used by both client and server
sl@0
    16
* implementations, but which are not exposed to the client.
sl@0
    17
*
sl@0
    18
*/
sl@0
    19
sl@0
    20
sl@0
    21
/**
sl@0
    22
 @internalComponent
sl@0
    23
 @test
sl@0
    24
 @file
sl@0
    25
*/
sl@0
    26
sl@0
    27
#ifndef SCSTESTCOMMON_H
sl@0
    28
#define SCSTESTCOMMON_H
sl@0
    29
sl@0
    30
sl@0
    31
namespace ScsTestImpl
sl@0
    32
	{
sl@0
    33
	/** The server name, to which clients connect. */
sl@0
    34
	_LIT(KServerName, "ScsTest");
sl@0
    35
sl@0
    36
	const TInt KScsTestVerMajor = 1;	///< SCS test server version major component.
sl@0
    37
	const TInt KScsTestVerMinor = 0;	///< SCS test server version minor component.
sl@0
    38
	const TInt KScsTestVerBuild = 0;	///< SCS test server version build number.
sl@0
    39
sl@0
    40
	inline TVersion Version();
sl@0
    41
sl@0
    42
	/** Executable image which runs the server process. */
sl@0
    43
	_LIT(KServerImageName, "scstestserver.exe");
sl@0
    44
sl@0
    45
	/** SCS test server SID. */
sl@0
    46
	const TUid KScsTestServerUid = {0x10283512};
sl@0
    47
sl@0
    48
	inline TUidType ServerImageFullUid();
sl@0
    49
	
sl@0
    50
	enum TSessionFunction
sl@0
    51
	/** Functions supported by SCS test session. */
sl@0
    52
		{
sl@0
    53
		/**
sl@0
    54
			This unused function is provided for test code to confirm the
sl@0
    55
			session handles unrecognized function identifiers correctly.
sl@0
    56
		 */
sl@0
    57
		ESessUnused = 0,
sl@0
    58
		ESessDouble = 1,		///< Doubles a client-side TInt.
sl@0
    59
		ESessTreble = 2,		///< Asynchronously trebles a client-side TInt.
sl@0
    60
		ESessNukeServer = 4,	///< Call with no arguments which panics server
sl@0
    61
		ESessSubsessFromInt = 4	///< Create subsession curried on an integer value.
sl@0
    62
		};
sl@0
    63
	
sl@0
    64
	enum TSubsessionFunction
sl@0
    65
	/** Functions supported by test server subsession. */
sl@0
    66
		{
sl@0
    67
		/**
sl@0
    68
			This function identifier is only defined to ensure the test subsession
sl@0
    69
			implementation correctly handles unrecognized functions.
sl@0
    70
		 */
sl@0
    71
		ESubsessUnused = 0,
sl@0
    72
		ESubsessQuadruple = 1,	///< Quadruple the curried value.
sl@0
    73
		ESubsessTreble			///< Asynchronously trebles a client-side TInt.
sl@0
    74
		};
sl@0
    75
sl@0
    76
	/** Delay before the asynchronous treble request is completed after construction. */
sl@0
    77
	static const TInt KTrebleTimerDelayUs = 5 * 1000 * 1000;
sl@0
    78
	
sl@0
    79
	/** The server is shut down if no sessions have been connected for this amount of time. */
sl@0
    80
	const TInt KShutdownPeriodUs = 2 * 1000 * 1000;
sl@0
    81
	}	// namespace UserPromptService
sl@0
    82
sl@0
    83
template <class T>
sl@0
    84
inline T TAnyPtrToFuncPtr(TAny* aPtr);
sl@0
    85
sl@0
    86
sl@0
    87
#include "scstestcommon.inl"
sl@0
    88
sl@0
    89
#endif	// SCSTESTCOMMON_H
sl@0
    90