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.
     1 /*
     2 * Copyright (c) 2007-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 * Data structures and values which are used by both client and server
    16 * implementations, but which are not exposed to the client.
    17 *
    18 */
    19 
    20 
    21 /**
    22  @internalComponent
    23  @test
    24  @file
    25 */
    26 
    27 #ifndef SCSTESTCOMMON_H
    28 #define SCSTESTCOMMON_H
    29 
    30 
    31 namespace ScsTestImpl
    32 	{
    33 	/** The server name, to which clients connect. */
    34 	_LIT(KServerName, "ScsTest");
    35 
    36 	const TInt KScsTestVerMajor = 1;	///< SCS test server version major component.
    37 	const TInt KScsTestVerMinor = 0;	///< SCS test server version minor component.
    38 	const TInt KScsTestVerBuild = 0;	///< SCS test server version build number.
    39 
    40 	inline TVersion Version();
    41 
    42 	/** Executable image which runs the server process. */
    43 	_LIT(KServerImageName, "scstestserver.exe");
    44 
    45 	/** SCS test server SID. */
    46 	const TUid KScsTestServerUid = {0x10283512};
    47 
    48 	inline TUidType ServerImageFullUid();
    49 	
    50 	enum TSessionFunction
    51 	/** Functions supported by SCS test session. */
    52 		{
    53 		/**
    54 			This unused function is provided for test code to confirm the
    55 			session handles unrecognized function identifiers correctly.
    56 		 */
    57 		ESessUnused = 0,
    58 		ESessDouble = 1,		///< Doubles a client-side TInt.
    59 		ESessTreble = 2,		///< Asynchronously trebles a client-side TInt.
    60 		ESessNukeServer = 4,	///< Call with no arguments which panics server
    61 		ESessSubsessFromInt = 4	///< Create subsession curried on an integer value.
    62 		};
    63 	
    64 	enum TSubsessionFunction
    65 	/** Functions supported by test server subsession. */
    66 		{
    67 		/**
    68 			This function identifier is only defined to ensure the test subsession
    69 			implementation correctly handles unrecognized functions.
    70 		 */
    71 		ESubsessUnused = 0,
    72 		ESubsessQuadruple = 1,	///< Quadruple the curried value.
    73 		ESubsessTreble			///< Asynchronously trebles a client-side TInt.
    74 		};
    75 
    76 	/** Delay before the asynchronous treble request is completed after construction. */
    77 	static const TInt KTrebleTimerDelayUs = 5 * 1000 * 1000;
    78 	
    79 	/** The server is shut down if no sessions have been connected for this amount of time. */
    80 	const TInt KShutdownPeriodUs = 2 * 1000 * 1000;
    81 	}	// namespace UserPromptService
    82 
    83 template <class T>
    84 inline T TAnyPtrToFuncPtr(TAny* aPtr);
    85 
    86 
    87 #include "scstestcommon.inl"
    88 
    89 #endif	// SCSTESTCOMMON_H
    90