|
1 // Copyright (c) 2005-2009 Nokia Corporation and/or its subsidiary(-ies). |
|
2 // All rights reserved. |
|
3 // This component and the accompanying materials are made available |
|
4 // under the terms of "Eclipse Public License v1.0" |
|
5 // which accompanies this distribution, and is available |
|
6 // at the URL "http://www.eclipse.org/legal/epl-v10.html". |
|
7 // |
|
8 // Initial Contributors: |
|
9 // Nokia Corporation - initial contribution. |
|
10 // |
|
11 // Contributors: |
|
12 // |
|
13 // Description: |
|
14 // |
|
15 |
|
16 |
|
17 |
|
18 #include <cmmssettings.h> |
|
19 |
|
20 |
|
21 |
|
22 /** |
|
23 Allocates and constructs an MMS settings object. |
|
24 |
|
25 Initialises all member data to their default values. |
|
26 |
|
27 @return |
|
28 The newly constructed MMS settings object. |
|
29 */ |
|
30 EXPORT_C CMmsSettings* CMmsSettings::NewL() |
|
31 { |
|
32 CMmsSettings* self = CMmsSettings::NewLC(); |
|
33 CleanupStack::Pop(self); |
|
34 return self; |
|
35 } |
|
36 |
|
37 /** |
|
38 Allocates and constructs an MMS settings object. |
|
39 |
|
40 Initialises all member data to their default values. |
|
41 |
|
42 @return |
|
43 The newly constructed MMS settings object. |
|
44 */ |
|
45 EXPORT_C CMmsSettings* CMmsSettings::NewLC() |
|
46 { |
|
47 CMmsSettings* self = new (ELeave) CMmsSettings(); |
|
48 CleanupStack::PushL(self); |
|
49 return self; |
|
50 } |
|
51 |
|
52 /** |
|
53 Constructor. |
|
54 */ |
|
55 CMmsSettings::CMmsSettings() |
|
56 : iMmsSettingsFlags(0), |
|
57 iApplicationId(0), |
|
58 iCreationMode(ECreationModeFree), |
|
59 iAutomaticDownloadOptions(EAutomaticDownloadOff), |
|
60 iValidityPeriod(0), |
|
61 iMaxDownloadSize(0), |
|
62 iMaxDownloadRetries(0), |
|
63 iDownloadRetryInterval(0), |
|
64 iMaxSendMsgSize(0), |
|
65 iDeviceContentClass(0), |
|
66 iMaxImageHeight(0), |
|
67 iMaxImageWidth(0) |
|
68 { |
|
69 } |
|
70 |
|
71 /** |
|
72 Destructor. |
|
73 */ |
|
74 EXPORT_C CMmsSettings::~CMmsSettings() |
|
75 { |
|
76 delete iAddress; |
|
77 iProxy.Close(); |
|
78 iNapId.Close(); |
|
79 } |
|
80 |
|
81 /** |
|
82 Returns the Application Id. |
|
83 |
|
84 @return |
|
85 Application Id |
|
86 */ |
|
87 EXPORT_C TInt CMmsSettings::ApplicationID( ) const |
|
88 { |
|
89 return iApplicationId; |
|
90 } |
|
91 |
|
92 /** |
|
93 Sets the Application Id. |
|
94 |
|
95 @param aAppID |
|
96 Application Id |
|
97 */ |
|
98 EXPORT_C void CMmsSettings::SetApplicationID(const TInt aAppID) |
|
99 { |
|
100 iApplicationId = aAppID; |
|
101 } |
|
102 |
|
103 /** |
|
104 Returns the absolute MMS Proxy-Relay URL |
|
105 |
|
106 @return |
|
107 The absolute MMS Proxy-Relay URL |
|
108 */ |
|
109 EXPORT_C TPtrC CMmsSettings::Address( ) const |
|
110 { |
|
111 if (iAddress) |
|
112 { |
|
113 return TPtrC(*iAddress); |
|
114 } |
|
115 |
|
116 return TPtrC(); |
|
117 } |
|
118 |
|
119 /** |
|
120 Sets the absolute MMS Proxy-Relay URL |
|
121 |
|
122 @param aAddress |
|
123 The absolute MMS Proxy-Relay URL |
|
124 */ |
|
125 EXPORT_C void CMmsSettings::SetAddressL(const TDesC& aAddress) |
|
126 { |
|
127 HBufC* newAddress = aAddress.AllocL(); |
|
128 delete iAddress; |
|
129 iAddress = newAddress; |
|
130 } |
|
131 |
|
132 /** |
|
133 Returns the Creation Mode. |
|
134 Creation Mode specifies how an MMS client should allow insertion of media |
|
135 items in an MMS. |
|
136 |
|
137 @see TCreationMode |
|
138 |
|
139 @return |
|
140 The Creation Mode. |
|
141 */ |
|
142 EXPORT_C TCreationMode CMmsSettings::CreationMode( ) const |
|
143 { |
|
144 return iCreationMode; |
|
145 } |
|
146 |
|
147 /** |
|
148 Sets the Creation Mode. |
|
149 Creation Mode specifies how an MMS client should allow insertion of media |
|
150 items in an MMS. |
|
151 |
|
152 @see TCreationMode |
|
153 |
|
154 @param aCreationMode |
|
155 The Creation Mode. |
|
156 */ |
|
157 EXPORT_C void CMmsSettings::SetCreationModeL(TCreationMode aCreationMode) |
|
158 { |
|
159 iCreationMode = aCreationMode; |
|
160 } |
|
161 |
|
162 /** |
|
163 Gets the number of Proxies stored in this object. |
|
164 |
|
165 @return |
|
166 The number of Proxies stored. |
|
167 */ |
|
168 EXPORT_C TInt CMmsSettings::ProxyCount( ) const |
|
169 { |
|
170 return iProxy.Count(); |
|
171 } |
|
172 |
|
173 /** |
|
174 Gets the Proxy at the specified index. |
|
175 |
|
176 @param aIndex |
|
177 Index |
|
178 |
|
179 @return |
|
180 Proxy |
|
181 */ |
|
182 EXPORT_C TUid CMmsSettings::GetProxy(TInt aIndex) const |
|
183 { |
|
184 return iProxy[aIndex]; |
|
185 } |
|
186 |
|
187 /** |
|
188 Appends a Proxy to the list. |
|
189 |
|
190 @param aProxy |
|
191 Proxy to be added to the list |
|
192 */ |
|
193 EXPORT_C void CMmsSettings::AddProxyL(const TUid aProxy) |
|
194 { |
|
195 iProxy.AppendL(aProxy); |
|
196 } |
|
197 |
|
198 /** |
|
199 Removes a Proxy from the list. |
|
200 |
|
201 @param aIndex |
|
202 Index |
|
203 */ |
|
204 EXPORT_C void CMmsSettings::RemoveProxy(TInt aIndex) |
|
205 { |
|
206 iProxy.Remove(aIndex); |
|
207 } |
|
208 |
|
209 /** |
|
210 Gets the number of Nap Ids stored in this object. |
|
211 |
|
212 @return |
|
213 The number of Nap Ids stored. |
|
214 */ |
|
215 EXPORT_C TInt CMmsSettings::NapIdCount( ) const |
|
216 { |
|
217 return iNapId.Count(); |
|
218 } |
|
219 |
|
220 /** |
|
221 Gets the Nap Id at the specified index. |
|
222 |
|
223 @param aIndex |
|
224 Index |
|
225 |
|
226 @return |
|
227 Nap Id |
|
228 */ |
|
229 EXPORT_C TUid CMmsSettings::GetNapId (TInt aIndex) const |
|
230 { |
|
231 return iNapId[aIndex]; |
|
232 } |
|
233 |
|
234 /** |
|
235 Appends a Nap Id to the list. |
|
236 |
|
237 @param aNapId |
|
238 Nap Id to be added to the list |
|
239 */ |
|
240 EXPORT_C void CMmsSettings::AddNapIdL(const TUid aNapId) |
|
241 { |
|
242 iNapId.AppendL(aNapId); |
|
243 } |
|
244 |
|
245 /** |
|
246 Removes a Nap Id from the list. |
|
247 |
|
248 @param aIndex |
|
249 Index |
|
250 */ |
|
251 EXPORT_C void CMmsSettings::RemoveNapId(TInt aIndex) |
|
252 { |
|
253 iNapId.Remove(aIndex); |
|
254 } |
|
255 |
|
256 /** |
|
257 Returns whether the Notification Receipt should be displayed immediately to the user. |
|
258 |
|
259 @return |
|
260 Returns ETrue if the Notification Receipt should be displayed to the user. |
|
261 */ |
|
262 EXPORT_C TBool CMmsSettings::DisplayNotification( ) const |
|
263 { |
|
264 return (iMmsSettingsFlags & ESmsSettingsDisplayNotification)==ESmsSettingsDisplayNotification; |
|
265 } |
|
266 |
|
267 /** |
|
268 Specifies whether the Notification Receipt should be displayed immediately to the user. |
|
269 |
|
270 @param aFlag |
|
271 Specify ETrue if the Notification Receipt should be displayed to the user. |
|
272 */ |
|
273 EXPORT_C void CMmsSettings::SetDisplayNotification(TBool aFlag) |
|
274 { |
|
275 iMmsSettingsFlags = (iMmsSettingsFlags & ~ESmsSettingsDisplayNotification) | (aFlag ? ESmsSettingsDisplayNotification : ESmsSettingsNoFlags); |
|
276 } |
|
277 |
|
278 /** |
|
279 Returns whether the message should be downloaded automatically. |
|
280 |
|
281 @see TAutomaticDownloadOptions |
|
282 |
|
283 @return |
|
284 The automatic download option |
|
285 */ |
|
286 EXPORT_C TAutomaticDownloadOptions CMmsSettings::AutomaticDownload( ) const |
|
287 { |
|
288 return iAutomaticDownloadOptions; |
|
289 } |
|
290 |
|
291 /** |
|
292 Sets the automatic download option |
|
293 |
|
294 @see TAutomaticDownloadOptions |
|
295 |
|
296 @param aDownloadOptions |
|
297 Automatic download option to be set |
|
298 */ |
|
299 EXPORT_C void CMmsSettings::SetAutomaticDownload(TAutomaticDownloadOptions aDownloadOptions) |
|
300 { |
|
301 iAutomaticDownloadOptions = aDownloadOptions; |
|
302 } |
|
303 |
|
304 /** |
|
305 Returns whether the user allowed to modify the creation mode or not. |
|
306 |
|
307 @return |
|
308 Returns ETrue if the user is allowed to modify the creation mode. |
|
309 */ |
|
310 EXPORT_C TBool CMmsSettings::CreationModeReadOnly( ) const |
|
311 { |
|
312 return (iMmsSettingsFlags & ESmsSettingsCreationModeReadOnly)==ESmsSettingsCreationModeReadOnly; |
|
313 } |
|
314 |
|
315 /** |
|
316 Specifies whether the user allowed to modify the creation mode or not. |
|
317 |
|
318 @param aFlag |
|
319 Specify ETrue if the user is allowed to modify the creation mode. |
|
320 */ |
|
321 EXPORT_C void CMmsSettings::SetCreationModeReadOnly(TBool aFlag) |
|
322 { |
|
323 iMmsSettingsFlags = (iMmsSettingsFlags & ~ESmsSettingsCreationModeReadOnly) | (aFlag ? ESmsSettingsCreationModeReadOnly : ESmsSettingsNoFlags); |
|
324 } |
|
325 |
|
326 /** |
|
327 Returns the Validity Period of the MMS message. |
|
328 |
|
329 @return |
|
330 Validity Period of the message |
|
331 */ |
|
332 EXPORT_C TInt CMmsSettings::ValidityPeriod( ) const |
|
333 { |
|
334 return iValidityPeriod; |
|
335 } |
|
336 |
|
337 /** |
|
338 Sets the Validity Period of the MMS message. |
|
339 |
|
340 @param aValidityPeriod |
|
341 Validity Period of the message |
|
342 */ |
|
343 EXPORT_C void CMmsSettings::SetValidityPeriod(const TInt aValidityPeriod) |
|
344 { |
|
345 iValidityPeriod = aValidityPeriod; |
|
346 } |
|
347 |
|
348 /** |
|
349 Returns the maximum size of the MMS message that can be downloaded automatically. |
|
350 |
|
351 @return |
|
352 Maximum size of the message that can be downloaded automatically |
|
353 */ |
|
354 EXPORT_C TInt CMmsSettings::MaxDownloadSize( ) const |
|
355 { |
|
356 return iMaxDownloadSize; |
|
357 } |
|
358 |
|
359 /** |
|
360 Sets the maximum size of the MMS message that can be downloaded automatically. |
|
361 |
|
362 @param aSize |
|
363 Maximum size of the message that can be downloaded automatically |
|
364 */ |
|
365 EXPORT_C void CMmsSettings::SetMaxDownloadSize (const TInt aSize) |
|
366 { |
|
367 iMaxDownloadSize = aSize; |
|
368 } |
|
369 |
|
370 /** |
|
371 Returns the Priority value of the MMS message. |
|
372 |
|
373 @return |
|
374 Priority value |
|
375 */ |
|
376 EXPORT_C TBool CMmsSettings::Priority( ) const |
|
377 { |
|
378 return (iMmsSettingsFlags & ESmsSettingsPriority)==ESmsSettingsPriority; |
|
379 } |
|
380 |
|
381 /** |
|
382 Sets the Priority value of the MMS message. |
|
383 |
|
384 @param aFlag |
|
385 Priority value |
|
386 */ |
|
387 EXPORT_C void CMmsSettings::SetPriority (TBool aFlag) |
|
388 { |
|
389 iMmsSettingsFlags = (iMmsSettingsFlags & ~ESmsSettingsPriority) | (aFlag ? ESmsSettingsPriority : ESmsSettingsNoFlags); |
|
390 } |
|
391 |
|
392 /** |
|
393 Returns whether the user's number should be hidden when sending an MMS. |
|
394 |
|
395 @return |
|
396 Returns ETrue if the user's number should be hidden. |
|
397 */ |
|
398 EXPORT_C TBool CMmsSettings::HideNumber( ) const |
|
399 { |
|
400 return (iMmsSettingsFlags & ESmsSettingsHideNumber)==ESmsSettingsHideNumber; |
|
401 } |
|
402 |
|
403 /** |
|
404 Specifies whether the user's number should be hidden when sending an MMS. |
|
405 |
|
406 @param aFlag |
|
407 Specify ETrue if the user's number should be hidden. |
|
408 */ |
|
409 EXPORT_C void CMmsSettings::SetHideNumber(TBool aFlag) |
|
410 { |
|
411 iMmsSettingsFlags = (iMmsSettingsFlags & ~ESmsSettingsHideNumber) | (aFlag ? ESmsSettingsHideNumber : ESmsSettingsNoFlags); |
|
412 } |
|
413 |
|
414 /** |
|
415 Returns whether the Read Reports should be sent back to the network when the user receives an MMS. |
|
416 |
|
417 @return |
|
418 Returns ETrue if the Read Reports should be sent back to the network |
|
419 */ |
|
420 EXPORT_C TBool CMmsSettings::ReadReport( ) const |
|
421 { |
|
422 return (iMmsSettingsFlags & ESmsSettingsReadReport)==ESmsSettingsReadReport; |
|
423 } |
|
424 |
|
425 /** |
|
426 Specifies whether the Read Reports should be sent back to the network when the user receives an MMS. |
|
427 |
|
428 @param aFlag |
|
429 Specify ETrue if the Read Reports should be sent back to the network |
|
430 */ |
|
431 EXPORT_C void CMmsSettings::SetReadReport(TBool aFlag) |
|
432 { |
|
433 iMmsSettingsFlags = (iMmsSettingsFlags & ~ESmsSettingsReadReport) | (aFlag ? ESmsSettingsReadReport : ESmsSettingsNoFlags); |
|
434 } |
|
435 |
|
436 /** |
|
437 Returns whether the Delivery Reports should be sent back to the network when the user receives an MMS. |
|
438 |
|
439 @return |
|
440 Returns ETrue if the Delivery Reports should be sent back to the network |
|
441 */ |
|
442 EXPORT_C TBool CMmsSettings::DeliveryReport( ) const |
|
443 { |
|
444 return (iMmsSettingsFlags & ESmsSettingsDeliveryReport)==ESmsSettingsDeliveryReport; |
|
445 } |
|
446 |
|
447 /** |
|
448 Specifies whether the Delivery Reports should be sent back to the network when the user receives an MMS. |
|
449 |
|
450 @param aFlag |
|
451 Specify ETrue if the Delivery Reports should be sent back to the network |
|
452 */ |
|
453 EXPORT_C void CMmsSettings::SetDeliveryReport(TBool aFlag) |
|
454 { |
|
455 iMmsSettingsFlags = (iMmsSettingsFlags & ~ESmsSettingsDeliveryReport) | (aFlag ? ESmsSettingsDeliveryReport : ESmsSettingsNoFlags); |
|
456 } |
|
457 |
|
458 /** |
|
459 Returns whether the original MMS should be included when replying to an MMS |
|
460 |
|
461 @return |
|
462 Returns ETrue if the original MMS should be included when replying to an MMS |
|
463 */ |
|
464 EXPORT_C TBool CMmsSettings::ReplyWithHistory( ) const |
|
465 { |
|
466 return (iMmsSettingsFlags & ESmsSettingsReplyWithHistory)==ESmsSettingsReplyWithHistory; |
|
467 } |
|
468 |
|
469 /** |
|
470 Specifies whether the original MMS should be included when replying to an MMS |
|
471 |
|
472 @param aFlag |
|
473 Specify ETrue if the original MMS should be included when replying to an MMS |
|
474 */ |
|
475 EXPORT_C void CMmsSettings::SetReplyWithHistory (TBool aFlag) |
|
476 { |
|
477 iMmsSettingsFlags = (iMmsSettingsFlags & ~ESmsSettingsReplyWithHistory) | (aFlag ? ESmsSettingsReplyWithHistory : ESmsSettingsNoFlags); |
|
478 } |
|
479 |
|
480 /** |
|
481 Returns the Allow Delivery Notification value |
|
482 |
|
483 @return |
|
484 Allow Delivery Notification value |
|
485 */ |
|
486 EXPORT_C TBool CMmsSettings::AllowDeliveryNotification( ) const |
|
487 { |
|
488 return (iMmsSettingsFlags & ESmsSettingsAllowDeliveryNotification)==ESmsSettingsAllowDeliveryNotification; |
|
489 } |
|
490 |
|
491 /** |
|
492 Sets the Allow Delivery Notification value |
|
493 |
|
494 @param aFlag |
|
495 Allow Delivery Notification value |
|
496 */ |
|
497 EXPORT_C void CMmsSettings::SetAllowDeliveryNotification(TBool aFlag) |
|
498 { |
|
499 iMmsSettingsFlags = (iMmsSettingsFlags & ~ESmsSettingsAllowDeliveryNotification) | (aFlag ? ESmsSettingsAllowDeliveryNotification : ESmsSettingsNoFlags); |
|
500 } |
|
501 |
|
502 /** |
|
503 Returns whether to filter advertisment MMS messages when downloading automatically. |
|
504 |
|
505 @return |
|
506 Returns ETrue if advertisments should be filtered when downloading automatically. |
|
507 */ |
|
508 EXPORT_C TBool CMmsSettings::FilterAdvertisements( ) const |
|
509 { |
|
510 return (iMmsSettingsFlags & ESmsSettingsFilterAdvertisements)==ESmsSettingsFilterAdvertisements; |
|
511 } |
|
512 |
|
513 /** |
|
514 Specifies whether to filter advertisment MMS messages when downloading automatically. |
|
515 |
|
516 @param aFlag |
|
517 Specify ETrue if advertisments should be filtered when downloading automatically. |
|
518 */ |
|
519 EXPORT_C void CMmsSettings::SetFilterAdvertisements(TBool aFlag) |
|
520 { |
|
521 iMmsSettingsFlags = (iMmsSettingsFlags & ~ESmsSettingsFilterAdvertisements) | (aFlag ? ESmsSettingsFilterAdvertisements : ESmsSettingsNoFlags); |
|
522 } |
|
523 |
|
524 /** |
|
525 Returns the maximum download retries of an MMS message |
|
526 |
|
527 @return |
|
528 Maximum download retries |
|
529 */ |
|
530 EXPORT_C TInt CMmsSettings::MaxDownloadRetries( ) const |
|
531 { |
|
532 return iMaxDownloadRetries; |
|
533 } |
|
534 |
|
535 /** |
|
536 Sets the maximum download retries of an MMS message |
|
537 |
|
538 @param aRetries |
|
539 Maximum download retries |
|
540 */ |
|
541 EXPORT_C void CMmsSettings::SetMaxDownloadRetries(const TInt aRetries) |
|
542 { |
|
543 iMaxDownloadRetries = aRetries; |
|
544 } |
|
545 |
|
546 /** |
|
547 Returns the download retry interval |
|
548 |
|
549 @return |
|
550 Download retry interval |
|
551 */ |
|
552 EXPORT_C TInt CMmsSettings::DownloadRetryInterval( ) const |
|
553 { |
|
554 return iDownloadRetryInterval; |
|
555 } |
|
556 |
|
557 /** |
|
558 Sets the download retry interval |
|
559 |
|
560 @param aInterval |
|
561 Download retry interval |
|
562 */ |
|
563 EXPORT_C void CMmsSettings::SetDownloadRetryInterval(const TInt aInterval) |
|
564 { |
|
565 iDownloadRetryInterval = aInterval; |
|
566 } |
|
567 |
|
568 /** |
|
569 Returns the maximum MMS message size that can be sent |
|
570 |
|
571 @return |
|
572 The maximum MMS message size that can be sent |
|
573 */ |
|
574 EXPORT_C TInt CMmsSettings::MaxSendMsgSize( ) const |
|
575 { |
|
576 return iMaxSendMsgSize; |
|
577 } |
|
578 |
|
579 /** |
|
580 Sets the maximum MMS message size that can be sent |
|
581 |
|
582 @param aSize |
|
583 The maximum MMS message size that can be sent |
|
584 */ |
|
585 EXPORT_C void CMmsSettings::SetMaxSendMsgSize (const TInt aSize) |
|
586 { |
|
587 iMaxSendMsgSize = aSize; |
|
588 } |
|
589 |
|
590 /** |
|
591 Returns whether to display MMS messages in full screen. |
|
592 |
|
593 @return |
|
594 Returns ETrue if MMS messages should be displayed in full screen. |
|
595 */ |
|
596 EXPORT_C TBool CMmsSettings::FullScreenPreview( ) const |
|
597 { |
|
598 return (iMmsSettingsFlags & ESmsSettingsFullScreenPreview)==ESmsSettingsFullScreenPreview; |
|
599 } |
|
600 |
|
601 /** |
|
602 Specifies whether to display MMS messages using full screen. |
|
603 |
|
604 @param aFlag |
|
605 Specify ETrue if MMS messages should be displayed in full screen. |
|
606 */ |
|
607 EXPORT_C void CMmsSettings::SetFullScreenPreview(TBool aFlag) |
|
608 { |
|
609 iMmsSettingsFlags = (iMmsSettingsFlags & ~ESmsSettingsFullScreenPreview) | (aFlag ? ESmsSettingsFullScreenPreview : ESmsSettingsNoFlags); |
|
610 } |
|
611 |
|
612 /** |
|
613 Returns the content class of the device |
|
614 |
|
615 @return |
|
616 The content class of the device |
|
617 */ |
|
618 EXPORT_C TInt CMmsSettings::DeviceContentClass( ) const |
|
619 { |
|
620 return iDeviceContentClass; |
|
621 } |
|
622 |
|
623 /** |
|
624 Sets the content class of the device |
|
625 |
|
626 @param aClass |
|
627 The content class of the device |
|
628 */ |
|
629 EXPORT_C void CMmsSettings::SetDeviceContentClass(const TInt aClass) |
|
630 { |
|
631 iDeviceContentClass = aClass; |
|
632 } |
|
633 |
|
634 /** |
|
635 Returns the maximum image height to be used when sending an MMS message |
|
636 |
|
637 @return |
|
638 The maximum image height |
|
639 */ |
|
640 EXPORT_C TInt CMmsSettings::MaxImageHeight( ) const |
|
641 { |
|
642 return iMaxImageHeight; |
|
643 } |
|
644 |
|
645 /** |
|
646 Sets the maximum image height to be used when sending an MMS message |
|
647 |
|
648 @param aHeight |
|
649 The maximum image height |
|
650 */ |
|
651 EXPORT_C void CMmsSettings::SetMaxImageHeight(const TInt aHeight) |
|
652 { |
|
653 iMaxImageHeight = aHeight; |
|
654 } |
|
655 |
|
656 /** |
|
657 Returns the maximum image width to be used when sending an MMS message |
|
658 |
|
659 @return |
|
660 The maximum image width |
|
661 */ |
|
662 EXPORT_C TInt CMmsSettings::MaxImageWidth( ) const |
|
663 { |
|
664 return iMaxImageWidth; |
|
665 } |
|
666 |
|
667 /** |
|
668 Sets the maximum image width to be used when sending an MMS message |
|
669 |
|
670 @param aWidth |
|
671 The maximum image width |
|
672 */ |
|
673 EXPORT_C void CMmsSettings::SetMaxImageWidth(const TInt aWidth) |
|
674 { |
|
675 iMaxImageWidth = aWidth; |
|
676 } |
|
677 |
|
678 /** |
|
679 Copies the MMS settings stored in the specified object into this object. |
|
680 |
|
681 @param aMmsSettings |
|
682 The MMS Settings to be copied. |
|
683 */ |
|
684 EXPORT_C void CMmsSettings::CopyL(const CMmsSettings& aMmsSettings) |
|
685 { |
|
686 iMmsSettingsFlags = aMmsSettings.iMmsSettingsFlags; |
|
687 iApplicationId = aMmsSettings.iApplicationId; |
|
688 |
|
689 delete iAddress; |
|
690 iAddress = aMmsSettings.Address().AllocL(); |
|
691 |
|
692 iCreationMode = aMmsSettings.iCreationMode; |
|
693 |
|
694 TInt count = aMmsSettings.ProxyCount(); |
|
695 iProxy.Reset(); |
|
696 for(TInt loop=0; loop < count; ++loop) |
|
697 { |
|
698 iProxy.Append(aMmsSettings.GetProxy(loop)); |
|
699 } |
|
700 |
|
701 count = aMmsSettings.NapIdCount(); |
|
702 iNapId.Reset(); |
|
703 for(TInt loop=0; loop < count; ++loop) |
|
704 { |
|
705 iNapId.Append(aMmsSettings.GetNapId(loop)); |
|
706 } |
|
707 |
|
708 iAutomaticDownloadOptions = aMmsSettings.iAutomaticDownloadOptions; |
|
709 iValidityPeriod = aMmsSettings.iValidityPeriod; |
|
710 iMaxDownloadSize = aMmsSettings.iMaxDownloadSize; |
|
711 iMaxDownloadRetries = aMmsSettings.iMaxDownloadRetries; |
|
712 iDownloadRetryInterval = aMmsSettings.iDownloadRetryInterval; |
|
713 iMaxSendMsgSize = aMmsSettings.iMaxSendMsgSize; |
|
714 iDeviceContentClass = aMmsSettings.iDeviceContentClass; |
|
715 iMaxImageHeight = aMmsSettings.iMaxImageHeight; |
|
716 iMaxImageWidth = aMmsSettings.iMaxImageWidth; |
|
717 } |
|
718 |
|
719 void CMmsSettings::RemoveAllProxies() |
|
720 { |
|
721 iProxy.Reset(); |
|
722 } |
|
723 |
|
724 void CMmsSettings::RemoveAllNapIds() |
|
725 { |
|
726 iNapId.Reset(); |
|
727 } |
|
728 |
|
729 /** |
|
730 Returns MMS settings flag |
|
731 |
|
732 @return |
|
733 MMS settings flag |
|
734 */ |
|
735 TUint32 CMmsSettings::MmsSettingsFlags() const |
|
736 { |
|
737 return iMmsSettingsFlags; |
|
738 } |
|
739 |
|
740 /** |
|
741 Sets MMS settings flag |
|
742 |
|
743 @param aMsgFlags |
|
744 MMS settings flag |
|
745 */ |
|
746 void CMmsSettings::SetMmsSettingsFlags(TUint32 aFlags) |
|
747 { |
|
748 iMmsSettingsFlags = aFlags; |
|
749 } |