|
1 /* |
|
2 * Copyright (c) 2005 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: Declaration of a simple interface to integrate the FM Radio |
|
15 * application engine and Ui. |
|
16 * Ui is derived from this class and Ui implements |
|
17 * the virtual method HandleRadioEngineCallBackL in class |
|
18 * CFMRadioAppUi. Radio engine then calls this virtual function |
|
19 * when it needs to pass information i.e. about its changed |
|
20 * state where Ui must react to. The traffic between Ui and |
|
21 * engine goes like: |
|
22 * Ui::RequestToEngine() -> Engine() -> Ui::DoAndShowItAndUpdateState() |
|
23 * |
|
24 */ |
|
25 |
|
26 |
|
27 #ifndef FMRADIOENGINESTATECHANGECALLBACK_H |
|
28 #define FMRADIOENGINESTATECHANGECALLBACK_H |
|
29 |
|
30 // Class declaration |
|
31 |
|
32 /** |
|
33 * It is interface to integrate the FM Radio |
|
34 * application engine and Ui. |
|
35 * @lib FMRadioEngine.lib |
|
36 * @since Series 60 2.7 |
|
37 */ |
|
38 class MRadioEngineStateChangeCallback |
|
39 { |
|
40 public: |
|
41 /** |
|
42 * Event codes for identifying the event that |
|
43 * caused the change in engine's internal state. |
|
44 * Also, the possible error context is determined |
|
45 * from the event code. See the TFMRadioErrorCode |
|
46 * decalaration below for further information. |
|
47 */ |
|
48 enum TFMRadioNotifyEvent |
|
49 { |
|
50 // Radio functionality events |
|
51 EFMRadioEventNone = 0x00, |
|
52 EFMRadioEventTunerReady, |
|
53 EFMRadioEventRadioOn, |
|
54 EFMRadioEventRadioOff, |
|
55 EFMRadioEventTune, |
|
56 EFMRadioEventVolumeUpdated, |
|
57 EFMRadioEventSetAudioMode, |
|
58 EFMRadioEventSetAudioOutput, |
|
59 EFMRadioEventHeadsetDisconnected, |
|
60 EFMRadioEventHeadsetReconnected, |
|
61 EFMRadioEventButtonPressed, |
|
62 EFMRadioEventFlightModeEnabled, |
|
63 EFMRadioEventFlightModeDisabled, |
|
64 EFMRadioEventStandbyMode, |
|
65 EFMRadioEventSetMuteState, |
|
66 EFMRadioEventAudioResourceAvailable, |
|
67 EFMRadioEventAudioResourcePaused, |
|
68 EFMRadioEventAudioResourceLost, |
|
69 EFMRadioEventCallStarted, |
|
70 EFMRadioEventCallEnded, |
|
71 EFMRadioEventFMRadioInitialized, |
|
72 EFMRadioEventFMTransmitterOn, |
|
73 EFMRadioEventFreqRangeChanged, |
|
74 EFMRadioEventRDSNotSupported, |
|
75 EFMRadioEventScanLocalStationsCanceled |
|
76 |
|
77 }; |
|
78 public: |
|
79 /** |
|
80 * Interface method to get the callback from the |
|
81 * radio engine to radio Ui. |
|
82 * |
|
83 * @param aEventCode Predefined code of the event which |
|
84 * caused the change in engine's internal state. |
|
85 * @param aErrorCode Predefined code of the error if |
|
86 * one was generated. If no errors, value is 0x00 (NULL). |
|
87 * @return none |
|
88 */ |
|
89 virtual void HandleRadioEngineCallBack(TFMRadioNotifyEvent aEventCode, TInt aErrorCode ) = 0; |
|
90 }; |
|
91 |
|
92 #endif //FMRADIOENGINESTATECHANGECALLBACK_H |
|
93 |
|
94 // End of file |