author | teknolog |
Tue, 27 Apr 2010 19:26:48 +0100 | |
changeset 60 | 4d230e702aa3 |
parent 15 | 93d9f66bf50b |
child 176 | 1c8b56cb6409 |
child 246 | 140a404c6b53 |
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> |
|
60 | 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)) |
|
2 | 32 |
|
33 |
_LIT(KURLPrefix, "http://"); |
|
34 |
_LIT(KItpcPrefix, "itpc://"); |
|
60 | 35 |
_LIT(KPcastPrefix, "pcast://"); |
36 |
||
37 |
_LIT(KVideoFormat1, ".wmv"); |
|
38 |
_LIT(KVideoFormat2, ".avi"); |
|
39 |
_LIT(KVideoFormat3, ".mp4"); |
|
40 |
||
41 |
||
2 | 42 |
|
43 |
class PodcastUtils |
|
44 |
{ |
|
45 |
public: |
|
46 |
IMPORT_C static void FixProtocolsL(TDes &aUrl); |
|
47 |
IMPORT_C static void CleanHtmlL(TDes &str); |
|
48 |
IMPORT_C static void ReplaceString(TDes & aString, const TDesC& aStringToReplace, const TDesC& aReplacement); |
|
49 |
IMPORT_C static void ReplaceChar(TDes & aString, TUint aCharToReplace, TUint aReplacement); |
|
50 |
IMPORT_C static void EnsureProperPathName(TFileName &aPath); |
|
51 |
IMPORT_C static void FileNameFromUrl(const TDesC &aUrl, TFileName &aFileName); |
|
52 |
IMPORT_C static void SQLEncode(TDes &aString); |
|
53 |
IMPORT_C static void XMLEncode(TDes &aString); |
|
15
93d9f66bf50b
Cleaning description better for second line in search results
teknolog
parents:
2
diff
changeset
|
54 |
IMPORT_C static void RemoveAllFormatting(TDes & aString); |
60 | 55 |
IMPORT_C static TBool IsVideoShow(TDesC &aUrl); |
2 | 56 |
}; |
57 |
||
58 |
#endif /* PODCASTUTILS_H_ */ |