|
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 * Sms Mtm Ui. |
|
16 * |
|
17 */ |
|
18 |
|
19 |
|
20 |
|
21 #if !defined(__SMSUCDMA_H__) |
|
22 #define __SMSUCDMA_H__ |
|
23 |
|
24 #if !defined(__MTMUIBAS_H__) |
|
25 #include <MTMUIBAS.H> // CBaseMtmUi |
|
26 #endif |
|
27 |
|
28 #include "smsu.h" |
|
29 // CLASS DECLARATION |
|
30 |
|
31 /** |
|
32 * CSmsMtmUiCDMA |
|
33 * Inherited from CSmsMtmUi |
|
34 * MTM implementation for CDMA SMS |
|
35 * Overloads the GSM method for lauching CDMA specific settings dialog and RFS functionalities |
|
36 */ |
|
37 NONSHARABLE_CLASS(CSmsMtmUiCDMA) : public CSmsMtmUi |
|
38 { |
|
39 public: // Constructors and destructor |
|
40 |
|
41 /** |
|
42 * Two-phased constructor. |
|
43 */ |
|
44 static CSmsMtmUiCDMA* NewL(CBaseMtm& aBaseMtm,CRegisteredMtmDll& aRegisteredMtmDll); |
|
45 |
|
46 /** |
|
47 * Destructor. |
|
48 */ |
|
49 virtual ~CSmsMtmUiCDMA(); |
|
50 |
|
51 public: // Functions from base classes |
|
52 |
|
53 /** |
|
54 * From CSmsMtmUi |
|
55 * Context-specific |
|
56 */ |
|
57 CMsvOperation* OpenL(TRequestStatus& aStatus); |
|
58 |
|
59 /** |
|
60 * From CSmsMtmUi |
|
61 */ |
|
62 void InvokeSyncFunctionL(TInt aFunctionId, const CMsvEntrySelection& aSelection, TDes8& aParameter); |
|
63 |
|
64 private: // New functions |
|
65 /** |
|
66 * Launch the service settings dialog on the current entry |
|
67 * @param aStatus follows the operation progress |
|
68 * @return pointer to started operation |
|
69 */ |
|
70 CMsvOperation* LaunchSettingsDialogL( TRequestStatus& aStatus ); |
|
71 |
|
72 /** |
|
73 * Creates Sms Service |
|
74 * @param aNoServiceNoCheckNeeded is check needed or not |
|
75 * @return id of service |
|
76 */ |
|
77 TMsvId CreateSmsServiceL( TBool aNoServiceNoCheckNeeded ); |
|
78 |
|
79 /** |
|
80 * Actual Sms service default creator |
|
81 * @param aServiceId of service |
|
82 */ |
|
83 void CreateDefaultSettingsL( TMsvId aServiceId ); |
|
84 |
|
85 /** |
|
86 * Reads default / variated settings from shared data |
|
87 * @param aServiceSettings pointer to service |
|
88 */ |
|
89 void ReadDefaultSettingsFromSharedDataL( CSmsSettings* aServiceSettings ); |
|
90 |
|
91 /** |
|
92 * Take the name and number fields from the recipients array and concaternate them |
|
93 * together, putting <> around the numbers and separating recipients with a comma |
|
94 * @return pointer to descriptor |
|
95 */ |
|
96 HBufC* TurnRecipientsArrayIntoStringLC( |
|
97 const CArrayPtrFlat<CSmsNumber>& aRecip, |
|
98 const TBool aEmailMessage = EFalse ) const; |
|
99 |
|
100 /** |
|
101 * Returns a pointer to Sms Client Mtm |
|
102 * @return reference to Sms Client Mtm |
|
103 */ |
|
104 inline CSmsClientMtm& SmsClientMtm() const { return (CSmsClientMtm&)BaseMtm();}; |
|
105 |
|
106 /** |
|
107 * Checks do we have sms service and store for it, if not creates (if wanted) |
|
108 * one with default settings |
|
109 * @param aCreateService if missing create one |
|
110 * @param aCreateStore if missing create one |
|
111 * @param aFetchSMSCs if something recreated fetch SMSCs from SIM |
|
112 * @return TInt enum TSmumSmsReCreation tells what was done |
|
113 */ |
|
114 TInt CheckAndEnsureSmsServiceOkL( |
|
115 TBool aCreateService, |
|
116 TBool aCreateStore, |
|
117 TBool aFetchSMSCs ); |
|
118 |
|
119 /** |
|
120 * Determines the current MO state of a SMS message |
|
121 * @param aContext SMS message Context |
|
122 * @return HBufC* Pointer to the string describing the current status |
|
123 */ |
|
124 HBufC* StatusTextL( const TMsvEntry& aContext ) const; |
|
125 |
|
126 /** |
|
127 * Extracts all the required data from the mtm, populates a message info array |
|
128 * and passes this array to the message info dialog class which displays the |
|
129 * dialog. |
|
130 * This is used for sms's and also created bio messages (which use sms as the |
|
131 * bearer). |
|
132 * @return |
|
133 */ |
|
134 void ConstructAndShowInfoDialogL() const; |
|
135 |
|
136 private: |
|
137 |
|
138 /** |
|
139 * By default Symbian OS constructor is private. |
|
140 */ |
|
141 void ConstructL(); |
|
142 |
|
143 /** |
|
144 * Constructor (accessible only through factory function) |
|
145 */ |
|
146 CSmsMtmUiCDMA(CBaseMtm& aBaseMtm,CRegisteredMtmDll& aRegisteredMtmDll); |
|
147 |
|
148 private: // Data |
|
149 // iNoCallbackNumber is a string, read from loc file, to be displayed |
|
150 // when there is no callback number set |
|
151 HBufC* iNoCallbackNumber; |
|
152 // Message Queue |
|
153 TBool iMsgQueueEnabled; |
|
154 TInt iMsgQueueTimeout; |
|
155 }; |
|
156 |
|
157 #endif // __SMSUCDMA_H__ |
|
158 |
|
159 |
|
160 |
|
161 // End of File |