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> |
|
24 #include "OstTraceDefinitions.h" |
23 #include "OstTraceDefinitions.h" |
25 #include "fbstrace.h" |
24 #include "fbstrace.h" |
26 #ifdef OST_TRACE_COMPILER_IN_USE |
25 #ifdef OST_TRACE_COMPILER_IN_USE |
27 #include "SESSIONTraces.h" |
26 #include "SESSIONTraces.h" |
28 #endif |
27 #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 |
|
289 switch(aMessage) |
288 switch(aMessage) |
290 { |
289 { |
291 case EFbsMessShutdown: |
290 case EFbsMessShutdown: |
292 case EFbsMessClose: |
291 case EFbsMessClose: |
293 SetCallBackPtr(aMessage==EFbsMessClose ? &aInt1 : 0); |
292 SetCallBackPtr(aMessage==EFbsMessClose ? &aInt1 : 0); |
294 iCallBack.CallBack(); |
293 iCallBack.CallBack(); |
295 default: |
294 default: |
296 break; |
295 break; |
297 } |
296 } |
298 |
|
299 TInt ret = SendReceive(aMessage, TIpcArgs(aInt0,aInt1,aInt2,aInt3)); |
297 TInt ret = SendReceive(aMessage, TIpcArgs(aInt0,aInt1,aInt2,aInt3)); |
300 |
|
301 return(ret); |
298 return(ret); |
302 } |
299 } |
303 |
300 |
304 TInt RFbsSession::SendCommand(TInt aMessage, const TIpcArgs& aArgs) const |
301 TInt RFbsSession::SendCommand(TInt aMessage, const TIpcArgs& aArgs) const |
305 { |
302 { |
536 TInt RFbsSession::ServerSessionHandle() const |
533 TInt RFbsSession::ServerSessionHandle() const |
537 { |
534 { |
538 __ASSERT_ALWAYS(iConnections>0,Panic(EFbsPanicBadConnection)); |
535 __ASSERT_ALWAYS(iConnections>0,Panic(EFbsPanicBadConnection)); |
539 return iHelper->iServerSessionHandle; |
536 return iHelper->iServerSessionHandle; |
540 } |
537 } |
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 } |
|
571 |
538 |
572 /** |
539 /** |
573 Returns the current sizes of the FBServ default heap, the heap for large bitmaps, |
540 Returns the current sizes of the FBServ default heap, the heap for large bitmaps, |
574 and the heap for small bitmaps. |
541 and the heap for small bitmaps. |
575 |
542 |