|
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: The audio closing state declaration |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 #ifndef C_BTMSCLOSEAUDIO_H |
|
20 #define C_BTMSCLOSEAUDIO_H |
|
21 |
|
22 #include "btmsinuse.h" |
|
23 |
|
24 class CBtmSyncSock; |
|
25 |
|
26 /** |
|
27 * audio closing state |
|
28 * |
|
29 * This state is responsible to release sync socket connection with a BT device |
|
30 * |
|
31 * @since S60 v3.1 |
|
32 */ |
|
33 class CBtmsCloseAudio : public CBtmsInuse |
|
34 { |
|
35 public: |
|
36 |
|
37 static CBtmsCloseAudio* NewL(CBtmMan& aParent, TRequestStatus* aRequest, |
|
38 CBtmRfcommSock* aRfcomm, CBtmSyncSock* aSco); |
|
39 |
|
40 virtual ~CBtmsCloseAudio(); |
|
41 |
|
42 private: |
|
43 |
|
44 // From base class CBtmState |
|
45 |
|
46 /** |
|
47 * From CBtmState |
|
48 * Entry of this state. |
|
49 * |
|
50 * @since S60 v3.1 |
|
51 */ |
|
52 void EnterL(); |
|
53 |
|
54 /** |
|
55 * disconnect the connected accessory |
|
56 * |
|
57 * @since S60 v3.1 |
|
58 * @param aAddr the BD address of the accessory |
|
59 * @param aStatus On completion, will contain an error code |
|
60 */ |
|
61 void DisconnectL(const TBTDevAddr& aAddr, TRequestStatus& aStatus); |
|
62 |
|
63 /** |
|
64 * Cancel the outstanding operation |
|
65 * |
|
66 * @since S60 v3.1 |
|
67 */ |
|
68 void CancelCloseAudioLinkL(const TBTDevAddr& aAddr); |
|
69 |
|
70 // From base class CBtmsInuse |
|
71 |
|
72 /** |
|
73 * The interface for subclasses to handle RFComm error situations. |
|
74 * |
|
75 * @since S60 v3.1 |
|
76 * @param aErr the completion error code |
|
77 */ |
|
78 void RfcommErrorL(TInt aErr); |
|
79 |
|
80 // FRom base class MBtmSockObserver |
|
81 |
|
82 /** |
|
83 * Notification of a synchronous socket disconnect completion event. |
|
84 * |
|
85 * @since S60 v3.1 |
|
86 * @param aErr the completion error code |
|
87 */ |
|
88 void SyncLinkDisconnectCompleteL(TInt aErr); |
|
89 |
|
90 private: |
|
91 |
|
92 CBtmsCloseAudio(CBtmMan& aParent, TRequestStatus* aRequest, |
|
93 CBtmRfcommSock* aRfcomm, CBtmSyncSock* aSco); |
|
94 |
|
95 void ConstructL(); |
|
96 |
|
97 private: |
|
98 |
|
99 /** |
|
100 * The connected sync Socket. |
|
101 */ |
|
102 CBtmSyncSock* iSco; |
|
103 |
|
104 }; |
|
105 |
|
106 #endif // C_BTMSCLOSEAUDIO_H |
|
107 |