equal
deleted
inserted
replaced
15 * Implementation of Scheme handler interface implementation for mailto:// scheme |
15 * Implementation of Scheme handler interface implementation for mailto:// scheme |
16 * |
16 * |
17 * |
17 * |
18 */ |
18 */ |
19 |
19 |
20 |
|
21 // INCLUDE FILES |
20 // INCLUDE FILES |
22 |
21 |
23 #include "MailToHandler.h" |
22 #include "MailToHandler.h" |
24 #include "SchemeDispLogger.h" |
23 #include "SchemeDispLogger.h" |
25 #include <ecom/ecom.h> // For REComSession |
24 #include <ecom/ecom.h> // For REComSession |
28 #include <apgcli.h> |
27 #include <apgcli.h> |
29 #include <apparc.h> |
28 #include <apparc.h> |
30 #include <eikdoc.h> |
29 #include <eikdoc.h> |
31 #include <eikproc.h> |
30 #include <eikproc.h> |
32 #include <f32file.h> |
31 #include <f32file.h> |
33 |
32 #include <utf.h> |
34 |
33 |
35 // ================= CONSTANTS ======================= |
34 // ================= CONSTANTS ======================= |
36 |
35 |
37 _LIT( KMailto,"mailto:"); |
36 _LIT( KMailto,"mailto:"); |
38 _LIT( KSubject, "subject=" ); |
37 _LIT( KSubject, "subject=" ); |
107 // --------------------------------------------------------- |
106 // --------------------------------------------------------- |
108 // |
107 // |
109 void CMailToHandler::HandleUrlEmbeddedL() |
108 void CMailToHandler::HandleUrlEmbeddedL() |
110 { |
109 { |
111 CLOG_ENTERFN( "CMailToHandler::HandleUrlEmbeddedL()" ); |
110 CLOG_ENTERFN( "CMailToHandler::HandleUrlEmbeddedL()" ); |
112 |
111 /* Convert to UCS-2, conversion from HBufC16 to HBufC8 should do no harm because the original string is HBufC8 */ |
113 //TPtrC path = iParsedUrl->Des(); |
112 HBufC8 *tempbuf8 = HBufC8::NewLC(iParsedUrl->Length()); |
114 |
113 tempbuf8->Des().Copy(iParsedUrl->Des()); |
|
114 TInt errEncode = CnvUtfConverter::ConvertToUnicodeFromUtf8( *static_cast<TDes16*>(&iParsedUrl->Des()),*tempbuf8); |
|
115 if (errEncode != KErrNone) |
|
116 { |
|
117 iParsedUrl->Des().Copy(tempbuf8->Des()); |
|
118 } |
|
119 CleanupStack::PopAndDestroy(tempbuf8); |
|
120 |
115 iTelService = CBrowserTelService::NewL(); |
121 iTelService = CBrowserTelService::NewL(); |
116 iTelService->AddObserver( this ); |
122 iTelService->AddObserver( this ); |
117 |
123 |
118 TPtrC recipient = GetField( KMailto ); |
124 TPtrC recipient = GetField( KMailto ); |
119 TPtrC subject = GetField( KSubject ); |
125 TPtrC subject = GetField( KSubject ); |