|
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 Query state declaration |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 #ifndef C_BTASRVACCSTATEATTACH_H |
|
20 #define C_BTASRVACCSTATEATTACH_H |
|
21 |
|
22 #include "basrvaccstate.h" |
|
23 |
|
24 class CBasrvAccStateAttach : public CBasrvAccState |
|
25 { |
|
26 public: |
|
27 |
|
28 static CBasrvAccStateAttach* NewL(CBasrvAcc& aParent, TBool aConnecting); |
|
29 |
|
30 virtual ~CBasrvAccStateAttach(); |
|
31 |
|
32 /** |
|
33 * Entry of this state. |
|
34 * |
|
35 * @since S60 v3.1 |
|
36 */ |
|
37 void EnterL(); |
|
38 |
|
39 /** |
|
40 * Returns the next state if EnterL leaves. |
|
41 * |
|
42 * @since S60 v3.1 |
|
43 * @return the next state |
|
44 */ |
|
45 CBasrvAccState* ErrorOnEntry(TInt aReason); |
|
46 |
|
47 TBTEngConnectionStatus ConnectionStatus() const; |
|
48 |
|
49 /** |
|
50 * Cancel connecting to accessory |
|
51 */ |
|
52 void CancelConnect(); |
|
53 |
|
54 void DisconnectL(); |
|
55 |
|
56 |
|
57 /** |
|
58 * Called when the connection is disconnected from remote side or there |
|
59 * is error on reading/writing data packet. |
|
60 * @param aErr the error code of event |
|
61 */ |
|
62 void AccessoryDisconnectedL(TProfiles aProfile); |
|
63 |
|
64 protected: |
|
65 // From MBasrvActiveObserver |
|
66 |
|
67 /** |
|
68 * Handles the request completion event. |
|
69 * |
|
70 * @since S60 v3.1 |
|
71 * @param aActive the Active Object to which the request is assigned to. |
|
72 */ |
|
73 virtual void RequestCompletedL(CBasrvActive& aActive); |
|
74 |
|
75 /** |
|
76 * Handles the cancellation of an outstanding request. |
|
77 * |
|
78 * @since S60 v3.1 |
|
79 * @param aActive the Active Object to which the request is assigned to. |
|
80 */ |
|
81 virtual void CancelRequest(CBasrvActive& aActive); |
|
82 |
|
83 protected: |
|
84 |
|
85 /** |
|
86 * Default constructor |
|
87 */ |
|
88 CBasrvAccStateAttach(CBasrvAcc& aParent, TBool aConnecting); |
|
89 |
|
90 void ConstructL(); |
|
91 |
|
92 protected: |
|
93 CBasrvActive* iActive; |
|
94 TBool iConnecting; |
|
95 }; |
|
96 |
|
97 #endif // C_BTASRVACCSTATEATTACH_H |
|
98 |
|
99 // End of File |