fbs/fontandbitmapserver/sfbs/SESSION.CPP
branchRCL_3
changeset 163 bbf46f59e123
parent 150 57c618273d5c
child 164 25ffed67c7ef
equal deleted inserted replaced
150:57c618273d5c 163:bbf46f59e123
    17 #include "fbsdefs.h"
    17 #include "fbsdefs.h"
    18 #include "UTILS.H"
    18 #include "UTILS.H"
    19 #include "FBSVER.H"
    19 #include "FBSVER.H"
    20 #include "FbsRalc.h"
    20 #include "FbsRalc.h"
    21 #include "fbshelper.h"
    21 #include "fbshelper.h"
    22 #include "fbsmessage.h"
    22 #include "FbsMessage.H"
       
    23 #include <graphics/fbsoogmmessage.h>
    23 #include "OstTraceDefinitions.h"
    24 #include "OstTraceDefinitions.h"
    24 #include "fbstrace.h"
    25 #include "fbstrace.h"
    25 #ifdef OST_TRACE_COMPILER_IN_USE
    26 #ifdef OST_TRACE_COMPILER_IN_USE
    26 #include "SESSIONTraces.h"
    27 #include "SESSIONTraces.h"
    27 #endif
    28 #endif
    28 
       
    29 
    29 
    30 GLDEF_C void Panic(TFbsPanic aPanic)
    30 GLDEF_C void Panic(TFbsPanic aPanic)
    31 	{
    31 	{
    32 	_LIT(KFBSERVClientPanicCategory,"FBSCLI");
    32 	_LIT(KFBSERVClientPanicCategory,"FBSCLI");
    33 	User::Panic(KFBSERVClientPanicCategory,aPanic);
    33 	User::Panic(KFBSERVClientPanicCategory,aPanic);
   283 @internalComponent
   283 @internalComponent
   284 */
   284 */
   285 EXPORT_C TInt RFbsSession::SendCommand(TInt aMessage,TInt aInt0,TInt aInt1,TInt aInt2,TInt aInt3) const
   285 EXPORT_C TInt RFbsSession::SendCommand(TInt aMessage,TInt aInt0,TInt aInt1,TInt aInt2,TInt aInt3) const
   286    {
   286    {
   287 	__ASSERT_ALWAYS(iConnections>0,Panic(EFbsPanicBadConnection));
   287 	__ASSERT_ALWAYS(iConnections>0,Panic(EFbsPanicBadConnection));
       
   288 
   288 	switch(aMessage)
   289 	switch(aMessage)
   289 		{
   290 		{
   290 	case EFbsMessShutdown:
   291 	case EFbsMessShutdown:
   291 	case EFbsMessClose:
   292 	case EFbsMessClose:
   292 		SetCallBackPtr(aMessage==EFbsMessClose ? &aInt1 : 0);
   293 		SetCallBackPtr(aMessage==EFbsMessClose ? &aInt1 : 0);
   293 		iCallBack.CallBack();
   294 		iCallBack.CallBack();
   294 	default:
   295 	default:
   295 		break;
   296 		break;
   296 		}
   297 		}
       
   298 
   297 	TInt ret = SendReceive(aMessage, TIpcArgs(aInt0,aInt1,aInt2,aInt3));
   299 	TInt ret = SendReceive(aMessage, TIpcArgs(aInt0,aInt1,aInt2,aInt3));
       
   300 
   298 	return(ret);
   301 	return(ret);
   299 	}
   302 	}
   300 
   303 
   301 TInt RFbsSession::SendCommand(TInt aMessage, const TIpcArgs& aArgs) const
   304 TInt RFbsSession::SendCommand(TInt aMessage, const TIpcArgs& aArgs) const
   302 	{
   305 	{
   533 TInt RFbsSession::ServerSessionHandle() const
   536 TInt RFbsSession::ServerSessionHandle() const
   534 	{
   537 	{
   535 	__ASSERT_ALWAYS(iConnections>0,Panic(EFbsPanicBadConnection));
   538 	__ASSERT_ALWAYS(iConnections>0,Panic(EFbsPanicBadConnection));
   536 	return iHelper->iServerSessionHandle;
   539 	return iHelper->iServerSessionHandle;
   537 	}
   540 	}
       
   541 
       
   542 EXPORT_C TInt RFbsSession::GetGlyphCacheMetrics( TGlyphCacheMetrics& aGlyphCacheMetrics )
       
   543     {
       
   544     TPckgBuf<TGlyphCacheMetrics> metrics;
       
   545     TIpcArgs args( &metrics );
       
   546 
       
   547     TInt ret = SendReceive( EFbsMessGetGlyphCacheMetrics, args );
       
   548     aGlyphCacheMetrics = metrics();
       
   549 
       
   550     return ret;
       
   551     }
       
   552 
       
   553 /**
       
   554  Perform the IPC to convey the desired OoGM action to the glyph atlas.
       
   555 
       
   556  @return KErrNone if IPC was successful. One of the system-wide error
       
   557          codes, as described for RSessionBase::SendReceive(), if not.
       
   558 
       
   559  @note The server-side platform security policy applied to this method is such that it is only useable by the GOoM framework.
       
   560 
       
   561  @param aOogmMessage. A reference to the class encapsulating the OoGM action required of the glyph atlas.
       
   562 */
       
   563 EXPORT_C TInt RFbsSession::ConveyOogmMessage( TFbsOogmMessage& aOogmMessage )
       
   564     {
       
   565     TPckgBuf<TFbsOogmMessage> oogmMessage;
       
   566     oogmMessage() = aOogmMessage;
       
   567     TIpcArgs args( &oogmMessage );
       
   568 
       
   569     return SendReceive( EFbsMessOogmNotification, args );
       
   570     }
   538 
   571 
   539 /**
   572 /**
   540 Returns the current sizes of the FBServ default heap, the heap for large bitmaps, 
   573 Returns the current sizes of the FBServ default heap, the heap for large bitmaps, 
   541 and the heap for small bitmaps.
   574 and the heap for small bitmaps.
   542 
   575