sl@0: /* sl@0: * Copyright (c) 2007-2009 Nokia Corporation and/or its subsidiary(-ies). sl@0: * All rights reserved. sl@0: * This component and the accompanying materials are made available sl@0: * under the terms of the License "Eclipse Public License v1.0" sl@0: * which accompanies this distribution, and is available sl@0: * at the URL "http://www.eclipse.org/legal/epl-v10.html". sl@0: * sl@0: * Initial Contributors: sl@0: * Nokia Corporation - initial contribution. sl@0: * sl@0: * Contributors: sl@0: * sl@0: * Description: sl@0: * Data structures and values which are used by both client and server sl@0: * implementations, but which are not exposed to the client. sl@0: * sl@0: */ sl@0: sl@0: sl@0: /** sl@0: @internalComponent sl@0: @test sl@0: @file sl@0: */ sl@0: sl@0: #ifndef SCSTESTCOMMON_H sl@0: #define SCSTESTCOMMON_H sl@0: sl@0: sl@0: namespace ScsTestImpl sl@0: { sl@0: /** The server name, to which clients connect. */ sl@0: _LIT(KServerName, "ScsTest"); sl@0: sl@0: const TInt KScsTestVerMajor = 1; ///< SCS test server version major component. sl@0: const TInt KScsTestVerMinor = 0; ///< SCS test server version minor component. sl@0: const TInt KScsTestVerBuild = 0; ///< SCS test server version build number. sl@0: sl@0: inline TVersion Version(); sl@0: sl@0: /** Executable image which runs the server process. */ sl@0: _LIT(KServerImageName, "scstestserver.exe"); sl@0: sl@0: /** SCS test server SID. */ sl@0: const TUid KScsTestServerUid = {0x10283512}; sl@0: sl@0: inline TUidType ServerImageFullUid(); sl@0: sl@0: enum TSessionFunction sl@0: /** Functions supported by SCS test session. */ sl@0: { sl@0: /** sl@0: This unused function is provided for test code to confirm the sl@0: session handles unrecognized function identifiers correctly. sl@0: */ sl@0: ESessUnused = 0, sl@0: ESessDouble = 1, ///< Doubles a client-side TInt. sl@0: ESessTreble = 2, ///< Asynchronously trebles a client-side TInt. sl@0: ESessNukeServer = 4, ///< Call with no arguments which panics server sl@0: ESessSubsessFromInt = 4 ///< Create subsession curried on an integer value. sl@0: }; sl@0: sl@0: enum TSubsessionFunction sl@0: /** Functions supported by test server subsession. */ sl@0: { sl@0: /** sl@0: This function identifier is only defined to ensure the test subsession sl@0: implementation correctly handles unrecognized functions. sl@0: */ sl@0: ESubsessUnused = 0, sl@0: ESubsessQuadruple = 1, ///< Quadruple the curried value. sl@0: ESubsessTreble ///< Asynchronously trebles a client-side TInt. sl@0: }; sl@0: sl@0: /** Delay before the asynchronous treble request is completed after construction. */ sl@0: static const TInt KTrebleTimerDelayUs = 5 * 1000 * 1000; sl@0: sl@0: /** The server is shut down if no sessions have been connected for this amount of time. */ sl@0: const TInt KShutdownPeriodUs = 2 * 1000 * 1000; sl@0: } // namespace UserPromptService sl@0: sl@0: template sl@0: inline T TAnyPtrToFuncPtr(TAny* aPtr); sl@0: sl@0: sl@0: #include "scstestcommon.inl" sl@0: sl@0: #endif // SCSTESTCOMMON_H sl@0: