connectivitylayer/isce/isicommunicationmanager_dll/src/isicommunicationmanager.cpp
changeset 7 fa67e03b87df
parent 5 8ccc39f9d787
child 9 8486d82aef45
equal deleted inserted replaced
6:942573423a60 7:fa67e03b87df
    15 *
    15 *
    16 */
    16 */
    17 
    17 
    18 
    18 
    19 #include <kernel.h>                       // For Kern
    19 #include <kernel.h>                       // For Kern
    20 #include "isicommunicationmanager.h"      // For DISINameService
    20 #include "isicommunicationmanager.h"      // For DISICommunicationManager
    21 #include "misiobjectrouterif.h"           // For MISIObjectRouterIf
    21 #include "misiobjectrouterif.h"           // For MISIObjectRouterIf
    22 #include "isicommunicationmanagertrace.h" // For C_TRACE, ASSERT_RESET.. and fault codes
    22 #include "isicommunicationmanagertrace.h" // For C_TRACE, ASSERT_RESET.. and fault codes
    23 #include "memapi.h"                       // For MemApi
    23 #include "memapi.h"                       // For MemApi
    24 #include <phonetisi.h>                    // For ISI_HEADER_SIZE
    24 #include <phonetisi.h>                    // For ISI_HEADER_SIZE
    25 #include <pn_const.h>                     // For PN_OBJ_ROUTING_REQ...
    25 #include <pn_const.h>                     // For PN_OBJ_ROUTING_REQ...
    26 #include "nsisi.h"                        // For PN_NAMESERVICE
    26 #include "nsisi.h"                        // For PN_NAMESERVICE
    27 #include "misiobjectrouterif.h"           // For MISIObjectRouterIf
    27 #ifdef INTERNAL_FLAG_ISI_ROUTER_IN_USE
       
    28 #include "isihelpers.h"                   // For SET_RECEIVER_OBJ...
       
    29 #include "isirouter.h"                    // For GetDFCThread
       
    30 #else
       
    31 //#include "misiobjectrouterif.h"           // For MISIObjectRouterIf
       
    32 #include "isaaccessextension.h"           // For DIsaAccessExtension
       
    33 
    28 #include "iadhelpers.h"                   // For SET_RECEIVER_OBJ...
    34 #include "iadhelpers.h"                   // For SET_RECEIVER_OBJ...
       
    35 #endif
    29 #include <iscnokiadefinitions.h>          // For THIS_DEVICE
    36 #include <iscnokiadefinitions.h>          // For THIS_DEVICE
    30 #include "isaaccessextension.h"           // For DIsaAccessExtension
       
    31 #include "isiindicationhandler.h"         // For DISIIndicationHandler
    37 #include "isiindicationhandler.h"         // For DISIIndicationHandler
    32 #include "ape_commgrisi.h"                // For APE_COMMGR..
    38 #include "ape_commgrisi.h"                // For APE_COMMGR..
       
    39 #include "misicommunicationmanagerif.h"   // For MISICommunicationManagerIf
       
    40 #include <commisi.h>                      // For Common messages
    33 
    41 
    34 
    42 
    35 // Faults
    43 // Faults
    36 enum TISICommunicationManagerFaults
    44 enum TISICommunicationManagerFaults
    37     {
    45     {
    39     EISICommunicationManagerMemAllocFailure1,
    47     EISICommunicationManagerMemAllocFailure1,
    40     EISICommunicationManagerNullPointer,
    48     EISICommunicationManagerNullPointer,
    41     EISICommunicationManagerUnknownMessage,
    49     EISICommunicationManagerUnknownMessage,
    42     EISICommunicationManagerMutexCreateFailed,
    50     EISICommunicationManagerMutexCreateFailed,
    43     EISICommunicationManagerMutexWaitFailed,
    51     EISICommunicationManagerMutexWaitFailed,
       
    52     EISICommunicationManagerWrongMessageOrder,
    44     };
    53     };
    45 
    54 
    46 
    55 
    47 /* PUTB8 macro writes byte value to given address.
    56 /* PUTB8 macro writes byte value to given address.
    48  * This macro is used mainly by other PUTBXX macros.
    57  * This macro is used mainly by other PUTBXX macros.
   101 _LIT8( KCommunicationManagerMutex, "KCommunicationManagerMutex" );
   110 _LIT8( KCommunicationManagerMutex, "KCommunicationManagerMutex" );
   102 
   111 
   103 const TUint32 KCommunicationManagerUID( 0x2002B3D0 );
   112 const TUint32 KCommunicationManagerUID( 0x2002B3D0 );
   104 const TUint8 KFiller( 0 );
   113 const TUint8 KFiller( 0 );
   105 const TInt KInitDfcPriority( 7 );
   114 const TInt KInitDfcPriority( 7 );
   106 
   115 const TUint8 KDone( 0 );
   107 
   116 
   108 DISICommunicationManager::DISICommunicationManager(
   117 DISICommunicationManager::DISICommunicationManager(
   109         // None
   118         // None
   110         )
   119         )
   111     : iObjId( 0x00 )
   120     : iObjId( 0x00 ),
       
   121       iBootMsgCount( 0x04 ) // 2xRESP, 2xIND
   112     {
   122     {
   113     C_TRACE( ( _T( "DISICommunicationManager::DISICommunicationManager 0x%x 0x%x>" ), iObjId, iRouter ) );
   123     C_TRACE( ( _T( "DISICommunicationManager::DISICommunicationManager 0x%x 0x%x>" ), iObjId, iRouter ) );
   114     iRouter = MISIObjectRouterIf::Connect( KCommunicationManagerUID, iObjId, this );
   124     iRouter = MISIObjectRouterIf::Connect( KCommunicationManagerUID, iObjId, this );
   115     ASSERT_RESET_ALWAYS( iRouter, ( EISICommunicationManagerNullPointer | EDISICommunicationManagerTraceId << KClassIdentifierShift ) );
   125     ASSERT_RESET_ALWAYS( iRouter, ( EISICommunicationManagerNullPointer | EDISICommunicationManagerTraceId << KClassIdentifierShift ) );
   116     // Must be > KMutexOrdGeneral1 for nesting purposes because trx shared memory uses KMutexOrdGeneral1
   126     // Must be > KMutexOrdGeneral1 for nesting purposes because trx shared memory uses KMutexOrdGeneral1
   117     TInt err( Kern::MutexCreate( iCommunicationManagerMutex, KCommunicationManagerMutex, KMutexOrdGeneral2 ) );
   127     TInt err( Kern::MutexCreate( iCommunicationManagerMutex, KCommunicationManagerMutex, KMutexOrdGeneral2 ) );
   118     ASSERT_RESET_ALWAYS( ( KErrNone == err ), ( EISICommunicationManagerMutexCreateFailed | EDISICommunicationManagerTraceId << KClassIdentifierShift ) );
   128     ASSERT_RESET_ALWAYS( ( KErrNone == err ), ( EISICommunicationManagerMutexCreateFailed | EDISICommunicationManagerTraceId << KClassIdentifierShift ) );
       
   129 #ifdef INTERNAL_FLAG_ISI_ROUTER_IN_USE    
       
   130     iInitDfc = new TDfc( InitDfc, this, iRouter->GetDfcThread( MISIObjectRouterIf::EISIKernelMainThread ), KInitDfcPriority );
       
   131 #else
   119     iInitDfc = new TDfc( InitDfc, this, DIsaAccessExtension::GetDFCThread( EIADExtensionDfcQueue ), KInitDfcPriority );
   132     iInitDfc = new TDfc( InitDfc, this, DIsaAccessExtension::GetDFCThread( EIADExtensionDfcQueue ), KInitDfcPriority );
       
   133 #endif    
   120     ASSERT_RESET_ALWAYS( iInitDfc, ( EISICommunicationManagerMemAllocFailure | EDISICommunicationManagerTraceId << KClassIdentifierShift ) );
   134     ASSERT_RESET_ALWAYS( iInitDfc, ( EISICommunicationManagerMemAllocFailure | EDISICommunicationManagerTraceId << KClassIdentifierShift ) );
   121     iISIIndicationHandler = new DISIIndicationHandler( iRouter );
   135     iISIIndicationHandler = new DISIIndicationHandler( iRouter );
   122     ASSERT_RESET_ALWAYS( iISIIndicationHandler, ( EISICommunicationManagerMemAllocFailure1 | EDISICommunicationManagerTraceId << KClassIdentifierShift ) );
   136     ASSERT_RESET_ALWAYS( iISIIndicationHandler, ( EISICommunicationManagerMemAllocFailure1 | EDISICommunicationManagerTraceId << KClassIdentifierShift ) );
   123     iInitDfc->Enque();
   137     iInitDfc->Enque();
   124     C_TRACE( ( _T( "DISICommunicationManager::DISICommunicationManager 0x%x 0x%x<" ), iObjId, iRouter ) );
   138     C_TRACE( ( _T( "DISICommunicationManager::DISICommunicationManager 0x%x 0x%x<" ), iObjId, iRouter ) );
   162     TDes8& addMsg2 = MemApi::AllocBlock( msgLength );
   176     TDes8& addMsg2 = MemApi::AllocBlock( msgLength );
   163     addMsg2.SetLength( msgLength );
   177     addMsg2.SetLength( msgLength );
   164     addMsg2.Copy( addMsg );
   178     addMsg2.Copy( addMsg );
   165     TUint8* addPtr2 = const_cast<TUint8*>( addMsg2.Ptr() );
   179     TUint8* addPtr2 = const_cast<TUint8*>( addMsg2.Ptr() );
   166     PUTB32( &addPtr2[ ISI_HEADER_SIZE + PNS_NAME_ADD_REQ_OFFSET_NAMEENTRY + PN_NAME_SRV_ITEM_STR_OFFSET_NAME ], PN_APE_COMMGR );
   180     PUTB32( &addPtr2[ ISI_HEADER_SIZE + PNS_NAME_ADD_REQ_OFFSET_NAMEENTRY + PN_NAME_SRV_ITEM_STR_OFFSET_NAME ], PN_APE_COMMGR );
       
   181     //Register PN_APE_COMMGR and PN_COMMGR
   167     iRouter->Send( addMsg, PN_OBJ_EVENT_MULTICAST );
   182     iRouter->Send( addMsg, PN_OBJ_EVENT_MULTICAST );
   168     iRouter->Send( addMsg2, PN_OBJ_EVENT_MULTICAST );
   183     iRouter->Send( addMsg2, PN_OBJ_EVENT_MULTICAST );
   169     C_TRACE( ( _T( "DISICommunicationManager::SendNameAddReqs<" ) ) );    
   184     C_TRACE( ( _T( "DISICommunicationManager::SendNameAddReqs<" ) ) );    
   170     }
   185     }
   171 
   186 
   181         iISIIndicationHandler = NULL;
   196         iISIIndicationHandler = NULL;
   182         }
   197         }
   183     iInitDfc->Cancel();
   198     iInitDfc->Cancel();
   184     delete iInitDfc;
   199     delete iInitDfc;
   185     iInitDfc = NULL;
   200     iInitDfc = NULL;
       
   201     if( iCommunicationManagerMutex )
       
   202         {
       
   203         ((DObject*)iCommunicationManagerMutex)->Close( NULL );
       
   204         }
   186     iCommunicationManagerMutex = NULL;
   205     iCommunicationManagerMutex = NULL;
   187     C_TRACE( ( _T( "DISICommunicationManager::~DISICommunicationManager<" ) ) );
   206     C_TRACE( ( _T( "DISICommunicationManager::~DISICommunicationManager<" ) ) );
   188     }
   207     }
   189 
   208 
   190 
   209 
   191 void DISICommunicationManager::Receive( const TDesC8& aMessage )
   210 void DISICommunicationManager::Receive( const TDesC8& aMessage )
   192     {
   211     {
   193     C_TRACE( ( _T( "DISICommunicationManager::Receive 0x%x>" ), &aMessage ) );
   212     C_TRACE( ( _T( "DISICommunicationManager::Receive 0x%x>" ), &aMessage ) );
   194     TInt err( Kern::MutexWait( *iCommunicationManagerMutex ) );
   213     TInt err( Kern::MutexWait( *iCommunicationManagerMutex ) );
   195     ASSERT_RESET_ALWAYS( ( KErrNone == err ), ( EISICommunicationManagerMutexWaitFailed | EDISICommunicationManagerTraceId << KClassIdentifierShift ) );
   214     ASSERT_RESET_ALWAYS( ( KErrNone == err ), ( EISICommunicationManagerMutexWaitFailed | EDISICommunicationManagerTraceId << KClassIdentifierShift ) );
   196     //TODO check nameadd resps for own nameadd success
       
   197     for( TInt i( 0 ); i < aMessage.Length(); i++ )
       
   198         {
       
   199         C_TRACE( ( _T( "index[ %d ] data 0x%x"), i, aMessage.Ptr()[i] ) );
       
   200         }
       
   201     
       
   202     const TUint8* msgPtr( aMessage.Ptr() );
   215     const TUint8* msgPtr( aMessage.Ptr() );
   203     TDes8* blockPtr = reinterpret_cast<TDes8*>( const_cast<TDesC8*>(&aMessage) );
   216     TDes8* blockPtr = reinterpret_cast<TDes8*>( const_cast<TDesC8*>(&aMessage) );
   204     
   217     if( iBootMsgCount == KDone )
   205     switch( msgPtr[ ISI_HEADER_OFFSET_RESOURCEID ] )
   218         {
   206         {
   219         if( msgPtr[ ISI_HEADER_OFFSET_MESSAGEID ] == COMMON_MESSAGE )
   207         case PN_COMMGR:
   220             {
   208             {
   221             switch( msgPtr[ ISI_HEADER_OFFSET_SUBMESSAGEID ] )
   209             C_TRACE( ( _T( "DISICommunicationManager message to PN_COMMGR" ) ) );
       
   210             break;
       
   211             }
       
   212         case PN_APE_COMMGR: //PN_APE_COMMGR
       
   213             {
       
   214             if( msgPtr[ ISI_HEADER_OFFSET_MESSAGEID ] == APE_COMMGR_SUBSCRIBE_REQ )
       
   215                 {
   222                 {
   216                 SendPNSSubscribeResp( *blockPtr );
   223                 case COMM_ISA_ENTITY_NOT_REACHABLE_RESP:
   217                 if( msgPtr[ ISI_HEADER_OFFSET_SENDERDEVICE ] == PN_DEV_OWN )
       
   218                     {
   224                     {
   219            	        C_TRACE( ( _T( "DISICommunicationManager PNS_SUBSCRIBE_REQ from APE" ) ) );
   225                     C_TRACE( ( _T( "DISICommunicationManager::Received not reachable resp" ) ) );
   220                     iISIIndicationHandler->Subscribe( *blockPtr );
   226                     break;
   221                     }
   227                     }
       
   228                 case COMM_ISI_VERSION_GET_REQ:
       
   229                     {
       
   230                     C_TRACE( ( _T( "DISICommunicationManager::Received version get req" ) ) );
       
   231                     SendCommIsiVersionGetResp( *blockPtr );
       
   232                     break;
       
   233                     }
       
   234                 default:
       
   235                     {
       
   236                     C_TRACE( ( _T( "DISICommunicationManager::Received unknown common message" ) ) );
       
   237                     SendCommServiceNotIdentifiedResp( *blockPtr );
       
   238                     break;
       
   239                     }
       
   240                 }
       
   241             }
       
   242         else if( ( msgPtr[ ISI_HEADER_OFFSET_RESOURCEID ] == PN_APE_COMMGR )
       
   243             || ( msgPtr[ ISI_HEADER_OFFSET_RESOURCEID ] == PN_COMMGR ) )
       
   244             {
       
   245             C_TRACE( ( _T( "DISICommunicationManager::Receive subscription" ) ) );
       
   246             SendPnsSubscribeResp( *blockPtr );
       
   247             if( msgPtr[ ISI_HEADER_OFFSET_SENDERDEVICE ] == PN_DEV_OWN )
       
   248                 {
       
   249        	        C_TRACE( ( _T( "DISICommunicationManager PNS_SUBSCRIBE_REQ from APE" ) ) );
       
   250                 iISIIndicationHandler->Subscribe( *blockPtr );
       
   251                 }
       
   252             }
       
   253         else
       
   254             {
       
   255             if( ( msgPtr[ ISI_HEADER_OFFSET_SENDERDEVICE ] != PN_DEV_OWN )
       
   256                 || ( MISICommunicationManagerIf::IsValidResource( *blockPtr ) ) )
       
   257                 {
       
   258                 C_TRACE( ( _T( "DISICommunicationManager::Receive indication" ) ) );
       
   259                 iISIIndicationHandler->Multicast( *blockPtr );
   222                 }
   260                 }
   223             else
   261             else
   224                 {
   262                 {
   225           	    C_TRACE( ( _T( "DISICommunicationManager unknown PN_APE_COMMGR message" ) ) );
   263                 C_TRACE( ( _T( "DISICommunicationManager not allowed resource from APE" ) ) );
   226                 }
   264                 }
   227             break;
   265             }
   228             }
   266         }
   229        default:
   267     else
   230            {
   268         {
   231            C_TRACE( ( _T( "DISICommunicationManager unknown message to communication manager" ) ) );
   269         C_TRACE( ( _T( "DISICommunicationManager not indication %d" ), iBootMsgCount ) );
   232            break;	
   270         // From PN_NAMESERVICE && ( IND || successfull RESP )
   233            }
   271         if( ( msgPtr[ ISI_HEADER_OFFSET_RESOURCEID ] == PN_NAMESERVICE )
       
   272             && ( msgPtr[ ISI_HEADER_SIZE + PNS_NAME_ADD_IND_OFFSET_SUBFUNCTION ]== PNS_NAME_ADD_IND
       
   273             || ( msgPtr[ ISI_HEADER_SIZE + PNS_NAME_ADD_RESP_OFFSET_SUBFUNCTION ]== PNS_NAME_ADD_RESP 
       
   274             && msgPtr[ ISI_HEADER_SIZE + PNS_NAME_ADD_RESP_OFFSET_REASON ] == PN_NAME_OK ) ) )
       
   275             {
       
   276             C_TRACE( ( _T( "DISICommunicationManager::Receive from NAMESERVICE message id 0x%x" ), msgPtr[ ISI_HEADER_SIZE + PNS_NAME_ADD_IND_OFFSET_SUBFUNCTION ]  ) );
       
   277             iBootMsgCount--;
       
   278             }
       
   279         else
       
   280             {
       
   281             ASSERT_RESET_ALWAYS( 0, ( EISICommunicationManagerWrongMessageOrder | EDISICommunicationManagerTraceId << KClassIdentifierShift ) );
       
   282             }
   234         }
   283         }
   235     MemApi::DeallocBlock( *blockPtr );
   284     MemApi::DeallocBlock( *blockPtr );
   236     Kern::MutexSignal( *iCommunicationManagerMutex );
   285     Kern::MutexSignal( *iCommunicationManagerMutex );
   237     C_TRACE( ( _T( "DISICommunicationManager::Receive<" ) ) );
   286     C_TRACE( ( _T( "DISICommunicationManager::Receive<" ) ) );
   238     }
   287     }
   239 
   288 
   240 void DISICommunicationManager::SendPNSSubscribeResp( const TDesC8& aMessage )
   289 void DISICommunicationManager::SendPnsSubscribeResp( const TDesC8& aMessage )
   241     {
   290     {
   242     C_TRACE( ( _T( "DISICommunicationManager::SendPNSSubscribeResp 0x%x>" ), &aMessage ) );
   291     C_TRACE( ( _T( "DISICommunicationManager::SendPnsSubscribeResp 0x%x>" ), &aMessage ) );
   243     TUint16 msgLength( ISI_HEADER_SIZE + SIZE_APE_COMMGR_SUBSCRIBE_RESP );
   292     TUint16 msgLength( ISI_HEADER_SIZE + SIZE_APE_COMMGR_SUBSCRIBE_RESP );
   244     TDes8& respMsg = MemApi::AllocBlock( msgLength );
   293     TDes8& respMsg = MemApi::AllocBlock( msgLength );
   245     respMsg.SetLength( msgLength );
   294     respMsg.SetLength( msgLength );
   246     TUint8* msgPtr = const_cast<TUint8*>( aMessage.Ptr() );
   295     TUint8* msgPtr = const_cast<TUint8*>( aMessage.Ptr() );
   247     TUint8* respPtr = const_cast<TUint8*>( respMsg.Ptr() );
   296     TUint8* respPtr = const_cast<TUint8*>( respMsg.Ptr() );
   248     respPtr[ ISI_HEADER_OFFSET_MEDIA ] = msgPtr[ ISI_HEADER_OFFSET_MEDIA ];
   297     respPtr[ ISI_HEADER_OFFSET_MEDIA ] = msgPtr[ ISI_HEADER_OFFSET_MEDIA ];
   249     SET_RECEIVER_DEV( respPtr, msgPtr[ ISI_HEADER_OFFSET_SENDERDEVICE ] );
   298     SET_RECEIVER_DEV( respPtr, GET_SENDER_DEV( aMessage ) );
   250     SET_SENDER_DEV( respPtr, PN_DEV_OWN );
   299     SET_SENDER_DEV( respPtr, PN_DEV_OWN );
   251     respPtr[ ISI_HEADER_OFFSET_RESOURCEID ] = PN_APE_COMMGR;
   300     respPtr[ ISI_HEADER_OFFSET_RESOURCEID ] = PN_APE_COMMGR;
   252     SET_LENGTH( respPtr, ( msgLength - PN_HEADER_SIZE ) );
   301     SET_LENGTH( respPtr, ( msgLength - PN_HEADER_SIZE ) );
   253     SET_RECEIVER_OBJ( respPtr, msgPtr[ ISI_HEADER_OFFSET_SENDEROBJECT ] );
   302     SET_RECEIVER_OBJ( respPtr, GET_SENDER_OBJ( aMessage ) );
   254     SET_SENDER_OBJ( respPtr, PN_OBJ_ROUTER );
   303     SET_SENDER_OBJ( respPtr, PN_OBJ_ROUTER );
   255     respPtr[ ISI_HEADER_SIZE + APE_COMMGR_SUBSCRIBE_RESP_OFFSET_TRANSID ] = msgPtr[ ISI_HEADER_OFFSET_TRANSID ];
   304     respPtr[ ISI_HEADER_SIZE + APE_COMMGR_SUBSCRIBE_RESP_OFFSET_TRANSID ] = msgPtr[ ISI_HEADER_OFFSET_TRANSID ];
   256     respPtr[ ISI_HEADER_SIZE + APE_COMMGR_SUBSCRIBE_RESP_OFFSET_MESSAGEID ] = APE_COMMGR_SUBSCRIBE_RESP;
   305     respPtr[ ISI_HEADER_SIZE + APE_COMMGR_SUBSCRIBE_RESP_OFFSET_MESSAGEID ] = APE_COMMGR_SUBSCRIBE_RESP;
   257     if( msgPtr[ ISI_HEADER_OFFSET_SENDERDEVICE ] == PN_DEV_OWN )
   306     if( msgPtr[ ISI_HEADER_OFFSET_SENDERDEVICE ] == PN_DEV_OWN )
   258         {
   307         {
   259         respPtr[ ISI_HEADER_SIZE + APE_COMMGR_SUBSCRIBE_RESP_OFFSET_RESULT ] = APE_COMMGR_OK;
   308         respPtr[ ISI_HEADER_SIZE + APE_COMMGR_SUBSCRIBE_RESP_OFFSET_RESULT ] = APE_COMMGR_OK;
   260         }
   309         }
   261     else
   310     else
   262         {
   311         {
   263         respPtr[ ISI_HEADER_SIZE + APE_COMMGR_SUBSCRIBE_RESP_OFFSET_RESULT ] = APE_COMMGR_NOT_ALLOWED;	
   312         respPtr[ ISI_HEADER_SIZE + APE_COMMGR_SUBSCRIBE_RESP_OFFSET_RESULT ] = APE_COMMGR_NOT_ALLOWED;	
   264         }
   313         }    
   265       
       
   266     
       
   267     for( TInt i( 0 ); i < respMsg.Length(); i++ )
       
   268         {
       
   269         C_TRACE( ( _T( "indeksi[ %d ] data 0x%x"), i, respMsg.Ptr()[i] ) );
       
   270         }
       
   271     
       
   272     iRouter->Send( respMsg, PN_OBJ_EVENT_MULTICAST );
   314     iRouter->Send( respMsg, PN_OBJ_EVENT_MULTICAST );
   273 	  C_TRACE( ( _T( "DISICommunicationManager::SendPNSSubscribeResp<" ) ) );
   315 	  C_TRACE( ( _T( "DISICommunicationManager::SendPnsSubscribeResp<" ) ) );
       
   316     }
       
   317 
       
   318 
       
   319 void DISICommunicationManager::SendCommServiceNotIdentifiedResp( const TDesC8& aMessage )
       
   320     {
       
   321     C_TRACE( ( _T( "DISICommunicationManager::SendCommServiceNotIdentifiedResp 0x%x>" ), &aMessage ) );
       
   322     TDes8& respMsg = MemApi::AllocBlock( ISI_HEADER_SIZE + SIZE_COMMON_MESSAGE_COMM_SERVICE_NOT_IDENTIFIED_RESP );
       
   323     TUint8* ptr( const_cast<TUint8*>( respMsg.Ptr() ) );
       
   324     const TUint8* msgPtr( aMessage.Ptr() );
       
   325     ptr[ ISI_HEADER_OFFSET_MEDIA ] = PN_MEDIA_ROUTING_REQ;
       
   326     SET_RECEIVER_DEV( ptr, GET_SENDER_DEV( aMessage ) );
       
   327     SET_SENDER_DEV( ptr, PN_DEV_OWN );
       
   328     ptr[ ISI_HEADER_OFFSET_RESOURCEID ] = PN_APE_COMMGR;
       
   329     SET_RECEIVER_OBJ( ptr, GET_SENDER_OBJ( aMessage ) );
       
   330     SET_SENDER_OBJ( ptr, PN_OBJ_EVENT_MULTICAST );
       
   331     ptr[ ISI_HEADER_SIZE + COMMON_MESSAGE_COMM_SERVICE_NOT_IDENTIFIED_RESP_OFFSET_TRANSACTIONID ] = 0x00;
       
   332     ptr[ ISI_HEADER_SIZE + COMMON_MESSAGE_COMM_SERVICE_NOT_IDENTIFIED_RESP_OFFSET_MESSAGEID ] = COMMON_MESSAGE;
       
   333     ptr[ ISI_HEADER_SIZE + COMMON_MESSAGE_COMM_SERVICE_NOT_IDENTIFIED_RESP_OFFSET_SUBMESSAGEID ] = COMM_SERVICE_NOT_IDENTIFIED_RESP;
       
   334     ptr[ ISI_HEADER_SIZE + COMMON_MESSAGE_COMM_SERVICE_NOT_IDENTIFIED_RESP_OFFSET_NOTSERVEDMESSAGEID ] = msgPtr[ ISI_HEADER_OFFSET_MESSAGEID ];
       
   335     ptr[ ISI_HEADER_SIZE + COMMON_MESSAGE_COMM_SERVICE_NOT_IDENTIFIED_RESP_OFFSET_FILLERBYTE1 ] = KFiller;
       
   336     ptr[ ISI_HEADER_SIZE + COMMON_MESSAGE_COMM_SERVICE_NOT_IDENTIFIED_RESP_OFFSET_NOTSERVEDSUBMESSAGEID ] = msgPtr[ ISI_HEADER_OFFSET_SUBMESSAGEID ];
       
   337     ptr[ ISI_HEADER_SIZE + COMMON_MESSAGE_COMM_SERVICE_NOT_IDENTIFIED_RESP_OFFSET_FILLERBYTE2 ] = KFiller;
       
   338     ptr[ ISI_HEADER_SIZE + COMMON_MESSAGE_COMM_SERVICE_NOT_IDENTIFIED_RESP_OFFSET_FILLERBYTE3 ] = KFiller;
       
   339     iRouter->Send( respMsg, PN_OBJ_EVENT_MULTICAST );
       
   340     C_TRACE( ( _T( "DISICommunicationManager::SendCommServiceNotIdentifiedResp<" ) ) );
       
   341     }
       
   342 
       
   343 
       
   344 void DISICommunicationManager::SendCommIsiVersionGetResp( const TDesC8& aMessage )
       
   345     {
       
   346     C_TRACE( ( _T( "DISICommunicationManager::SendCommIsiVersionGetResp 0x%x>" ), &aMessage ) );
       
   347     TDes8& respMsg = MemApi::AllocBlock( ISI_HEADER_SIZE + SIZE_COMMON_MESSAGE_COMM_ISI_VERSION_GET_RESP );
       
   348     TUint8* ptr( const_cast<TUint8*>( respMsg.Ptr() ) );
       
   349     const TUint8* msgPtr( aMessage.Ptr() );
       
   350     ptr[ ISI_HEADER_OFFSET_MEDIA ] = PN_MEDIA_ROUTING_REQ;
       
   351     SET_RECEIVER_DEV( ptr, GET_SENDER_DEV( aMessage ) );
       
   352     SET_SENDER_DEV( ptr, PN_DEV_OWN );
       
   353     ptr[ ISI_HEADER_OFFSET_RESOURCEID ] = PN_APE_COMMGR;
       
   354     SET_RECEIVER_OBJ( ptr, GET_SENDER_OBJ( aMessage ) );
       
   355     SET_SENDER_OBJ( ptr, PN_OBJ_EVENT_MULTICAST );
       
   356     ptr[ ISI_HEADER_SIZE + COMMON_MESSAGE_COMM_ISI_VERSION_GET_RESP_OFFSET_TRANSACTIONID ] = 0x00;
       
   357     ptr[ ISI_HEADER_SIZE + COMMON_MESSAGE_COMM_ISI_VERSION_GET_RESP_OFFSET_MESSAGEID ] = COMMON_MESSAGE;
       
   358     ptr[ ISI_HEADER_SIZE + COMMON_MESSAGE_COMM_ISI_VERSION_GET_RESP_OFFSET_SUBMESSAGEID ] = COMM_ISI_VERSION_GET_RESP;
       
   359     ptr[ ISI_HEADER_SIZE + COMMON_MESSAGE_COMM_ISI_VERSION_GET_RESP_OFFSET_ISIVERSIONZZZ ] = APE_COMMUNICATION_MANAGER_SERVER_ISI_VERSION_Z;
       
   360     ptr[ ISI_HEADER_SIZE + COMMON_MESSAGE_COMM_ISI_VERSION_GET_RESP_OFFSET_ISIVERSIONYYY ] = APE_COMMUNICATION_MANAGER_SERVER_ISI_VERSION_Y;
       
   361     ptr[ ISI_HEADER_SIZE + COMMON_MESSAGE_COMM_ISI_VERSION_GET_RESP_OFFSET_FILLERBYTE1 ] = KFiller;
       
   362     ptr[ ISI_HEADER_SIZE + COMMON_MESSAGE_COMM_ISI_VERSION_GET_RESP_OFFSET_FILLERBYTE2 ] = KFiller;
       
   363     ptr[ ISI_HEADER_SIZE + COMMON_MESSAGE_COMM_ISI_VERSION_GET_RESP_OFFSET_FILLERBYTE3 ] = KFiller;
       
   364     iRouter->Send( respMsg, PN_OBJ_EVENT_MULTICAST );
       
   365     C_TRACE( ( _T( "DISICommunicationManager::SendCommIsiVersionGetResp<" ) ) );
   274     }
   366     }
   275 
   367 
   276 
   368 
   277 DECLARE_STANDARD_EXTENSION()
   369 DECLARE_STANDARD_EXTENSION()
   278     {
   370     {