os/kernelhwsrv/kerneltest/f32test/shostmassstorage/msman/server/cusbhostsession.h
author sl
Tue, 10 Jun 2014 14:32:02 +0200 (2014-06-10)
changeset 1 260cb5ec6c19
permissions -rw-r--r--
Update contrib.
     1 // Copyright (c) 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 "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 // CUsbMassStorageSession.h
    15 // Implements a Session of a Symbian OS server for the RUsbMassStorage API
    16 // 
    17 //
    18 
    19 
    20 
    21 /**
    22  @file
    23  @internalTechnology
    24 */
    25 
    26 #ifndef CUSBHOSTSESSION_H
    27 #define CUSBHOSTSESSION_H
    28 
    29 
    30 _LIT(KUsbHostClientPncCat, "UsbHostClient");
    31 
    32 enum TUsbHostPanicClient
    33     {
    34     EUsbHostPanicIllegalIPC
    35     };
    36 
    37 
    38 class CUsbHostSession : public CSession2
    39 	{
    40 public:
    41 	static CUsbHostSession* NewL();
    42     virtual void CreateL();
    43 
    44 protected:
    45 	CUsbHostSession();
    46 	void ConstructL();
    47 
    48 private:
    49 	~CUsbHostSession();
    50 
    51 
    52 public:
    53 	// CSession2
    54 	void ServiceL(const RMessage2& aMessage);
    55     void DispatchMessageL(const RMessage2& aMessage);
    56 
    57 private:
    58     // Services
    59 	TInt Start(const RMessage2& aMessage);
    60 
    61 protected:
    62     // panic the client
    63     void PanicClient(const RMessage2& aMessage,TInt aPanic) const;
    64 
    65 private:
    66     CUsbHostServer& Server();
    67 	};
    68 
    69 
    70 inline CUsbHostServer& CUsbHostSession::Server()
    71     {
    72     return *static_cast<CUsbHostServer*>(const_cast<CServer2*>(CSession2::Server()));
    73     }
    74 
    75 
    76 #endif //CUSBHOSTSESSION_H