voipplugins/sipmxresolver/src/sipmxresolver.cpp
branchRCL_3
changeset 10 7117cbf1600a
parent 0 a4daefaec16c
equal deleted inserted replaced
6:fc8c25e5a2e8 10:7117cbf1600a
    34 #include <sdpmediafield.h>
    34 #include <sdpmediafield.h>
    35 #include <sdpcodecstringpool.h>
    35 #include <sdpcodecstringpool.h>
    36 #include <sdpcodecstringconstants.h>
    36 #include <sdpcodecstringconstants.h>
    37 #include <sdpattributefield.h>
    37 #include <sdpattributefield.h>
    38 #include <sipstrings.h>
    38 #include <sipstrings.h>
       
    39 #include <sipallowheader.h>
       
    40 #include <sipsupportedheader.h>
    39 
    41 
    40 //For checking dynamic voip status and MuS availability
    42 //For checking dynamic voip status and MuS availability
    41 #include <featmgr.h>
    43 #include <featmgr.h>
    42 #include <centralrepository.h>
    44 #include <centralrepository.h>
    43 #include <settingsinternalcrkeys.h>
    45 #include <settingsinternalcrkeys.h>
    57 _LIT8( KMediaTypeApp, "application" );        	// For content-type header checks
    59 _LIT8( KMediaTypeApp, "application" );        	// For content-type header checks
    58 _LIT8( KMediaSubtypeSdp, "sdp" );            	// For content-type header checks
    60 _LIT8( KMediaSubtypeSdp, "sdp" );            	// For content-type header checks
    59 _LIT8( KSendOnly, "sendonly" );            		// For attribute checks
    61 _LIT8( KSendOnly, "sendonly" );            		// For attribute checks
    60 _LIT8( KApplicationAttr, "application" );   	// For attribute checks
    62 _LIT8( KApplicationAttr, "application" );   	// For attribute checks
    61 _LIT8( KXApplicationAttr, "X-application" );	// For attribute checks
    63 _LIT8( KXApplicationAttr, "X-application" );	// For attribute checks
    62 _LIT8( KNokiaRtvs, "com.nokia.rtvs" );       	// For attribute checks 
    64 _LIT8( KNokiaRtvs, "com.nokia.rtvs" );       	// For attribute checks
       
    65 _LIT8( KSIPMethodsInAllowHeader, "INVITE,ACK,CANCEL,OPTIONS,BYE,PRACK,SUBSCRIBE,REFER,NOTIFY,UPDATE");	// SIP Methods allowed by various plugins
       
    66 _LIT8( KSIPExtensionsSupported, "100rel,timer,sec-agree"); //Extensions supported by various plugins
    63 
    67 
    64 /**
    68 /**
    65  * Cleanup function for RPointerArray
    69  * Cleanup function for RPointerArray
    66  * Called in case of a leave in SupportedSdpMediasL
    70  * Called in case of a leave in SupportedSdpMediasL
    67  */
    71  */
   467 // ---------------------------------------------------------------------------
   471 // ---------------------------------------------------------------------------
   468 // CSipMXResolver::AddClientSpecificHeadersForOptionsResponseL
   472 // CSipMXResolver::AddClientSpecificHeadersForOptionsResponseL
   469 // ---------------------------------------------------------------------------
   473 // ---------------------------------------------------------------------------
   470 // 
   474 // 
   471 void CSipMXResolver::AddClientSpecificHeadersForOptionsResponseL(
   475 void CSipMXResolver::AddClientSpecificHeadersForOptionsResponseL(
   472     RPointerArray<CSIPHeaderBase>& /*aHeaders*/ )
   476     RPointerArray<CSIPHeaderBase>& aHeaders )
   473     {
   477     {
       
   478     SIPMXRLOG( "[SIPMXRESOLVER] -> \
       
   479     CSipMXResolver::AddClientSpecificHeadersForOptionsResponseL()" )
       
   480 	//Add Allow Header		
       
   481 	RPointerArray<CSIPAllowHeader> allowheaders = 
       
   482 	    CSIPAllowHeader::DecodeL(KSIPMethodsInAllowHeader);
       
   483 	TInt count = allowheaders.Count();
       
   484 	for(TInt i = 0; i<count; i++)
       
   485 		{
       
   486 		User::LeaveIfError(aHeaders.Append(allowheaders[i]));
       
   487 		}
       
   488 	allowheaders.Reset();
       
   489 
       
   490 	//Add Supported Header
       
   491 	RPointerArray<CSIPSupportedHeader> supportedheaders = 
       
   492 	    CSIPSupportedHeader::DecodeL(KSIPExtensionsSupported);
       
   493 	count = supportedheaders.Count();
       
   494 	for(TInt j = 0; j<count; j++)
       
   495 		{
       
   496 		User::LeaveIfError(aHeaders.Append(supportedheaders[j]));
       
   497 		}
       
   498 	supportedheaders.Reset();
   474     }
   499     }
   475 
   500 
   476 
   501 
   477 // ---------------------------------------------------------------------------
   502 // ---------------------------------------------------------------------------
   478 // CSipMXResolver::IsCsCallActive
   503 // CSipMXResolver::IsCsCallActive