33
|
1 |
/*
|
|
2 |
* Copyright (c) 2003 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 file contains the header file of the server-side settings
|
|
15 |
* subsession class.
|
|
16 |
*
|
|
17 |
*/
|
|
18 |
|
|
19 |
|
|
20 |
|
|
21 |
#ifndef CCBSSETTINGS_H
|
|
22 |
#define CCBSSETTINGS_H
|
|
23 |
|
|
24 |
// INCLUDES
|
|
25 |
#include "CCbsSession.h"
|
|
26 |
#include "CCbsObject.h"
|
|
27 |
#include "MCbsDbSettingsObserver.H"
|
|
28 |
|
|
29 |
// FORWARD DECLARATIONS
|
|
30 |
class CCbsDbImpSettings;
|
|
31 |
class CCbsRecEtel;
|
|
32 |
|
|
33 |
// CLASS DECLARATION
|
|
34 |
|
|
35 |
/**
|
|
36 |
* The server-side CbsClient subsession for modifying settings.
|
|
37 |
*/
|
|
38 |
class CCbsSettings
|
|
39 |
: public CCbsObject, public MCbsDbSettingsObserver
|
|
40 |
{
|
|
41 |
public: // New functions
|
|
42 |
/**
|
|
43 |
* Creates a new instance of the class.
|
|
44 |
*
|
|
45 |
* @param aSession Session object
|
|
46 |
* @param aSettings Database settings manager
|
|
47 |
* @param aReceiver Receiver object
|
|
48 |
* @return Pointer to a new instance of CCbsSettings
|
|
49 |
*/
|
|
50 |
static CCbsSettings* NewL( CCbsSession& aSession,
|
|
51 |
CCbsDbImpSettings& aSettings,
|
|
52 |
CCbsRecEtel& aReceiver );
|
|
53 |
|
|
54 |
/**
|
|
55 |
* Destructor.
|
|
56 |
*/
|
|
57 |
~CCbsSettings();
|
|
58 |
|
|
59 |
public: // From CCbsObject
|
|
60 |
/**
|
|
61 |
* Handle the requests for the object.
|
|
62 |
*
|
|
63 |
* @param aMessage Message to be handled.
|
|
64 |
* @return Indicates whether the message was handled.
|
|
65 |
*/
|
|
66 |
TBool HandleRequestsL( const RMessage2& aMessage );
|
|
67 |
|
|
68 |
private: // From MCbsDbSettingsObserver
|
|
69 |
|
|
70 |
/**
|
|
71 |
* Called when the topic detection is changed.
|
|
72 |
*/
|
|
73 |
void TopicDetectionStatusChangedIndL();
|
|
74 |
|
|
75 |
/**
|
|
76 |
* Called when reception status is changed.
|
|
77 |
*/
|
|
78 |
void ReceptionStatusChangedIndL();
|
|
79 |
|
|
80 |
/**
|
|
81 |
* Called when preferred languages are changed.
|
|
82 |
*/
|
|
83 |
void LanguagesChangedIndL();
|
|
84 |
|
|
85 |
/**
|
|
86 |
* Called when time-limited reception status changed
|
|
87 |
*/
|
|
88 |
void LimitedReceptionStatusChangedIndL();
|
|
89 |
|
|
90 |
/**
|
|
91 |
* Called when clean up interval of read messages changed
|
|
92 |
*/
|
|
93 |
void CleanupTimeChangedIndL();
|
|
94 |
|
|
95 |
private:
|
|
96 |
/**
|
|
97 |
* Constructor.
|
|
98 |
*
|
|
99 |
* @param aSession Session session object
|
|
100 |
* @param aSettings Database settings manager
|
|
101 |
* @param aReceiver Receiver
|
|
102 |
*/
|
|
103 |
CCbsSettings( CCbsSession& aSession,
|
|
104 |
CCbsDbImpSettings& aSettings,
|
|
105 |
CCbsRecEtel& aReceiver );
|
|
106 |
|
|
107 |
/**
|
|
108 |
* Finalizes construction.
|
|
109 |
*/
|
|
110 |
void ConstructL();
|
|
111 |
|
|
112 |
/**
|
|
113 |
* Close the subsession.
|
|
114 |
*
|
|
115 |
* Note that the method will delete itself, so the object is no
|
|
116 |
* longer valid after the call.
|
|
117 |
*/
|
|
118 |
void CloseSettings();
|
|
119 |
|
|
120 |
/**
|
|
121 |
* Return the current reception status to the client.
|
|
122 |
*/
|
|
123 |
void GetReceptionStatusL();
|
|
124 |
|
|
125 |
/**
|
|
126 |
* Change the reception status to the requested one.
|
|
127 |
*/
|
|
128 |
void SetReceptionStatusL();
|
|
129 |
|
|
130 |
/**
|
|
131 |
* Return the current topic detection status to the client.
|
|
132 |
*/
|
|
133 |
void GetTopicDetectionStatusL();
|
|
134 |
|
|
135 |
/**
|
|
136 |
* Change the topic detection status to the requested one.
|
|
137 |
*/
|
|
138 |
void SetTopicDetectionStatusL();
|
|
139 |
|
|
140 |
/**
|
|
141 |
* Return the preferred languages to the client.
|
|
142 |
*/
|
|
143 |
void GetLanguagesL();
|
|
144 |
|
|
145 |
/**
|
|
146 |
* Change the preferred languages to the requested.
|
|
147 |
*/
|
|
148 |
void SetLanguagesL();
|
|
149 |
|
|
150 |
/**
|
|
151 |
* Make request to notify when settings are changed.
|
|
152 |
*/
|
|
153 |
void NotifySettingsChanged();
|
|
154 |
|
|
155 |
/**
|
|
156 |
* Cancel the request to notify when settings are changed.
|
|
157 |
*/
|
|
158 |
void NotifySettingsChangedCancel();
|
|
159 |
|
|
160 |
/**
|
|
161 |
* Notifies the client (if there is a pending request).
|
|
162 |
*
|
|
163 |
* @param aEvent Identifies the type of request that
|
|
164 |
* has happened.
|
|
165 |
*/
|
|
166 |
void NotifyClientL( TCbsSettingsEvent aEvent );
|
|
167 |
|
|
168 |
private: // Prohibited operators and functions
|
|
169 |
|
|
170 |
// Copy constructor
|
|
171 |
CCbsSettings( const CCbsSettings& );
|
|
172 |
|
|
173 |
// Assignment operator
|
|
174 |
CCbsSettings& operator=( const CCbsSettings& );
|
|
175 |
|
|
176 |
private: // Data
|
|
177 |
|
|
178 |
// Reference to the database settings manager
|
|
179 |
CCbsDbImpSettings& iSettings;
|
|
180 |
|
|
181 |
// Reference to the receiver
|
|
182 |
CCbsRecEtel& iReceiver;
|
|
183 |
|
|
184 |
// Indicates whether iMessage is a valid message; that is, there
|
|
185 |
// is a pending notify request.
|
|
186 |
TBool iIsMessage;
|
|
187 |
|
|
188 |
// Message of the pending notify request, if available
|
|
189 |
RMessage2 iMessage;
|
|
190 |
};
|
|
191 |
|
|
192 |
#endif // CCBSSETTINGS_H
|
|
193 |
|
|
194 |
// End of File
|
|
195 |
|
|
196 |
|