usbmgmt/usbmgrtest/ObexClassController/ObexUsbClassController/ClassControllerServerSession/inc/classContServer.h
changeset 0 c9bc50fca66e
equal deleted inserted replaced
-1:000000000000 0:c9bc50fca66e
       
     1 /*
       
     2 * Copyright (c) 2005-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 "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  @file
       
    20  @internalComponent
       
    21 */
       
    22 
       
    23 #ifndef CLASSCONTSERVER_H
       
    24 #define CLASSCONTSERVER_H
       
    25 
       
    26 #include <e32base.h>
       
    27 
       
    28 
       
    29 _LIT(KServerPanicCategory, "ServServer");
       
    30 _LIT(KClientPanicCategory, "Client");
       
    31 
       
    32 _LIT_SECURE_ID(KUsbSvrSecureId,0x101fe1db);
       
    33 
       
    34 enum TServServerPanic
       
    35 	{
       
    36 	EServServerPanicIllegal = 0
       
    37 	};
       
    38 
       
    39 enum TClientPanic
       
    40 	{
       
    41 	EClientPanicBadMessage = 0
       
    42 	};
       
    43 
       
    44 class CServerTimer;
       
    45 
       
    46 /**
       
    47  * CClassContServer is a CServer2 derived class, it resides on the server side
       
    48  * of the Client and Server configuration and implements a new Session to deal with requests 
       
    49  * from the client side.
       
    50  *
       
    51  */
       
    52 
       
    53 NONSHARABLE_CLASS(CClassContServer) : public CServer2
       
    54 	{
       
    55 	public:
       
    56 		static CClassContServer* NewLC();
       
    57 		~CClassContServer();
       
    58 		void SessionRemoved();
       
    59 		void StartShutdownTimer();
       
    60 		void CancelShutdownTimer();
       
    61 		static TInt ShutdownTimerFired(TAny*);
       
    62 
       
    63 	
       
    64 	private:
       
    65 		CClassContServer();
       
    66 		CSession2* NewSessionL(const TVersion &aVersion, const RMessage2& aMessage) const;
       
    67 		void ConstructL();
       
    68 
       
    69 	private:
       
    70 		CSession2* iSession;
       
    71 		CPeriodic* iShutdownTimer;
       
    72 		static const TUint KShutdownDelay = 5 * 1000 * 1000;
       
    73 		static const TUint KShutdownInterval = 0;
       
    74 	};
       
    75 
       
    76 
       
    77 
       
    78 
       
    79 #endif // CLASSCONTSERVER_H