|
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 P&S listener. |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 #ifndef BTAUDIOPLAYERCONTROLLISTENER_H |
|
20 #define BTAUDIOPLAYERCONTROLLISTENER_H |
|
21 |
|
22 #include <e32base.h> |
|
23 #include <e32property.h> |
|
24 |
|
25 class MBmbPlayerControl |
|
26 { |
|
27 public: |
|
28 virtual void Pause() = 0; |
|
29 virtual void Play() = 0; |
|
30 }; |
|
31 |
|
32 class CBTAudioPlayerControlListener : public CActive |
|
33 { |
|
34 public: |
|
35 /** |
|
36 * Two-phased constructor. |
|
37 */ |
|
38 static CBTAudioPlayerControlListener* NewL(MBmbPlayerControl& aControl); |
|
39 |
|
40 /** |
|
41 * Destructor. |
|
42 */ |
|
43 ~CBTAudioPlayerControlListener(); |
|
44 |
|
45 private: |
|
46 /** |
|
47 * C++ default constructor. |
|
48 */ |
|
49 CBTAudioPlayerControlListener(MBmbPlayerControl& aControl); |
|
50 /** |
|
51 * By default Symbian 2nd phase constructor is private. |
|
52 */ |
|
53 void ConstructL(); |
|
54 |
|
55 public: |
|
56 /** |
|
57 * Starts asynchronous command handling |
|
58 * @param None |
|
59 * @return None |
|
60 */ |
|
61 void Start(); |
|
62 |
|
63 private: |
|
64 /** |
|
65 * From CActive. Called when asynchronous request completes. |
|
66 * @param None |
|
67 * @return None |
|
68 */ |
|
69 void RunL(); |
|
70 |
|
71 /** |
|
72 * From CActive. Cancels asynchronous request. |
|
73 * @param None |
|
74 * @return None |
|
75 */ |
|
76 void DoCancel(); |
|
77 |
|
78 public: |
|
79 /** |
|
80 * Returns the class status. |
|
81 * @param None |
|
82 * @return Status code. |
|
83 * @since 2.5 |
|
84 */ |
|
85 TInt Status() const; |
|
86 |
|
87 private: |
|
88 MBmbPlayerControl& iControl; |
|
89 |
|
90 RProperty iProperty; |
|
91 }; |
|
92 |
|
93 #endif |