diff -r 000000000000 -r bde4ae8d615e os/security/authorisation/userpromptservice/test/include/tups_sys_server.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/os/security/authorisation/userpromptservice/test/include/tups_sys_server.h Fri Jun 15 03:10:57 2012 +0200 @@ -0,0 +1,83 @@ +/* +* Copyright (c) 2007-2009 Nokia Corporation and/or its subsidiary(-ies). +* All rights reserved. +* This component and the accompanying materials are made available +* under the terms of the License "Eclipse Public License v1.0" +* which accompanies this distribution, and is available +* at the URL "http://www.eclipse.org/legal/epl-v10.html". +* +* Initial Contributors: +* Nokia Corporation - initial contribution. +* +* Contributors: +* +* Description: +* +*/ + + +/** + @file + @test +*/ + +#if (!defined __UPS_TEST_SERVER_H__) +#define __UPS_TEST_SERVER_H__ + +#include +#include +#include +#include "tupstesteractive.h" +#include "tups_clientapi_sysserver.h" + + +class CUPSTestServer : public CServer2 + { +public: + static CUPSTestServer* NewL(const TDesC& serverName); + + IMPORT_C virtual ~CUPSTestServer(); + IMPORT_C CSession2* NewSessionL(const TVersion& aVersion,const RMessage2& aMessage) const; + IMPORT_C virtual void ConstructL(const TDesC& aName); + void SessionClosed(); + inline const TDesC& Name() const {return iServerName;}; +protected: + IMPORT_C CUPSTestServer(); + inline void IncSessionCount() {++iSessionCount;}; +protected: +public: + TInt iSessionCount; + TBuf iServerName; + +public: + UserPromptService::RUpsSession iUpsSession; + + + }; + +class CUPSTestSession : public CSession2 + + { +public: + + static CUPSTestSession* NewL(const CUPSTestServer *aServer, const RMessage2& aMessage); + virtual void ServiceL(const RMessage2& aMessage); + + void CTUPSTesterActiveComplete(CTUPSTesterActive *aTester); +private: + void ConstructL(CUPSTestServer *aServer, const RMessage2& aMessage); + + IMPORT_C CUPSTestSession(); + IMPORT_C virtual ~CUPSTestSession(); + + void makeRequestToUPsL(const RMessage2& aMessage); + + CTUPSTesterActive *iUpsTestActiveObj; + +public: + UserPromptService::RUpsSubsession iUpsSubsession; + TUpsTestServiceRequestData iRequestData; + + }; + +#endif