|
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: |
|
15 * |
|
16 */ |
|
17 |
|
18 #include "cpprofilemodel.h" |
|
19 #include "cpprofilemodel_p.h" |
|
20 |
|
21 CpProfileModel::CpProfileModel() |
|
22 { |
|
23 dptr = new CpProfileModelPrivate(); |
|
24 } |
|
25 |
|
26 CpProfileModel::~CpProfileModel() |
|
27 { |
|
28 delete dptr; |
|
29 } |
|
30 |
|
31 /* |
|
32 * Get the result of the initiation |
|
33 */ |
|
34 int CpProfileModel::initiationFlag() |
|
35 { |
|
36 return dptr->initiationFlag(); |
|
37 } |
|
38 |
|
39 /* |
|
40 * Get profile name with its id |
|
41 */ |
|
42 QString CpProfileModel::profileName(int profileId) |
|
43 { |
|
44 return dptr->profileName(profileId); |
|
45 } |
|
46 |
|
47 /* |
|
48 * Activate a profile with its id, return the operation code. |
|
49 */ |
|
50 int CpProfileModel::activateProfile(int profileId) |
|
51 { |
|
52 return dptr->activateProfile(profileId); |
|
53 } |
|
54 |
|
55 /* |
|
56 * Get active profile's id |
|
57 */ |
|
58 int CpProfileModel::activeProfileId() |
|
59 { |
|
60 return dptr->activeProfileId(); |
|
61 } |
|
62 |
|
63 /* |
|
64 * Get path and file name of ring tone file |
|
65 */ |
|
66 QString CpProfileModel::ringTone() |
|
67 { |
|
68 return dptr->ringTone(); |
|
69 } |
|
70 |
|
71 /* |
|
72 * Set path and file to ring tone |
|
73 */ |
|
74 int CpProfileModel::setRingTone(const QString& filePath) |
|
75 { |
|
76 int err = dptr->setRingTone(filePath); |
|
77 return err; |
|
78 } |
|
79 |
|
80 /* |
|
81 * Get path and file name of message tone file |
|
82 */ |
|
83 QString CpProfileModel::messageTone() |
|
84 { |
|
85 return dptr->messageTone(); |
|
86 } |
|
87 |
|
88 /* |
|
89 * Set path and file to message tone |
|
90 */ |
|
91 int CpProfileModel::setMessageTone(const QString& filePath) |
|
92 { |
|
93 int err = dptr->setMessageTone(filePath); |
|
94 return err; |
|
95 } |
|
96 |
|
97 /* |
|
98 * Get path and file name of email tone file |
|
99 */ |
|
100 QString CpProfileModel::emailTone() |
|
101 { |
|
102 return dptr->emailTone(); |
|
103 } |
|
104 |
|
105 /* |
|
106 * Set path and file to email tone |
|
107 */ |
|
108 int CpProfileModel::setEmailTone(const QString& filePath) |
|
109 { |
|
110 int err = dptr->setEmailTone(filePath); |
|
111 return err; |
|
112 } |
|
113 |
|
114 /* |
|
115 * Get path and file name of calendar event tone file |
|
116 */ |
|
117 QString CpProfileModel::calendarTone() |
|
118 { |
|
119 return dptr->calendarTone(); |
|
120 } |
|
121 |
|
122 /* |
|
123 * Set path and file to calendar event tone |
|
124 */ |
|
125 void CpProfileModel::setCalendarTone(const QString& filePath) |
|
126 { |
|
127 dptr->setCalendarTone(filePath); |
|
128 } |
|
129 |
|
130 /* |
|
131 * Get path and file name of clock alarm tone file |
|
132 */ |
|
133 QString CpProfileModel::alarmTone() |
|
134 { |
|
135 return dptr->alarmTone(); |
|
136 } |
|
137 |
|
138 /* |
|
139 * Set path and file to clock alarm tone |
|
140 */ |
|
141 void CpProfileModel::setAlarmTone(const QString& filePath) |
|
142 { |
|
143 dptr->setAlarmTone(filePath); |
|
144 } |
|
145 |
|
146 /* |
|
147 * Get the value of master volume |
|
148 */ |
|
149 int CpProfileModel::ringVolume() |
|
150 { |
|
151 return dptr->ringVolume(); |
|
152 } |
|
153 |
|
154 /* |
|
155 * Set master volume, the value should be between 1-10 |
|
156 */ |
|
157 void CpProfileModel::setRingVolume(int volume) |
|
158 { |
|
159 dptr->setRingVolume(volume); |
|
160 } |
|
161 |
|
162 /* |
|
163 * Activate master volume to beep |
|
164 */ |
|
165 void CpProfileModel::activateBeep() |
|
166 { |
|
167 dptr->activateBeep(); |
|
168 } |
|
169 |
|
170 /* |
|
171 * Get beep status in master volume |
|
172 */ |
|
173 bool CpProfileModel::isBeep() |
|
174 { |
|
175 return dptr->isBeep(); |
|
176 } |
|
177 |
|
178 /* |
|
179 * Activate master volume to silent |
|
180 */ |
|
181 void CpProfileModel::activateSilent() |
|
182 { |
|
183 dptr->activateSilent(); |
|
184 } |
|
185 |
|
186 /* |
|
187 * Get silent status in master volume |
|
188 */ |
|
189 bool CpProfileModel::isSilent() |
|
190 { |
|
191 return dptr->isSilent(); |
|
192 } |
|
193 |
|
194 /* |
|
195 * Get master vibra's status |
|
196 */ |
|
197 bool CpProfileModel::vibraStatus() |
|
198 { |
|
199 return dptr->vibraStatus(); |
|
200 } |
|
201 |
|
202 /* |
|
203 * Set master vibra's status |
|
204 */ |
|
205 void CpProfileModel::setVibraStatus(bool status) |
|
206 { |
|
207 dptr->setVibraStatus(status); |
|
208 } |
|
209 |
|
210 /* |
|
211 * Get keypad' volume |
|
212 */ |
|
213 int CpProfileModel::keyVolume() |
|
214 { |
|
215 return dptr->keyVolume(); |
|
216 } |
|
217 |
|
218 /* |
|
219 * Set keypad's volume, |
|
220 * the value of the volume should be between 0-3 |
|
221 */ |
|
222 void CpProfileModel::setKeyVolume(int volume) |
|
223 { |
|
224 dptr->setKeyVolume(volume); |
|
225 } |
|
226 |
|
227 /* |
|
228 * Get screen tone's volume |
|
229 */ |
|
230 int CpProfileModel::screenVolume() |
|
231 { |
|
232 return dptr->screenVolume(); |
|
233 } |
|
234 |
|
235 /* |
|
236 * Set screen tone's volume, |
|
237 * the value of the volume should be between 0-3 |
|
238 */ |
|
239 void CpProfileModel::setScreenVolume(int volume) |
|
240 { |
|
241 dptr->setScreenVolume(volume); |
|
242 } |
|
243 |
|
244 /* |
|
245 * Get screen vibra's level |
|
246 */ |
|
247 int CpProfileModel::screenVibra() |
|
248 { |
|
249 return dptr->screenVibra(); |
|
250 } |
|
251 |
|
252 /* |
|
253 * Set screen vibra's level, |
|
254 * the value of the level should be between 0-3 |
|
255 */ |
|
256 void CpProfileModel::setScreenVibra(int volume) |
|
257 { |
|
258 dptr->setScreenVibra(volume); |
|
259 } |
|
260 |
|
261 // End of file |
|
262 |