os/security/authorisation/userpromptservice/test/include/tups_sys_server.h
changeset 0 bde4ae8d615e
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/os/security/authorisation/userpromptservice/test/include/tups_sys_server.h	Fri Jun 15 03:10:57 2012 +0200
     1.3 @@ -0,0 +1,83 @@
     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 +*
    1.19 +*/
    1.20 +
    1.21 +
    1.22 +/**
    1.23 + @file  
    1.24 + @test 
    1.25 +*/
    1.26 + 
    1.27 +#if (!defined __UPS_TEST_SERVER_H__)
    1.28 +#define __UPS_TEST_SERVER_H__
    1.29 +
    1.30 +#include <e32base.h>
    1.31 +#include <test/tefexportconst.h>
    1.32 +#include <ups/upsclient.h>
    1.33 +#include "tupstesteractive.h"
    1.34 +#include "tups_clientapi_sysserver.h"
    1.35 +
    1.36 +
    1.37 +class CUPSTestServer : public CServer2
    1.38 +	{
    1.39 +public:
    1.40 +	static CUPSTestServer* NewL(const TDesC& serverName);
    1.41 +
    1.42 +	IMPORT_C virtual ~CUPSTestServer();
    1.43 +	IMPORT_C CSession2* NewSessionL(const TVersion& aVersion,const RMessage2& aMessage) const;
    1.44 +	IMPORT_C virtual void ConstructL(const TDesC& aName);
    1.45 +	void SessionClosed();
    1.46 +	inline const TDesC& Name() const {return iServerName;};
    1.47 +protected:
    1.48 +	IMPORT_C CUPSTestServer();
    1.49 +	inline void IncSessionCount() {++iSessionCount;};
    1.50 +protected:
    1.51 +public:
    1.52 +	TInt	iSessionCount;
    1.53 +	TBuf<KMaxTestExecuteNameLength> iServerName;
    1.54 +	
    1.55 +public:
    1.56 +	UserPromptService::RUpsSession iUpsSession;
    1.57 +	
    1.58 +	
    1.59 +	};
    1.60 +
    1.61 +class CUPSTestSession : public CSession2
    1.62 +
    1.63 +	{
    1.64 +public:
    1.65 +
    1.66 +	static CUPSTestSession* NewL(const CUPSTestServer *aServer, const RMessage2& aMessage);
    1.67 +	virtual void ServiceL(const RMessage2& aMessage);
    1.68 +	
    1.69 +	void CTUPSTesterActiveComplete(CTUPSTesterActive *aTester);
    1.70 +private:
    1.71 +	void ConstructL(CUPSTestServer *aServer, const RMessage2& aMessage);
    1.72 +
    1.73 +	IMPORT_C CUPSTestSession();
    1.74 +	IMPORT_C virtual ~CUPSTestSession();
    1.75 +
    1.76 +    void makeRequestToUPsL(const RMessage2& aMessage);
    1.77 +    
    1.78 +    CTUPSTesterActive *iUpsTestActiveObj;
    1.79 +    
    1.80 +public:
    1.81 + 	UserPromptService::RUpsSubsession 	iUpsSubsession;
    1.82 + 	TUpsTestServiceRequestData 			iRequestData;
    1.83 +
    1.84 +	};
    1.85 +
    1.86 +#endif