engine/src/FeedParser.cpp
changeset 123 50edf2be6f0d
parent 2 29cda98b007e
child 88 f4b512d870e8
equal deleted inserted replaced
122:dd31cab34e27 123:50edf2be6f0d
    23 #include <charconv.h>
    23 #include <charconv.h>
    24 #include <xml/stringdictionarycollection.h>
    24 #include <xml/stringdictionarycollection.h>
    25 #include <utf.h>
    25 #include <utf.h>
    26 #include <tinternetdate.h>
    26 #include <tinternetdate.h>
    27 #include "debug.h"
    27 #include "debug.h"
       
    28 #include "podcastutils.h"
    28 
    29 
    29 using namespace Xml;
    30 using namespace Xml;
    30 const TInt KMaxParseBuffer = 1024;
    31 const TInt KMaxParseBuffer = 1024;
    31 const TInt KMaxStringBuffer = 100;
    32 const TInt KMaxStringBuffer = 100;
    32 
    33 
   174 				// url=...
   175 				// url=...
   175 				if (attr16.Compare(KTagUrl) == 0) {
   176 				if (attr16.Compare(KTagUrl) == 0) {
   176 					HBufC* val16 = HBufC::NewLC(KMaxParseBuffer);
   177 					HBufC* val16 = HBufC::NewLC(KMaxParseBuffer);
   177 					val16->Des().Copy(attr.Value().DesC());
   178 					val16->Des().Copy(attr.Value().DesC());
   178 					iActiveShow->SetUrlL(*val16);
   179 					iActiveShow->SetUrlL(*val16);
       
   180 					
       
   181 					if (PodcastUtils::IsVideoShow(*val16)) {
       
   182 						iActiveShow->SetShowType(EVideoPodcast);
       
   183 					}
   179 					CleanupStack::PopAndDestroy(val16);
   184 					CleanupStack::PopAndDestroy(val16);
   180 				// length=...
   185 				// length=...
   181 				} else if (attr16.Compare(KTagLength) == 0) {
   186 				} else if (attr16.Compare(KTagLength) == 0) {
   182 					TLex8 lex(attr.Value().DesC());
   187 					TLex8 lex(attr.Value().DesC());
   183 					TUint size = 0;
   188 					TUint size = 0;
   367 			iFeedState = EStateItem;
   372 			iFeedState = EStateItem;
   368 			break;
   373 			break;
   369 		case EStateItemLink:
   374 		case EStateItemLink:
   370 			if (iActiveShow->Url().Length() == 0) {
   375 			if (iActiveShow->Url().Length() == 0) {
   371 				iActiveShow->SetUrlL(iBuffer);
   376 				iActiveShow->SetUrlL(iBuffer);
       
   377 				
       
   378 				if (PodcastUtils::IsVideoShow(iBuffer)) {
       
   379 					iActiveShow->SetShowType(EVideoPodcast);
       
   380 				}
   372 			}
   381 			}
   373 			iFeedState = EStateItem;
   382 			iFeedState = EStateItem;
   374 			break;
   383 			break;
   375 		case EStateItemDescription:
   384 		case EStateItemDescription:
   376 			iActiveShow->SetDescriptionL(iBuffer);
   385 			iActiveShow->SetDescriptionL(iBuffer);