|
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 //FORWARD DECLARATION |
|
24 class SmsSettingsPrivate; |
|
25 class MmsSettingsPrivate; |
|
26 |
|
27 /** |
|
28 * This class defines interfaces wrapper b/w MsgSettings UI |
|
29 * and m/w. |
|
30 */ |
|
31 class MsgSettingEngine : public QObject |
|
32 { |
|
33 Q_OBJECT |
|
34 |
|
35 public: |
|
36 /* |
|
37 * Enum defining Character Encoding |
|
38 */ |
|
39 enum CharacterEncoding |
|
40 { |
|
41 ReducedSupport, FullSupport |
|
42 }; |
|
43 |
|
44 /** |
|
45 * Enum defining MmsRetrieval mode |
|
46 */ |
|
47 enum MmsRetrieval |
|
48 { |
|
49 AlwaysAutomatic, AutomInHomeNetwork, Maual, Off, No |
|
50 }; |
|
51 |
|
52 public: |
|
53 |
|
54 /** |
|
55 * Constructor |
|
56 */ |
|
57 MsgSettingEngine(); |
|
58 |
|
59 /** |
|
60 * Destructor |
|
61 */ |
|
62 ~MsgSettingEngine(); |
|
63 |
|
64 /** |
|
65 * for basic message settings |
|
66 * set the status of service messages |
|
67 * @param serviceMessages bool true or false |
|
68 */ |
|
69 void setReceiveSerivceMessages(bool serviceMessages); |
|
70 |
|
71 /** |
|
72 * set the character encoding |
|
73 * @param encoding specifying encoding type |
|
74 */ |
|
75 void setCharacterEncoding(MsgSettingEngine::CharacterEncoding encoding); |
|
76 |
|
77 /** |
|
78 * returns settings delivery report status |
|
79 * and character encoding |
|
80 * @param receiveServiceMessages for getting status service messages |
|
81 * @param encoding for char encoding |
|
82 */ |
|
83 void settingsServiceMessagesAndCharEncoding( |
|
84 bool& receiveServiceMessages, |
|
85 MsgSettingEngine::CharacterEncoding& encoding); |
|
86 |
|
87 /** |
|
88 * set the mms retrieval mode |
|
89 * @param retrieval specifying mode |
|
90 */ |
|
91 void setMMSRetrieval(MsgSettingEngine::MmsRetrieval); |
|
92 |
|
93 /** |
|
94 * set the anonymous message |
|
95 * @param status true or false |
|
96 */ |
|
97 void setAnonymousMessages(bool status); |
|
98 |
|
99 /** |
|
100 * set for receiving MMS Adverts |
|
101 * @param status for true or false |
|
102 */ |
|
103 void setReceiveMMSAdverts(bool status); |
|
104 |
|
105 /** |
|
106 * for view 2 mms advance settings\ |
|
107 * get all the fields of mms advance setting |
|
108 * @param retrieval return for mms retrieval |
|
109 * @param anonymous return status true or false |
|
110 * @param mmsadverts return status true or false |
|
111 */ |
|
112 void advanceMmsSettings(MsgSettingEngine::MmsRetrieval& retrieval, |
|
113 bool& anonymousStatus, bool& mmsAdvertsStatus); |
|
114 |
|
115 /** |
|
116 * get all the MMs access points |
|
117 * @param returns all the access point names |
|
118 * @attention to be displayed as per the index o to total count |
|
119 * @param defaultIndex returns default selected |
|
120 */ |
|
121 void allMMsAcessPoints(QStringList& nameList, int& defaultIndex); |
|
122 |
|
123 /** |
|
124 * set the default access point |
|
125 * @param index specifying the index |
|
126 */ |
|
127 void setMMSAccesspoint(int index); |
|
128 |
|
129 /** |
|
130 * get the list of all SMS Message Centres |
|
131 * @param list of all names QString |
|
132 * @param defaultIndex returns default selected |
|
133 */ |
|
134 void allSMSMessageCenter(QStringList& nameList, int& defaultIndex); |
|
135 |
|
136 /** |
|
137 * set the default SMS message centre |
|
138 * @param index specifying default index |
|
139 */ |
|
140 void setSMSMessageCenter(int index); |
|
141 |
|
142 /** |
|
143 * for editing the SMS messafe Centre |
|
144 * @param name specifying center name |
|
145 * @param number specifying center number |
|
146 * @param index specying index of message list |
|
147 */ |
|
148 void editSmsMessageCenter(QString& centreName, QString& centreNumber, |
|
149 int index); |
|
150 |
|
151 /** |
|
152 * for add new sms message centre |
|
153 * @param name specifying center name |
|
154 * @param number specifying center number |
|
155 */ |
|
156 void addSmsMessageCenter(QString& centreName, QString& centreNumber); |
|
157 |
|
158 /** |
|
159 * for delete new sms message centre |
|
160 * @param deleteIndex specifying index to delete |
|
161 */ |
|
162 void deleteSmsMessageCenter(int deleteIndex); |
|
163 |
|
164 /** |
|
165 * get the sms message centre namd and number |
|
166 * @index for which center needs |
|
167 * @param return name specifying center name |
|
168 * @param return number specifying center number |
|
169 */ |
|
170 void smsCenterNameAndNumber(int index, QString& centreName, |
|
171 QString& centreNumber); |
|
172 |
|
173 private: |
|
174 SmsSettingsPrivate* dptr_smsSettings; |
|
175 MmsSettingsPrivate* dptr_mmsSettings; |
|
176 }; |
|
177 |
|
178 #endif /* MSGSETTINGENGINE_H_ */ |