|
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 MPHONEAUDIOPLAYEROBSERVER_H |
|
19 #define MPHONEAUDIOPLAYEROBSERVER_H |
|
20 |
|
21 // User includes |
|
22 #include "phoneconstants.h" |
|
23 |
|
24 // Class declaration |
|
25 |
|
26 /** |
|
27 * Observer interface for audio player. |
|
28 * |
|
29 * @since 1.0 |
|
30 */ |
|
31 class MPhoneAudioPlayerObserver |
|
32 { |
|
33 public: // Constructors and destructor |
|
34 |
|
35 // Enumerates different failures. |
|
36 // |
|
37 // EAudioPlayerInitializingFailure - failure in initialising |
|
38 // EAudioPlayerPlayingFailure - failure during playing |
|
39 enum TPhoneAudioPlayerErrorEvent |
|
40 { |
|
41 EAudioPlayerInitializingFailure, |
|
42 EAudioPlayerPlayingFailure |
|
43 }; |
|
44 |
|
45 /** |
|
46 * Observe the error. |
|
47 * @param aEvent the error event happend in initializing or playing. |
|
48 * @param aError The error code return by audio server. Observer can |
|
49 * handle these two error code for recoverable |
|
50 * and unrecoverable errors. |
|
51 * @param aId Indicate which audio player is outof working. |
|
52 */ |
|
53 virtual void HandleAudioPlayerError( |
|
54 TPhoneAudioPlayerErrorEvent aEvent, |
|
55 TInt aError, |
|
56 TInt aId = KPhoneAudioPlayerNotSpecified ) = 0; |
|
57 |
|
58 /** |
|
59 * This function is called when audio player initialization complete. |
|
60 * @param aId The id of the audio player. |
|
61 */ |
|
62 virtual void HandleAudioPlayerInitComplete( |
|
63 TInt aId = KPhoneAudioPlayerNotSpecified ) = 0; |
|
64 |
|
65 /** |
|
66 * This funciton is called after the playing complete successfully. |
|
67 * @param aId The id of the audio player. |
|
68 */ |
|
69 virtual void HandlePlayingComplete( |
|
70 TInt aId = KPhoneAudioPlayerNotSpecified ) = 0; |
|
71 }; |
|
72 |
|
73 #endif // MPHONEAUDIOPLAYEROBSERVER_H |
|
74 |
|
75 // End of File |