|
1 /* |
|
2 * Copyright (c) 2006 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: Implementation for Settings Interface for getting/setting tonefilename etc |
|
15 * |
|
16 */ |
|
17 |
|
18 #ifndef CCACOMMANDSETTINGASPEXTCMD_H |
|
19 #define CCACOMMANDSETTINGASPEXTCMD_H |
|
20 |
|
21 |
|
22 |
|
23 // INCLUDES |
|
24 #include "MCASettingsPC.h" |
|
25 #include"MCASettingSapExt.h" |
|
26 |
|
27 // FORWARD DECLARATIONS |
|
28 class CIMPSPresenceConnectionUi; |
|
29 class CIMPSSAPSettingsStore; |
|
30 class MCASettingsPC; |
|
31 class CIMPSSAPSettings; |
|
32 |
|
33 |
|
34 class CCACommandSettingSapExtCmd : public CBase, public MCASettingSapExt |
|
35 { |
|
36 public: |
|
37 /** |
|
38 * Two-phased constructor. |
|
39 * @param aSettingsPC Reference to the settings process component |
|
40 * @param aPreserveSessionIdInExit ETrue to preserve IMPSCUI Session Id when exiting, |
|
41 * needed in Always Online case |
|
42 * @param aSAPSettings If given, the settings will be saved in the sap |
|
43 * instead of cenrep. |
|
44 */ |
|
45 static CCACommandSettingSapExtCmd* NewLC( MCASettingsPC* aSettingsPC, |
|
46 TBool aPreserveSessionIdInExit = EFalse, |
|
47 CIMPSSAPSettings* aSAPSettings = NULL ); |
|
48 |
|
49 /** |
|
50 * Two-phased constructor. |
|
51 * @param aSettingsPC Reference to the settings process component |
|
52 * @param aPreserveSessionIdInExit ETrue to preserve IMPSCUI Session Id when exiting, |
|
53 * needed in Always Online case |
|
54 * @param aSAPSettings If given, the settings will be saved in the sap |
|
55 * instead of cenrep. |
|
56 */ |
|
57 |
|
58 static CCACommandSettingSapExtCmd* NewL( MCASettingsPC* aSettingsPC, |
|
59 TBool aPreserveSessionIdInExit = EFalse, |
|
60 CIMPSSAPSettings* aSAPSettings = NULL ); |
|
61 |
|
62 |
|
63 /** |
|
64 * Destructor. |
|
65 */ |
|
66 virtual ~CCACommandSettingSapExtCmd( ); |
|
67 |
|
68 |
|
69 public: // New functions |
|
70 |
|
71 /** |
|
72 * Sets int value to SAP settings |
|
73 * @since Series 60 3.0 |
|
74 * @param aKey Key for key-value pair in SAP settings |
|
75 * @param aValue Value for key-value pair in SAP settings |
|
76 */ |
|
77 void SetIntValueL( const TDesC& aKey, TInt aValue ); |
|
78 |
|
79 |
|
80 /** |
|
81 * Gets int value from SAP settings |
|
82 * @since Series 60 3.0 |
|
83 * @param aKey Key for key-value pair in SAP settings |
|
84 * @return Value for key |
|
85 */ |
|
86 TInt IntValueL( const TDesC& aKey ); |
|
87 |
|
88 |
|
89 /** |
|
90 * Sets alert tone file name to SAP settings |
|
91 * @since Series 60 3.0 |
|
92 * @param aToneFileName Filename that is stored to SAP settings |
|
93 */ |
|
94 void SetToneFileNameL( const TDesC& aToneFileName ); |
|
95 |
|
96 |
|
97 /** |
|
98 * Gets alert tone file name from SAP settings |
|
99 * @since Series 60 3.0 |
|
100 * @param aToneFileName Filename that is stored to SAP settings |
|
101 */ |
|
102 void GetToneFileNameL( TDes& aToneFileName ); |
|
103 |
|
104 public: |
|
105 //New Methods |
|
106 |
|
107 /** |
|
108 * Gets editable stored SAP |
|
109 */ |
|
110 CIMPSSAPSettings* StoredSAPLC( ); |
|
111 |
|
112 |
|
113 /** |
|
114 * Gets current SAP |
|
115 */ |
|
116 CIMPSSAPSettings* CurrentSAPLC( ) ; |
|
117 |
|
118 private: |
|
119 |
|
120 /* |
|
121 *ConstructL |
|
122 */ |
|
123 void ConstructL( CIMPSSAPSettings* aSAPSettings ); |
|
124 |
|
125 |
|
126 |
|
127 /* |
|
128 *Default Constructor |
|
129 * @param aPreserveSessionIdInExit ETrue to preserve IMPSCUI Session Id when exiting, |
|
130 * needed in Always Online case |
|
131 * @param aSettingsPC Reference to the settings process component |
|
132 */ |
|
133 CCACommandSettingSapExtCmd( TBool aPreserveSessionIdInExit, |
|
134 MCASettingsPC* aSettingsPC ); |
|
135 |
|
136 |
|
137 private://data members |
|
138 |
|
139 //Does not own |
|
140 CIMPSSAPSettings* iSAPSettings; |
|
141 |
|
142 //Does not own |
|
143 MCASettingsPC* iSettingsPC; |
|
144 |
|
145 // ETrue if IMPSCUI Session Id should be preserved upon exit |
|
146 TBool iPreserveSessionIdInExit; |
|
147 |
|
148 // Owns, sapsettingstore interface |
|
149 CIMPSSAPSettingsStore* iSAPSettingsStore; |
|
150 |
|
151 // Owns. Connection UI |
|
152 CIMPSPresenceConnectionUi* iConnectionUI; |
|
153 }; |
|
154 |
|
155 |
|
156 #endif |