1 /* |
|
2 * Copyright (c) 2009 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 * |
|
16 */ |
|
17 |
|
18 #ifndef CRADIOPUBSUB_H |
|
19 #define CRADIOPUBSUB_H |
|
20 |
|
21 #include <e32base.h> |
|
22 |
|
23 #include "radiointernalpskeys.h" |
|
24 |
|
25 class MRadioControlEventObserver; |
|
26 |
|
27 /** |
|
28 * Publish&Subscribe interface of Visual Radio Application. |
|
29 */ |
|
30 NONSHARABLE_CLASS( CRadioPubSub ) : public CBase |
|
31 { |
|
32 public: |
|
33 |
|
34 IMPORT_C static CRadioPubSub* NewL(); |
|
35 |
|
36 IMPORT_C virtual ~CRadioPubSub(); |
|
37 |
|
38 /** |
|
39 * Publishes active channel number to P&S. |
|
40 * |
|
41 * @param aChannelId The channel ID to publish. |
|
42 */ |
|
43 virtual TBool PublishChannel( TInt aChannelId ) const = 0; |
|
44 |
|
45 /** |
|
46 * Publishes active frequency to P&S. |
|
47 * |
|
48 * @param aFreq The frequency to publish. |
|
49 */ |
|
50 virtual TBool PublishFrequency( TUint32 aFreq ) const = 0; |
|
51 |
|
52 /** |
|
53 * Publishes radio power state to P&S. |
|
54 * |
|
55 * @param aPowerOn The radio power state to publish. |
|
56 */ |
|
57 virtual TBool PublishPowerState( TBool aPowerOn ) const = 0; |
|
58 |
|
59 /** |
|
60 * Publishes current volume level to P&S. |
|
61 * |
|
62 * @param aVol The current volume level to publish. |
|
63 */ |
|
64 virtual TBool PublishVolume( TInt aVol ) const = 0; |
|
65 |
|
66 /** |
|
67 * Publishes changed channel number to P&S. |
|
68 * |
|
69 * @param aChannelId The channel ID to publish. |
|
70 */ |
|
71 virtual TBool PublishChannelDataChanged( TInt aChannelId ) const = 0; |
|
72 |
|
73 /** |
|
74 * Publishes the tuning state to P&S. |
|
75 * @param aTuningState The tuning state to publish. |
|
76 */ |
|
77 virtual TBool PublishTuningState( TRadioPSTuningState aTuningState ) const = 0; |
|
78 |
|
79 /** |
|
80 * Publishes radio mute state to P&S. |
|
81 * |
|
82 * @param aMuted The radio mute state to publish. |
|
83 */ |
|
84 virtual TBool PublishRadioMuteState( TBool aMuted ) const = 0; |
|
85 |
|
86 /** |
|
87 * Publishes application running state to P&S. |
|
88 * |
|
89 * @param aRunningState The application running state. |
|
90 */ |
|
91 virtual TBool PublishApplicationRunningState( TRadioPSApplicationRunningState aRunningState ) const = 0; |
|
92 |
|
93 /** |
|
94 * Publishes the headset status to P&S. |
|
95 * |
|
96 * @param aHeadsetStatus The headset's status. |
|
97 */ |
|
98 virtual TBool PublishHeadsetStatus( TRadioPSHeadsetStatus aHeadsetStatus ) const = 0; |
|
99 |
|
100 /** |
|
101 * Publishes the frequency decimal count to P&S. |
|
102 * @param aDecimalCount The decimal count. |
|
103 */ |
|
104 virtual TBool PublishFrequencyDecimalCount( TRadioPSFrequencyDecimalCount aDecimalCount ) const = 0; |
|
105 |
|
106 /** |
|
107 * Publishes speaker status. Before state is set for first time it is in |
|
108 * <code>ERadioPSSpeakerUninitialized</code> state. |
|
109 * |
|
110 * @param aLoudspeakerStatus Status of the speaker |
|
111 */ |
|
112 virtual TBool PublishLoudspeakerStatus( TRadioPSLoudspeakerStatus aLoudspeakerStatus ) const = 0; |
|
113 |
|
114 /** |
|
115 * Publishes Rds Program Service information. |
|
116 * |
|
117 * @param aProgramService Rds Program service descriptor |
|
118 */ |
|
119 virtual TBool PublishRdsProgramService( const TDesC& aProgramService ) const = 0; |
|
120 |
|
121 /** |
|
122 * Publishes Rds Radio Text information. |
|
123 * |
|
124 * @param aRadioText The Radio Text information to be published. |
|
125 */ |
|
126 virtual TBool PublishRdsRadioText( const TDesC& aRadioText ) const = 0; |
|
127 |
|
128 /** |
|
129 * Publishes Channel name information. |
|
130 * |
|
131 * @param aName The name to be published. |
|
132 */ |
|
133 virtual TBool PublishChannelName( const TDesC& aName ) const = 0; |
|
134 |
|
135 /** |
|
136 * Publishes the number of presets in the active preset list. |
|
137 * |
|
138 * @param aCount The number of presets. |
|
139 */ |
|
140 virtual TBool PublishActivePreseListCount( TInt aCount ) const = 0; |
|
141 |
|
142 /** |
|
143 * Publishes the focus in the active preset list. |
|
144 * |
|
145 * @param aIndex The focus in the active preset list. |
|
146 */ |
|
147 virtual TBool PublishActivePreseListFocus( TInt aIndex ) const = 0; |
|
148 |
|
149 /** |
|
150 * Publishes the antenna state ( attach/detach ). |
|
151 * |
|
152 * @param aState The current antenna state. |
|
153 */ |
|
154 virtual TBool PublishAntennaState( TRadioPSRadioAntennaState aState ) const = 0; |
|
155 |
|
156 /** |
|
157 * Sets the UI side control event observer. |
|
158 * @param aControlEventObserver the observer for control events |
|
159 */ |
|
160 virtual void SetControlEventObserver( MRadioControlEventObserver* aControlEventObserver ) = 0; |
|
161 |
|
162 }; |
|
163 |
|
164 #endif // CRADIOPUBSUB_H |
|