RFbsSession Class Reference

class RFbsSession : protected RSessionBase

A session with the font and bitmap server.

Inherits from

Public Member Functions
RFbsSession ()
TInt AllocScanLineBuffer ( TInt )
IMPORT_C void CallBack ()
IMPORT_C TInt Connect ()
IMPORT_C TInt Connect ( RFs &)
IMPORT_C void Disconnect ()
HBufC8 * GetDecompressionBuffer ( TInt )
HBufC8 * GetExtraBuffer ( TInt )
IMPORT_C TInt GetHeapSizes ( TInt &, TInt &, TInt &)
HBufC8 * GetScanLineBuffer ()
IMPORT_C RFbsSession * GetSession ()
IMPORT_C TUint8 * HeapBase ()
IMPORT_C void ResetCallBack ()
IMPORT_C TInt ResourceCount ()
IMPORT_C TInt SendCommand ( TInt , TInt , TInt , TInt , TInt )
TInt SendCommand ( TInt , const TIpcArgs &)
void SendCommand ( TInt , const TIpcArgs &, TRequestStatus &)
TInt ServerSessionHandle ()
TInt SessionHandle ()
IMPORT_C void SetCallBack ( TCallBack )
void SetCallBackPtr ( TInt *)
IMPORT_C TVersion Version ()
Private Member Functions
TInt DoAlloc ( RFbsSession *&)
TInt DoConnect ( RFs &)
RFs & FileServer ()
TBool LookupBitmapInROM (const TDesC &, TAny *&)
Inherited Functions
RHandleBase::Attributes()const
RHandleBase::BTraceId()const
RHandleBase::Close()
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()
Public Member Enumerations
enum THeapFailType { EHeapFailTypeServerMemory , EHeapFailTypeHeapMemory }
Inherited Enumerations
RHandleBase:TAttributes
RSessionBase:TAttachMode
Private Attributes
TCallBack iCallBack
TInt iConnections
HBufC8 * iDecompressionBuffer
RFs iFileServer
CFbsSessionHelper * iHelper
RChunk iLargeBitmapChunk
CFbsRalCache * iRomFileAddrCache
HBufC8 * iScanLineBuffer
RChunk iSharedChunk
TUint32 * iSpare
Inherited Attributes
RHandleBase::iHandle

Constructor & Destructor Documentation

RFbsSession()

IMPORT_C RFbsSession ( )

Member Functions Documentation

AllocScanLineBuffer(TInt)

TInt AllocScanLineBuffer ( TInt aSize )

Allocates the buffer for decoding compressed rom bitmaps.

Internal use only.

Parameters

TInt aSize Minimum size of the buffer required. If the buffer is too small an attempt to resize it will be made.

CallBack()

IMPORT_C void CallBack ( )

Triggers the most recently registered callback. This is mainly called by bitmaps when their twips size changes and when any FBSERV objects are closed to notify clients of a change that may affect their operation.

Connect()

IMPORT_C TInt Connect ( ) [static]

Creates a session with the Font and Bitmap server.

Connect(RFs &)

IMPORT_C TInt Connect ( RFs & aFileServer ) [static]

Creates a session with the Font and Bitmap server.

Parameters

RFs & aFileServer A fuly constructed file server session

Disconnect()

IMPORT_C void Disconnect ( ) [static]

Closes the session with the Font and Bitmap server.

DoAlloc(RFbsSession *&)

TInt DoAlloc ( RFbsSession *& aNewSession ) [private, static]

Parameters

RFbsSession *& aNewSession

DoConnect(RFs &)

TInt DoConnect ( RFs & aFileServer ) [private]

Do actual connect as common to both Connect() and Connect(RFs& aFileServer) . Store fully constructed file server session to iSpare member variable Connect()

Parameters

RFs & aFileServer

FileServer()

RFs & FileServer ( ) [private, inline]

GetDecompressionBuffer(TInt)

HBufC8 * GetDecompressionBuffer ( TInt aSize )

Gets a pointer to the buffer currently in use for decoding compressed mask bitmaps.

Internal use only.

Parameters

TInt aSize Minimum size of the buffer required. If the buffer is too small an attempt to resize it will be made.

GetExtraBuffer(TInt)

HBufC8 * GetExtraBuffer ( TInt aSize )

Gets a pointer to an extra buffer for general use.

Internal use only.

Parameters

TInt aSize Minimum size of the buffer required. If the buffer is too small an attempt to resize it will be made.

GetHeapSizes(TInt &, TInt &, TInt &)

IMPORT_C TInt GetHeapSizes ( TInt & aDefaultHeap,
TInt & aSmallBmpHeap,
TInt & aBigBmpChunk
)

Returns the current sizes of the FBServ default heap, the heap for large bitmaps, and the heap for small bitmaps.

Not supported in release builds.

Test

Parameters

TInt & aDefaultHeap
TInt & aSmallBmpHeap
TInt & aBigBmpChunk

GetScanLineBuffer()

HBufC8 * GetScanLineBuffer ( )

Gets a reference to the buffer currently in use for decoding compressed rom bitmaps.

Internal use only.

GetSession()

IMPORT_C RFbsSession * GetSession ( ) [static]

Gets the current Font and Bitmap server session.

HeapBase()

IMPORT_C TUint8 * HeapBase ( ) const

Gets the address of first location in the global shared heap containing fonts and bitmaps.

LookupBitmapInROM(const TDesC &, TAny *&)

TBool LookupBitmapInROM ( const TDesC & aFilename,
TAny *& aAddr
) [private]

Parameters

const TDesC & aFilename
TAny *& aAddr

ResetCallBack()

IMPORT_C void ResetCallBack ( )

Resets the callback.

ResourceCount()

IMPORT_C TInt ResourceCount ( )

Returns the number of Font and Bitmap Server objects currently in use by this session.

SendCommand(TInt, TInt, TInt, TInt, TInt)

IMPORT_C TInt SendCommand ( TInt aMessage,
TInt aInt0 = 0,
TInt aInt1 = 0,
TInt aInt2 = 0,
TInt aInt3 = 0
) const

Utility function for passing commands to the server.

Parameters

TInt aMessage Integer code for the message to pass - see TFbsMessage.
TInt aInt0 = 0 Parameter 0 for the message.
TInt aInt1 = 0 Parameter 1 for the message.
TInt aInt2 = 0 Parameter 2 for the message.
TInt aInt3 = 0 Parameter 3 for the message.

SendCommand(TInt, const TIpcArgs &)

TInt SendCommand ( TInt aMessage,
const TIpcArgs & aArgs
) const

Parameters

TInt aMessage
const TIpcArgs & aArgs

SendCommand(TInt, const TIpcArgs &, TRequestStatus &)

void SendCommand ( TInt aMessage,
const TIpcArgs & aArgs,
TRequestStatus & aStatus
) const

Parameters

TInt aMessage
const TIpcArgs & aArgs
TRequestStatus & aStatus

ServerSessionHandle()

TInt ServerSessionHandle ( ) const
Returns a handle assigned to this session by the server upon connection. This method should be used instead of SessionHandle() when passing a session handle to FbServ APIs that require Session handles.
Pre-condition
The session has successfully connected to the server.

SessionHandle()

TInt SessionHandle ( ) const [inline]

SetCallBack(TCallBack)

IMPORT_C void SetCallBack ( TCallBack aCallBack )

Sets the callback.

Parameters

TCallBack aCallBack callback object to be called by CallBack(). Only one may be in use at a time and subsequent calls will displace previous calls.

SetCallBackPtr(TInt *)

void SetCallBackPtr ( TInt * aBitmapHandle ) const

Parameters

TInt * aBitmapHandle

Version()

IMPORT_C TVersion Version ( )

Gets the current Font and Bitmap server version.

Member Enumerations Documentation

Enum THeapFailType

WARNING: For internal use ONLY. Compatibility is not guaranteed in future releases. Used for testing server side out of memory failures. Test

Enumerators

EHeapFailTypeServerMemory
EHeapFailTypeHeapMemory

Member Data Documentation

TCallBack iCallBack

TCallBack iCallBack [private]

TInt iConnections

TInt iConnections [private]

HBufC8 * iDecompressionBuffer

HBufC8 * iDecompressionBuffer [private]

RFs iFileServer

RFs iFileServer [private]

CFbsSessionHelper * iHelper

CFbsSessionHelper * iHelper [private]

RChunk iLargeBitmapChunk

RChunk iLargeBitmapChunk [private]

CFbsRalCache * iRomFileAddrCache

CFbsRalCache * iRomFileAddrCache [private]

HBufC8 * iScanLineBuffer

HBufC8 * iScanLineBuffer [private]

RChunk iSharedChunk

RChunk iSharedChunk [private]

TUint32 * iSpare

TUint32 * iSpare [private]