baseport/src/cedar/generic/base/syborg/svphostfs/fs/rsvphostfsdriver.cpp
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 #include <f32file.h>
       
    19 #include <f32fsys.h>
       
    20 #include <f32ver.h>
       
    21 #include <e32uid.h>
       
    22 
       
    23 #include <rsvphostfsdriver.h>
       
    24 
       
    25 #include "svphostfsy.h"
       
    26 
       
    27 #ifdef DP
       
    28 #undef DP
       
    29 #define DP(f...)
       
    30 #endif
       
    31 
       
    32 TInt RSVPHostFsDriver::Open()
       
    33 	{
       
    34 	DP(_L("** (rsvphostfsdriver.cpp) RSVPHostFsDriver::Open()"));
       
    35 	return DoCreate(KSVPHostFsDriverName, TVersion(KMajorVersionNumber, KMinorVersionNumber, KBuildVersionNumber), KNullUnit, NULL, NULL);
       
    36 	}
       
    37 
       
    38 TInt RSVPHostFsDriver::MkDir(TSVPHostFsMkDirInfo& aInfo)
       
    39 	{
       
    40 	DP(_L("** (rsvphostfsdriver.cpp) RSVPHostFsDriver::MkDir()"));
       
    41 	return DoSVPRequest(EMkDir, &aInfo);
       
    42 	}
       
    43 
       
    44 TInt RSVPHostFsDriver::RmDir(TSVPHostFsRmDirInfo& aInfo)
       
    45 	{
       
    46 	DP(_L("** (rsvphostfsdriver.cpp) RSVPHostFsDriver::RmDir()"));
       
    47 	return DoSVPRequest(ERmDir, &aInfo);
       
    48 	}
       
    49 
       
    50 TInt RSVPHostFsDriver::Delete(TSVPHostFsDeleteInfo& aInfo)
       
    51 	{
       
    52 	DP(_L("** (rsvphostfsdriver.cpp) RSVPHostFsDriver::Delete()"));
       
    53 	return DoSVPRequest(EDelete, &aInfo);
       
    54 	}
       
    55 
       
    56 TInt RSVPHostFsDriver::Rename(TSVPHostFsRenameInfo& aInfo)
       
    57 	{
       
    58 	DP(_L("** (rsvphostfsdriver.cpp) RSVPHostFsDriver::Rename()"));
       
    59 	return DoSVPRequest(ERename, &aInfo);
       
    60 	}
       
    61 
       
    62 TInt RSVPHostFsDriver::Replace(TSVPHostFsReplaceInfo& aInfo)
       
    63 	{
       
    64 	DP(_L("** (rsvphostfsdriver.cpp) RSVPHostFsDriver::Replace()"));
       
    65 	return DoSVPRequest(EReplace, &aInfo);
       
    66 	}
       
    67 
       
    68 TInt RSVPHostFsDriver::ReadUid(const TDesC& /*aName*/,TEntry& /*anEntry*/)
       
    69 	{
       
    70 	DP(_L("** (rsvphostfsdriver.cpp) RSVPHostFsDriver::ReadUid()"));
       
    71 	return KErrNone;
       
    72 	}
       
    73 
       
    74 TInt RSVPHostFsDriver::Entry(TSVPHostFsEntryInfo& aInfo)
       
    75 	{
       
    76 	DP(_L("** (rsvphostfsdriver.cpp) RSVPHostFsDriver::Entry()"));
       
    77 	return DoSVPRequest(EEntry, &aInfo);
       
    78 	}
       
    79 
       
    80 TInt RSVPHostFsDriver::SetEntry(TSVPHostFsSetEntryInfo &aInfo)
       
    81 	{
       
    82 	DP(_L("** (rsvphostfsdriver.cpp) RSVPHostFsDriver::SetEntry()"));
       
    83 	return  DoSVPRequest(ESetEntry, &aInfo);
       
    84 	}
       
    85 
       
    86 TInt RSVPHostFsDriver::FileOpen(TSVPHostFsFileOpenInfo& aInfo)
       
    87 	{
       
    88 	DP(_L("** (rsvphostfsdriver.cpp) RSVPHostFsDriver::FileOpen()"));
       
    89 	return DoSVPRequest(EFileOpen, &aInfo);
       
    90 	}
       
    91 
       
    92 TInt RSVPHostFsDriver::FileClose(TUint32 aDrive, TUint32 aHandle)
       
    93 	{
       
    94 	DP(_L("** (rsvphostfsdriver.cpp) RSVPHostFsDriver::FileClose()"));
       
    95 	return DoSVPRequest(EFileClose, (TAny *)aDrive, (TAny *)aHandle);
       
    96 	}
       
    97 
       
    98 TInt RSVPHostFsDriver::FileRead(TSVPHostFsFileReadInfo& aInfo)
       
    99 	{
       
   100 	DP(_L("** (rsvphostfsdriver.cpp) RSVPHostFsDriver::FileRead()"));
       
   101 	return  DoSVPRequest(EFileRead, &aInfo);
       
   102 	}
       
   103 
       
   104 TInt RSVPHostFsDriver::FileWrite(TSVPHostFsFileWriteInfo& aInfo)
       
   105 	{
       
   106 	DP(_L("** (rsvphostfsdriver.cpp) RSVPHostFsDriver::FileWrite()"));
       
   107 	return  DoSVPRequest(EFileWrite, &aInfo);
       
   108 	}
       
   109 
       
   110 TInt RSVPHostFsDriver::FileSetSize(TSVPHostFsFileSetSizeInfo &aInfo)
       
   111 	{
       
   112 	DP(_L("** (rsvphostfsdriver.cpp) RSVPHostFsDriver::FileSetSize()"));
       
   113 	return  DoSVPRequest(EFileSetSize, &aInfo);
       
   114 	}
       
   115 
       
   116 TInt RSVPHostFsDriver::FileSetEntry(TSVPHostFsSetEntryInfo &aInfo)
       
   117 	{
       
   118 	DP(_L("** (rsvphostfsdriver.cpp) RSVPHostFsDriver::FileSetEntry()"));
       
   119 	return  KErrNotSupported;
       
   120 	}
       
   121 
       
   122 TInt RSVPHostFsDriver::FlushData(TUint32 aDrive)
       
   123 	{
       
   124 	DP(_L("** (rsvphostfsdriver.cpp) RSVPHostFsDriver::FlushData()"));
       
   125 	return DoSVPRequest(EFileFlushAll, (TAny *)aDrive);
       
   126 	}
       
   127 
       
   128 TInt RSVPHostFsDriver::FlushAll(TUint32 aDrive)
       
   129 	{
       
   130 	DP(_L("** (rsvphostfsdriver.cpp) RSVPHostFsDriver::FlushAll()"));
       
   131 	return DoSVPRequest(EFileFlushAll, (TAny *)aDrive);
       
   132 	}
       
   133 
       
   134 TInt RSVPHostFsDriver::DirOpen(TSVPHostFsDirOpenInfo& aInfo)
       
   135 	{
       
   136 	DP(_L("** (rsvphostfsdriver.cpp) RSVPHostFsDriver::DirOpen()"));
       
   137 	return DoSVPRequest(EDirOpen, &aInfo);
       
   138 	}
       
   139 
       
   140 TInt RSVPHostFsDriver::DirClose(TUint32 aDrive, TUint32 aHandle)
       
   141 	{
       
   142 	DP(_L("** (rsvphostfsdriver.cpp) RSVPHostFsDriver::DirClose()"));
       
   143 	return DoSVPRequest(EDirClose, (TAny *)aDrive, (TAny *)aHandle);
       
   144 	}
       
   145 
       
   146 TInt RSVPHostFsDriver::DirRead(TSVPHostFsDirReadInfo& aInfo)
       
   147 	{
       
   148 	DP(_L("** (rsvphostfsdriver.cpp) RSVPHostFsDriver::DirRead()"));
       
   149 	return  DoSVPRequest(EDirRead, &aInfo);
       
   150 	}
       
   151 
       
   152 TUint32 RSVPHostFsDriver::GetDeviceID(TUint32 aDrive)
       
   153 	{
       
   154 	DP(_L("** (rsvphostfsdriver.cpp) RSVPHostFsDriver::GetDeviceID()"));
       
   155 
       
   156 	TUint32 id;
       
   157 	TInt r = DoSVPRequest(EGetDeviceID, (TAny *) aDrive, &id);
       
   158 	return (r != KErrNone) ? r : id;
       
   159 	}
       
   160 
       
   161 TInt RSVPHostFsDriver::GetDriveMap(TUint32 * aMap)
       
   162 	{
       
   163 	DP(_L("** (rsvphostfsdriver.cpp) RSVPHostFsDriver::GetDeviceID()"));
       
   164 
       
   165 	return DoSVPRequest(EGetDriveMap, (TAny *)aMap);
       
   166 	}
       
   167