usbclasses/usbphoneasmodem/classimplementation/mscfileserver/inc/mscfileserver.h
changeset 34 7858bc6ead78
parent 31 dfdd8240f7c8
child 35 9d8b04ca6939
equal deleted inserted replaced
31:dfdd8240f7c8 34:7858bc6ead78
     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 "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: Implements a Symbian OS server that exposes the RUsbMassStorage API
       
    14 // 
       
    15 // 
       
    16 
       
    17 #ifndef MSCFILESERVER_H
       
    18 #define MSCFILESERVER_H
       
    19 
       
    20 _LIT(KUsbMsSvrPncCat, "CUsbMsServer");
       
    21 
       
    22 enum TUsbPanicServer
       
    23 	{
       
    24 	EMsClientInvalidSessCount,
       
    25 	EMsControlInterfaceBadState,
       
    26 	EMsControlInterfaceStillActive,
       
    27 	EMsBulkOnlyStillActive,
       
    28 	EMsWrongEndpoint,
       
    29 	EMsWrongLength
       
    30 	};
       
    31 
       
    32 //
       
    33 // Forward declarations
       
    34 //
       
    35 class CMscFileController;
       
    36 
       
    37 /**
       
    38  The CMscFileServer class
       
    39  Implements a Symbian OS server that exposes the RUsbMassStorage API
       
    40  */
       
    41 class CMscFileServer : public CPolicyServer
       
    42 	{
       
    43 public:
       
    44 	static CMscFileServer* NewLC();
       
    45 	virtual ~CMscFileServer();
       
    46 
       
    47 private:
       
    48     CMscFileServer();
       
    49     void ConstructL();
       
    50 
       
    51 public:
       
    52 	virtual CSession2* NewSessionL(const TVersion &aVersion, const RMessage2& aMessage) const;
       
    53 	void Error(TInt aError);
       
    54 
       
    55 	inline CMscFileController& Controller() const;
       
    56 
       
    57 	void IncrementSessionCount();
       
    58 	void DecrementSessionCount();
       
    59 	inline TInt SessionCount() const;
       
    60 
       
    61     static TInt ThreadFunction( TAny* aStarted );
       
    62     
       
    63 private:
       
    64     static void ThreadFunctionL();
       
    65     
       
    66 private:
       
    67 	CMscFileController* iController;
       
    68 	TInt iSessionCount;
       
    69 	};
       
    70 
       
    71 #include "mscfileserver.inl"
       
    72 
       
    73 #endif // MSCFILESERVER_H
       
    74 
       
    75