1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
1.2 +++ b/os/security/cryptomgmtlibs/securitycommonutils/test/inc_private/scstestcommon.h Fri Jun 15 03:10:57 2012 +0200
1.3 @@ -0,0 +1,90 @@
1.4 +/*
1.5 +* Copyright (c) 2007-2009 Nokia Corporation and/or its subsidiary(-ies).
1.6 +* All rights reserved.
1.7 +* This component and the accompanying materials are made available
1.8 +* under the terms of the License "Eclipse Public License v1.0"
1.9 +* which accompanies this distribution, and is available
1.10 +* at the URL "http://www.eclipse.org/legal/epl-v10.html".
1.11 +*
1.12 +* Initial Contributors:
1.13 +* Nokia Corporation - initial contribution.
1.14 +*
1.15 +* Contributors:
1.16 +*
1.17 +* Description:
1.18 +* Data structures and values which are used by both client and server
1.19 +* implementations, but which are not exposed to the client.
1.20 +*
1.21 +*/
1.22 +
1.23 +
1.24 +/**
1.25 + @internalComponent
1.26 + @test
1.27 + @file
1.28 +*/
1.29 +
1.30 +#ifndef SCSTESTCOMMON_H
1.31 +#define SCSTESTCOMMON_H
1.32 +
1.33 +
1.34 +namespace ScsTestImpl
1.35 + {
1.36 + /** The server name, to which clients connect. */
1.37 + _LIT(KServerName, "ScsTest");
1.38 +
1.39 + const TInt KScsTestVerMajor = 1; ///< SCS test server version major component.
1.40 + const TInt KScsTestVerMinor = 0; ///< SCS test server version minor component.
1.41 + const TInt KScsTestVerBuild = 0; ///< SCS test server version build number.
1.42 +
1.43 + inline TVersion Version();
1.44 +
1.45 + /** Executable image which runs the server process. */
1.46 + _LIT(KServerImageName, "scstestserver.exe");
1.47 +
1.48 + /** SCS test server SID. */
1.49 + const TUid KScsTestServerUid = {0x10283512};
1.50 +
1.51 + inline TUidType ServerImageFullUid();
1.52 +
1.53 + enum TSessionFunction
1.54 + /** Functions supported by SCS test session. */
1.55 + {
1.56 + /**
1.57 + This unused function is provided for test code to confirm the
1.58 + session handles unrecognized function identifiers correctly.
1.59 + */
1.60 + ESessUnused = 0,
1.61 + ESessDouble = 1, ///< Doubles a client-side TInt.
1.62 + ESessTreble = 2, ///< Asynchronously trebles a client-side TInt.
1.63 + ESessNukeServer = 4, ///< Call with no arguments which panics server
1.64 + ESessSubsessFromInt = 4 ///< Create subsession curried on an integer value.
1.65 + };
1.66 +
1.67 + enum TSubsessionFunction
1.68 + /** Functions supported by test server subsession. */
1.69 + {
1.70 + /**
1.71 + This function identifier is only defined to ensure the test subsession
1.72 + implementation correctly handles unrecognized functions.
1.73 + */
1.74 + ESubsessUnused = 0,
1.75 + ESubsessQuadruple = 1, ///< Quadruple the curried value.
1.76 + ESubsessTreble ///< Asynchronously trebles a client-side TInt.
1.77 + };
1.78 +
1.79 + /** Delay before the asynchronous treble request is completed after construction. */
1.80 + static const TInt KTrebleTimerDelayUs = 5 * 1000 * 1000;
1.81 +
1.82 + /** The server is shut down if no sessions have been connected for this amount of time. */
1.83 + const TInt KShutdownPeriodUs = 2 * 1000 * 1000;
1.84 + } // namespace UserPromptService
1.85 +
1.86 +template <class T>
1.87 +inline T TAnyPtrToFuncPtr(TAny* aPtr);
1.88 +
1.89 +
1.90 +#include "scstestcommon.inl"
1.91 +
1.92 +#endif // SCSTESTCOMMON_H
1.93 +