|
1 /* |
|
2 * Copyright (c) 2004 Nokia Corporation and/or its subsidiary(-ies). |
|
3 * All rights reserved. |
|
4 * This component and the accompanying materials are made available |
|
5 * under the terms of "Eclipse Public License v1.0" |
|
6 * which accompanies this distribution, and is available |
|
7 * at the URL "http://www.eclipse.org/legal/epl-v10.html". |
|
8 * |
|
9 * Initial Contributors: |
|
10 * Nokia Corporation - initial contribution. |
|
11 * |
|
12 * Contributors: |
|
13 * |
|
14 * Description: |
|
15 * Declaration of Scheme handler interface implementation for |
|
16 * "mmsto" URI scheme |
|
17 * |
|
18 */ |
|
19 |
|
20 |
|
21 |
|
22 #ifndef MMS_TO_HANDLER_H |
|
23 #define MMS_TO_HANDLER_H |
|
24 |
|
25 // INCLUDES |
|
26 |
|
27 #include "BaseHandler.h" |
|
28 #include <e32base.h> |
|
29 #include <eikdoc.h> |
|
30 #include <apparc.h> |
|
31 |
|
32 // FORWARD DECLARATION |
|
33 class CSendUi; |
|
34 |
|
35 // CLASS DECLARATION |
|
36 |
|
37 /** |
|
38 * Scheme Handler IF implementation class for mmsto uri scheme |
|
39 * @since Series60_2.6 |
|
40 */ |
|
41 class CMmsToHandler : public CBaseHandler |
|
42 { |
|
43 |
|
44 public: // Constructors and destructor |
|
45 |
|
46 /** |
|
47 * Two phased constructor. Leaves on failure. |
|
48 * @param - aUrl |
|
49 * @return The created object. |
|
50 */ |
|
51 static CMmsToHandler* NewL( const TDesC& aUrl ); |
|
52 |
|
53 /** |
|
54 * Destructor. |
|
55 */ |
|
56 virtual ~CMmsToHandler(); |
|
57 |
|
58 /** |
|
59 * Url Handler with embedding |
|
60 * @param - |
|
61 */ |
|
62 void HandleUrlEmbeddedL(); |
|
63 |
|
64 /** |
|
65 * Url Handler without embedding |
|
66 * @param - |
|
67 */ |
|
68 void HandleUrlStandaloneL(); |
|
69 |
|
70 private: // Constructors |
|
71 |
|
72 enum TSchemeMmsToFields //<Possible MmsTo fields |
|
73 { |
|
74 ESchemeMmsTo, ///< MmsTo. |
|
75 ESchemeSubject, ///< Subject. |
|
76 ESchemeMsgBody, ///< Message Body. |
|
77 ESchemeTo, ///< TO. |
|
78 ESchemeCc, ///< CC. |
|
79 ESchemeNoMore |
|
80 }; |
|
81 |
|
82 /** |
|
83 * Constructor. |
|
84 */ |
|
85 CMmsToHandler(); |
|
86 |
|
87 /** |
|
88 * Second phase constructor. Leaves on failure. |
|
89 * @param - aUrl |
|
90 */ |
|
91 void ConstructL( const TDesC& aUrl ); |
|
92 |
|
93 private: |
|
94 |
|
95 /** |
|
96 * Url Handler |
|
97 * @param aLaunchEmbedded |
|
98 */ |
|
99 void HandleUrlL(TBool aLaunchEmbedded); |
|
100 |
|
101 /** |
|
102 * Get the appropriate filed from the url |
|
103 * @param aHeader the name of the field |
|
104 * @return Value of the header |
|
105 */ |
|
106 TPtrC GetField(const TDesC& aHeader); |
|
107 |
|
108 /** |
|
109 * Check if the field is in the url |
|
110 * @param aHeader the name of the field |
|
111 * @return TBool |
|
112 */ |
|
113 TBool IsHeader(const TDesC& aHeader); |
|
114 |
|
115 /** |
|
116 * Starting position of the specific field |
|
117 * @param aHeader the name of the field |
|
118 * @return TInt Starting position of the specific field |
|
119 */ |
|
120 TInt FieldStart(const TDesC& aHeader); |
|
121 |
|
122 /** |
|
123 * Ending position of the specific field |
|
124 * @param aHeader the name of the field |
|
125 * @return TInt Ending position of the specific field |
|
126 */ |
|
127 TInt FieldEnd(const TDesC& aHeader); |
|
128 |
|
129 /** |
|
130 * Get the enumerated position of the specific field |
|
131 * @param aHeader the name of the field |
|
132 * @return TSchemeMmsToFields |
|
133 */ |
|
134 TSchemeMmsToFields GetHeaderPos(const TDesC& aHeader); |
|
135 |
|
136 /** |
|
137 * Get the next enumerated position of the specific field |
|
138 * @param aPos enumerated position of the field |
|
139 * @return Start position of the next field. |
|
140 */ |
|
141 TInt GetNextField( TInt aStart ); |
|
142 |
|
143 private: // Data |
|
144 |
|
145 CSendUi* iSendUi; |
|
146 RFs iFs; |
|
147 }; |
|
148 |
|
149 #endif /* def MMS_TO_HANDLER_H */ |