common/tools/ats/smoketest/Utils/Inc/SmokeTestSecureFSserver.h
changeset 117 483f966c6335
child 872 17498133d9ad
equal deleted inserted replaced
113:7f0174848f99 117:483f966c6335
       
     1 // Copyright (c) 2005-2009 Nokia Corporation and/or its subsidiary(-ies).
       
     2 // All rights reserved.
       
     3 // This component and the accompanying materials are made available
       
     4 // under the terms of the License "Symbian Foundation License v1.0"
       
     5 // which accompanies this distribution, and is available
       
     6 // at the URL "http://www.symbianfoundation.org/legal/sfl-v10.html".
       
     7 //
       
     8 // Initial Contributors:
       
     9 // Nokia Corporation - initial contribution.
       
    10 //
       
    11 // Contributors:
       
    12 //
       
    13 // Description:
       
    14 // TestServer - server classes
       
    15 // 
       
    16 //
       
    17 
       
    18 #ifndef __SMOKETEST_SECURE_FS_SERVER_H__
       
    19 #define __SMOKETEST_SECURE_FS_SERVER_H__
       
    20 
       
    21 #include <e32base.h>
       
    22 #include "SmokeTestSecureFSclientserver.h"
       
    23 
       
    24 enum TTestPanic
       
    25 	{
       
    26 	EPanicBadDescriptor,
       
    27 	EPanicIllegalFunction,
       
    28 	EPanicAlreadyReceiving
       
    29 	};
       
    30 
       
    31 void PanicClient(const RMessage2& aMessage,TTestPanic TMyPanic);
       
    32 
       
    33 class CTestSecureFSshutdown : public CTimer
       
    34 	{
       
    35 	enum {KMyShutdownDelay=0x500000};	// approx 5s
       
    36 public:
       
    37 	inline CTestSecureFSshutdown();
       
    38 	inline void ConstructL();
       
    39 	inline void Start();
       
    40 private:
       
    41 	void RunL();
       
    42 	};
       
    43 
       
    44 class CTestSecureFSserver : public CServer2
       
    45 	{
       
    46 public:
       
    47 	static CServer2* NewLC();
       
    48 	void AddSession();
       
    49 	void DropSession();
       
    50 	void Send(const TDesC& aMessage);
       
    51 private:
       
    52 	CTestSecureFSserver();
       
    53 	void ConstructL();
       
    54 	// CSharableSession* NewSessionL(const TVersion& aVersion, const RMessage& aMessage) const;
       
    55         CSession2* NewSessionL(const TVersion& aVersion, const RMessage2& aMessage) const;
       
    56 private:
       
    57 	TInt iSessionCount;
       
    58 	CTestSecureFSshutdown iShutdown;
       
    59 	};
       
    60 
       
    61 //class CTestSecureFSSession : public CSharableSession
       
    62 class CTestSecureFSSession : public CSession2
       
    63 	{
       
    64 public:
       
    65 	CTestSecureFSSession();
       
    66 	void CreateL();
       
    67 	void Send(const TDesC& aMessage);
       
    68 private:
       
    69 	~CTestSecureFSSession();
       
    70 	inline CTestSecureFSserver& Server();
       
    71 	void ServiceL(const RMessage2& aMessage);
       
    72 	void ServiceError(const RMessage2& aMessage,TInt aError);
       
    73 	inline TBool ReceivePending() const;
       
    74 private:
       
    75 	void DoSetHomeTime(const RMessage2& aMessage);
       
    76 	
       
    77 	// General File Manipulation
       
    78 	TInt DoDeleteFileL(const RMessage2& aMessage);
       
    79 
       
    80 	// Power User
       
    81 	void DoKillProcess(const RMessage2& aMessage);
       
    82 	TInt DoChangeLocale(const RMessage2& aMessage);
       
    83 	TInt DoCheckForFile(const RMessage2& aMessage);
       
    84 	TInt DoCopyFile(const RMessage2& aMessage);
       
    85 	void DoSetUpFbs();
       
    86 
       
    87 private:
       
    88 	RMessage2 iReceive;
       
    89 	};
       
    90 
       
    91 #endif // __SMOKETEST_SECURE_FS_SERVER_H__