|
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_BTASRVACCSTATEQUERY_H |
|
20 #define C_BTASRVACCSTATEQUERY_H |
|
21 |
|
22 #include "basrvaccstate.h" |
|
23 #include "basrvsdpquery.h" |
|
24 |
|
25 class CBasrvAccStateQuery : public CBasrvAccState, public MBasrvSdpQuerier |
|
26 { |
|
27 public: |
|
28 |
|
29 static CBasrvAccStateQuery* NewL(CBasrvAcc& aParent, TBool aConnectingRequest); |
|
30 |
|
31 virtual ~CBasrvAccStateQuery(); |
|
32 |
|
33 /** |
|
34 * Entry of this state. |
|
35 * |
|
36 * @since S60 v3.1 |
|
37 */ |
|
38 void EnterL(); |
|
39 |
|
40 /** |
|
41 * Returns the next state if EnterL leaves. |
|
42 * |
|
43 * @since S60 v3.1 |
|
44 * @return the next state |
|
45 */ |
|
46 CBasrvAccState* ErrorOnEntry(TInt aReason); |
|
47 |
|
48 TBTEngConnectionStatus ConnectionStatus() const; |
|
49 |
|
50 /** |
|
51 * Cancel connecting to accessory |
|
52 */ |
|
53 void CancelConnect(); |
|
54 |
|
55 void DisconnectL(); |
|
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 private: |
|
65 // From MBasrvSdpQuerier |
|
66 |
|
67 void GetAccInfoCompletedL(TInt aErr, const TAccInfo* aAcc, const TBTDeviceClass* aCod); |
|
68 |
|
69 private: |
|
70 |
|
71 CBasrvAccStateQuery(CBasrvAcc& aParent, TBool aConnectingRequest); |
|
72 |
|
73 void ConstructL(); |
|
74 |
|
75 void ResolveConflicts(RArray<TBTDevAddr>& aConflicts); |
|
76 |
|
77 private: |
|
78 CBasrvSdpQuery* iQuery; |
|
79 TBool iConnecting; |
|
80 }; |
|
81 |
|
82 #endif // C_BTASRVACCSTATEQUERY_H |
|
83 |
|
84 // End of File |