23 #define SCHEME_HANDLER_H |
23 #define SCHEME_HANDLER_H |
24 |
24 |
25 // INCLUDES |
25 // INCLUDES |
26 |
26 |
27 #include <QtCore/QObject> |
27 #include <QtCore/QObject> |
28 #if defined(Q_OS_SYMBIAN) |
|
29 #include <txtrich.h> // CRichText |
|
30 #endif |
|
31 |
28 |
32 // CLASS DECLARATION |
29 // CLASS DECLARATION |
33 |
30 |
34 class QUrl; |
31 class QUrl; |
35 #if defined(Q_OS_SYMBIAN) |
|
36 class WrtTelService; |
|
37 #endif |
|
38 |
|
39 |
32 |
40 namespace WRT { |
33 namespace WRT { |
41 |
34 |
|
35 class SchemeHandlerPrivate; |
42 |
36 |
43 /** |
37 /** |
44 * Scheme Handler IF definition class |
38 * Scheme Handler IF definition class |
45 */ |
39 */ |
46 class SchemeHandler : public QObject { |
40 class SchemeHandler : public QObject { |
47 |
41 |
48 Q_OBJECT |
42 Q_OBJECT |
49 |
43 |
50 public: |
44 public: |
|
45 enum SchemeHandlerError { |
|
46 NoError, // Success |
|
47 SchemeNotHandled, // http(s) and file schemes to be handled elsewhere |
|
48 SchemeUnsupported, // scheme not supported |
|
49 LaunchFailed // attempt to launch handling application failed |
|
50 }; |
|
51 |
51 SchemeHandler(); |
52 SchemeHandler(); |
52 ~SchemeHandler(); |
53 ~SchemeHandler(); |
53 |
54 |
54 bool HandleSpecialScheme(const QUrl &url); |
55 SchemeHandlerError HandleSpecialScheme(const QUrl &url); |
55 |
56 |
56 private: |
57 private: |
57 bool ReadSdConfirmDtmfValue(); |
58 SchemeHandlerPrivate *d; |
58 bool HandleUrlEmbedded( const QUrl &url, bool confirmDTMF ); |
|
59 |
|
60 bool HandleMailtoScheme(const QUrl &url); |
|
61 bool HandleRtspScheme(const QUrl &url); |
|
62 #if defined(Q_OS_SYMBIAN) |
|
63 void HandleRtspSchemeL(const QUrl &url); |
|
64 void HandleMailtoSchemeL(const QUrl &url); |
|
65 TPtrC qt_QString2TPtrC( const QString& string ); |
|
66 HBufC* qt_QString2HBufC(const QString& string); |
|
67 #endif |
|
68 |
|
69 private: |
|
70 #if defined(Q_OS_SYMBIAN) |
|
71 WrtTelService* m_telService; ///< Owned. |
|
72 #endif |
|
73 }; |
59 }; |
|
60 |
74 } |
61 } |
75 #endif /* def SCHEME_HANDLER_H */ |
62 #endif /* def SCHEME_HANDLER_H */ |