|
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 RCbsSettings class |
|
15 * |
|
16 * Client-side subsession which handles requests regarding |
|
17 * CbsServer settings, i.e. receive state, topic detection state and |
|
18 * selected languages. |
|
19 * |
|
20 * |
|
21 */ |
|
22 |
|
23 |
|
24 |
|
25 #ifndef RCBSSETTINGS_H |
|
26 #define RCBSSETTINGS_H |
|
27 |
|
28 // INCLUDES |
|
29 #include <e32base.h> |
|
30 #include "CbsCommon.h" |
|
31 |
|
32 |
|
33 // FORWARD DECLARATIONS |
|
34 class RCbs; |
|
35 |
|
36 // CLASS DECLARATION |
|
37 |
|
38 /** |
|
39 * This represents the client-side subsession to modify and retrieve settings. |
|
40 */ |
|
41 class RCbsSettings |
|
42 : public RSubSessionBase |
|
43 { |
|
44 public: // New functions |
|
45 |
|
46 /** |
|
47 * Constructor. |
|
48 */ |
|
49 RCbsSettings(); |
|
50 |
|
51 /** |
|
52 * Creates a subsession to the server. |
|
53 * |
|
54 * Note that this method must be called before using any other method. |
|
55 * |
|
56 * @param aServer It is the session. |
|
57 * @return Error code. |
|
58 */ |
|
59 TInt Open( RCbs& aServer ); |
|
60 |
|
61 /** |
|
62 * Closes the subsession. |
|
63 * |
|
64 * @return Error code. |
|
65 */ |
|
66 TInt Close(); |
|
67 |
|
68 /** |
|
69 * Returns the reception status in aStatus, which is ETrue if the |
|
70 * reception is on. Otherwise it is EFalse. |
|
71 * |
|
72 * @param aStatus The method returns the reception status in |
|
73 * this parameter. |
|
74 */ |
|
75 void GetReceptionStatus( TBool& aStatus ); |
|
76 |
|
77 /** |
|
78 * Changes the reception status to aStatus. |
|
79 * |
|
80 * @param aStatus It contains the new reception status. |
|
81 * @return Result code. KErrNone if no errors. |
|
82 */ |
|
83 TInt SetReceptionStatus( TBool aStatus ); |
|
84 |
|
85 /** |
|
86 * Returns the topic detection status in aStatus, which is ETrue if |
|
87 * the detection is on. Otherwise it is EFalse. |
|
88 * |
|
89 * @param aStatus The method returns the topic detection status |
|
90 * in this parameter. |
|
91 */ |
|
92 void GetTopicDetectionStatus( TBool& aStatus ); |
|
93 |
|
94 /** |
|
95 * Changes the topic detection status to aStatus. |
|
96 * |
|
97 * @param aStatus It contains the new topic detection status. |
|
98 * @return Result code. KErrNone if no errors. |
|
99 */ |
|
100 TInt SetTopicDetectionStatus( TBool aStatus ); |
|
101 |
|
102 /** |
|
103 * Returns the preferred languages in aLanguages. |
|
104 * |
|
105 * @param aLanguages The method returns the languages in this |
|
106 * parameter. |
|
107 */ |
|
108 void GetLanguages( TCbsSettingsLanguages& aLanguages ); |
|
109 |
|
110 /** |
|
111 * Changes the preferred languages to aLanguages. |
|
112 * |
|
113 * @param aLanguages It contains the new preferred languages. |
|
114 * @return Result code. KErrNone if no errors. |
|
115 */ |
|
116 TInt SetLanguages( const TCbsSettingsLanguages& aLanguages ); |
|
117 |
|
118 /** |
|
119 * Requests the server to notify the client whenever any settings |
|
120 * will be changed. |
|
121 * |
|
122 * Note that for each subsession only one this kind of request can |
|
123 * be pending. Each client is responsible of assuring this. |
|
124 * |
|
125 * @param aStatus It is the variable that the server will |
|
126 * modify whenever an event occurs. |
|
127 * @param aEvent The server will store the type of occurred |
|
128 * event to this variable. |
|
129 */ |
|
130 void NotifySettingsChanged( TRequestStatus& aStatus, |
|
131 TCbsSettingsEvent& aEvent ); |
|
132 |
|
133 /** |
|
134 * Cancels the request to notify the client. |
|
135 */ |
|
136 void NotifySettingsChangedCancel(); |
|
137 |
|
138 private: // prohibited functions |
|
139 // Prohibited copy constructor |
|
140 RCbsSettings( const RCbsSettings& ); |
|
141 |
|
142 // Prohibited assignment operator |
|
143 RCbsSettings& operator=( const RCbsSettings& ); |
|
144 |
|
145 private: // Data |
|
146 |
|
147 // Pointer descriptor used to transfer information during a notify |
|
148 // request. |
|
149 TPtr8 iNotifyEventPtr; |
|
150 }; |
|
151 |
|
152 |
|
153 #endif // RCBSSETTINGS_H |
|
154 |
|
155 // End of File |
|
156 |
|
157 |