|
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: |
|
15 * Send message command object. |
|
16 * Opens a message editor for writing and sending a message to a |
|
17 * contact. |
|
18 * |
|
19 */ |
|
20 |
|
21 |
|
22 #ifndef __CPbkSendMultipleMessageCmd_H__ |
|
23 #define __CPbkSendMultipleMessageCmd_H__ |
|
24 |
|
25 // INCLUDES |
|
26 #include <e32base.h> |
|
27 #include <MPbkCommand.h> |
|
28 #include <MPbkBackgroundProcess.h> |
|
29 #include <TPbkSendingParams.h> |
|
30 |
|
31 |
|
32 // FORWARD DECLARATIONS |
|
33 class CPbkContactEngine; |
|
34 class CContactIdArray; |
|
35 class TPbkContactItemField; |
|
36 class CPbkAttachmentFile; |
|
37 |
|
38 |
|
39 // CLASS DECLARATION |
|
40 |
|
41 /** |
|
42 * Call command object. |
|
43 */ |
|
44 class CPbkSendMultipleMessageCmd : |
|
45 public CBase, |
|
46 public MPbkCommand, |
|
47 private MPbkProcessObserver |
|
48 { |
|
49 public: // Interface |
|
50 /** |
|
51 * Static constructor. |
|
52 * @param aEngine, for retrieving contact info |
|
53 * @param aParams, sending params |
|
54 * @param aContacts, array of contact ids where to send message to. |
|
55 * @param aFocusedField currently focused field. May be NULL if caller |
|
56 * doesn't have field-level focus. If field is |
|
57 * applicable address field it is used directly |
|
58 * as the recipient address. |
|
59 * @param aUseDefaultDirectly if ETrue and a default address is found |
|
60 * from the contact the default address is |
|
61 * used without presenting address |
|
62 * selection list. |
|
63 * @return a new send message command object. |
|
64 */ |
|
65 static CPbkSendMultipleMessageCmd* NewL ( |
|
66 CPbkContactEngine& aEngine, |
|
67 TPbkSendingParams aParams, |
|
68 const CContactIdArray& aContacts, |
|
69 const TPbkContactItemField* aFocusedField, |
|
70 TBool aUseDefaultDirectly); |
|
71 |
|
72 /** |
|
73 * Destructor. |
|
74 */ |
|
75 ~CPbkSendMultipleMessageCmd(); |
|
76 |
|
77 public: // from MPbkCommand |
|
78 void ExecuteLD(); |
|
79 void AddObserver( MPbkCommandObserver& aObserver ); |
|
80 |
|
81 public: // from MPbkProcessObserver |
|
82 void ProcessFinished(MPbkBackgroundProcess& aProcess); |
|
83 |
|
84 private: // Implementation |
|
85 CPbkSendMultipleMessageCmd ( |
|
86 CPbkContactEngine& aEngine, |
|
87 TPbkSendingParams aParams, |
|
88 const CContactIdArray& aContacts, |
|
89 const TPbkContactItemField* aFocusedField, |
|
90 TBool aUseDefaultDirectly); |
|
91 void ConstructL(); |
|
92 |
|
93 private: //New functions |
|
94 /** |
|
95 * Filter and display SendUI query |
|
96 * @return TUid Uid of the selected sending service. |
|
97 */ |
|
98 TUid ShowWriteQueryL(); |
|
99 |
|
100 private: // Data |
|
101 // Ref: Pbk contact engine |
|
102 CPbkContactEngine& iEngine; |
|
103 /// Sending params |
|
104 TPbkSendingParams iParams; |
|
105 // Ref: Array of contact ids to be send |
|
106 const CContactIdArray& iContacts; |
|
107 /// Own: send mtm uid |
|
108 TUid iMtmUid; |
|
109 /// Ref: the currently focused field |
|
110 const TPbkContactItemField* iFocusedField; |
|
111 /// Own: if true the possible default address is used directly |
|
112 TBool iUseDefaultDirectly; |
|
113 //Own: Postcard temporary attachment file |
|
114 CPbkAttachmentFile* iAttachmentFile; |
|
115 //Ref: Command Observer |
|
116 MPbkCommandObserver* iObserver; |
|
117 }; |
|
118 |
|
119 |
|
120 #endif // __CPbkSendMultipleMessageCmd_H__ |
|
121 |
|
122 // End of File |