|
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 * A simple utility class for providing common functionality |
|
16 * and minimizing duplicate code. |
|
17 * |
|
18 */ |
|
19 |
|
20 |
|
21 |
|
22 #ifndef SMUMUTIL_H |
|
23 #define SMUMUTIL_H |
|
24 |
|
25 // FORWARD DECLARATIONS |
|
26 class CSmsSettings; |
|
27 |
|
28 // CLASS DECLARATION |
|
29 |
|
30 /** |
|
31 * A simple utility class for providing common functionality |
|
32 * and minimizing duplicate code. |
|
33 */ |
|
34 class SmumUtil |
|
35 { |
|
36 public: |
|
37 |
|
38 /** |
|
39 * Finds default name for Service Centre and adds ordinal |
|
40 * number in the end if it is needed. |
|
41 * @param aName A reference parameter for transferring the default name. |
|
42 * Ensure the descriptor is long enough to handle default name + ordinal. |
|
43 * @param aSCNamesList A pointer to list of SC names (if not |
|
44 * given, returns only default name) |
|
45 */ |
|
46 IMPORT_C static void FindDefaultNameForSCL( |
|
47 TDes& aName, |
|
48 TBool aNameIsForSCentreFromSIM, |
|
49 CDesCArrayFlat* aSCNamesList = NULL); |
|
50 |
|
51 /** |
|
52 * Returns the current Email-over-Sms settings |
|
53 * @since 2.6 |
|
54 * @param aSmsc |
|
55 * @param aDestinationAddress |
|
56 * @param aModifiable |
|
57 * @return Symbian OS standard error code |
|
58 */ |
|
59 IMPORT_C static TInt ReadEmailOverSmsSettingsL( |
|
60 TDes& aSmsc, |
|
61 TDes& aDestinationAddress, |
|
62 TBool& aModifiable ); |
|
63 |
|
64 /** |
|
65 * Writes the current Email-over-Sms settings to file |
|
66 * @since 2.6 |
|
67 * @param aSmsc service centre used |
|
68 * for Email over Sms messages |
|
69 * @param aDestinationAddress service number |
|
70 * used for Email over Sms messages |
|
71 * @param aModifiable used to determine if user is allowed to |
|
72 * modify setting or read only |
|
73 * @return Symbian OS standard error code |
|
74 */ |
|
75 IMPORT_C static TInt WriteEmailOverSmsSettingsL( |
|
76 const TDes& aSmsc, |
|
77 const TDes& aDestinationAddress, |
|
78 const TBool& aModifiable ); |
|
79 |
|
80 /** |
|
81 * Checks if Email Over Sms feature is supported |
|
82 * according to local variation |
|
83 * @since 2.6 |
|
84 * @return ETrue if feature supported |
|
85 */ |
|
86 IMPORT_C static TBool CheckEmailOverSmsSupportL(); |
|
87 |
|
88 /** |
|
89 * Shows an information note |
|
90 * @since 2.6 |
|
91 * @param aResource, resourse id used in note text |
|
92 */ |
|
93 static void ShowInformationNoteL( TInt aResource ); |
|
94 |
|
95 /** |
|
96 * Reads the MCE variation flags value from CentralRepository |
|
97 * @since 2.8 |
|
98 * @param aKey, the key of interest |
|
99 * @return TInt, value of MCE variation flags |
|
100 */ |
|
101 static TInt CheckVariationFlagsL( const TUid aUid, const TUint32 aKey ); |
|
102 |
|
103 private: |
|
104 |
|
105 /** |
|
106 * Checks if Email Over Sms feature is supported |
|
107 * according to Value Added Services (U)SIM, bit KCspSMMOEmail |
|
108 * @since 2.6 |
|
109 * @return ETrue if feature supported |
|
110 */ |
|
111 static TBool ReadEmailSupportFromVASL(); |
|
112 |
|
113 // Prohibit copy constructor |
|
114 SmumUtil( const SmumUtil& ); |
|
115 // Prohibit assigment operator |
|
116 SmumUtil& operator= ( const SmumUtil& ); |
|
117 |
|
118 }; |
|
119 |
|
120 #endif // SMUMUTIL.H |
|
121 |
|
122 // End of File |