sysstatemgmt/systemstarter/test/sysmondemo/src/sysmondemo.h
changeset 0 4e1aa6a622a0
equal deleted inserted replaced
-1:000000000000 0:4e1aa6a622a0
       
     1 // Copyright (c) 2006-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 "Eclipse Public License v1.0"
       
     5 // which accompanies this distribution, and is available
       
     6 // at the URL "http://www.eclipse.org/legal/epl-v10.html".
       
     7 //
       
     8 // Initial Contributors:
       
     9 // Nokia Corporation - initial contribution.
       
    10 //
       
    11 // Contributors:
       
    12 //
       
    13 // Description:
       
    14 //
       
    15 
       
    16 #ifndef __SYSMONDEMO_H__
       
    17 #define __SYSMONDEMO_H__
       
    18 
       
    19 #include "e32std.h" 
       
    20 #include "e32base.h"
       
    21 
       
    22 
       
    23 _LIT(KDemoServerName, "SysMonDemoServ") ;
       
    24 _LIT(KDemoServerImage, "Z:\\sys\\bin\\sysmondemoserv.exe") ;
       
    25 
       
    26 
       
    27 class CDemoSSess;
       
    28 class CDemoServ;
       
    29 
       
    30 class RDemoCli: public RSessionBase
       
    31 {
       
    32 	public:
       
    33 		TInt Open() ;
       
    34 		void Close() ;	
       
    35 		void Poke(TTime &time) ;
       
    36 		void Kill(TTime &time) ;
       
    37 		void Done(TTime &time) ;		
       
    38 };
       
    39 
       
    40 class CDemoSSess: public CSession2
       
    41 {
       
    42 	public:
       
    43 		static CDemoSSess* NewL() ;
       
    44 		~CDemoSSess() ;
       
    45 		virtual void ServiceL(const RMessage2 &aMessage) ;		
       
    46 		void CmdPokeL() ;		
       
    47 		void CmdKillL() ;		
       
    48 		void CmdDoneL() ;		
       
    49 		CDemoServ* DemoServer() ;	
       
    50 	private:
       
    51 		RMessage2 iMessage ;	
       
    52 };
       
    53 
       
    54 class CDemoServ: public CServer2
       
    55 {
       
    56 	public:
       
    57 		static CDemoServ* NewLC() ;
       
    58 		CDemoServ() ;
       
    59 		~CDemoServ() ;
       
    60 		TTime GetLoadTime() ;
       
    61 		
       
    62 	protected:
       
    63 	//	virtual void RunL() ;
       
    64 	//	virtual void DoCancel() ;
       
    65 		CSession2* NewSessionL(const TVersion& aVersion, const RMessage2& aMessage) const;
       
    66 	
       
    67 	private:
       
    68 		TTime iLoadTime ;	
       
    69 };
       
    70 
       
    71 enum TSysMonDemoCom
       
    72 	{
       
    73 	EServerPoke = 0,
       
    74 	EServerKill,
       
    75 	EServerDone
       
    76 	};
       
    77 
       
    78 
       
    79 #endif