mmfenh/enhancedaudioplayerutility/AudioStreaming/AudioClientStreamSource/src/S60SourceEventDispatcher.h
equal
deleted
inserted
replaced
|
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: Definition of the S60 Audio Stream Source event dispatcher |
|
15 * |
|
16 */ |
|
17 |
|
18 #ifndef __CS60SOURCEEVENTDISPATCHER_H__ |
|
19 #define __CS60SOURCEEVENTDISPATCHER_H__ |
|
20 |
|
21 #include <e32base.h> |
|
22 #include <e32std.h> |
|
23 #include "MS60AudioStreamSourceObserver.h" |
|
24 |
|
25 /** |
|
26 Active object utility class to allow the callback to be called asynchronously. |
|
27 This should help prevent re-entrant code in clients of the mediaframework. |
|
28 */ |
|
29 class CS60SourceEventDispatcher : public CActive |
|
30 { |
|
31 |
|
32 enum TSourceEvent |
|
33 { |
|
34 ESeekSupportChanged, |
|
35 EBufferProcessed |
|
36 }; |
|
37 |
|
38 public: |
|
39 |
|
40 static CS60SourceEventDispatcher* NewL(MS60AudioStreamSourceObserver& aObserver); |
|
41 virtual ~CS60SourceEventDispatcher(); |
|
42 |
|
43 void SeekSupportChanged(); |
|
44 void BufferProcessed(CClientAudioBuffer& aBuffer, TInt aStatus); |
|
45 |
|
46 private: |
|
47 |
|
48 CS60SourceEventDispatcher(MS60AudioStreamSourceObserver& aObserver); |
|
49 |
|
50 void RunL(); |
|
51 void DoCancel(); |
|
52 |
|
53 private: |
|
54 MS60AudioStreamSourceObserver& iObserver; |
|
55 TSourceEvent iSourceEvent; |
|
56 CClientAudioBuffer* iBuffer; |
|
57 TInt iBufferStatus; |
|
58 |
|
59 }; |
|
60 |
|
61 #endif // __CS60SOURCEEVENTDISPATCHER_H__ |
|
62 |
|
63 // End of File |