author | Sebastian Brannstrom <sebastianb@symbian.org> |
Sat, 23 Oct 2010 15:20:49 +0100 | |
branch | RCL_3 |
changeset 271 | 12799e9aba73 |
parent 257 | f5377b5817a0 |
permissions | -rw-r--r-- |
2 | 1 |
/* |
2 |
* Copyright (c) 2007-2010 Sebastian Brannstrom, Lars Persson, EmbedDev AB |
|
3 |
* |
|
4 |
* All rights reserved. |
|
5 |
* This component and the accompanying materials are made available |
|
6 |
* under the terms of the License "Eclipse Public License v1.0" |
|
7 |
* which accompanies this distribution, and is available |
|
8 |
* at the URL "http://www.eclipse.org/legal/epl-v10.html". |
|
9 |
* |
|
10 |
* Initial Contributors: |
|
11 |
* EmbedDev AB - initial contribution. |
|
12 |
* |
|
13 |
* Contributors: |
|
14 |
* |
|
15 |
* Description: |
|
16 |
* |
|
17 |
*/ |
|
18 |
||
19 |
#ifndef PODCASTUTILS_H_ |
|
20 |
#define PODCASTUTILS_H_ |
|
21 |
||
22 |
#include <e32cmn.h> |
|
116 | 23 |
#include <sqlite3.h> |
24 |
||
109 | 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 |
} |
|
116 | 30 |
|
109 | 31 |
#define Cleanup_sqlite3_finalize_PushL(__handle) CleanupStack::PushL(TCleanupItem(&Cleanup_sqlite3_finalize_wrapper, __handle)) |
32 |
||
2 | 33 |
_LIT(KURLPrefix, "http://"); |
34 |
_LIT(KItpcPrefix, "itpc://"); |
|
123 | 35 |
_LIT(KPcastPrefix, "pcast://"); |
36 |
||
37 |
_LIT(KVideoFormat1, ".wmv"); |
|
38 |
_LIT(KVideoFormat2, ".avi"); |
|
39 |
_LIT(KVideoFormat3, ".mp4"); |
|
257
f5377b5817a0
Fix for bug 3626 - show filenames are now generated from UIDs
Sebastian Brannstrom <sebastianb@symbian.org>
parents:
123
diff
changeset
|
40 |
_LIT(KVideoFormat4, ".mov"); |
123 | 41 |
|
42 |
||
2 | 43 |
|
44 |
class PodcastUtils |
|
45 |
{ |
|
46 |
public: |
|
47 |
IMPORT_C static void FixProtocolsL(TDes &aUrl); |
|
48 |
IMPORT_C static void CleanHtmlL(TDes &str); |
|
49 |
IMPORT_C static void ReplaceString(TDes & aString, const TDesC& aStringToReplace, const TDesC& aReplacement); |
|
50 |
IMPORT_C static void ReplaceChar(TDes & aString, TUint aCharToReplace, TUint aReplacement); |
|
51 |
IMPORT_C static void EnsureProperPathName(TFileName &aPath); |
|
52 |
IMPORT_C static void FileNameFromUrl(const TDesC &aUrl, TFileName &aFileName); |
|
53 |
IMPORT_C static void SQLEncode(TDes &aString); |
|
54 |
IMPORT_C static void XMLEncode(TDes &aString); |
|
15
93d9f66bf50b
Cleaning description better for second line in search results
teknolog
parents:
2
diff
changeset
|
55 |
IMPORT_C static void RemoveAllFormatting(TDes & aString); |
123 | 56 |
IMPORT_C static TBool IsVideoShow(TDesC &aUrl); |
2 | 57 |
}; |
58 |
||
59 |
#endif /* PODCASTUTILS_H_ */ |