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 the License "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 CRADIOACCESSORYOBSERVERSTUB_H |
|
19 #define CRADIOACCESSORYOBSERVERSTUB_H |
|
20 |
|
21 #include <AccessoryServer.h> |
|
22 #include <AccessoryConnection.h> |
|
23 #include <AccPolSubblockNameArray.h> |
|
24 #include <RadioStubManager.h> |
|
25 |
|
26 class MRadioHeadsetEventObserver; |
|
27 |
|
28 /** |
|
29 * Observer of accessory states. |
|
30 * |
|
31 * Instance of this class observes notifications of headset state changes. |
|
32 * In its turn it sends notifications to its observer of those changes. |
|
33 * |
|
34 */ |
|
35 NONSHARABLE_CLASS( CRadioAccessoryObserver ): public CBase |
|
36 { |
|
37 public: |
|
38 |
|
39 /** |
|
40 * C++ default constructor. |
|
41 */ |
|
42 CRadioAccessoryObserver(); |
|
43 |
|
44 /** |
|
45 * Static constructor. |
|
46 */ |
|
47 static CRadioAccessoryObserver* NewL(); |
|
48 |
|
49 /** |
|
50 * Destructor. |
|
51 */ |
|
52 virtual ~CRadioAccessoryObserver(); |
|
53 |
|
54 /** |
|
55 * Sets observer. The observer will be notified when headset has been |
|
56 * pressed or headset is connected/disconnected. |
|
57 * |
|
58 * @param aObserver Observer |
|
59 */ |
|
60 void SetObserver( MRadioHeadsetEventObserver* aObserver ); |
|
61 |
|
62 /** |
|
63 * Tells if there is a headset connected. |
|
64 * |
|
65 * @return <code>ETrue </code> if headset accessory is connected, |
|
66 * <code>EFalse</code> otherwise |
|
67 */ |
|
68 TBool IsHeadsetConnectedL() const; |
|
69 |
|
70 private: |
|
71 |
|
72 /** |
|
73 * By default Symbian 2nd phase constructor is private. |
|
74 * |
|
75 * @param aAccessoryServer Existing session for The Accessory Server. |
|
76 */ |
|
77 void ConstructL(); |
|
78 |
|
79 |
|
80 private: // data |
|
81 |
|
82 // RadioStubManager pointer points inside RadioStubManagerChunk |
|
83 SRadioStubManager* iRadioStubManager; |
|
84 |
|
85 // RadioStubManagerChunk handle |
|
86 RChunk iRadioStubManagerChunk; |
|
87 |
|
88 }; |
|
89 |
|
90 #endif // CRADIOACCESSORYOBSERVERSTUB_H |
|