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:This class provides API m/w for msg settings plugin |
|
15 * |
|
16 */ |
|
17 |
|
18 #ifndef MSGSETTINGENGINE_H_ |
|
19 #define MSGSETTINGENGINE_H_ |
|
20 |
|
21 #include <qobject.h> |
|
22 |
|
23 #ifdef MSGSETTINGENGINE_DLL |
|
24 #define MSG_SETTING_ENGINE_EXPORT Q_DECL_EXPORT |
|
25 #else |
|
26 #define MSG_SETTING_ENGINE_EXPORT Q_DECL_IMPORT |
|
27 #endif |
|
28 |
|
29 //FORWARD DECLARATION |
|
30 class SmsSettingsPrivate; |
|
31 class MmsSettingsPrivate; |
|
32 |
|
33 /** |
|
34 * This class defines interfaces wrapper b/w MsgSettings UI |
|
35 * and m/w. |
|
36 */ |
|
37 class MSG_SETTING_ENGINE_EXPORT MsgSettingEngine : public QObject |
|
38 { |
|
39 Q_OBJECT |
|
40 |
|
41 public: |
|
42 /* |
|
43 * Enum defining Character Encoding |
|
44 */ |
|
45 enum CharacterEncoding |
|
46 { |
|
47 ReducedSupport, FullSupport |
|
48 }; |
|
49 |
|
50 /** |
|
51 * Enum defining MmsCreation Mode |
|
52 */ |
|
53 enum MmsCreationMode |
|
54 { |
|
55 Restricted, Guided, Free |
|
56 }; |
|
57 |
|
58 /** |
|
59 * Enum defining MmsRetrieval mode |
|
60 */ |
|
61 enum MmsRetrieval |
|
62 { |
|
63 AlwaysAutomatic, AutomInHomeNetwork, Maual, Off, No |
|
64 }; |
|
65 |
|
66 public: |
|
67 |
|
68 /** |
|
69 * Constructor |
|
70 */ |
|
71 MsgSettingEngine(); |
|
72 |
|
73 /** |
|
74 * Destructor |
|
75 */ |
|
76 ~MsgSettingEngine(); |
|
77 |
|
78 /** |
|
79 * for basic message settings |
|
80 * set the deliver report |
|
81 * @param report bool true or false |
|
82 */ |
|
83 void setDeliveryReport(bool report); |
|
84 |
|
85 /** |
|
86 * set the character encoding |
|
87 * @param encoding specifying encoding type |
|
88 */ |
|
89 void setCharacterEncoding(MsgSettingEngine::CharacterEncoding encoding); |
|
90 |
|
91 /** |
|
92 * returns settings delivery report status |
|
93 * and character encoding |
|
94 * @param report for getting status report |
|
95 * @param encoding for char encoding |
|
96 */ |
|
97 void settingsDeliverReportAndCharEncoding( bool& report, |
|
98 MsgSettingEngine::CharacterEncoding& encoding); |
|
99 |
|
100 /** |
|
101 * for advanced settings |
|
102 * set the creation mode |
|
103 * @mode for creation mode |
|
104 */ |
|
105 void setMMSCreationmode(MsgSettingEngine::MmsCreationMode mode); |
|
106 |
|
107 /** |
|
108 * set the mms retrieval mode |
|
109 * @param retrieval specifying mode |
|
110 */ |
|
111 void setMMSRetrieval(MsgSettingEngine::MmsRetrieval); |
|
112 |
|
113 /** |
|
114 * set the anonymous message |
|
115 * @param status true or false |
|
116 */ |
|
117 void setAnonymousMessages(bool status); |
|
118 |
|
119 /** |
|
120 * set for receiving MMS Adverts |
|
121 * @param status for true or false |
|
122 */ |
|
123 void setReceiveMMSAdverts(bool status); |
|
124 |
|
125 /** |
|
126 * for view 2 mms advance settings\ |
|
127 * get all the fields of mms advance setting |
|
128 * @param mode return for MMsCreation mode |
|
129 * @param retrieval return for mms retrieval |
|
130 * @param anonymous return status true or false |
|
131 * @param mmsadverts return status true or false |
|
132 */ |
|
133 void advanceMmsSettings(MsgSettingEngine::MmsCreationMode& mode, |
|
134 MsgSettingEngine::MmsRetrieval& retrieval, |
|
135 bool& anonymousStatus, bool& mmsAdvertsStatus); |
|
136 |
|
137 /** |
|
138 * get all the MMs access points |
|
139 * @param returns all the access point names |
|
140 * @attention to be displayed as per the index o to total count |
|
141 * @param defaultIndex returns default selected |
|
142 */ |
|
143 void allMMsAcessPoints(QStringList& nameList, int& defaultIndex); |
|
144 |
|
145 /** |
|
146 * set the default access point |
|
147 * @param index specifying the index |
|
148 */ |
|
149 void setMMSAccesspoint(int index); |
|
150 |
|
151 /** |
|
152 * get the list of all SMS Message Centres |
|
153 * @param list of all names QString |
|
154 * @param defaultIndex returns default selected |
|
155 */ |
|
156 void allSMSMessageCenter(QStringList& nameList, int& defaultIndex); |
|
157 |
|
158 /** |
|
159 * set the default SMS message centre |
|
160 * @param index specifying default index |
|
161 */ |
|
162 void setSMSMessageCenter(int index); |
|
163 |
|
164 /** |
|
165 * for editing the SMS messafe Centre |
|
166 * @param name specifying center name |
|
167 * @param number specifying center number |
|
168 * @param index specying index of message list |
|
169 */ |
|
170 void editSmsMessageCenter(QString& centreName, QString& centreNumber, |
|
171 int index); |
|
172 |
|
173 /** |
|
174 * for add new sms message centre |
|
175 * @param name specifying center name |
|
176 * @param number specifying center number |
|
177 */ |
|
178 void addSmsMessageCenter(QString& centreName, QString& centreNumber); |
|
179 |
|
180 /** |
|
181 * get the sms message centre namd and number |
|
182 * @index for which center needs |
|
183 * @param return name specifying center name |
|
184 * @param return number specifying center number |
|
185 */ |
|
186 void smsCenterNameAndNumber(int index, QString& centreName, |
|
187 QString& centreNumber); |
|
188 |
|
189 /** |
|
190 * set the Sms Email gateway |
|
191 * @param gateway string |
|
192 */ |
|
193 void setEmailGateway(QString& gateway); |
|
194 |
|
195 /** |
|
196 * set the sms Email Service centre number |
|
197 * @param centre number |
|
198 */ |
|
199 void setEmailSeriveCenterNumber(QString& centerNumber); |
|
200 |
|
201 /** |
|
202 * get the sms email gateway and |
|
203 * service centre number |
|
204 * @param gateway return email gateway |
|
205 * @param centreNumber return service number |
|
206 */ |
|
207 void emailEmailGatewayAndServiceCenterNumber(QString& gateway, |
|
208 QString& serviceNumber); |
|
209 |
|
210 private: |
|
211 SmsSettingsPrivate* dptr_smsSettings; |
|
212 MmsSettingsPrivate* dptr_mmsSettings; |
|
213 }; |
|
214 |
|
215 #endif /* MSGSETTINGENGINE_H_ */ |
|