os/security/authorisation/userpromptservice/test/include/tups_sys_server.h
author sl
Tue, 10 Jun 2014 14:32:02 +0200 (2014-06-10)
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 *
    16 */
    17 
    18 
    19 /**
    20  @file  
    21  @test 
    22 */
    23  
    24 #if (!defined __UPS_TEST_SERVER_H__)
    25 #define __UPS_TEST_SERVER_H__
    26 
    27 #include <e32base.h>
    28 #include <test/tefexportconst.h>
    29 #include <ups/upsclient.h>
    30 #include "tupstesteractive.h"
    31 #include "tups_clientapi_sysserver.h"
    32 
    33 
    34 class CUPSTestServer : public CServer2
    35 	{
    36 public:
    37 	static CUPSTestServer* NewL(const TDesC& serverName);
    38 
    39 	IMPORT_C virtual ~CUPSTestServer();
    40 	IMPORT_C CSession2* NewSessionL(const TVersion& aVersion,const RMessage2& aMessage) const;
    41 	IMPORT_C virtual void ConstructL(const TDesC& aName);
    42 	void SessionClosed();
    43 	inline const TDesC& Name() const {return iServerName;};
    44 protected:
    45 	IMPORT_C CUPSTestServer();
    46 	inline void IncSessionCount() {++iSessionCount;};
    47 protected:
    48 public:
    49 	TInt	iSessionCount;
    50 	TBuf<KMaxTestExecuteNameLength> iServerName;
    51 	
    52 public:
    53 	UserPromptService::RUpsSession iUpsSession;
    54 	
    55 	
    56 	};
    57 
    58 class CUPSTestSession : public CSession2
    59 
    60 	{
    61 public:
    62 
    63 	static CUPSTestSession* NewL(const CUPSTestServer *aServer, const RMessage2& aMessage);
    64 	virtual void ServiceL(const RMessage2& aMessage);
    65 	
    66 	void CTUPSTesterActiveComplete(CTUPSTesterActive *aTester);
    67 private:
    68 	void ConstructL(CUPSTestServer *aServer, const RMessage2& aMessage);
    69 
    70 	IMPORT_C CUPSTestSession();
    71 	IMPORT_C virtual ~CUPSTestSession();
    72 
    73     void makeRequestToUPsL(const RMessage2& aMessage);
    74     
    75     CTUPSTesterActive *iUpsTestActiveObj;
    76     
    77 public:
    78  	UserPromptService::RUpsSubsession 	iUpsSubsession;
    79  	TUpsTestServiceRequestData 			iRequestData;
    80 
    81 	};
    82 
    83 #endif