RFbsSession Class Reference

#include <fbs.h>

Link against: fbscli.lib

class RFbsSession : protected RSessionBase

Inherits from

  • RFbsSession
    Public Member Enumerations
    enumTHeapFailType { EHeapFailTypeServerMemory, EHeapFailTypeHeapMemory }
    Public Member Functions
    RFbsSession()
    TInt AllocScanLineBuffer(TInt)
    IMPORT_C voidCallBack()
    IMPORT_C TIntConnect()
    IMPORT_C TIntConnect(RFs &)
    IMPORT_C voidDisconnect()
    HBufC8 *GetDecompressionBuffer(TInt)
    HBufC8 *GetExtraBuffer(TInt)
    IMPORT_C TIntGetHeapSizes(TInt &, TInt &, TInt &)
    HBufC8 *GetScanLineBuffer()
    IMPORT_C RFbsSession *GetSession()
    IMPORT_C TUint8 *HeapBase()
    IMPORT_C voidResetCallBack()
    IMPORT_C TIntResourceCount()
    IMPORT_C TIntSendCommand(TInt, TInt, TInt, TInt, TInt)
    TInt SendCommand(TInt, const TIpcArgs &)
    voidSendCommand(TInt, const TIpcArgs &, TRequestStatus &)
    TInt ServerSessionHandle()
    TInt SessionHandle()
    IMPORT_C voidSetCallBack(TCallBack)
    voidSetCallBackPtr(TInt *)
    IMPORT_C TVersionVersion()
    Inherited Attributes
    RHandleBase::iHandle
    Inherited Enumerations
    RHandleBase:TAttributes
    RSessionBase:TAttachMode
    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()

    Detailed Description

    A session with the font and bitmap server.

    Member Enumeration 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

    Constructor & Destructor Documentation

    RFbsSession ( )

    IMPORT_CRFbsSession()

    Member Function Documentation

    AllocScanLineBuffer ( TInt )

    TInt AllocScanLineBuffer(TIntaSize)

    Allocates the buffer for decoding compressed rom bitmaps.

    Internal use only.

    ParameterDescription
    aSizeMinimum size of the buffer required. If the buffer is too small an attempt to resize it will be made.

    Returns: KErrNone if successful, KErrNoMemory if the buffer was too small and could not be expanded.

    CallBack ( )

    IMPORT_C voidCallBack()

    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 TIntConnect()[static]

    Creates a session with the Font and Bitmap server.

    Returns: KErrNone, if successful; KErrNoMemory if there is not enough memory to create the session; otherwise another of the system-wide error codes.

    Connect ( RFs & )

    IMPORT_C TIntConnect(RFs &aFileServer)[static]

    Creates a session with the Font and Bitmap server.

    ParameterDescription
    aFileServerA fuly constructed file server session

    Returns: KErrNone, if successful; KErrNoMemory if there is not enough memory to create the session; otherwise another of the system-wide error codes.

    Disconnect ( )

    IMPORT_C voidDisconnect()[static]

    Closes the session with the Font and Bitmap server.

    GetDecompressionBuffer ( TInt )

    HBufC8 *GetDecompressionBuffer(TIntaSize)

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

    Internal use only.

    ParameterDescription
    aSizeMinimum size of the buffer required. If the buffer is too small an attempt to resize it will be made.

    Returns: The buffer area currently in use or NULL if there is no memory.

    GetExtraBuffer ( TInt )

    HBufC8 *GetExtraBuffer(TIntaSize)

    Gets a pointer to an extra buffer for general use.

    Internal use only.

    ParameterDescription
    aSizeMinimum size of the buffer required. If the buffer is too small an attempt to resize it will be made.

    Returns: The buffer area currently in use or NULL if there is no memory.

    GetHeapSizes ( TInt &, TInt &, TInt & )

    IMPORT_C TIntGetHeapSizes(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

    Returns: KErrNone or one of the system wide error codes in debug mode, or KErrNotSupported in release mode.

    GetScanLineBuffer ( )

    HBufC8 *GetScanLineBuffer()

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

    Internal use only.

    Returns: The buffer area currently in use,

    GetSession ( )

    IMPORT_C RFbsSession *GetSession()[static]

    Gets the current Font and Bitmap server session.

    Returns: A pointer to the current session or NULL if Connect() has not been called yet.

    HeapBase ( )

    IMPORT_C TUint8 *HeapBase()const

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

    Returns: Pointer to the base of the shared heap.

    ResetCallBack ( )

    IMPORT_C voidResetCallBack()

    Resets the callback.

    ResourceCount ( )

    IMPORT_C TIntResourceCount()

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

    Returns: The number of resources in use: bitmaps, fonts, typeface stores.

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

    IMPORT_C TIntSendCommand(TIntaMessage,
    TIntaInt0 = 0,
    TIntaInt1 = 0,
    TIntaInt2 = 0,
    TIntaInt3 = 0
    )const

    Utility function for passing commands to the server.

    ParameterDescription
    aMessageInteger code for the message to pass - see TFbsMessage.
    aInt0Parameter 0 for the message.
    aInt1Parameter 1 for the message.
    aInt2Parameter 2 for the message.
    aInt3Parameter 3 for the message.

    Returns: Return code from RSessionBase::SendReceive().

    SendCommand ( TInt, const TIpcArgs & )

    TInt SendCommand(TIntaMessage,
    const TIpcArgs &aArgs
    )const

    SendCommand ( TInt, const TIpcArgs &, TRequestStatus & )

    voidSendCommand(TIntaMessage,
    const TIpcArgs &aArgs,
    TRequestStatus &aStatus
    )const

    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.

    Returns: A handle representing this session on the server.

    SessionHandle ( )

    TInt SessionHandle()const [inline]

    SetCallBack ( TCallBack )

    IMPORT_C voidSetCallBack(TCallBackaCallBack)

    Sets the callback.

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

    SetCallBackPtr ( TInt * )

    voidSetCallBackPtr(TInt *aBitmapHandle)const

    Version ( )

    IMPORT_C TVersionVersion()

    Gets the current Font and Bitmap server version.

    Returns: The current version of the server.