syncmlfw/common/alertqueue/src/NSmlDSAlertParser11.cpp
branchRCL_3
changeset 26 19bba8228ff0
parent 25 b183ec05bd8c
child 27 5cc2995847ea
equal deleted inserted replaced
25:b183ec05bd8c 26:19bba8228ff0
    22 #include <ecom.h>
    22 #include <ecom.h>
    23 #include <barsread.h>
    23 #include <barsread.h>
    24 #include <barsc.h>
    24 #include <barsc.h>
    25 #include <s32mem.h>
    25 #include <s32mem.h>
    26 #include <data_caging_path_literals.hrh>
    26 #include <data_caging_path_literals.hrh>
    27 #include <nsmldstypesres.rsg>
    27 #include <NSmlDSTypesRes.rsg>
    28 
    28 
    29 #include <nsmlconstants.h>
    29 #include <nsmlconstants.h>
    30 #include <nsmlunicodeconverter.h>
    30 #include <nsmlunicodeconverter.h>
    31 #include <nsmldsconstants.h>
    31 #include <nsmldsconstants.h>
    32 #include "nsmldshostclient.h"
    32 #include "nsmldshostclient.h"
   215 			
   215 			
   216 		}
   216 		}
   217 
   217 
   218 	SmlMetInfMetInf_t* metInf = NULL;
   218 	SmlMetInfMetInf_t* metInf = NULL;
   219 	TPtr8 mediaType( NULL, 0, 0 );
   219 	TPtr8 mediaType( NULL, 0, 0 );
   220 
   220 	
       
   221 	if ( aAlert->itemList->item->meta )
       
   222 		{
       
   223 		if ( aAlert->itemList->item->meta->content && 
       
   224 			aAlert->itemList->item->meta->contentType == SML_PCDATA_EXTENSION && 
       
   225 			aAlert->itemList->item->meta->extension == SML_EXT_METINF )
       
   226 			{
       
   227 			metInf = (SmlMetInfMetInf_t*) aAlert->itemList->item->meta->content;
       
   228 			
       
   229 			if ( metInf->type )
       
   230 				{
       
   231 				mediaType.Set( static_cast<TUint8*>( metInf->type->content ), metInf->type->length, metInf->type->length );
       
   232 				TrimRightSpaceAndNull( mediaType );
       
   233 				}
       
   234 			}
       
   235 		}
       
   236 		
   221 	if ( aAlert->itemList )
   237 	if ( aAlert->itemList )
   222 		{
   238 		{
   223 		if (aAlert->itemList->item)
   239 		if (aAlert->itemList->item)
   224 			{	
   240 			{
   225 			if ( aAlert->itemList->item->meta )
       
   226 				{
       
   227 				if ( aAlert->itemList->item->meta->content && 
       
   228 				aAlert->itemList->item->meta->contentType == SML_PCDATA_EXTENSION && 
       
   229 				aAlert->itemList->item->meta->extension == SML_EXT_METINF )
       
   230 				{
       
   231 				metInf = (SmlMetInfMetInf_t*) aAlert->itemList->item->meta->content;
       
   232 			
       
   233 				if ( metInf->type )
       
   234 					{
       
   235 					mediaType.Set( static_cast<TUint8*>( metInf->type->content ), metInf->type->length, metInf->type->length );
       
   236 					TrimRightSpaceAndNull( mediaType );
       
   237 					}
       
   238 				}
       
   239 				}
       
   240 			if ( aAlert->itemList->item->source )
   241 			if ( aAlert->itemList->item->source )
   241 				{
   242 				{
   242 				HBufC8* remotePath = NULL;
   243 				HBufC8* remotePath = NULL;
   243 				
   244 				
   244 				TPtr8 pcdata( (TUint8*) aAlert->itemList->item->source->locURI->content, aAlert->itemList->item->source->locURI->length, aAlert->itemList->item->source->locURI->length );
   245 				TPtr8 pcdata( (TUint8*) aAlert->itemList->item->source->locURI->content, aAlert->itemList->item->source->locURI->length, aAlert->itemList->item->source->locURI->length );
   250 					{
   251 					{
   251 					MatchContentTypeL( p, mediaType, syncType, i );	
   252 					MatchContentTypeL( p, mediaType, syncType, i );	
   252 					}
   253 					}
   253 							
   254 							
   254 				CleanupStack::PopAndDestroy(); // remotePath	
   255 				CleanupStack::PopAndDestroy(); // remotePath	
   255     		}
   256     			}
   256 			}
   257 			}
   257 		}
   258 		}
   258 	
   259 	
   259 	return 0;
   260 	return 0;
   260 	}
   261 	}