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