engine/inc/PodcastUtils.h
changeset 60 4d230e702aa3
parent 15 93d9f66bf50b
child 176 1c8b56cb6409
child 246 140a404c6b53
equal deleted inserted replaced
59:9569ea080d5a 60:4d230e702aa3
    18 
    18 
    19 #ifndef PODCASTUTILS_H_
    19 #ifndef PODCASTUTILS_H_
    20 #define PODCASTUTILS_H_
    20 #define PODCASTUTILS_H_
    21 
    21 
    22 #include <e32cmn.h>
    22 #include <e32cmn.h>
       
    23 #include <sqlite3.h>
       
    24 
       
    25 // Cleanup stack macro for SQLite3
       
    26 static void Cleanup_sqlite3_finalize_wrapper(TAny* handle)
       
    27 	{
       
    28 	sqlite3_finalize(static_cast<sqlite3_stmt*>(handle));
       
    29 	}
       
    30 
       
    31 #define Cleanup_sqlite3_finalize_PushL(__handle) CleanupStack::PushL(TCleanupItem(&Cleanup_sqlite3_finalize_wrapper, __handle))
    23 
    32 
    24 _LIT(KURLPrefix, "http://");
    33 _LIT(KURLPrefix, "http://");
    25 _LIT(KItpcPrefix, "itpc://");
    34 _LIT(KItpcPrefix, "itpc://");
    26 _LIT(KPcastPrefix, "pcast://");			
    35 _LIT(KPcastPrefix, "pcast://");
       
    36 
       
    37 _LIT(KVideoFormat1, ".wmv");
       
    38 _LIT(KVideoFormat2, ".avi");
       
    39 _LIT(KVideoFormat3, ".mp4");
       
    40 
       
    41 
    27 
    42 
    28 class PodcastUtils
    43 class PodcastUtils
    29 	{
    44 	{
    30 public:
    45 public:
    31 	IMPORT_C static void FixProtocolsL(TDes &aUrl);
    46 	IMPORT_C static void FixProtocolsL(TDes &aUrl);
    35 	IMPORT_C static void EnsureProperPathName(TFileName &aPath);
    50 	IMPORT_C static void EnsureProperPathName(TFileName &aPath);
    36 	IMPORT_C static void FileNameFromUrl(const TDesC &aUrl, TFileName &aFileName);
    51 	IMPORT_C static void FileNameFromUrl(const TDesC &aUrl, TFileName &aFileName);
    37 	IMPORT_C static void SQLEncode(TDes &aString);
    52 	IMPORT_C static void SQLEncode(TDes &aString);
    38 	IMPORT_C static void XMLEncode(TDes &aString);
    53 	IMPORT_C static void XMLEncode(TDes &aString);
    39 	IMPORT_C static void RemoveAllFormatting(TDes & aString);
    54 	IMPORT_C static void RemoveAllFormatting(TDes & aString);
       
    55 	IMPORT_C static TBool IsVideoShow(TDesC &aUrl);
    40 };
    56 };
    41 
    57 
    42 #endif /* PODCASTUTILS_H_ */
    58 #endif /* PODCASTUTILS_H_ */