|
1 /* |
|
2 * Copyright (c) 2004-2005 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: Launches Send Ui. |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 #ifndef CAUIMESSAGESENDER_H |
|
20 #define CAUIMESSAGESENDER_H |
|
21 |
|
22 // INCLUDES |
|
23 #include <e32base.h> |
|
24 #include <msvapi.h> |
|
25 #include <MsgArrays.h> // CUidNameArray |
|
26 |
|
27 // CLASS DECLARATION |
|
28 class CMsvSession; |
|
29 class CSendUi; |
|
30 |
|
31 // CLASS DECLARATION |
|
32 |
|
33 /** |
|
34 * CaUIMessageSender implementation. |
|
35 * |
|
36 * @lib CaUiEngine.lib |
|
37 * @since 2.6 |
|
38 */ |
|
39 class CCaUiMessageSender : |
|
40 public CBase, |
|
41 private MMsvSessionObserver |
|
42 { |
|
43 public: // Constructors and destructor |
|
44 |
|
45 /** |
|
46 * Destructor. |
|
47 */ |
|
48 ~CCaUiMessageSender(); |
|
49 |
|
50 /** |
|
51 * Two-phased constructor. |
|
52 * @return an instance of CCaUiMessageSender. |
|
53 */ |
|
54 static CCaUiMessageSender* NewL(); |
|
55 |
|
56 public: // New functions |
|
57 |
|
58 /** |
|
59 * Create new message by given Id. The message editor will always |
|
60 * be lauched stand alone. |
|
61 * @param aMessageType mtmUid indicate the message type |
|
62 * aRealAddress address list to send message |
|
63 */ |
|
64 void CreateNewMessageL( TInt aMessageType, |
|
65 MDesC16Array* aRealAddress, |
|
66 MDesC16Array* aAliases, |
|
67 CRichText* aRichText ); |
|
68 |
|
69 /** |
|
70 * Get messgae types array |
|
71 */ |
|
72 const CUidNameArray& MessageTypesArrayL(); |
|
73 |
|
74 private: |
|
75 |
|
76 /** |
|
77 * C++ constructor. |
|
78 * |
|
79 * @param aIndex After the query is dismissed, the index will hold |
|
80 * the value of selected item. |
|
81 */ |
|
82 CCaUiMessageSender( ); |
|
83 |
|
84 /** |
|
85 * Create SendUi |
|
86 */ |
|
87 void CreateSendUiL(); |
|
88 |
|
89 /** |
|
90 * Get message types from mtm registry |
|
91 * |
|
92 * @param aMsgTypes array of UIDs (MTM types) |
|
93 * |
|
94 */ |
|
95 void UpdateMessageTypesArrayL( CUidNameArray* aMsgTypes ); |
|
96 |
|
97 /** |
|
98 * Check if mail box is defined |
|
99 */ |
|
100 TBool IsMailboxDefinedL(); |
|
101 |
|
102 /** |
|
103 * Create connection to message service |
|
104 */ |
|
105 void CreateMessageServiceConnectionL(); |
|
106 |
|
107 protected: // Functions from base classes |
|
108 |
|
109 /** |
|
110 * From MMsvSessionObserver |
|
111 */ |
|
112 virtual void HandleSessionEventL(TMsvSessionEvent aEvent, |
|
113 TAny* aArg1, TAny* aArg2, TAny* aArg3); |
|
114 |
|
115 private: |
|
116 |
|
117 // Message service session |
|
118 CMsvSession* iSession; |
|
119 |
|
120 // Send UI |
|
121 CSendUi* iSendUi; |
|
122 |
|
123 // Array of MTM types |
|
124 CUidNameArray* iMsgTypes; |
|
125 |
|
126 }; |
|
127 |
|
128 #endif // CAUIMESSAGESENDER_H |
|
129 |
|
130 // End of File |