|
1 /* |
|
2 * Copyright (c) 2005-2008 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 * UniEditor Plugin interface definition. |
|
16 * |
|
17 */ |
|
18 |
|
19 |
|
20 |
|
21 #ifndef __UNIPLUGINAPI_H |
|
22 #define __UNIPLUGINAPI_H |
|
23 |
|
24 // INCLUDES |
|
25 #include <e32base.h> |
|
26 #include <msvstd.h> |
|
27 #include <mtclbase.h> |
|
28 #include <gsmuelem.h> |
|
29 |
|
30 // DATA TYPES |
|
31 |
|
32 // FORWARD DECLARATIONS |
|
33 class CMsvSession; |
|
34 class CMsvStore; |
|
35 class CMsvOperation; |
|
36 class CUniClientMtm; |
|
37 class TUniSendingSettings; |
|
38 |
|
39 // CLASS DECLARATION |
|
40 |
|
41 struct TUniPluginParams |
|
42 { |
|
43 // Constructor |
|
44 TUniPluginParams( CMsvSession& aSession, CUniClientMtm& aUniMtm ) |
|
45 : iSession( aSession ), iUniMtm( aUniMtm ) {} |
|
46 // Data |
|
47 CMsvSession& iSession; |
|
48 CUniClientMtm& iUniMtm; |
|
49 }; |
|
50 |
|
51 /** |
|
52 * CUniEditorPlugin |
|
53 */ |
|
54 class CUniEditorPlugin : public CBase |
|
55 { |
|
56 public: // Constructors and destructor |
|
57 |
|
58 /** |
|
59 * Two-phased constructor. |
|
60 * @param aImplementationUid The implementation UID of the |
|
61 * MTM plugin to be created. |
|
62 * @return Pointer to object of CUniEditorPlugin |
|
63 */ |
|
64 IMPORT_C static CUniEditorPlugin* NewL( |
|
65 const TUid& aImplementationUid, |
|
66 CMsvSession& aSession, |
|
67 CUniClientMtm& aUniMtm ); |
|
68 |
|
69 /** |
|
70 * Destructor. |
|
71 */ |
|
72 IMPORT_C virtual ~CUniEditorPlugin(); |
|
73 |
|
74 public: // New functions |
|
75 |
|
76 /** |
|
77 * Loads MTM Specific headers for a message |
|
78 * @param aStore Read only store |
|
79 */ |
|
80 virtual void LoadHeadersL( CMsvStore* aStore ) = 0; |
|
81 |
|
82 /** |
|
83 * Saves MTM Specific headers for message |
|
84 * @param aStore Read/write store |
|
85 */ |
|
86 virtual void SaveHeadersL( CMsvStore& aStore ) = 0; |
|
87 |
|
88 /** |
|
89 * Converts MTM specific message into unified message type |
|
90 * @param aId TMsvId of the message to be converted |
|
91 * @return TmsvId of the converted message |
|
92 */ |
|
93 virtual TMsvId ConvertFromL( TMsvId aId ) = 0; |
|
94 |
|
95 /** |
|
96 * Converts unified message into MTM specific message |
|
97 * @param aId TMsvId of the message to be converted |
|
98 * @return TmsvId of the converted message |
|
99 */ |
|
100 virtual TMsvId ConvertToL( TMsvId aId ) = 0; |
|
101 |
|
102 /** |
|
103 * Creates unified reply message |
|
104 * @param aSrc TMsvId of MTM specific message to be replied |
|
105 * @param aDest The folder entry to which to assign the reply message |
|
106 * @param aParts The parts that are to be copied from the original message |
|
107 * into the reply |
|
108 * @return TmsvId of the new unified message message |
|
109 */ |
|
110 virtual TMsvId CreateReplyL( TMsvId aSrc, TMsvId aDest, TMsvPartList aParts ) = 0; |
|
111 |
|
112 /** |
|
113 * Creates unified forward message based on MTM specific message |
|
114 * @param aSrc TMsvId of the message to be converted |
|
115 * @param aDest The folder entry to which to assign the forwarded message |
|
116 * @param aParts The parts that are to be copied from the original message |
|
117 * into the forward message |
|
118 * @return TmsvId of the new unified message |
|
119 */ |
|
120 virtual TMsvId CreateForwardL( TMsvId aSrc, TMsvId aDest, TMsvPartList aParts ) = 0; |
|
121 |
|
122 /** |
|
123 * Sends a message which has already been converted into MTM specifc message |
|
124 * @param aId, TMsvId of the message to be sent |
|
125 */ |
|
126 virtual void SendL( TMsvId aId ) = 0; |
|
127 |
|
128 /** |
|
129 * Validates settings. Parameter only needed for SMS messages. |
|
130 * @param aEmailOverSms, boolean informing if this message is a E-Mail over SMS message |
|
131 * @return ETrue/EFalse , valid or invalid |
|
132 */ |
|
133 virtual TBool ValidateServiceL( TBool aEmailOverSms = EFalse ) = 0; |
|
134 |
|
135 /** |
|
136 * Copies MTM specific settings into parameter |
|
137 * @param aSettings, on return contains MTM specific settings |
|
138 */ |
|
139 virtual void GetSendingSettingsL( TUniSendingSettings& aSettings ) = 0; |
|
140 |
|
141 /** |
|
142 * Sets MTM specific sending settings based on TUniSendingSettings |
|
143 * @param aSettings Unified sending settings |
|
144 */ |
|
145 virtual void SetSendingSettingsL( TUniSendingSettings& aSettings ) = 0; |
|
146 |
|
147 /** |
|
148 * Checks whether service settings are valid. |
|
149 * @return ETrue/EFalse, valid or invalid |
|
150 */ |
|
151 virtual TBool IsServiceValidL() = 0; |
|
152 |
|
153 /** |
|
154 * To Set encoding settings like encoding type, character support |
|
155 * and alternative encoding if any |
|
156 * Turkish SMS-PREQ2265 Specific |
|
157 */ |
|
158 virtual void SetEncodingSettings (TBool aUnicodeMode, TSmsEncoding aAlternativeEncodingType, TInt aCharSupportType) = 0; |
|
159 |
|
160 /** |
|
161 * To get PDU Info: extracts details of number of PDUs, number of remaining chars in last PDU |
|
162 * and encoding types used. |
|
163 * Turkish SMS-PREQ2265 Specific |
|
164 */ |
|
165 virtual void GetNumPDUsL ( |
|
166 TDesC& aBuf, |
|
167 TInt& aNumOfRemainingChars, |
|
168 TInt& aNumOfPDUs, |
|
169 TBool& aUnicodeMode, |
|
170 TSmsEncoding& aAlternativeEncodingType) = 0; |
|
171 |
|
172 private: // Data |
|
173 // Implementation UID of the sending service |
|
174 TUid iDtor_ID_Key; |
|
175 |
|
176 }; |
|
177 |
|
178 #endif // __UNIPLUGINAPI_H |
|
179 |
|
180 // End of File |