1 /* |
|
2 * Copyright (c) 2009 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 * |
|
16 */ |
|
17 |
|
18 #ifndef __UNIEDITORMMSPLUGINPRIVATE_H |
|
19 #define __UNIEDITORMMSPLUGINPRIVATE_H |
|
20 |
|
21 #include <msvapi.h> |
|
22 #include <cmsvrecipientlist.h> |
|
23 #include "convergedmessage.h" |
|
24 #include "convergedmessageid.h" |
|
25 |
|
26 // DATA TYPES |
|
27 |
|
28 // FORWARD DECLARATIONS |
|
29 |
|
30 class CClientMtmRegistry; |
|
31 class CMmsClientMtm; |
|
32 class CMmsHeaders; |
|
33 class CMmsSettings; |
|
34 class CCommsDatabase; |
|
35 class TUniSendingSettings; |
|
36 class UniDataModelLoader; |
|
37 class UniDataModelPluginInterface; |
|
38 class SessionEventHandler; |
|
39 |
|
40 // CLASS DECLARATION |
|
41 |
|
42 class CUniEditorMmsPluginPrivate : public CBase |
|
43 { |
|
44 public: // Constructors and destructor |
|
45 |
|
46 /** |
|
47 * Two-phased constructor. |
|
48 */ |
|
49 static CUniEditorMmsPluginPrivate* NewL(); |
|
50 |
|
51 /** |
|
52 * Destructor. |
|
53 */ |
|
54 virtual ~CUniEditorMmsPluginPrivate(); |
|
55 |
|
56 public: |
|
57 |
|
58 /** |
|
59 * Converts message from message store into ConvergedMessage |
|
60 * @param TMsvId id |
|
61 * @return ConvergedMessage object is returned in successfull cases and |
|
62 * NULL is returned in failure cases. The ownership of the object |
|
63 * is transferred to the caller |
|
64 */ |
|
65 ConvergedMessage* convertFromL( TMsvId aId ); |
|
66 |
|
67 /** |
|
68 * delete entry from drafts folder |
|
69 * @param aId TMsvId of the message entry to be deleted |
|
70 */ |
|
71 void deleteDraftsEntryL( TMsvId aId ); |
|
72 |
|
73 /** |
|
74 * Converts ConvergedMessage message into a message in store |
|
75 * @param ConvergedMessage obj |
|
76 * @return TMsvId id |
|
77 */ |
|
78 TMsvId convertToL( ConvergedMessage *aMessage ); |
|
79 |
|
80 /** |
|
81 * Implementation for convertToL which converts ConvergedMessage message |
|
82 * into a message in store |
|
83 * @param ConvergedMessage obj |
|
84 * @param TMsvEntry |
|
85 */ |
|
86 void DoConvertToL(ConvergedMessage *aMessage,TMsvEntry& entry); |
|
87 |
|
88 /** |
|
89 * Sends the message |
|
90 * @param TMsvId id |
|
91 */ |
|
92 void sendL( TMsvId aId ); |
|
93 |
|
94 /** |
|
95 * Validates the service for send |
|
96 * @param aEmailOverSms |
|
97 * @return true if the service is valid for send |
|
98 */ |
|
99 TBool validateServiceL( TBool aEmailOverSms = EFalse ); |
|
100 |
|
101 /** |
|
102 * isServiceValidL |
|
103 * @return TBool |
|
104 */ |
|
105 TBool isServiceValidL(); |
|
106 |
|
107 private: // Constructors |
|
108 |
|
109 /** |
|
110 * C++ default constructor. |
|
111 */ |
|
112 CUniEditorMmsPluginPrivate(); |
|
113 |
|
114 /** |
|
115 * Returns pointer to iMmsMtm member variable |
|
116 */ |
|
117 CMmsClientMtm* MmsMtmL(); |
|
118 |
|
119 /** |
|
120 * Generates details for TMsvEntry object |
|
121 */ |
|
122 void MakeDetailsL( TDes& aDetails ); |
|
123 |
|
124 /** |
|
125 * Populates address feilds in message from ConvergedMessage |
|
126 */ |
|
127 void addRecipientsL(ConvergedMessage *message); |
|
128 |
|
129 /** |
|
130 * Populates address feilds in message from ConvergedMessage |
|
131 */ |
|
132 void addRecipientsL(const ConvergedMessageAddressList &array, |
|
133 TMsvRecipientType recpType); |
|
134 |
|
135 /** |
|
136 * Populates converged message from the drafts entry |
|
137 */ |
|
138 void convertFromDraftsL(ConvergedMessage& aMessage ); |
|
139 |
|
140 /** |
|
141 * Populates address feilds in drafts entry to converged message |
|
142 */ |
|
143 void populateRecipientsL( |
|
144 ConvergedMessage &aMessage); |
|
145 |
|
146 private: // Data |
|
147 |
|
148 CMsvSession* iSession; |
|
149 CClientMtmRegistry* iMtmRegistry; |
|
150 CMmsClientMtm* iMmsMtm; |
|
151 CMmsHeaders* iMmsHeader; |
|
152 |
|
153 // owned |
|
154 UniDataModelLoader* iDataModelPluginLoader; |
|
155 //Not owned |
|
156 UniDataModelPluginInterface* iMmsDataPlugin; |
|
157 SessionEventHandler *iSessionHandler; |
|
158 }; |
|
159 |
|
160 #endif // __UNIEDITORMMSPLUGINPRIVATE_H |
|
161 |
|
162 // End of File |
|