baseport/src/cedar/generic/base/syborg/svphostfs/driver/svphostfsdriver.h
changeset 0 ffa851df0825
equal deleted inserted replaced
-1:000000000000 0:ffa851df0825
       
     1 /*
       
     2 * Copyright (c) 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 the License "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 #ifndef __SVPHOSTFSDRIVER_H__
       
    19 #define __SVPHOSTFSDRIVER_H__
       
    20 
       
    21 
       
    22 #include "rsvphostfsdriver.h"
       
    23 
       
    24 // Debug messages
       
    25 //#define SVPDBG
       
    26 #ifdef SVPDBG
       
    27 #define LOG_MSG(x) Kern::Printf(x)
       
    28 #define LOG_MSG2(x, y) Kern::Printf(x, y)
       
    29 #else
       
    30 #define LOG_MSG(x)
       
    31 #define LOG_MSG2(x, y)
       
    32 #endif
       
    33 
       
    34 
       
    35 //
       
    36 // class DSVPHostFsDriverFactory
       
    37 //
       
    38 class DSVPHostFsDriverFactory : public DLogicalDevice
       
    39 {
       
    40 public:
       
    41 
       
    42 	DSVPHostFsDriverFactory();
       
    43 	virtual TInt Install();
       
    44 	virtual void GetCaps(TDes8& aDes) const;
       
    45 	virtual TInt Create(DLogicalChannelBase*& aChannel);
       
    46 };
       
    47 
       
    48 //
       
    49 // DSVPHostFsChannel
       
    50 //
       
    51 class DSVPHostFsChannel : public DLogicalChannel
       
    52 {
       
    53 public:
       
    54 
       
    55 	DSVPHostFsChannel(DLogicalDevice* aLogicalDevice);
       
    56 	~DSVPHostFsChannel();
       
    57 
       
    58 	virtual TInt DoCreate(TInt aUnit, const TDesC* anInfo, const TVersion& aVer);	
       
    59 	virtual void HandleMsg(TMessageBase* aMsg);
       
    60 	
       
    61 protected:
       
    62 	virtual void DoCancel(TInt aReqNo);
       
    63 	virtual TInt DoRequest(TInt aReqNo, TRequestStatus* aStatus, TAny* a1, TAny* a2);
       
    64 	virtual TInt DoControl(TInt aFunction, TAny *a1, TAny *a2);
       
    65 	
       
    66 private:
       
    67 	TInt DirOpen(TSVPHostFsDirOpenInfo* aInfo);
       
    68 	TInt DirClose(TUint32 aHandle);
       
    69 	TInt DirRead(TSVPHostFsDirReadInfo* aInfo);
       
    70 
       
    71 private:
       
    72 	DThread* iClientThread;
       
    73 	
       
    74 	
       
    75 	TDfcQue* iDFCQue;
       
    76 
       
    77 };
       
    78 
       
    79 #endif //__SVPHOSTFSDRIVER_H__