sl@0: // Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). sl@0: // All rights reserved. sl@0: // This component and the accompanying materials are made available sl@0: // under the terms of the License "Eclipse Public License v1.0" sl@0: // which accompanies this distribution, and is available sl@0: // at the URL "http://www.eclipse.org/legal/epl-v10.html". sl@0: // sl@0: // Initial Contributors: sl@0: // Nokia Corporation - initial contribution. sl@0: // sl@0: // Contributors: sl@0: // sl@0: // Description: sl@0: // CUsbMassStorageSession.h sl@0: // Implements a Session of a Symbian OS server for the RUsbMassStorage API sl@0: // sl@0: // sl@0: sl@0: sl@0: sl@0: /** sl@0: @file sl@0: @internalTechnology sl@0: */ sl@0: sl@0: #ifndef CUSBHOSTSESSION_H sl@0: #define CUSBHOSTSESSION_H sl@0: sl@0: sl@0: _LIT(KUsbHostClientPncCat, "UsbHostClient"); sl@0: sl@0: enum TUsbHostPanicClient sl@0: { sl@0: EUsbHostPanicIllegalIPC sl@0: }; sl@0: sl@0: sl@0: class CUsbHostSession : public CSession2 sl@0: { sl@0: public: sl@0: static CUsbHostSession* NewL(); sl@0: virtual void CreateL(); sl@0: sl@0: protected: sl@0: CUsbHostSession(); sl@0: void ConstructL(); sl@0: sl@0: private: sl@0: ~CUsbHostSession(); sl@0: sl@0: sl@0: public: sl@0: // CSession2 sl@0: void ServiceL(const RMessage2& aMessage); sl@0: void DispatchMessageL(const RMessage2& aMessage); sl@0: sl@0: private: sl@0: // Services sl@0: TInt Start(const RMessage2& aMessage); sl@0: sl@0: protected: sl@0: // panic the client sl@0: void PanicClient(const RMessage2& aMessage,TInt aPanic) const; sl@0: sl@0: private: sl@0: CUsbHostServer& Server(); sl@0: }; sl@0: sl@0: sl@0: inline CUsbHostServer& CUsbHostSession::Server() sl@0: { sl@0: return *static_cast(const_cast(CSession2::Server())); sl@0: } sl@0: sl@0: sl@0: #endif //CUSBHOSTSESSION_H