|
1 /* |
|
2 * Copyright (c) 2005-2006 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 |
|
19 #ifndef C_BTASRVACC_H |
|
20 #define C_BTASRVACC_H |
|
21 |
|
22 #include <e32base.h> |
|
23 #include <bttypes.h> |
|
24 #include <btengconstants.h> |
|
25 #include <AccessoryTypes.h> |
|
26 #include "BTAccInfo.h" |
|
27 #include "btaccTypes.h" |
|
28 |
|
29 class CBasrvAccState; |
|
30 class TAccInfo; |
|
31 class CBasrvAccMan; |
|
32 class CBasrvPowerControlAgent; |
|
33 class CBasrvRvc; |
|
34 |
|
35 class CBasrvAcc : public CBase |
|
36 { |
|
37 public: |
|
38 static CBasrvAcc* NewL(CBasrvAccMan& aAccMan); |
|
39 |
|
40 static CBasrvAcc* NewLC(CBasrvAccMan& aAccMan); |
|
41 |
|
42 ~CBasrvAcc(); |
|
43 |
|
44 const TBTDevAddr& Remote(); |
|
45 |
|
46 void ConnectL(const TBTDevAddr& aAddr); |
|
47 |
|
48 void CancelConnect(); |
|
49 |
|
50 void DisconnectL(); |
|
51 |
|
52 void AccessoryConnectedL(const TBTDevAddr& aAddr, TProfiles aProfile); |
|
53 |
|
54 void AccOpenedAudio(TProfiles aProfile); |
|
55 |
|
56 void AccClosedAudio(TProfiles aProfile); |
|
57 |
|
58 void AccessoryDisconnectedL(TProfiles aProfile); |
|
59 |
|
60 const TAccInfo* AccInfo(const TBTDevAddr& aAddr); |
|
61 |
|
62 TAccInfo& AccInfo(); |
|
63 |
|
64 /** |
|
65 * Called when an audio open request comes from Acc FW. |
|
66 */ |
|
67 void OpenAudioL(TAccAudioType aType); |
|
68 |
|
69 /** |
|
70 * Called when an audio close request comes from Acc FW. |
|
71 */ |
|
72 void CloseAudioL(TAccAudioType aType); |
|
73 |
|
74 void ChangeStateL(CBasrvAccState* aNewState); |
|
75 |
|
76 CBasrvAccMan& AccMan(); |
|
77 |
|
78 TBTEngConnectionStatus ConnectionStatus() const; |
|
79 |
|
80 void RequestSniffMode(); |
|
81 |
|
82 void RequestActiveMode(); |
|
83 |
|
84 void CancelPowerModeControl(); |
|
85 |
|
86 void NotifyLinkChange2Rvc(); |
|
87 |
|
88 void PreventLowPowerMode(); |
|
89 |
|
90 void AllowLowPowerMode(); |
|
91 |
|
92 protected: |
|
93 |
|
94 /** |
|
95 * Default constructor |
|
96 */ |
|
97 CBasrvAcc(CBasrvAccMan& aAccMan); |
|
98 |
|
99 void ConstructL(); |
|
100 |
|
101 protected: |
|
102 CBasrvAccMan& iAccMan; |
|
103 |
|
104 CBasrvAccState* iState; |
|
105 |
|
106 TAccInfo iAccInfo; |
|
107 |
|
108 CBasrvPowerControlAgent* iPowerController; |
|
109 CBasrvRvc* iRvc; |
|
110 }; |
|
111 |
|
112 #endif // C_BTASRVACC_H |
|
113 |
|
114 // End of File |