|
1 /* |
|
2 * Copyright (c) 2002 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: Declares document class of Mail Editor. |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 #ifndef MSGMAILEDITORDOCUMENT_H |
|
20 #define MSGMAILEDITORDOCUMENT_H |
|
21 |
|
22 // INCLUDES |
|
23 |
|
24 #include "MsgMailDocument.h" // CMsgMailDocument |
|
25 |
|
26 #include <miutset.h> // KUidMsgTypeSMTP, KUidMsvServiceEntry |
|
27 #include <miutmsg.h> // for TImAttachmentInfo |
|
28 #include <MsgAttachmentInfo.h> |
|
29 #include <ImumInternalApi.h> |
|
30 #include <ImumInHealthServices.h> |
|
31 |
|
32 |
|
33 // FORWARD DECLARATIONS |
|
34 class CEikAppUi; |
|
35 class CMsgMailPreferences; |
|
36 class MsgMailDRMHandler; |
|
37 |
|
38 // CLASS DECLARATION |
|
39 |
|
40 /** |
|
41 * CMsgMailEditorDocument document class. |
|
42 */ |
|
43 class CMsgMailEditorDocument |
|
44 : public CMsgMailDocument |
|
45 { |
|
46 public: // Constructors and destructor |
|
47 /** |
|
48 * Two-phased constructor. |
|
49 * @param aApp a reference to an application |
|
50 * @return A pointer to created document object |
|
51 */ |
|
52 static CMsgMailEditorDocument* NewL(CEikApplication& aApp); |
|
53 |
|
54 /** |
|
55 * Destructor. |
|
56 */ |
|
57 virtual ~CMsgMailEditorDocument(); |
|
58 |
|
59 public: // New functions |
|
60 |
|
61 /** |
|
62 * Check that are we creating a new entry or editing an old one. |
|
63 */ |
|
64 TBool IsNewMessage() const; |
|
65 |
|
66 /** |
|
67 * Check if this is reply message. |
|
68 */ |
|
69 TBool IsReplyMessage() const; |
|
70 |
|
71 /** |
|
72 * Check if this is a forward message. |
|
73 */ |
|
74 TBool IsForwardMessage() const; |
|
75 |
|
76 /** |
|
77 * Read sending options. |
|
78 * If new message read default settings. |
|
79 * If old message read settings from mail entry. |
|
80 */ |
|
81 void ReadSendOptionsL(); |
|
82 |
|
83 /** |
|
84 * @return ETrue if Online |
|
85 */ |
|
86 TBool IsOnlineL(); |
|
87 |
|
88 /** |
|
89 * Opens mail message entry |
|
90 * @since S60 3.1 |
|
91 * @param aEntry Entry to be opened. |
|
92 */ |
|
93 void OpenMailMessageEntryL( TMsvEntry aEntry ); |
|
94 |
|
95 /** |
|
96 * Send mail message |
|
97 * @since S60 3.1 |
|
98 * @param aMsgId Entry to be send. |
|
99 */ |
|
100 void SendImmediatelyL( const TMsvId aMsgId ); |
|
101 |
|
102 /** |
|
103 * Get array of healty mailboxes |
|
104 * @since S60 3.1 |
|
105 * @param aFlags see MIMAMailboxDoctor::GetHealthyMailboxList |
|
106 * Ownership not transferred. |
|
107 */ |
|
108 MImumInHealthServices::RMailboxIdArray GetHealthyMailboxListL( |
|
109 const TInt64& aFlags ); |
|
110 |
|
111 MMsvAttachmentManager& GetAttachmentManagerL(); |
|
112 |
|
113 private: // implementation |
|
114 |
|
115 CMsgMailEditorDocument(CEikApplication& aApp); |
|
116 void ConstructL(); |
|
117 |
|
118 private: // New functions |
|
119 /** |
|
120 * This is called from NotifyChanges and possible leave is |
|
121 * trapped there. |
|
122 * @param aCommand executed command |
|
123 * @param aAttachmentInfo affected attachment |
|
124 */ |
|
125 void NotifyChangesL(TMsgAttachmentCommand aCommand, |
|
126 CMsgAttachmentInfo* aAttachmentInfo); |
|
127 |
|
128 private: // Functions from base classes |
|
129 |
|
130 /// From CEikDocument, create CMsgMailEditorAppUi "App UI" object. |
|
131 CEikAppUi* CreateAppUiL(); |
|
132 |
|
133 public: |
|
134 /// From MMsgAttachmentModelObserver |
|
135 void NotifyChanges( |
|
136 TMsgAttachmentCommand aCommand, |
|
137 CMsgAttachmentInfo* aAttachmentInfo); |
|
138 |
|
139 // From MMsgAttachmentModelObserver |
|
140 RFile GetAttachmentFileL( TMsvAttachmentId aId ); |
|
141 |
|
142 private: // data |
|
143 |
|
144 // Owned: Pointer to email API object |
|
145 CImumInternalApi* iEmailApi; |
|
146 |
|
147 // Owned: Array of mailbox ids |
|
148 MImumInHealthServices::RMailboxIdArray iMailboxArray; |
|
149 |
|
150 }; |
|
151 |
|
152 #endif |
|
153 |
|
154 // End of File |
|
155 |