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 void Close ()
IMPORT_C void CloseFile (const TFid , TUint )
IMPORT_C TInt Connect ()
IMPORT_C TInt CreateFile ( TFid , const TDesC &, TUint , TUint , TFid &)
IMPORT_C TInt Fetch ( TFid , TInt , TInt , TInt &)
IMPORT_C TInt FetchData ( TFid , TInt , TInt , TDes &, TBool &)
IMPORT_C TInt Flush (const TFid , TInt , TInt , TInt )
IMPORT_C TInt FlushCache ( TFid &)
IMPORT_C TInt GetAttributes ( TFid , TEntry &)
IMPORT_C TInt Lookup ( TFid , const TDesC &, TUint , TFid &)
IMPORT_C TInt MakeDirectory ( TFid , const TDesC &)
IMPORT_C TInt MoveFids ( TFid , const TDesC &, TFid , const TDesC &, TBool )
IMPORT_C TInt OkToWrite ( TFid , TUint , TBool &)
IMPORT_C TInt OpenByPath ( TFid , TDes &, TDirEntAttr *, TBool )
IMPORT_C TInt RemoveDirectory ( TFid , const TDesC &)
IMPORT_C TInt RemoveFile ( TFid , const TDesC &)
IMPORT_C TInt RfeInit ( TFid &)
IMPORT_C TInt SetEntry ( TFid , const TTime &, TUint , TUint )
IMPORT_C TInt SetHighCachePriority ( TFid &)
IMPORT_C TVersion Version ()
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_C RRsfwSession ( )

Constructor.

Member Functions Documentation

Close()

IMPORT_C void Close ( )
Close the session
Since
Series 60 3.1

CloseFile(const TFid, TUint)

IMPORT_C void CloseFile ( const TFid aFid,
TUint aFlags
)
Tells Remote File Engine that a file has been closed
Since
Series 60 3.1

Parameters

const TFid aFid Fid of the file that was closed
TUint aFlags whether the file has been changed

Connect()

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

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

IMPORT_C TInt CreateFile ( TFid aParentFid,
const TDesC & aFileName,
TUint aMode,
TUint aExcl,
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 aParentFid Fid of the parent directory.
const TDesC & aFileName The name of the new file.
TUint aMode The mode in which the file will be opened.
TUint aExcl Boolean indicating whether it is ok to overwrite an existing file. (ETrue = exclusive = no overwriting)
TFid & aNewFid Upon 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 TInt Fetch ( TFid aFileFid,
TInt aFirstByte,
TInt aLastByte,
TInt & aCachedBytes
)
Issue requet to fetch and cache a file or a directory
Since
Series 60 3.1

Parameters

TFid aFileFid the fid of the file to be cached
TInt aFirstByte the first byte to be cached (0 for dirs)
TInt aLastByte the last byte to be cached (0 for dirs)
TInt & aCachedBytes upon succesful return, the number of bytes cached after this fetch

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

IMPORT_C TInt FetchData ( TFid aFileFid,
TInt aFirstByte,
TInt aLastByte,
TDes & aTempFileName,
TBool & aUseTempPath
)
Issue request to fetch data without permanent caching.
Since
Series 60 3.1

Parameters

TFid aFileFid the fid of the file to be fetched
TInt aFirstByte the first byte to be fetched
TInt aLastByte the last byte to be fetched
TDes & aTempFileName the path of the temp file where the data will be stored
TBool & aUseTempPath FALSE 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 TInt Flush ( const TFid aFid,
TInt aFirstByte,
TInt aDataLength,
TInt aTotalSize
)
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 aFid Fid of the file to be flushed
TInt aFirstByte the first byte to be flushed
TInt aDataLength
TInt aTotalSize the full size of the file

FlushCache(TFid &)

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

Parameters

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

GetAttributes(TFid, TEntry &)

IMPORT_C TInt GetAttributes ( TFid aFileFid,
TEntry & aAttributes
)
Issue request to fetch file or directory attributes.
Since
Series 60 3.1

Parameters

TFid aFileFid Fid of the file.
TEntry & aAttributes On success, contains the file attributes (TEntry::iName is not filled)

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

IMPORT_C TInt Lookup ( TFid aParentFid,
const TDesC & aName,
TUint aNodeType,
TFid & aFid
)
finds the fid of a file system object
Since
Series 60 3.1

Parameters

TFid aParentFid fid of the parent directory
const TDesC & aName name of the child to be looked up
TUint aNodeType is the type of the child, KNodeTypeUnknown,KNodeTypeFile or KNodeTypeDir (also a trailing backslash in the name indicates KNodeTypeDir)
TFid & aFid upon successful return contains the fid of the object to be looked up

MakeDirectory(TFid, const TDesC &)

IMPORT_C TInt MakeDirectory ( TFid aParentFid,
const TDesC & aDirName
)
Issue request to make a directory.
Since
Series 60 3.1

Parameters

TFid aParentFid Fid of the parent directory.
const TDesC & aDirName The name of the new directory.

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

IMPORT_C TInt MoveFids ( TFid aSourceFid,
const TDesC & aSourceName,
TFid aDestFid,
const TDesC & aDestName,
TBool aOverWrite
)
Issue request to rename or replace a file or a directory
Since
Series 60 3.1

Parameters

TFid aSourceFid Fid of the source file's parent directory
const TDesC & aSourceName The name of the object to be renamed (for dirs must have a trailing backslash)
TFid aDestFid Fid of the destination directory
const TDesC & aDestName The name of the target object (for dirs must have a trailing backslash)
TBool aOverWrite

OkToWrite(TFid, TUint, TBool &)

IMPORT_C TInt OkToWrite ( TFid aFid,
TUint aBytes,
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 aFid fid of the file whose data will be written
TUint aBytes the number of bytes to be written
TBool & aOkToWrite

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

IMPORT_C TInt OpenByPath ( TFid aFid,
TDes & aContainerPath,
TDirEntAttr * aAttr,
TBool aTrueOpen
)
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 aFid Fid of the file or directory.
TDes & aContainerPath
TDirEntAttr * aAttr aAttr.iAtt: Open mode, controls acquiring locks etc. on return, contains size etc.
TBool aTrueOpen Whether 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 TInt RemoveDirectory ( TFid aParentFid,
const TDesC & aDirName
)
Issue request to remove a directory.
Since
Series 60 3.1

Parameters

TFid aParentFid Fid of the parent directory.
const TDesC & aDirName The name of the directory to be removed.

RemoveFile(TFid, const TDesC &)

IMPORT_C TInt RemoveFile ( TFid aParentFid,
const TDesC & aFileName
)
Issue request to remove a file.
Since
Series 60 3.1

Parameters

TFid aParentFid Fid of the parent directory.
const TDesC & aFileName The name of the file to be removed.

RfeInit(TFid &)

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

Parameters

TFid & aRootFid

SendRequest(TInt, TInt, TIpcArgs)

TInt SendRequest ( TInt aOpCode,
TInt aDrive,
TIpcArgs aArgs
) [private]

Parameters

TInt aOpCode
TInt aDrive
TIpcArgs aArgs

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

IMPORT_C TInt SetEntry ( TFid aFid,
const TTime & aTime,
TUint aSetAttMask,
TUint aClearAttMask
)
Issue request to set entry details for a specified file or directory.
Since
Series60 3.1

Parameters

TFid aFid Fid of the target file or directory
const TTime & aTime A reference to the time object holding the new universal modified time for aName.
TUint aSetAttMask Attribute mask for setting the entry's attributes.
TUint aClearAttMask Attribute mask for clearing the entry's attributes.

SetHighCachePriority(TFid &)

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

Parameters

TFid & aFid The fid of the file.

StartServer(const TDesC &)

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

Parameters

const TDesC & aServerName

Version()

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