RRsfwSession Class Reference

class RRsfwSession : public RSessionBase

This class provides the client-side interface to the server session.

rsfwsession.dll
Since
Series 60 3.1

Inherits from

Public Member Functions
RRsfwSession()
IMPORT_C voidClose()
IMPORT_C voidCloseFile(const TFid, TUint)
IMPORT_C TIntConnect()
IMPORT_C TIntCreateFile(TFid, const TDesC &, TUint, TUint, TFid &)
IMPORT_C TIntFetch(TFid, TInt, TInt, TInt &)
IMPORT_C TIntFetchData(TFid, TInt, TInt, TDes &, TBool &)
IMPORT_C TIntFlush(const TFid, TInt, TInt, TInt)
IMPORT_C TIntFlushCache(TFid &)
IMPORT_C TIntGetAttributes(TFid, TEntry &)
IMPORT_C TIntLookup(TFid, const TDesC &, TUint, TFid &)
IMPORT_C TIntMakeDirectory(TFid, const TDesC &)
IMPORT_C TIntMoveFids(TFid, const TDesC &, TFid, const TDesC &, TBool)
IMPORT_C TIntOkToWrite(TFid, TUint, TBool &)
IMPORT_C TIntOpenByPath(TFid, TDes &, TDirEntAttr *, TBool)
IMPORT_C TIntRemoveDirectory(TFid, const TDesC &)
IMPORT_C TIntRemoveFile(TFid, const TDesC &)
IMPORT_C TIntRfeInit(TFid &)
IMPORT_C TIntSetEntry(TFid, const TTime &, TUint, TUint)
IMPORT_C TIntSetHighCachePriority(TFid &)
IMPORT_C TVersionVersion()
Private Member Functions
TInt CreateServerProcess(const TDesC &)
TInt SendRequest(TInt, TInt, TIpcArgs)
TInt StartServer(const TDesC &)
Inherited Functions
RHandleBase::Attributes()const
RHandleBase::BTraceId()const
RHandleBase::DoExtendedClose()
RHandleBase::Duplicate(const RThread &,TOwnerType)
RHandleBase::FullName()const
RHandleBase::FullName(TDes &)const
RHandleBase::Handle()const
RHandleBase::HandleInfo(THandleInfo *)
RHandleBase::Name()const
RHandleBase::NotifyDestruction(TRequestStatus &)
RHandleBase::Open(const TFindHandleBase &,TOwnerType)
RHandleBase::OpenByName(const TDesC &,TOwnerType,TInt)
RHandleBase::RHandleBase()
RHandleBase::RHandleBase(TInt)
RHandleBase::SetHandle(TInt)
RHandleBase::SetHandleNC(TInt)
RSessionBase::CreateSession(RServer2,const TVersion &)
RSessionBase::CreateSession(RServer2,const TVersion &,TInt)
RSessionBase::CreateSession(RServer2,const TVersion &,TInt,TIpcSessionType,const TSecurityPolicy *,TRequestStatus *)
RSessionBase::CreateSession(const TDesC &,const TVersion &)
RSessionBase::CreateSession(const TDesC &,const TVersion &,TInt)
RSessionBase::CreateSession(const TDesC &,const TVersion &,TInt,TIpcSessionType,const TSecurityPolicy *,TRequestStatus *)
RSessionBase::CreateSession(const TDesC &,const TVersion &,TInt,TRequestStatus *)
RSessionBase::Open(RMessagePtr2,TInt,TOwnerType)
RSessionBase::Open(RMessagePtr2,TInt,const TSecurityPolicy &,TOwnerType)
RSessionBase::Open(TInt,TOwnerType)
RSessionBase::Open(TInt,const TSecurityPolicy &,TOwnerType)
RSessionBase::Send(TInt)const
RSessionBase::Send(TInt,const TIpcArgs &)const
RSessionBase::SendReceive(TInt)const
RSessionBase::SendReceive(TInt,TRequestStatus &)const
RSessionBase::SendReceive(TInt,const TIpcArgs &)const
RSessionBase::SendReceive(TInt,const TIpcArgs &,TRequestStatus &)const
RSessionBase::SetReturnedHandle(TInt)
RSessionBase::SetReturnedHandle(TInt,RHandleBase &)
RSessionBase::SetReturnedHandle(TInt,const TSecurityPolicy &)
RSessionBase::ShareAuto()
RSessionBase::ShareProtected()
Inherited Enumerations
RHandleBase:TAttributes
RSessionBase:TAttachMode
Inherited Attributes
RHandleBase::iHandle

Constructor & Destructor Documentation

RRsfwSession()

IMPORT_CRRsfwSession()

Constructor.

Member Functions Documentation

Close()

IMPORT_C voidClose()
Close the session
Since
Series 60 3.1

CloseFile(const TFid, TUint)

IMPORT_C voidCloseFile(const TFidaFid,
TUintaFlags
)
Tells Remote File Engine that a file has been closed
Since
Series 60 3.1

Parameters

const TFid aFidFid of the file that was closed
TUint aFlagswhether the file has been changed

Connect()

IMPORT_C TIntConnect()
Connect to the server and create a session.
Since
Series 60 3.1

CreateFile(TFid, const TDesC &, TUint, TUint, TFid &)

IMPORT_C TIntCreateFile(TFidaParentFid,
const TDesC &aFileName,
TUintaMode,
TUintaExcl,
TFid &aNewFid
)
Issue request to create and open a file. Note that this is "OPEN" operation, e.g. if the mode is relevant a lock will be acquired and will be refreshed until the file is closed.
Since
Series 60 3.1

Parameters

TFid aParentFidFid of the parent directory.
const TDesC & aFileNameThe name of the new file.
TUint aModeThe mode in which the file will be opened.
TUint aExclBoolean indicating whether it is ok to overwrite an existing file. (ETrue = exclusive = no overwriting)
TFid & aNewFidUpon successful return, contains the fid of the new file

CreateServerProcess(const TDesC &)

TInt CreateServerProcess(const TDesC &aServerName)[private, static]

Parameters

const TDesC & aServerName

Fetch(TFid, TInt, TInt, TInt &)

IMPORT_C TIntFetch(TFidaFileFid,
TIntaFirstByte,
TIntaLastByte,
TInt &aCachedBytes
)
Issue requet to fetch and cache a file or a directory
Since
Series 60 3.1

Parameters

TFid aFileFidthe fid of the file to be cached
TInt aFirstBytethe first byte to be cached (0 for dirs)
TInt aLastBytethe last byte to be cached (0 for dirs)
TInt & aCachedBytesupon succesful return, the number of bytes cached after this fetch

FetchData(TFid, TInt, TInt, TDes &, TBool &)

IMPORT_C TIntFetchData(TFidaFileFid,
TIntaFirstByte,
TIntaLastByte,
TDes &aTempFileName,
TBool &aUseTempPath
)
Issue request to fetch data without permanent caching.
Since
Series 60 3.1

Parameters

TFid aFileFidthe fid of the file to be fetched
TInt aFirstBytethe first byte to be fetched
TInt aLastBytethe last byte to be fetched
TDes & aTempFileNamethe path of the temp file where the data will be stored
TBool & aUseTempPathFALSE if the caching mode was such that the data was anyway stored into the normal cache file.

Flush(const TFid, TInt, TInt, TInt)

IMPORT_C TIntFlush(const TFidaFid,
TIntaFirstByte,
TIntaDataLength,
TIntaTotalSize
)
Tells Remote File Engine to write a file that has been modified back to the server. However, File Server does not close the file.
Since
Series 60 3.1

Parameters

const TFid aFidFid of the file to be flushed
TInt aFirstBytethe first byte to be flushed
TInt aDataLength
TInt aTotalSizethe full size of the file

FlushCache(TFid &)

IMPORT_C TIntFlushCache(TFid &aFid)
Issue request to flush an entry from the cache.
Since
Series 60 3.1

Parameters

TFid & aFidThe fid of the file or directory to be flushed.

GetAttributes(TFid, TEntry &)

IMPORT_C TIntGetAttributes(TFidaFileFid,
TEntry &aAttributes
)
Issue request to fetch file or directory attributes.
Since
Series 60 3.1

Parameters

TFid aFileFidFid of the file.
TEntry & aAttributesOn success, contains the file attributes (TEntry::iName is not filled)

Lookup(TFid, const TDesC &, TUint, TFid &)

IMPORT_C TIntLookup(TFidaParentFid,
const TDesC &aName,
TUintaNodeType,
TFid &aFid
)
finds the fid of a file system object
Since
Series 60 3.1

Parameters

TFid aParentFidfid of the parent directory
const TDesC & aNamename of the child to be looked up
TUint aNodeTypeis the type of the child, KNodeTypeUnknown,KNodeTypeFile or KNodeTypeDir (also a trailing backslash in the name indicates KNodeTypeDir)
TFid & aFidupon successful return contains the fid of the object to be looked up

MakeDirectory(TFid, const TDesC &)

IMPORT_C TIntMakeDirectory(TFidaParentFid,
const TDesC &aDirName
)
Issue request to make a directory.
Since
Series 60 3.1

Parameters

TFid aParentFidFid of the parent directory.
const TDesC & aDirNameThe name of the new directory.

MoveFids(TFid, const TDesC &, TFid, const TDesC &, TBool)

IMPORT_C TIntMoveFids(TFidaSourceFid,
const TDesC &aSourceName,
TFidaDestFid,
const TDesC &aDestName,
TBoolaOverWrite
)
Issue request to rename or replace a file or a directory
Since
Series 60 3.1

Parameters

TFid aSourceFidFid of the source file's parent directory
const TDesC & aSourceNameThe name of the object to be renamed (for dirs must have a trailing backslash)
TFid aDestFidFid of the destination directory
const TDesC & aDestNameThe name of the target object (for dirs must have a trailing backslash)
TBool aOverWrite

OkToWrite(TFid, TUint, TBool &)

IMPORT_C TIntOkToWrite(TFidaFid,
TUintaBytes,
TBool &aOkToWrite
)
Queries from Remote File Engine whether there is enough local cache space to write aBytes of data
Since
Series 60 3,1

Parameters

TFid aFidfid of the file whose data will be written
TUint aBytesthe number of bytes to be written
TBool & aOkToWrite

OpenByPath(TFid, TDes &, TDirEntAttr *, TBool)

IMPORT_C TIntOpenByPath(TFidaFid,
TDes &aContainerPath,
TDirEntAttr *aAttr,
TBoolaTrueOpen
)
Issue request to open this fid and return the path of the container file Note that this is "OPEN" operation, e.g. if the mode is relevant a lock will be acquired and will be refreshed until the file is closed.
Since
Series 60 3.1

Parameters

TFid aFidFid of the file or directory.
TDes & aContainerPath
TDirEntAttr * aAttraAttr.iAtt: Open mode, controls acquiring locks etc. on return, contains size etc.
TBool aTrueOpenWhether File Server opens the file, or ReadSection was called in which case we also mimic the sequence of opening a file (file is not candidate for removing from cache if it has been opened by the File Server).

RemoveDirectory(TFid, const TDesC &)

IMPORT_C TIntRemoveDirectory(TFidaParentFid,
const TDesC &aDirName
)
Issue request to remove a directory.
Since
Series 60 3.1

Parameters

TFid aParentFidFid of the parent directory.
const TDesC & aDirNameThe name of the directory to be removed.

RemoveFile(TFid, const TDesC &)

IMPORT_C TIntRemoveFile(TFidaParentFid,
const TDesC &aFileName
)
Issue request to remove a file.
Since
Series 60 3.1

Parameters

TFid aParentFidFid of the parent directory.
const TDesC & aFileNameThe name of the file to be removed.

RfeInit(TFid &)

IMPORT_C TIntRfeInit(TFid &aRootFid)
Issue request to initialize the remote mount.
Since
Series 60 3.1

Parameters

TFid & aRootFid

SendRequest(TInt, TInt, TIpcArgs)

TInt SendRequest(TIntaOpCode,
TIntaDrive,
TIpcArgsaArgs
)[private]

Parameters

TInt aOpCode
TInt aDrive
TIpcArgs aArgs

SetEntry(TFid, const TTime &, TUint, TUint)

IMPORT_C TIntSetEntry(TFidaFid,
const TTime &aTime,
TUintaSetAttMask,
TUintaClearAttMask
)
Issue request to set entry details for a specified file or directory.
Since
Series60 3.1

Parameters

TFid aFidFid of the target file or directory
const TTime & aTimeA reference to the time object holding the new universal modified time for aName.
TUint aSetAttMaskAttribute mask for setting the entry's attributes.
TUint aClearAttMaskAttribute mask for clearing the entry's attributes.

SetHighCachePriority(TFid &)

IMPORT_C TIntSetHighCachePriority(TFid &aFid)
Issue request to raise the cache priority of an already cached file.
Since
Series 60 3.1

Parameters

TFid & aFidThe fid of the file.

StartServer(const TDesC &)

TInt StartServer(const TDesC &aServerName)[private, static]

Parameters

const TDesC & aServerName

Version()

IMPORT_C TVersionVersion()const
Get the server version number.
Since
Series 60 3.1